Feature #1515 ยป 0049-Show-government-flags-in-government-help.patch
| client/helpdata.c | ||
|---|---|---|
|
void helptext_government(char *buf, size_t bufsz, struct player *pplayer,
|
||
|
const char *user_text, struct government *gov)
|
||
|
{
|
||
|
int flagid;
|
||
|
bool has_flags = FALSE;
|
||
|
bool reqs = FALSE;
|
||
|
struct universal source = {
|
||
|
.kind = VUT_GOVERNMENT,
|
||
| ... | ... | |
|
} strvec_iterate_end;
|
||
|
}
|
||
|
for (flagid = GOVF_USER_FLAG_1; flagid <= GOVF_LAST_USER_FLAG; flagid++) {
|
||
|
if (government_has_flag(gov, flagid)) {
|
||
|
const char *helptxt = gov_flag_helptxt(flagid);
|
||
|
if (helptxt != nullptr) {
|
||
|
CATLSTR(buf, bufsz, "%s %s\n", BULLET, _(helptxt));
|
||
|
has_flags = TRUE;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if (has_flags) {
|
||
|
fc_strlcat(buf, "\n", bufsz);
|
||
|
}
|
||
|
/* Add requirement text for government itself */
|
||
|
requirement_vector_iterate(&gov->reqs, preq) {
|
||
|
if (req_text_insert_nl(buf, bufsz, pplayer, preq, VERB_DEFAULT, "")) {
|
||