From 77bb331bc524977dd6b01dcbca7abcfa3b8f79c7 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 12 Aug 2007 13:56:59 +0000 Subject: [PATCH] Unicode WIP: some message-fixes, building types that had been broken since forever, small stuff --- src/common/gamecode/laws.c | 5 +++-- src/common/kernel/building.c | 1 + src/common/kernel/move.c | 5 ----- src/common/spells/spells.c | 4 ++++ src/res/messages.xml | 15 ++++++++------- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index bc54629f4..760a53cf3 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -1485,6 +1485,7 @@ name_cmd(unit * u, struct order * ord) } s = &b->name; } else { + // TODO: building types static speichern um lookups zu sparen if (!b) { cmistake(u, ord, 145, MSG_PRODUCE); break; @@ -1493,7 +1494,7 @@ name_cmd(unit * u, struct order * ord) cmistake(u, ord, 148, MSG_PRODUCE); break; } - if (b->type == bt_find("generic")) { + if (b->type == bt_find("genericbuilding")) { cmistake(u, ord, 278, MSG_EVENT); break; } @@ -1503,7 +1504,7 @@ name_cmd(unit * u, struct order * ord) break; } } - if (b->type == bt_find("artsculpure")) { + if (b->type == bt_find("artsculpture")) { cmistake(u, ord, 29, MSG_EVENT); break; } diff --git a/src/common/kernel/building.c b/src/common/kernel/building.c index 16f790361..307d670d0 100644 --- a/src/common/kernel/building.c +++ b/src/common/kernel/building.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include diff --git a/src/common/kernel/move.c b/src/common/kernel/move.c index 67ec1419b..2fae4f7e2 100644 --- a/src/common/kernel/move.c +++ b/src/common/kernel/move.c @@ -453,11 +453,6 @@ cansail(const region * r, ship * sh) return false; getshipweight(sh, &n, &p); - if( is_cursed(sh->attribs, C_SHIP_FLYING, 0) ) { - if (sh->type->cargo>500*100) - assert(!"Ein Schiff wurde verzaubert, das zu groß ist"); - if (n > 10000) return false; - } if (n > shipcapacity(sh)) return false; if (p > sh->type->cabins) return false; diff --git a/src/common/spells/spells.c b/src/common/spells/spells.c index ea5d8c3b4..dd7e417bd 100644 --- a/src/common/spells/spells.c +++ b/src/common/spells/spells.c @@ -2270,6 +2270,10 @@ sp_stormwinds(castorder *co) sh = pa->param[n]->data.sh; + if (sh->type->cargo>50000) { + ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, "error_flying_ship_too_big", "ship", sh)) + continue; + } /* mit C_SHIP_NODRIFT haben wir kein Problem */ if (is_cursed(sh->attribs, C_SHIP_FLYING, 0) ) { ADDMSG(&mage->faction->msgs, msg_feedback(mage, co->order, "error_spell_on_flying_ship", "ship", sh)) diff --git a/src/res/messages.xml b/src/res/messages.xml index 7d25e53cd..88bfd4c9d 100644 --- a/src/res/messages.xml +++ b/src/res/messages.xml @@ -1430,6 +1430,14 @@ "$unit($mage) calls $int($amount) undead from their graves." + + + + + "$unit($mage) stört die Ruhe der Toten." + "$unit($mage) communicates with the dead." + + @@ -2432,13 +2440,6 @@ "$unit($unit) in $region($region): '$order($command)' - $unit($unit) gelingt es zwar die Region zu verzaubern, aber irgendwas ging schief." "$unit($unit) in $region($region): '$order($command)' - $unit($unit) manages to put a spell on the region, but something went wrong nonetheless." - - - - - "$unit($unit) stört die Ruhe der Toten." - "$unit($unit) communicates with the dead." -