CQUI-Org / cqui

Civilization 6 - Chao's Quick UI. Reduce clicks and manage your empire faster!
MIT License
318 stars 64 forks source link

Real Housing - recalculate values only when they changed #569

Closed bollbas closed 7 years ago

bollbas commented 7 years ago

Previously real housing from improvements function was recalculating data every time between turns or when changing city focus or changing government and so on. And as soon as housing from improvements never changes on these actions now we don't recalculate the same values and take them from a table. We recalculate these values when tiles improved/pillaged, when swap tiles and when tiles lost by a culture bomb only. This should also improve performance a bit. This PR is related to #545 and #556

chaorace commented 7 years ago

I'm having a similar issue with this commit as #556. Your text editor is mangling the trailing whitespace in these files, which is making the diffs much harder to read. I don't have an issue with removing trailing whitespace, but please isolate the whitespace changes into a separate commit.