diff --git a/src/common/kernel/magic.c b/src/common/kernel/magic.c
index 0ee6a8941..392083f2f 100644
--- a/src/common/kernel/magic.c
+++ b/src/common/kernel/magic.c
@@ -923,7 +923,7 @@ cancast(unit * u, const spell * sp, int level, int range, struct order * ord)
{
int k;
int itemanz;
- boolean b = true;
+ resource * reslist = NULL;
if (knowsspell(u->region, u, sp) == false) {
/* Diesen Zauber kennt die Einheit nicht */
@@ -962,22 +962,16 @@ cancast(unit * u, const spell * sp, int level, int range, struct order * ord)
}
if (get_pooled(u, rtype, GET_DEFAULT) < itemanz) {
- if (b == false) {
- /* es fehlte schon eine andere Komponente, wir basteln die
- * Meldung weiter zusammen */
- scat(", ");
- } else {
- b = false;
- buf[0] = 0;
- }
- icat(itemanz);
- scat(" ");
- scat(LOC(u->faction->locale, resourcename(rtype, (itemanz!=1)?NMF_PLURAL:0)));
+ resource * res = malloc(sizeof(resource));
+ res->number = itemanz;
+ res->type = rtype;
+ res->next = reslist;
+ reslist = res->next;
}
}
}
- if (!b) {
- ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "missing_components_list", "list", buf));
+ if (reslist!=NULL) {
+ ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "missing_components_list", "list", reslist));
}
return b;
diff --git a/src/res/messages.xml b/src/res/messages.xml
index a87cd07a9..a9bf7bed2 100644
--- a/src/res/messages.xml
+++ b/src/res/messages.xml
@@ -381,11 +381,11 @@
-
+
- "$unit($unit) in $region($region): '$order($command)' - Dafür braucht die Einheit $items($required)."
- "$unit($unit) in $region($region): '$order($command)' - for this, the unit needs $items($required)."
- "$unit($unit) in $region($region): '$order($command)' - for this, the unit needs $items($required)."
+ "$unit($unit) in $region($region): '$order($command)' - Dafür braucht die Einheit $resources($required)."
+ "$unit($unit) in $region($region): '$order($command)' - for this, the unit needs $resources($required)."
+ "$unit($unit) in $region($region): '$order($command)' - for this, the unit needs $resources($required)."
@@ -1434,10 +1434,10 @@
-
+
- "$unit($unit) in $region($region): '$order($command)' - Für diesen Zauber fehlen noch ${list}."
- "$unit($unit) in $region($region): '$order($command)' - Casting this spell requires an additional ${list}."
+ "$unit($unit) in $region($region): '$order($command)' - Für diesen Zauber fehlen noch $resources($list)."
+ "$unit($unit) in $region($region): '$order($command)' - Casting this spell requires an additional $resources($list)."
@@ -1445,7 +1445,7 @@
- "$unit($unit) hat nur genügend Komponenten um $spell($spell) auf Stufe $int($level) zu zaubern."
+ "$unit($unit) hat nicht genügend Komponenten um $spell($spell) auf Stufe $int($level) zu zaubern."
"$unit($unit) has insufficient components to cast $spell($spell) on level $int($level)."