Nightinggale
Deity
- Joined
- Feb 2, 2009
- Messages
- 5,281
The problem is more fundamental than that. You are talking about redrawing while the problem appears to be that once each box is set, it's fixed and can't be removed. The method of removing it is to discard everything and build up a new screen, which likely isn't a good idea in CvMainInterface.py.
Moving all city related stuff into a function of it's own would most likely solve the problem. However how much work is that?
I think I will try to build the multiple tables. I'm actually fairly close considering how my current code is at the moment. Also the function to tell if a yield is inventable should also be fairly simple. Just add a bool to CvYieldInfo and set it to false by default. After XML is loaded, loop though all inventions and for every new yield gained by an invention, set the bool to true. Then make a python function to get that bool.
That function could also be used to improve the yield page on Colopedia.
Moving all city related stuff into a function of it's own would most likely solve the problem. However how much work is that?
I think I will try to build the multiple tables. I'm actually fairly close considering how my current code is at the moment. Also the function to tell if a yield is inventable should also be fairly simple. Just add a bool to CvYieldInfo and set it to false by default. After XML is loaded, loop though all inventions and for every new yield gained by an invention, set the bool to true. Then make a python function to get that bool.
That function could also be used to improve the yield page on Colopedia.