Done and tested (in real workload).
Hmm... yeah, maybe it makes sense to implement this one before #41123 after all - given that this adds setting of counter 'index' on the server side.
The "game.h" include should be in "/* common */" includes section, and the source file's own header ("counters.h") should be last, in a section of it's own.
Reply To cazfi
Hmm... yeah, maybe it makes sense to implement this one before #41123 after all - given that this adds setting of counter 'index' on the server side. --- The "game.h" include should be in "/* common */" includes section, and the source file's own header ("counters.h") should be last, in a section of it's own.
I forgot to reply. Is the:
2022-08-09 04:09 Updated by: lachu
correct?
Works nicely. I noticed that it does allow adding multiple counters by the same name, which obviously leads to problems, but let's investigate that in a new ticket (likely counters are not the only ruleset item affected)
Reply To cazfi
I noticed that it does allow adding multiple counters by the same name, which obviously leads to problems, but let's investigate that in a new ticket (likely counters are not the only ruleset item affected)
-> #45428
Tested some other ruleset items, and ruleset loading time sanity checking wasn't catching them either.
While still having City Owned counter as the only supported counter type, add support multiple counters of that type. The counters can differ from each other by their rule_name and checkpoint.
Test by introducing two City Owned counters with different checkpoints. That way there should be three different situations; 1) neither counter has reached checkpoint, 2) first counter has reached checkpoint, 3) both counters have reached checkpoints. Introduce two effects that have these counters as requirements to see that these situations do happen.