Nightinggale
Deity
- Joined
- Feb 2, 2009
- Messages
- 5,281
I commited a major update to the tech advisor. The tech screen can now be displayed without python errors. However it's not drawn as intended. More precisely requirements aren't drawn yet, nor are the arrows. While I know what to do about those issues, there is a bigger issue, which is not all tech boxes are drawn and right now I have no idea why. Maybe the problem solves itself when all cases of canDoCivic() and similar are updated.
I added a check to ensure only techs are drawn. Without that check, perks are drawn too, but the XML (X,Y) values made them appear on top of the techs (which spoils the view for both types). This mean perks are drawn as intended and that the code can handle both perks and techs in the same tree just fine.
Back when I added PlotGroups, I copied some python exposure code from BTS without fully knowing why vanilla has it and then I forgot about it. Now I ran into big problems and after investigating the problem (as well as some ), I figured out not only how to make a proper python exposure, but also how and why it works. This mean I now know how to add both C++ classes and enums to python, complete with functions and everything, which sort of make python way more powerful (though still slower than pure C++). I think I better start writing some modder's programing guide or something for the next time we need this.
I added a python class for InfoArray. This mean the code written for C++ can be exposed to python using only a single line of code. That should make things easier inside the DLL. I wonder if I should do the same with JIT arrays, though the need is not as great as with InfoArrays.
I added a check to ensure only techs are drawn. Without that check, perks are drawn too, but the XML (X,Y) values made them appear on top of the techs (which spoils the view for both types). This mean perks are drawn as intended and that the code can handle both perks and techs in the same tree just fine.
Back when I added PlotGroups, I copied some python exposure code from BTS without fully knowing why vanilla has it and then I forgot about it. Now I ran into big problems and after investigating the problem (as well as some ), I figured out not only how to make a proper python exposure, but also how and why it works. This mean I now know how to add both C++ classes and enums to python, complete with functions and everything, which sort of make python way more powerful (though still slower than pure C++). I think I better start writing some modder's programing guide or something for the next time we need this.
I added a python class for InfoArray. This mean the code written for C++ can be exposed to python using only a single line of code. That should make things easier inside the DLL. I wonder if I should do the same with JIT arrays, though the need is not as great as with InfoArrays.