Move counter initialization routine outside ruleset initialization code, so ruledit could use it
Done.
I realized I still cannot remove code from ruleset.c, but with current code reinitialize counters should be possible. From what should I known, I can reuse counter entry in counter's array? Does ruledit do that for other artifacts?
One bug gets fixed, sorry.
+ pcounter->ruledit_disabled = false;
Should be FALSE in freeciv C-code (we can use false in C++)
+#include <stdbool.h>
Include (utility/)support.h for getting bool defined by portable way (even when there's no stdbool.h header in the system)
Reply To cazfi
+ pcounter->ruledit_disabled = false; Should be FALSE in freeciv C-code (we can use false in C++) -- +#include <stdbool.h> Include (utility/)support.h for getting bool defined by portable way (even when there's no stdbool.h header in the system)
Patch seem to include unrelated changes (parts of #45891?), and build on top of the previous one instead of replacing it.
Currently, counter initialization code is placed inside ruleset loading code. This makes sense in past, because there was no other parts, which would use it. Currently, ruledit need to reinitialize and initialize counters, what means ruledit_enable is set to default value, name struct was free/reinitialized, etc.