Cross posted from #812
From saveddata.fit:
@property
def tank(self):
hps = {"passiveShield" : self.calculateShieldRecharge()}
for type in ("shield", "armor", "hull"):
hps["%sRepair" % type] = self.extraAttributes["%sRepair" % type]
return hps
Turns out that this is using the base amounts. So for example, a small AAR on an unbonused ship with V skills and Improved Exile will give 78 HP for armorDamageAmount (current/actual). If, however, you look at self.extraAttributes, you get 52 (base).
Digging into it, I can see why.
self.extraAttributes is set when we run effects. For example
# shieldBoosting
#
# Used by:
# Modules from group: Shield Booster (93 of 93)
runTime = "late"
type = "active"
def handler(fit, module, context):
amount = module.getModifiedItemAttr("shieldBonus")
speed = module.getModifiedItemAttr("duration") / 1000.0
fit.extraAttributes.increase("shieldRepair", amount / speed)
While this one is late, not all of them are. Plus, if we set something else to run late (like maybe something that modifies boost amount) there's nothing that forces them to run before this effect runs.
TL;DR: can't trust the extraAttributes. Awesome. This is probably a bigger issue with many things we set in extraAttributes and not just repairs.
Cross posted from #812
From
saveddata.fit:Turns out that this is using the base amounts. So for example, a small AAR on an unbonused ship with V skills and Improved Exile will give 78 HP for
armorDamageAmount(current/actual). If, however, you look atself.extraAttributes, you get 52 (base).Digging into it, I can see why.
self.extraAttributesis set when we run effects. For exampleWhile this one is late, not all of them are. Plus, if we set something else to run late (like maybe something that modifies boost amount) there's nothing that forces them to run before this effect runs.
TL;DR: can't trust the
extraAttributes. Awesome. This is probably a bigger issue with many things we set inextraAttributesand not just repairs.