Ticket #41122

Support for multiple counters of the same type

오픈 날짜: 2021-01-08 15:48 마지막 업데이트: 2022-12-03 00:36

Reporter:
소유자:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
3

Details

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.

Ticket History (3/15 Histories)

2021-01-08 15:48 Updated by: cazfi
  • New Ticket "Support for multiple counters of the same type" created
2022-08-01 19:22 Updated by: lachu
2022-08-01 19:22 Updated by: lachu
  • File 0001-OSDN-41122-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 9995) is deleted
2022-08-01 19:24 Updated by: lachu
댓글 올리기

Done and tested (in real workload).

2022-08-06 14:26 Updated by: 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.

2022-08-09 04:09 Updated by: lachu
  • File 0001-OSDN-41122-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 10045) is attached
2022-08-09 04:09 Updated by: lachu
  • File 0001-OSDN-41122-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 10045) is deleted
2022-08-12 04:59 Updated by: lachu
댓글 올리기

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

File 0001-OSDN-41122-S-awomir-Lach-slawek-lach.art.pl.patch (File ID: 10046) is attached

correct?

2022-08-21 14:53 Updated by: cazfi
  • 소유자 Update from (None) to cazfi
  • Resolution Update from None to Accepted
댓글 올리기

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)

2022-08-23 05:06 Updated by: cazfi
댓글 올리기

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.

2022-08-23 05:59 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed
2022-12-03 00:15 Updated by: lachu
댓글 올리기

I need to add counter initialization routines somewhere. I think this ticket is related. Reopen it? Counter initialization is needed for #45892 and #45891 . Should I just create a new ticket? Currently initialization was part of ruleset loading routines.

2022-12-03 00:36 Updated by: cazfi
댓글 올리기

Reply To lachu

I need to add counter initialization routines somewhere. I think this ticket is related. Reopen it? Counter initialization is needed for #45892 and #45891 . Should I just create a new ticket? Currently initialization was part of ruleset loading routines.

New ticket.

Attachment File List

Edit

Please login to add comment to this ticket » Login