Caesium
Radiant!
- Joined
- Jan 14, 2006
- Messages
- 526
As reported earlier there is a bug in the MainInterface, when pointing on an air unit:
I get python exceptions when selecting air units (Airships at least).
Something about airCurrCombatStr being called with different C++ signature (in CvMainInterface.py).
This has to do with the unit info pane... I found the call, in line 1835
fCurrStrength = float(pUnit.airCurrCombatStr()*0.01)
if you change that to
fCurrStrength = float(pUnit.airBaseCombatStr())*float(1.0-pUnit.getDamage()*0.01)
and also replace airMaxCombatStr by airBaseCombatStr in the next line (and remove the *0.01), it should work.
Best Regards,
Ace
So I looked into the normal code that displays strength for air units, and it is using getBaseAirCombat(). I didn't want to switch to the method used for land units without investigating. Therefore, while the above code works, it may differ from the game's display.
I'll copy the code used by the regular game to fix this problem correctly. I have some outstanding changes to my CvMainInterface.py that are causing a small delay, but I hope to do that tonight.
Is Ace Of Spade's code correct or are you going to release another code?
----------
The posted autolog bugs were related to Revolution Mod.Here's a new one:Code:File "CvMainInterface", line 1163, in tempMove ArgumentError: Python argument types in CyUnit.setXY(CyUnit, int, int) did not match C++ signature: setXY(class CyUnit {lvalue}, int, int, bool, bool, bool) ERR: Python function handleInput failed, module CvScreensInterface[/quote]
The shown bug's line is the same as in your svn.
Could you please give me a solution for this one?
But these two bugs above are still in the MainInterface.py and I'm still interested in getting rid of them.