forked from github/server
"Merkwürdige Fehlermeldung bei Delphin" Neue Message-Funktion, die den Terraintyp einer Region ausgibt.
This commit is contained in:
parent
5317da7512
commit
9f146d1a07
|
@ -2922,6 +2922,19 @@ eval_region(struct opstack ** stack, const void * userdata) /* region -> string
|
|||
opush(stack, var);
|
||||
}
|
||||
|
||||
static void
|
||||
eval_terrain(struct opstack ** stack, const void * userdata) /* region -> string */
|
||||
{
|
||||
const struct faction * f = (const struct faction *)userdata;
|
||||
const struct region * r = (const struct region *)opop(stack).v;
|
||||
const char * c = LOC(f->locale, terrain_name(r));
|
||||
size_t len = strlen(c);
|
||||
variant var;
|
||||
|
||||
var.v = strcpy(balloc(len+1), c);
|
||||
opush(stack, var);
|
||||
}
|
||||
|
||||
static void
|
||||
eval_ship(struct opstack ** stack, const void * userdata) /* ship -> string */
|
||||
{
|
||||
|
@ -3091,6 +3104,7 @@ report_init(void)
|
|||
/* register functions that turn message contents to readable strings */
|
||||
add_function("alliance", &eval_alliance);
|
||||
add_function("region", &eval_region);
|
||||
add_function("terrain", &eval_terrain);
|
||||
add_function("weight", &eval_weight);
|
||||
add_function("resource", &eval_resource);
|
||||
add_function("race", &eval_race);
|
||||
|
|
|
@ -1969,18 +1969,18 @@
|
|||
<arg name="unit" type="unit"/>
|
||||
<arg name="direction" type="direction"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) entdeckt dass im $direction($direction) Ozean ist."</text>
|
||||
<text locale="fr">"$unit($unit) discovered that an Ocean lies in the $direction($direction)."</text>
|
||||
<text locale="en">"$unit($unit) discovered that an Ocean lies in the $direction($direction)."</text>
|
||||
<text locale="de">"$unit($unit) entdeckt dass im $direction($direction) $terrain($region) ist."</text>
|
||||
<text locale="fr">"$unit($unit) discovered that an ocean lies in the $direction($direction)."</text>
|
||||
<text locale="en">"$unit($unit) discovered that an ocean lies in the $direction($direction)."</text>
|
||||
</message>
|
||||
<message name="detectocean" section="movement">
|
||||
<type>
|
||||
<arg name="unit" type="unit"/>
|
||||
<arg name="region" type="region"/>
|
||||
</type>
|
||||
<text locale="de">"$unit($unit) entdeckt, dass $region($region) Ozean ist."</text>
|
||||
<text locale="fr">"$unit($unit) discovered that $region($region) is Ocean."</text>
|
||||
<text locale="en">"$unit($unit) discovered that $region($region) is Ocean."</text>
|
||||
<text locale="de">"$unit($unit) entdeckt, dass $region($region) $terrain($region) ist."</text>
|
||||
<text locale="fr">"$unit($unit) discovered that $region($region) is $terrain($region)."</text>
|
||||
<text locale="en">"$unit($unit) discovered that $region($region) is $terrain($region)."</text>
|
||||
</message>
|
||||
<message name="sailnolandingstorm" section="movement">
|
||||
<type>
|
||||
|
|
Loading…
Reference in New Issue