Feature #2223 » 0046-rulesave-Rename-save_strvec-as-save_helptext.patch
| tools/ruleutil/rulesave.c | ||
|---|---|---|
|
}
|
||
|
/**********************************************************************//**
|
||
|
Save strvec as ruleset vector of strings
|
||
|
Save helptext as ruleset vector of strings
|
||
|
**************************************************************************/
|
||
|
static bool save_strvec(struct section_file *sfile,
|
||
|
struct strvec *to_save,
|
||
|
const char *path, const char *entry)
|
||
|
static bool save_helptext(struct section_file *sfile,
|
||
|
struct strvec *to_save,
|
||
|
const char *path, const char *entry)
|
||
|
{
|
||
|
if (to_save != nullptr) {
|
||
|
int sect_count = strvec_size(to_save);
|
||
| ... | ... | |
|
"%s.flags", path);
|
||
|
}
|
||
|
save_strvec(sfile, pb->helptext, path, "helptext");
|
||
|
save_helptext(sfile, pb->helptext, path, "helptext");
|
||
|
}
|
||
|
} improvement_re_active_iterate_end;
|
||
| ... | ... | |
|
secfile_insert_str(sfile, s->graphic_alt, "%s.graphic_alt", path);
|
||
|
}
|
||
|
save_strvec(sfile, s->helptext, path, "helptext");
|
||
|
save_helptext(sfile, s->helptext, path, "helptext");
|
||
|
} specialist_type_iterate_end;
|
||
| ... | ... | |
|
"%s.flags", path);
|
||
|
}
|
||
|
save_strvec(sfile, pgood->helptext, path, "helptext");
|
||
|
save_helptext(sfile, pgood->helptext, path, "helptext");
|
||
|
} goods_type_re_active_iterate_end;
|
||
|
/* Clauses */
|
||
| ... | ... | |
|
if (pcounter->helptext != nullptr
|
||
|
&& strvec_size(pcounter->helptext) > 0) {
|
||
|
save_strvec(sfile, pcounter->helptext, path, "helptext");
|
||
|
save_helptext(sfile, pcounter->helptext, path, "helptext");
|
||
|
}
|
||
|
} counters_re_iterate_end;
|
||
| ... | ... | |
|
}
|
||
|
}
|
||
|
save_strvec(sfile, pg->helptext, path, "helptext");
|
||
|
save_helptext(sfile, pg->helptext, path, "helptext");
|
||
|
} governments_re_active_iterate_end;
|
||
| ... | ... | |
|
save_reqs_vector(sfile, &(pmul->reqs), path, "reqs");
|
||
|
save_strvec(sfile, pmul->helptext, path, "helptext");
|
||
|
save_helptext(sfile, pmul->helptext, path, "helptext");
|
||
|
}
|
||
|
} multipliers_iterate_end;
|
||
| ... | ... | |
|
secfile_insert_int(sfile, pa->cost, "%s.cost", path);
|
||
|
}
|
||
|
save_strvec(sfile, pa->helptext, path, "helptext");
|
||
|
save_helptext(sfile, pa->helptext, path, "helptext");
|
||
|
}
|
||
|
} advance_re_active_iterate_end;
|
||
| ... | ... | |
|
rgbcolor_save(sfile, pterr->rgb, "%s.color", path);
|
||
|
save_strvec(sfile, pterr->helptext, path, "helptext");
|
||
|
save_helptext(sfile, pterr->helptext, path, "helptext");
|
||
|
} terrain_type_iterate_end;
|
||
| ... | ... | |
|
"%s.bridged_over", path);
|
||
|
}
|
||
|
save_strvec(sfile, pextra->helptext, path, "helptext");
|
||
|
save_helptext(sfile, pextra->helptext, path, "helptext");
|
||
|
} extra_type_re_active_iterate_end;
|
||
| ... | ... | |
|
"%s.flags", path);
|
||
|
}
|
||
|
save_strvec(sfile, puc->helptext, path, "helptext");
|
||
|
save_helptext(sfile, puc->helptext, path, "helptext");
|
||
|
} unit_class_re_active_iterate_end;
|
||
| ... | ... | |
|
"%s.roles", path);
|
||
|
}
|
||
|
save_strvec(sfile, put->helptext, path, "helptext");
|
||
|
save_helptext(sfile, put->helptext, path, "helptext");
|
||
|
}
|
||
|
} unit_type_re_active_iterate_end;
|
||
- « Previous
- 1
- 2
- Next »