Merge branch 'develop' of github.com:ennorehling/eressea into develop

This commit is contained in:
Enno Rehling 2020-01-03 20:20:47 +01:00
commit c9f82d81f9
7 changed files with 88 additions and 10 deletions

View File

@ -2690,6 +2690,70 @@
</type> </type>
</message> </message>
<message name="error321" section="errors">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
</type>
</message>
<message name="error322" section="errors">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
</type>
</message>
<message name="error323" section="errors">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
</type>
</message>
<message name="error324" section="errors">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
</type>
</message>
<message name="error325" section="errors">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
</type>
</message>
<message name="error326" section="errors">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
</type>
</message>
<message name="error327" section="errors">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
</type>
</message>
<message name="error328" section="errors">
<type>
<arg name="unit" type="unit"/>
<arg name="region" type="region"/>
<arg name="command" type="order"/>
</type>
</message>
<message name="error319" section="errors"> <message name="error319" section="errors">
<type> <type>
<arg name="unit" type="unit"/> <arg name="unit" type="unit"/>

View File

@ -2775,7 +2775,10 @@ msgid "error324"
msgstr "\"$unit($unit) in $region($region): '$order($command)' - Die Einheit gehört nicht zu unserer Partei.\"" msgstr "\"$unit($unit) in $region($region): '$order($command)' - Die Einheit gehört nicht zu unserer Partei.\""
msgid "error322" msgid "error322"
msgstr "\"$unit($unit) in $region($region): '$order($command)' - Die Einheit ist bereits auf einem Schiff.\"" msgstr "\"$unit($unit) in $region($region): '$order($command)' - Nur Schiffe gleicher Bauart können einen Konvoi bilden.\""
msgid "error328"
msgstr "\"$unit($unit) in $region($region): '$order($command)' - Nur Schiffe an der selben Küste können einen Konvoi bilden.\""
msgid "error323" msgid "error323"
msgstr "\"$unit($unit) in $region($region): '$order($command)' - Das Schiff ist verzaubert.\"" msgstr "\"$unit($unit) in $region($region): '$order($command)' - Das Schiff ist verzaubert.\""

View File

@ -2781,11 +2781,14 @@ msgid "error324"
msgstr "\"$unit($unit) in $region($region): '$order($command)' - The unit is not one of ours.\"" msgstr "\"$unit($unit) in $region($region): '$order($command)' - The unit is not one of ours.\""
msgid "error322" msgid "error322"
msgstr "\"$unit($unit) in $region($region): '$order($command)' - The unit is already on a ship.\"" msgstr "\"$unit($unit) in $region($region): '$order($command)' - Only ships of the same type can form a convoy.\""
msgid "error323" msgid "error323"
msgstr "\"$unit($unit) in $region($region): '$order($command)' - The ship is under a spell.\"" msgstr "\"$unit($unit) in $region($region): '$order($command)' - The ship is under a spell.\""
msgid "error328"
msgstr "\"$unit($unit) in $region($region): '$order($command)' - All ships of a convoy must be on the same coast.\""
msgid "dissolve_units_2" msgid "dissolve_units_2"
msgstr "\"$unit($unit) in $region($region): $int($number) $race($race,$number) turned into $if($eq($number,1),\"a tree\", \"trees\").\"" msgstr "\"$unit($unit) in $region($region): $int($number) $race($race,$number) turned into $if($eq($number,1),\"a tree\", \"trees\").\""

View File

@ -1775,12 +1775,12 @@ static void breedtrees(unit * u, int raw)
} }
if (n > raw) n = raw; if (n > raw) n = raw;
/* Fuer jeden Samen Talent*5% Erfolgschance. */ /* Talent * 5% der Samen setzen an (max 100%) */
for (i = n; i > 0; i--) { planted = n;
if (rng_int() % 100 < skill * 5) if (skill < 20) {
planted++; planted = planted * skill / 20;
} }
rsettrees(r, 1, rtrees(r, 1) + planted); rsettrees(r, 0, rtrees(r, 0) + planted);
/* Alles ok. Abziehen. */ /* Alles ok. Abziehen. */
produceexp(u, SK_HERBALISM, u->number); produceexp(u, SK_HERBALISM, u->number);

View File

@ -371,7 +371,7 @@ message * give_ship(unit *u1, unit *u2, int n, order *ord)
u2->ship->coast = u1->ship->coast; u2->ship->coast = u1->ship->coast;
} }
else { else {
return msg_error(u1, ord, 182); return msg_error(u1, ord, 328);
} }
} }
} }

View File

@ -62,6 +62,7 @@ static message *missing_feedback(const char *name, const struct unit *u,
log_error("trying to create undefined feedback of type \"%s\"\n", name); log_error("trying to create undefined feedback of type \"%s\"\n", name);
} }
else if (missing_message_mode == MESSAGE_MISSING_REPLACE) { else if (missing_message_mode == MESSAGE_MISSING_REPLACE) {
log_warning("trying to create undefined message of type \"%s\"\n", name);
if (strcmp(name, "missing_feedback") != 0) { if (strcmp(name, "missing_feedback") != 0) {
if (!mt_find("missing_feedback")) { if (!mt_find("missing_feedback")) {
mt_create_va(mt_new("missing_feedback", NULL), "unit:unit", mt_create_va(mt_new("missing_feedback", NULL), "unit:unit",

View File

@ -594,6 +594,13 @@ growing_trees_e3(region * r, const int current_season,
} }
} }
static short cap_short(int i) {
if (i > SHRT_MIN) {
return ((i < SHRT_MAX) ? (short)i : SHRT_MAX);
}
return SHRT_MIN;
}
static void static void
growing_trees(region * r, const season_t current_season, const season_t last_weeks_season) growing_trees(region * r, const season_t current_season, const season_t last_weeks_season)
{ {
@ -687,8 +694,8 @@ growing_trees(region * r, const season_t current_season, const season_t last_wee
a = a_find(r->attribs, &at_germs); a = a_find(r->attribs, &at_germs);
if (!a) { if (!a) {
a = a_add(&r->attribs, a_new(&at_germs)); a = a_add(&r->attribs, a_new(&at_germs));
a->data.sa[0] = (short)rtrees(r, 0); a->data.sa[0] = cap_short(rtrees(r, 0));
a->data.sa[1] = (short)rtrees(r, 1); a->data.sa[1] = cap_short(rtrees(r, 1));
} }
/* wir haben 6 Wochen zum wachsen, jeder Same/Spross hat 18% Chance /* wir haben 6 Wochen zum wachsen, jeder Same/Spross hat 18% Chance
* zu wachsen, damit sollten nach 5-6 Wochen alle gewachsen sein */ * zu wachsen, damit sollten nach 5-6 Wochen alle gewachsen sein */