Merge remote-tracking branch 'origin/master' into attrGroup
# Conflicts: # eve.db
@@ -24,9 +24,9 @@ saveInRoot = False
|
||||
|
||||
# Version data
|
||||
|
||||
version = "2.5.0b1"
|
||||
version = "2.5.0"
|
||||
tag = "Stable"
|
||||
expansionName = "YC120.8"
|
||||
expansionName = "YC120.10"
|
||||
expansionVersion = "1.0"
|
||||
evemonMinVersion = "4081"
|
||||
|
||||
|
||||
7
eos/effects/emergencyhullenergizer.py
Normal file
@@ -0,0 +1,7 @@
|
||||
type = "active"
|
||||
runtime = "late"
|
||||
|
||||
|
||||
def handler(fit, src, context):
|
||||
for dmgType in ('em', 'thermal', 'kinetic', 'explosive'):
|
||||
fit.ship.forceItemAttr('{}DamageResonance'.format(dmgType), src.getModifiedItemAttr("hull{}DamageResonance".format(dmgType.title())))
|
||||
@@ -1,10 +1,13 @@
|
||||
type = "passive"
|
||||
type = "active"
|
||||
|
||||
|
||||
def handler(fit, src, context):
|
||||
fit.ship.increaseItemAttr("warpScrambleStatus", src.getModifiedItemAttr("warpScrambleStrength"))
|
||||
fit.ship.boostItemAttr("mass", src.getModifiedItemAttr("massBonusPercentage"), stackingPenalties=True)
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Afterburner"), "speedFactor", src.getModifiedItemAttr("speedFactorBonus"), stackingPenalties=True)
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Afterburner"), "speedBoostFactor", src.getModifiedItemAttr("speedBoostFactorBonus"))
|
||||
fit.modules.filteredItemIncrease(lambda mod: mod.item.requiresSkill("High Speed Maneuvering"), "activationBlocked", src.getModifiedItemAttr("activationBlockedStrenght"))
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Afterburner"), "speedFactor",
|
||||
src.getModifiedItemAttr("speedFactorBonus"), stackingPenalties=True)
|
||||
fit.modules.filteredItemBoost(lambda mod: mod.item.requiresSkill("Afterburner"), "speedBoostFactor",
|
||||
src.getModifiedItemAttr("speedBoostFactorBonus"))
|
||||
fit.modules.filteredItemIncrease(lambda mod: mod.item.requiresSkill("High Speed Maneuvering"), "activationBlocked",
|
||||
src.getModifiedItemAttr("activationBlockedStrenght"))
|
||||
fit.ship.boostItemAttr("maxVelocity", src.getModifiedItemAttr("maxVelocityBonus"), stackingPenalties=True)
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
import wx
|
||||
import math
|
||||
|
||||
from gui.utils import anim_effects
|
||||
import math
|
||||
|
||||
import wx
|
||||
|
||||
@@ -73,7 +73,11 @@ class BitmapLoader(object):
|
||||
|
||||
@classmethod
|
||||
def getImage(cls, name, location):
|
||||
return cls.getBitmap(name, location).ConvertToImage()
|
||||
bmp = cls.getBitmap(name, location)
|
||||
if bmp is not None:
|
||||
return bmp.ConvertToImage()
|
||||
else:
|
||||
return None
|
||||
|
||||
@classmethod
|
||||
def loadBitmap(cls, name, location):
|
||||
|
||||
@@ -76,10 +76,11 @@ class ImplantView(wx.Panel):
|
||||
|
||||
def OnRadioSelect(self, event):
|
||||
fitID = self.mainFrame.getActiveFit()
|
||||
sFit = Fit.getInstance()
|
||||
sFit.toggleImplantSource(fitID, ImplantLocation.FIT if self.rbFit.GetValue() else ImplantLocation.CHARACTER)
|
||||
if fitID is not None:
|
||||
sFit = Fit.getInstance()
|
||||
sFit.toggleImplantSource(fitID, ImplantLocation.FIT if self.rbFit.GetValue() else ImplantLocation.CHARACTER)
|
||||
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
|
||||
|
||||
|
||||
class ImplantDisplay(d.Display):
|
||||
|
||||
@@ -2,6 +2,7 @@ import wx
|
||||
from eos.saveddata.module import Module, State
|
||||
import eos.db
|
||||
from logbook import Logger
|
||||
from service.fit import Fit
|
||||
pyfalog = Logger(__name__)
|
||||
|
||||
|
||||
@@ -23,6 +24,7 @@ class FitAddModuleCommand(wx.Command):
|
||||
self.replace_cmd = None
|
||||
|
||||
def Do(self):
|
||||
sFit = Fit.getInstance()
|
||||
fitID = self.fitID
|
||||
itemID = self.itemID
|
||||
fit = eos.db.getFit(fitID)
|
||||
@@ -57,7 +59,7 @@ class FitAddModuleCommand(wx.Command):
|
||||
# As some items may affect state-limiting attributes of the ship, calculate new attributes first
|
||||
# self.recalc(fit)
|
||||
# Then, check states of all modules and change where needed. This will recalc if needed
|
||||
# self.checkStates(fit, m)
|
||||
sFit.checkStates(fit, self.module)
|
||||
|
||||
# fit.fill()
|
||||
eos.db.commit()
|
||||
|
||||
@@ -30,7 +30,7 @@ class FitChangeStatesCommand(wx.Command):
|
||||
|
||||
def Do(self):
|
||||
fit = eos.db.getFit(self.fitID)
|
||||
|
||||
sFit = Fit.getInstance()
|
||||
baseMod = fit.modules[self.baseModPos]
|
||||
|
||||
# make sure positions only include non-empty positions
|
||||
@@ -61,6 +61,7 @@ class FitChangeStatesCommand(wx.Command):
|
||||
# As some items may affect state-limiting attributes of the ship, calculate new attributes first
|
||||
# self.recalc(fit)
|
||||
# # Then, check states of all modules and change where needed. This will recalc if needed
|
||||
sFit.checkStates(fit, baseMod)
|
||||
# self.checkStates(fit, base)
|
||||
return True
|
||||
return False
|
||||
|
||||
BIN
imgs/icons/10886@1x.png
Normal file
|
After Width: | Height: | Size: 773 B |
BIN
imgs/icons/10886@2x.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
imgs/icons/10887@1x.png
Normal file
|
After Width: | Height: | Size: 787 B |
BIN
imgs/icons/10887@2x.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 815 B |
|
Before Width: | Height: | Size: 2.3 KiB |
BIN
imgs/icons/22042@1x.png
Normal file
|
After Width: | Height: | Size: 849 B |
BIN
imgs/icons/22042@2x.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
BIN
imgs/renders/22233@1x.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
imgs/renders/22233@2x.png
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
imgs/renders/22234@1x.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
imgs/renders/22234@2x.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 7.0 KiB |
@@ -65,8 +65,8 @@ graphics = graphicIDsLoader.load(os.path.join(to_path, 'graphicIDs.fsdbinary'))
|
||||
|
||||
graphics_py_ob = {}
|
||||
for x, v in graphics.items():
|
||||
if hasattr(v, 'iconFolder'):
|
||||
graphics_py_ob[x] = v.iconFolder
|
||||
if hasattr(v, 'iconInfo') and hasattr(v.iconInfo, 'folder'):
|
||||
graphics_py_ob[x] = v.iconInfo.folder
|
||||
|
||||
# Add children to market group list
|
||||
# {parent: {children}}
|
||||
@@ -230,7 +230,11 @@ if toadd:
|
||||
print(('Adding {} icons...'.format(len(toadd))))
|
||||
missing = set()
|
||||
for fname in sorted(toadd):
|
||||
key = graphics_py_ob[int(fname)]
|
||||
try:
|
||||
key = graphics_py_ob[int(fname)]
|
||||
except KeyError:
|
||||
print("Can't find graphicID {}".format(fname))
|
||||
|
||||
key = "{}/{}_64.png".format(key, fname)
|
||||
|
||||
for i in range(2):
|
||||
|
||||
@@ -558,9 +558,10 @@ class Fit(FitDeprecated):
|
||||
drone.amountActive = 0
|
||||
changed = True
|
||||
|
||||
return changed
|
||||
# If any state was changed, recalculate attributes again
|
||||
if changed:
|
||||
self.recalc(fit)
|
||||
# if changed:
|
||||
# self.recalc(fit)
|
||||
|
||||
def refreshFit(self, fitID):
|
||||
pyfalog.debug("Refresh fit for fit ID: {0}", fitID)
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
import inspect
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
import sys
|
||||
import traceback
|
||||
import json
|
||||
import json
|
||||
from math import log
|
||||
|
||||
from logbook import Logger
|
||||
|
||||
import eos.db
|
||||
|
||||
from math import log
|
||||
from config import version as pyfaVersion
|
||||
from eos.db import gamedata_session, getAttributeInfo, getCategory, getGroup
|
||||
from eos.effectHandlerHelpers import HandledList
|
||||
from eos.enum import Enum
|
||||
from eos.gamedata import Attribute, Effect, Group, Item, ItemEffect
|
||||
from eos.saveddata.drone import Drone
|
||||
from eos.saveddata.module import Hardpoint, Module, Slot, State
|
||||
from service.fit import Fit
|
||||
from service.market import Market
|
||||
|
||||
from eos.enum import Enum
|
||||
from eos.saveddata.module import Hardpoint, Slot, Module, State
|
||||
from eos.saveddata.drone import Drone
|
||||
from eos.effectHandlerHelpers import HandledList
|
||||
from eos.db import gamedata_session, getItemsByCategory, getCategory, getAttributeInfo, getGroup
|
||||
from eos.gamedata import Category, Group, Item, Traits, Attribute, Effect, ItemEffect
|
||||
from logbook import Logger
|
||||
pyfalog = Logger(__name__)
|
||||
|
||||
|
||||
@@ -26,9 +29,9 @@ class RigSize(Enum):
|
||||
CAPITAL = 4
|
||||
|
||||
|
||||
class EfsPort:
|
||||
class EfsPort():
|
||||
wepTestSet = {}
|
||||
version = 0.01
|
||||
version = 0.02
|
||||
|
||||
@staticmethod
|
||||
def attrDirectMap(values, target, source):
|
||||
@@ -88,12 +91,10 @@ class EfsPort:
|
||||
oldPropState = propWithBloom.state
|
||||
propWithBloom.state = State.ONLINE
|
||||
sFit.recalc(fit)
|
||||
fit = eos.db.getFit(fitID)
|
||||
sp = fit.maxSpeed
|
||||
sig = fit.ship.getModifiedItemAttr("signatureRadius")
|
||||
propWithBloom.state = oldPropState
|
||||
sFit.recalc(fit)
|
||||
fit = eos.db.getFit(fitID)
|
||||
return {"usingMWD": True, "unpropedSpeed": sp, "unpropedSig": sig}
|
||||
return {
|
||||
"usingMWD": False,
|
||||
@@ -150,6 +151,13 @@ class EfsPort:
|
||||
elif mod.item.group.name == "Warp Scrambler":
|
||||
stats["type"] = "Warp Scrambler"
|
||||
EfsPort.attrDirectMap(["activationBlockedStrenght", "warpScrambleStrength"], stats, mod)
|
||||
elif mod.item.group.name == "Warp Disrupt Field Generator":
|
||||
maxRangeDefault = mod.getModifiedItemAttr("warpScrambleRange")
|
||||
stats["type"] = "Warp Scrambler"
|
||||
EfsPort.attrDirectMap(["activationBlockedStrenght", "warpScrambleStrength"], stats, mod)
|
||||
if maxRangeDefault >= 30000:
|
||||
# We want this to be 0 for disruption scripts as we have no other way to tell scrams from points.
|
||||
stats["activationBlockedStrenght"] = 0
|
||||
elif mod.item.group.name == "Target Painter":
|
||||
stats["type"] = "Target Painter"
|
||||
EfsPort.attrDirectMap(["signatureRadiusBonus"], stats, mod)
|
||||
@@ -313,10 +321,13 @@ class EfsPort:
|
||||
explosionRadius = 0
|
||||
explosionVelocity = 0
|
||||
aoeFieldRange = 0
|
||||
if stats.charge:
|
||||
name = stats.item.name + ", " + stats.charge.name
|
||||
else:
|
||||
name = stats.item.name
|
||||
if stats.hardpoint == Hardpoint.TURRET:
|
||||
tracking = stats.getModifiedItemAttr("trackingSpeed")
|
||||
typeing = "Turret"
|
||||
name = stats.item.name + ", " + stats.charge.name
|
||||
# Bombs share most attributes with missiles despite not needing the hardpoint
|
||||
elif stats.hardpoint == Hardpoint.MISSILE or "Bomb Launcher" in stats.item.name:
|
||||
maxVelocity = stats.getModifiedChargeAttr("maxVelocity")
|
||||
@@ -325,15 +336,18 @@ class EfsPort:
|
||||
explosionRadius = stats.getModifiedChargeAttr("aoeCloudSize")
|
||||
explosionVelocity = stats.getModifiedChargeAttr("aoeVelocity")
|
||||
typeing = "Missile"
|
||||
name = stats.item.name + ", " + stats.charge.name
|
||||
elif stats.hardpoint == Hardpoint.NONE:
|
||||
aoeFieldRange = stats.getModifiedItemAttr("empFieldRange")
|
||||
# This also covers non-bomb weapons with dps values and no hardpoints, most notably targeted doomsdays.
|
||||
typeing = "SmartBomb"
|
||||
name = stats.item.name
|
||||
# Targeted DDs are the only non drone/fighter weapon without an explict max range
|
||||
if stats.item.group.name == 'Super Weapon' and stats.maxRange == None:
|
||||
maxRange = 300000
|
||||
else:
|
||||
maxRange = stats.maxRange
|
||||
statDict = {
|
||||
"dps": stats.dps * n, "capUse": stats.capUse * n, "falloff": stats.falloff,
|
||||
"type": typeing, "name": name, "optimal": stats.maxRange,
|
||||
"type": typeing, "name": name, "optimal": maxRange,
|
||||
"numCharges": stats.numCharges, "numShots": stats.numShots, "reloadTime": stats.reloadTime,
|
||||
"cycleTime": stats.cycleTime, "volley": stats.volley * n, "tracking": tracking,
|
||||
"maxVelocity": maxVelocity, "explosionDelay": explosionDelay, "damageReductionFactor": damageReductionFactor,
|
||||
@@ -497,7 +511,7 @@ class EfsPort:
|
||||
|
||||
# Since the effect modules are fairly opaque a mock test fit is used to test the impact of traits.
|
||||
# standin class used to prevent . notation causing issues when used as an arg
|
||||
class standin:
|
||||
class standin():
|
||||
pass
|
||||
tf = standin()
|
||||
tf.modules = HandledList(turrets + launchers)
|
||||
|
||||
@@ -235,4 +235,4 @@ class PriceWorkerThread(threading.Thread):
|
||||
|
||||
|
||||
# Import market sources only to initialize price source modules, they register on their own
|
||||
from .marketSources import *
|
||||
from service.marketSources import evemarketer, evemarketdata # noqa: E402
|
||||
|
||||