Open dahaic opened 5 years ago
screw my last update, just read down further..... line numbers are off by 2 (see above fix)
--------------------------------------------------ORIGINAL CODE-------------------------------------------------- 166 addAttr('missileDef', _('Missile defence'), V_SEQUIP|VEFF, 0) 167 addAttr('combatAttPerc', ('Combat defense (extra)'), V_SEQUIP|V_HULL|V_EFF, 0, default=1, convertor = percBase12Text) 168 addAttr('combatDefPerc', ('Combat attack (extra)'), V_SEQUIP|V_HULL|V_EFF, 0, default=1, convertor = percBase12Text) 169 addAttr('missileDefPerc', ('Missile defence (extra)'), V_SEQUIP|V_EFF, 0, default=1, convertor = percBase1_2Text)
--------------------------------------------------MODIFIED CODE-------------------------------------------------- 168 addAttr('missileDef', _('Missile defence'), V_SEQUIP|VEFF, 0) 169 addAttr('combatAttPerc', ('Combat attack (extra)'), V_SEQUIP|V_HULL|V_EFF, 0, default=1, convertor = percBase12Text) 170 addAttr('combatDefPerc', ('Combat defence (extra)'), V_SEQUIP|V_HULL|V_EFF, 0, default=1, convertor = percBase12Text) 171 addAttr('missileDefPerc', ('Missile defence (extra)'), V_SEQUIP|V_EFF, 0, default=1, convertor = percBase1_2Text)
TechInfoDlg.py update to LINE# 135 addAttr('refuelInc', ('Refuel increase percent'), V_STRUCT|V_EFF, 0, convertor = perc1002Text) ----------------------------------BEGIN INSERT---------------------------------- 136 addAttr('repairShip', ('Ship repair percent'), V_STRUCT|VEFF, 0, convertor = float) 137 addAttr('upgradeShip', ('Upgrade points'), V_STRUCT|VEFF, 0) ----------------------------------END INSERT---------------------------------- 138 addAttr('trainShipInc', ('Exp. points per turn'), V_STRUCT|V_EFF, 0, convertor = float)
after typing up the fix, had to go back and correct original dirty hack (some days I am bad at formatting, deleted old post.
I got annoyed at seeing the value displayed as a decimal, sooooooo, i added a function, so it can be used wherever else someone feels they need a more concise display.
61 def percBase100(value): 62 string=_('%d%%') % (value * 100) 63 return string 64
138 addAttr('trainShipInc', _('Exp. points per turn'), V_STRUCT|V_EFF, 0, convertor = percBase100) of course line 138 becomes 142 (if I suggest changes from my fork, I would not have to refer to line #'s, blegh)
Battle Tag reports bonus to Combat defense, when in reality it boosts combat attack. Space Port/Space Docks .. do not show Repair Ratio and Upgrade points.