diff --git a/res/core/messages.xml b/res/core/messages.xml index 2cb5a0a09..bf4b0c041 100644 --- a/res/core/messages.xml +++ b/res/core/messages.xml @@ -1,5 +1,13 @@ + + + + + + "$unit($unit): '$command' - Dieser Befehl ist unbekannt." + "$unit($unit): '$command' - Parse error, unknown command." + Die Region ist verwüstet, der Boden karg. The region is ravaged, the ground infertile. diff --git a/src/battle.c b/src/battle.c index 5bf35f191..5ae215135 100644 --- a/src/battle.c +++ b/src/battle.c @@ -21,10 +21,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "battle.h" #include "alchemy.h" #include "chaos.h" -#include "move.h" +#include "guard.h" #include "laws.h" -#include "skill.h" #include "monster.h" +#include "move.h" +#include "skill.h" #include #include @@ -2763,7 +2764,7 @@ static void aftermath(battle * b) /* Distribute Loot */ loot_items(df); - setguard(du, true); + setguard(du, false); scale_number(du, 0); } else { diff --git a/src/creport.c b/src/creport.c index 0eb2d4abb..8f32d3ac3 100644 --- a/src/creport.c +++ b/src/creport.c @@ -1,4 +1,4 @@ -/* +/* +-------------------+ Enno Rehling | Eressea PBEM host | Christian Schlittchen | (c) 1998 - 2008 | Katja Zedel @@ -11,6 +11,7 @@ without prior permission by the authors of Eressea. #include #include #include "creport.h" +#include "guard.h" #include "travelthru.h" /* tweakable features */ @@ -185,9 +186,9 @@ cr_output_curses(stream *out, const faction * viewer, const void *obj, objtype_t region *r; /* Die Sichtbarkeit eines Zaubers und die Zaubermeldung sind bei - * Gebäuden und Schiffen je nach, ob man Besitzer ist, verschieden. + * Gebaeuden und Schiffen je nach, ob man Besitzer ist, verschieden. * Bei Einheiten sieht man Wirkungen auf eigene Einheiten immer. - * Spezialfälle (besonderes Talent, verursachender Magier usw. werde + * Spezialfaelle (besonderes Talent, verursachender Magier usw. werde * bei jedem curse gesondert behandelt. */ if (typ == TYP_SHIP) { ship *sh = (ship *)obj; diff --git a/src/economy.c b/src/economy.c index 1836c1305..10215d0da 100644 --- a/src/economy.c +++ b/src/economy.c @@ -24,6 +24,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "alchemy.h" #include "direction.h" #include "donations.h" +#include "guard.h" #include "give.h" #include "laws.h" #include "randenc.h" @@ -340,8 +341,8 @@ static int do_recruiting(recruitment * recruits, int available) /* unit is empty, dead, and cannot recruit */ number = 0; } + add_recruits(u, number, req->qty); if (number > 0) { - add_recruits(u, number, req->qty); dec = (int)(number * multi); if ((rc->ec_flags & ECF_REC_ETHEREAL) == 0) { recruited += dec; diff --git a/src/give.c b/src/give.c index 80f4a1ab5..b6d1bd118 100644 --- a/src/give.c +++ b/src/give.c @@ -1,4 +1,4 @@ -/* +/* +-------------------+ Christian Schlittchen | | Enno Rehling | Eressea PBEM host | Katja Zedel diff --git a/src/guard.c b/src/guard.c index 86af55f85..adacd1bf6 100644 --- a/src/guard.c +++ b/src/guard.c @@ -1,4 +1,4 @@ -/* +/* Copyright (c) 1998-2015, Enno Rehling Katja Zedel status >= ST_FLEE || fval(u, UFL_FLEEING)) return E_GUARD_FLEEING; - /* Monster der Monsterpartei dürfen immer bewachen */ + /* Monster der Monsterpartei duerfen immer bewachen */ if (is_monsters(u->faction) || fval(u_race(u), RCF_UNARMEDGUARD)) return E_GUARD_OK; if (!armedmen(u, true)) diff --git a/src/guard.h b/src/guard.h index 4743230d3..4fb6cbf56 100644 --- a/src/guard.h +++ b/src/guard.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #ifndef H_GUARD #define H_GUARD diff --git a/src/jsreport.c b/src/jsreport.c index d75b7919d..dc22c760a 100644 --- a/src/jsreport.c +++ b/src/jsreport.c @@ -1,4 +1,4 @@ -#include "reports.h" +#include "reports.h" #include "jsreport.h" #include #include diff --git a/src/kernel/build.c b/src/kernel/build.c index f963797fd..649679d93 100644 --- a/src/kernel/build.c +++ b/src/kernel/build.c @@ -24,6 +24,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "direction.h" #include "move.h" #include "study.h" +#include "guard.h" #include "laws.h" #include "skill.h" #include "lighthouse.h" diff --git a/src/kernel/order.c b/src/kernel/order.c index f79b2dd68..3fd1dc92f 100644 --- a/src/kernel/order.c +++ b/src/kernel/order.c @@ -285,7 +285,7 @@ static order *create_order_i(keyword_t kwd, const char *sptr, bool persistent, order *ord = NULL; int lindex; - if ((int)kwd > 0 && keyword_disabled(kwd)) { + if (kwd == NOKEYWORD || keyword_disabled(kwd)) { log_error("trying to create an order for disabled keyword %s.", keyword(kwd)); return NULL; } @@ -407,8 +407,8 @@ order *parse_order(const char *s, const struct locale * lang) if (kwd != NOKEYWORD) { while (isxspace(*(unsigned char *)sptr)) ++sptr; s = sptr; + return create_order_i(kwd, s, persistent, lang); } - return create_order_i(kwd, s, persistent, lang); } return NULL; } diff --git a/src/kernel/save.c b/src/kernel/save.c index 0b0ea222d..93c4f7e4b 100644 --- a/src/kernel/save.c +++ b/src/kernel/save.c @@ -206,12 +206,14 @@ static unit *unitorders(FILE * F, int enc, struct faction *f) if (*ordp) { ordp = &(*ordp)->next; } + else { + ADDMSG(&f->msgs, msg_message("parse_error", "unit command", u, s)); + } } } } else { - /* cmistake(?, buf, 160, MSG_EVENT); */ return NULL; } return u; diff --git a/src/laws.c b/src/laws.c old mode 100755 new mode 100644 index 47cb4b13a..9e53a465f --- a/src/laws.c +++ b/src/laws.c @@ -1,4 +1,4 @@ -/* +/* Copyright (c) 1998-2014, Enno Rehling Katja Zedel -#include "guard.h" #ifdef __cplusplus extern "C" { diff --git a/src/laws.test.c b/src/laws.test.c index 0f2d54e47..65f48012d 100644 --- a/src/laws.test.c +++ b/src/laws.test.c @@ -1,6 +1,7 @@ #include #include "laws.h" #include "battle.h" +#include "guard.h" #include "monster.h" #include diff --git a/src/magic.c b/src/magic.c index 0a2c685d4..3f1008cc4 100644 --- a/src/magic.c +++ b/src/magic.c @@ -1,4 +1,4 @@ -/* +/* Copyright (c) 1998-2014, Enno Rehling Katja Zedel Katja Zedel #include #include "move.h" +#include "guard.h" #include "laws.h" #include "reports.h" #include "study.h" diff --git a/src/report.c b/src/report.c index e9a0681ba..ddf78bc73 100644 --- a/src/report.c +++ b/src/report.c @@ -1,4 +1,4 @@ -/* +/* Copyright (c) 1998-2015, Enno Rehling Katja Zedel @@ -23,6 +23,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "report.h" #include "reports.h" +#include "guard.h" #include "laws.h" #include "travelthru.h" #include "monster.h" diff --git a/src/reports.c b/src/reports.c index a136645de..c183786b4 100644 --- a/src/reports.c +++ b/src/reports.c @@ -19,6 +19,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #include "reports.h" +#include "guard.h" #include "laws.h" #include "travelthru.h" #include "lighthouse.h" diff --git a/src/spells.c b/src/spells.c index e4ca75fbc..46eda80bd 100644 --- a/src/spells.c +++ b/src/spells.c @@ -15,6 +15,7 @@ #include #include +#include "guard.h" #include "spy.h" #include "vortex.h" #include "laws.h" diff --git a/src/spy.c b/src/spy.c index 01a419aba..3233fb563 100644 --- a/src/spy.c +++ b/src/spy.c @@ -1,4 +1,4 @@ -/* +/* Copyright (c) 1998-2015, Enno Rehling Katja Zedel @@ -19,6 +19,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include #include "spy.h" +#include "guard.h" #include "laws.h" #include "move.h" #include "reports.h" diff --git a/src/study.c b/src/study.c index 1ddaf8dfe..59f1130ea 100644 --- a/src/study.c +++ b/src/study.c @@ -1,4 +1,4 @@ -/* +/* Copyright (c) 1998-2015, Enno Rehling Katja Zedel diff --git a/src/summary.c b/src/summary.c index cbc998b4a..6e94f31a8 100644 --- a/src/summary.c +++ b/src/summary.c @@ -1,4 +1,4 @@ -/* +/* * +-------------------+ Christian Schlittchen * | | Enno Rehling * | Eressea PBEM host | Katja Zedel diff --git a/src/travelthru.c b/src/travelthru.c index e55cacaa0..5e6cac41b 100644 --- a/src/travelthru.c +++ b/src/travelthru.c @@ -1,4 +1,4 @@ -/* +/* Copyright (c) 1998-2015, Enno Rehling Katja Zedel diff --git a/src/travelthru.h b/src/travelthru.h index 4e43dd25a..16452869a 100644 --- a/src/travelthru.h +++ b/src/travelthru.h @@ -1,4 +1,4 @@ -#pragma once +#pragma once #ifndef H_TRAVELTHRU #define H_TRAVELTHRU diff --git a/src/travelthru.test.c b/src/travelthru.test.c index 74ab29b7e..be87743d2 100644 --- a/src/travelthru.test.c +++ b/src/travelthru.test.c @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/src/upkeep.test.c b/src/upkeep.test.c index 1013314aa..b4f2ae412 100644 --- a/src/upkeep.test.c +++ b/src/upkeep.test.c @@ -1,4 +1,4 @@ -#include +#include #include "upkeep.h" #include