forked from github/server
plural/singular bei resourcenamen vertauscht. warum meldet sowas keiner?
This commit is contained in:
parent
ab4eaabc09
commit
91357b3adc
|
@ -2372,22 +2372,22 @@ attrib_type at_resourcelimit = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
resname(resource_t res, int index)
|
resname(resource_t res, int plural)
|
||||||
{
|
{
|
||||||
const item_type * itype = resource2item(oldresourcetype[res]);
|
const item_type * itype = resource2item(oldresourcetype[res]);
|
||||||
if (itype!=NULL) {
|
if (itype!=NULL) {
|
||||||
return locale_string(NULL, resourcename(oldresourcetype[res], index));
|
return locale_string(NULL, resourcename(oldresourcetype[res], index));
|
||||||
}
|
}
|
||||||
else if (res == R_AURA) {
|
else if (res == R_AURA) {
|
||||||
return index==1?"aura":"aura_p";
|
return index?"aura_p":"aura";
|
||||||
} else if (res == R_PERMAURA) {
|
} else if (res == R_PERMAURA) {
|
||||||
return index==1?"permaura":"permaura_p";
|
return index?"permaura_p":"permaura";
|
||||||
} else if (res == R_PEASANTS) {
|
} else if (res == R_PEASANTS) {
|
||||||
return index==1?"peasant":"peasant_p";
|
return index?"peasant_p":"peasant";
|
||||||
} else if (res == R_UNIT) {
|
} else if (res == R_UNIT) {
|
||||||
return index==1?"unit":"unit_p";
|
return index?"unit_p":"unit";
|
||||||
} else if (res == R_HITPOINTS) {
|
} else if (res == R_HITPOINTS) {
|
||||||
return index==1?"hp":"hp_p";
|
return index?"hp_p":"hp";
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -946,17 +946,14 @@ cancast(unit * u, spell * sp, int level, int range, struct order * ord)
|
||||||
* Meldung weiter zusammen */
|
* Meldung weiter zusammen */
|
||||||
scat(", ");
|
scat(", ");
|
||||||
icat(itemanz);
|
icat(itemanz);
|
||||||
scat(locale_string(u->faction->locale,
|
scat(LOC(u->faction->locale, resname(res, itemanz!=1)));
|
||||||
resname(res, (itemanz == 1 ? 0 : 1))));
|
|
||||||
} else {
|
} else {
|
||||||
/* Noch fehlte keine Komponente, wir generieren den Anfang der
|
/* Noch fehlte keine Komponente, wir generieren den Anfang der
|
||||||
* Fehlermeldung */
|
* Fehlermeldung */
|
||||||
sprintf(buf, "%s in %s: 'ZAUBER %s' Für diesen Zauber fehlen "
|
sprintf(buf, "%s in %s: 'ZAUBER %s' - Für diesen Zauber fehlen "
|
||||||
"noch %d ", unitname(u), regionname(u->region, u->faction),
|
"noch %d ", unitname(u), regionname(u->region, u->faction),
|
||||||
spell_name(sp, u->faction->locale),
|
spell_name(sp, u->faction->locale), itemanz);
|
||||||
itemanz);
|
scat(LOC(u->faction->locale, resname(res, itemanz!=1)));
|
||||||
scat(locale_string(u->faction->locale,
|
|
||||||
resname(res, (itemanz == 1 ? 0 : 1))));
|
|
||||||
b = false;
|
b = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue