#47697: Counter description Open Date: 2023-03-26 13:49 Last Update: 2023-04-24 01:07 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/47697 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47697 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2023-04-24 01:07 Updated by: cazfi Comment: +void counters_free(void); It's already declared in counters.h. --- void counters_init(void) { + if (0 < game.control.num_counters) { + counters_free(); + } I'm not sure if game.control.num_counters is initialized at all when _init() gets called the very first time. Also, I think counters follow (or they should follow) the common pattern that there's always matching _free() call for each _init(), so this kind of code should never be needed. One could make it an assert, if one suspects that _free() might have not been called properly: "fc_assert(game.control.num_counters == 0);" --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: (None) Type: Patches Status: Open Priority: 5 - Medium MileStone: S3_2 npf Component: General Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: If we're going to show known counter values to the user on the client side, we should provide also longer explanation for them instead of just name. This ticket is about adding such explanation to the ruleset format, and communicating it to client. -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/47697 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=47697