|
As I was playing around with effects it came up that the ordering was not always as expected, which is species first, specials, techs, buildings and then ships (as they are loaded in Universe::GetEffectsAndTargets).
The cause of this was due to them being stored as a map, however, they are never accessed by key, only iterated over.
When it came to Universe::ExecuteEffects there was no guarantee that they would be executed in the order they were loaded.
This patch is a simple refactoring from being a map to a vector of pairs.
Please review.
Edit: Not all the variables were renamed consistently to remove the _map suffix, this has been fixed in the patch now. Also, some comments were referring to a variable name from some other previous revision, with inconsistencies between the header and the code files with comments and variable names. In other words, grooming/maintenance.
|