Author: cazfi Date: Fri Aug 26 08:50:08 2016 New Revision: 33712 URL: http://svn.gna.org/viewcvs/freeciv?rev=33712&view=rev Log: Do not save items marked removed to the ruleset.
See bug #25008 Modified: trunk/tools/ruleutil/rulesave.c Modified: trunk/tools/ruleutil/rulesave.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/tools/ruleutil/rulesave.c?rev=33712&r1=33711&r2=33712&view=diff ============================================================================== --- trunk/tools/ruleutil/rulesave.c (original) +++ trunk/tools/ruleutil/rulesave.c Fri Aug 26 08:50:08 2016 @@ -386,7 +386,7 @@ comment_buildings(sfile); sect_idx = 0; - improvement_iterate(pb) { + improvement_active_iterate(pb) { if (!pb->disabled) { char path[512]; const char *flag_names[IF_COUNT]; @@ -434,7 +434,7 @@ save_strvec(sfile, pb->helptext, path, "helptext"); } - } improvement_iterate_end; + } improvement_active_iterate_end; return save_ruleset_file(sfile, filename); } @@ -1237,7 +1237,7 @@ comment_goods(sfile); sect_idx = 0; - goods_type_iterate(pgood) { + goods_active_type_iterate(pgood) { char path[512]; fc_snprintf(path, sizeof(path), "goods_%d", sect_idx++); @@ -1245,7 +1245,7 @@ save_name_translation(sfile, &(pgood->name), path); save_reqs_vector(sfile, &(pgood->reqs), path, "reqs"); - } goods_type_iterate_end; + } goods_active_type_iterate_end; locks = FALSE; settings_iterate(SSET_ALL, pset) { @@ -1313,7 +1313,7 @@ comment_govs(sfile); sect_idx = 0; - governments_iterate(pg) { + governments_active_iterate(pg) { char path[512]; struct ruler_title *prtitle; @@ -1351,7 +1351,7 @@ save_strvec(sfile, pg->helptext, path, "helptext"); - } governments_iterate_end; + } governments_active_iterate_end; comment_policies(sfile); @@ -1767,7 +1767,7 @@ comment_techs(sfile); sect_idx = 0; - advance_iterate(A_FIRST, pa) { + advance_active_iterate(pa) { if (pa->require[AR_ONE] != A_NEVER) { char path[512]; const char *flag_names[TF_COUNT]; @@ -1820,7 +1820,7 @@ save_strvec(sfile, pa->helptext, path, "helptext"); } - } advance_iterate_end; + } advance_active_iterate_end; return save_ruleset_file(sfile, filename); } @@ -2511,7 +2511,7 @@ comment_utypes(sfile); sect_idx = 0; - unit_type_iterate(put) { + unit_active_type_iterate(put) { if (!put->disabled) { char path[512]; const char *flag_names[UTYF_LAST_USER_FLAG + 1]; @@ -2641,7 +2641,7 @@ save_strvec(sfile, put->helptext, path, "helptext"); } - } unit_type_iterate_end; + } unit_active_type_iterate_end; return save_ruleset_file(sfile, filename); } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits