待辦事項 #41122

Support for multiple counters of the same type

啟用日期: 2021-01-08 15:48 最後更新: 2022-12-03 00:36

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:
3

細節

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 (無) to cazfi
  • 處理結果 Update from 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
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正
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

編輯

Please login to add comment to this ticket » 登入