forked from github/server
give player an error message when a message is missing.
This commit is contained in:
parent
54446e0a1e
commit
b5d6b0876e
|
@ -88,7 +88,7 @@ msg_feedback(const struct unit * u, struct order * ord, const char * name, const
|
|||
|
||||
if (!mtype) {
|
||||
log_error(("trying to create message of unknown type \"%s\"\n", name));
|
||||
return NULL;
|
||||
return msg_message("missing_feedback", "unit region command name", u, u->region, ord, name);
|
||||
}
|
||||
|
||||
var.v = (void*)u;
|
||||
|
@ -141,8 +141,8 @@ msg_message(const char * name, const char* sig, ...)
|
|||
memset(args, 0, sizeof(args));
|
||||
|
||||
if (!mtype) {
|
||||
log_warning(("trying to create message of unknown type \"%s\"\n", name));
|
||||
return NULL;
|
||||
log_error(("trying to create message of unknown type \"%s\"\n", name));
|
||||
return msg_message("missing_message", "name", name);
|
||||
}
|
||||
|
||||
va_start(marker, sig);
|
||||
|
|
|
@ -523,6 +523,23 @@
|
|||
<text locale="fr">"$unit($unit) sets a solar sail. The ship's speed is increased by $int($speed)."</text>
|
||||
<text locale="en">"$unit($unit) sets a solar sail. The ship's speed is increased by $int($speed)."</text>
|
||||
</message>
|
||||
<message name="missing_message" section="errors">
|
||||
<type>
|
||||
<arg name="name" type="string"/>
|
||||
</type>
|
||||
<text locale="de">"Interner Fehler: Meldung '$name' nicht definiert."</text>
|
||||
<text locale="en">"Internal Error: Message '$name' is undefined."</text>
|
||||
</message>
|
||||
<message name="missing_feedback" section="errors">
|
||||
<type>
|
||||
<arg name="region" type="region"/>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="command" type="order"/>
|
||||
<arg name="name" type="string"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) in $region($region): '$order($command)' - Interner Fehler: Meldung '$name' nicht definiert."</text>
|
||||
<text locale="en">"$unit($unit) in $region($region): '$order($command)' - Internal Error: Message '$name' is undefined."</text>
|
||||
</message>
|
||||
<message name="use_questkey_wrongregion" section="events">
|
||||
<type>
|
||||
<arg name="region" type="region"/>
|
||||
|
|
Loading…
Reference in New Issue