#44345: Load counter from ruleset Open Date: 2022-04-13 06:06 Last Update: 2022-04-24 22:37 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/44345 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44345 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-04-24 22:37 Updated by: cazfi Comment: This looks mostly good already. Couple of things I noticed on quick reading: - int num = nval; /* No "size_t" to printf */ -> Please use the SIZE_T_PRINTF macro instead of tricks like this (which may fail itself on some environments as size_t > int) - In an error situation you section_list_destroy() twice - once when you detect the error, but still also in the end of handling - Don't name variable outside macros, or similar constructs, from using namespace '*_'. You have 'curr_' named like that for no reason (and potentially conflicting with macro calls we later add there) - Matter of taste, but I wouldn't have default value (of 1) for checkpoint, but to make it mandatory field instead --- What you need to add: - Saving the rules in tools/ruleutil/rulesave.c - Documentation in rulesets (but we probably want to agree on one copy first, before having it copied to all supplied rulesets --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: (None) Type: Patches Status: Open Priority: 5 - Medium MileStone: 3.2.0 Component: General Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: Originally: #41121 Replace internal City Owned counter definition by loading zero or one counter definitions from the ruleset. There's no need to send the info to client yet. -- 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/44345 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44345