Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research Info page wrong or incomplete #270

Open
dahaic opened this issue Sep 22, 2018 · 3 comments
Open

Research Info page wrong or incomplete #270

dahaic opened this issue Sep 22, 2018 · 3 comments
Labels
Milestone

Comments

@dahaic
Copy link
Contributor

dahaic commented Sep 22, 2018

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.

@dahaic dahaic added the bug label Sep 22, 2018
@dahaic dahaic added this to the 0.5.75 milestone Sep 22, 2018
@temuchin-
Copy link

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|V_EFF, 0)
167 addAttr('combatAttPerc', _('Combat defense (extra)'), V_SEQUIP|V_HULL|V_EFF, 0, default=1, convertor = percBase1_2Text)
168 addAttr('combatDefPerc', _('Combat attack (extra)'), V_SEQUIP|V_HULL|V_EFF, 0, default=1, convertor = percBase1_2Text)
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|V_EFF, 0)
169 addAttr('combatAttPerc', _('Combat attack (extra)'), V_SEQUIP|V_HULL|V_EFF, 0, default=1, convertor = percBase1_2Text)
170 addAttr('combatDefPerc', _('Combat defence (extra)'), V_SEQUIP|V_HULL|V_EFF, 0, default=1, convertor = percBase1_2Text)
171 addAttr('missileDefPerc', _('Missile defence (extra)'), V_SEQUIP|V_EFF, 0, default=1, convertor = percBase1_2Text)

@temuchin-
Copy link

TechInfoDlg.py update to
LINE#
135 addAttr('refuelInc', ('Refuel increase percent'), V_STRUCT|V_EFF, 0, convertor = perc100_2Text)
----------------------------------BEGIN INSERT----------------------------------
136 addAttr('repairShip', _('Ship repair percent'), V_STRUCT|V_EFF, 0, convertor = float)
137 addAttr('upgradeShip', _('Upgrade points'), V_STRUCT|V_EFF, 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.

@temuchin-
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants