diff --git a/src/common/gamecode/economy.c b/src/common/gamecode/economy.c index c43ae4aeb..c110d2218 100644 --- a/src/common/gamecode/economy.c +++ b/src/common/gamecode/economy.c @@ -2676,39 +2676,44 @@ research_cmd(unit *u, struct order * ord) static int wahrnehmung(region * r, faction * f) { - unit *u; - int w = 0; + unit *u; + int w = 0; - for (u = r->units; u; u = u->next) { - if (u->faction == f) { - if (eff_skill(u, SK_OBSERVATION, r) > w) { - w = eff_skill(u, SK_OBSERVATION, r); - } - } - } + for (u = r->units; u; u = u->next) { + if (u->faction == f) { + if (eff_skill(u, SK_OBSERVATION, r) > w) { + w = eff_skill(u, SK_OBSERVATION, r); + } + } + } - return w; + return w; } static void steal_cmd(unit * u, struct order * ord, request ** stealorders) { - int n, i, id; - boolean goblin = false; - request * o; - unit * u2 = NULL; + int n, i, id; + boolean goblin = false; + request * o; + unit * u2 = NULL; region * r = u->region; - faction * f = NULL; + faction * f = NULL; + + if (!fval(u->race, RCF_CANSTEAL)) { + ADDMSG(&u->faction->msgs, msg_feedback("race_nosteal", "race", u->race)); + return; + } if (fval(r->terrain, SEA_REGION) && u->race != new_race[RC_AQUARIAN]) { cmistake(u, ord, 242, MSG_INCOME); return; } - if (r->planep && fval(r->planep, PFL_NOATTACK)) { - cmistake(u, ord, 270, MSG_INCOME); - return; - } + if (r->planep && fval(r->planep, PFL_NOATTACK)) { + cmistake(u, ord, 270, MSG_INCOME); + return; + } init_tokens(ord); skip_token(); diff --git a/src/common/kernel/race.h b/src/common/kernel/race.h index 731e9e340..bc2673584 100644 --- a/src/common/kernel/race.h +++ b/src/common/kernel/race.h @@ -115,7 +115,7 @@ extern int rc_specialdamage(const race *, const race *, const struct weapon_type #define RCF_PLAYERRACE (1<<0) /* can be played by a player. */ #define RCF_KILLPEASANTS (1<<1) /* Töten Bauern. Dämonen werden nicht über dieses Flag, sondern in randenc() behandelt. */ #define RCF_SCAREPEASANTS (1<<2) - +#define RCF_CANSTEAL (1<<3) #define RCF_MOVERANDOM (1<<4) #define RCF_CANNOTMOVE (1<<5) #define RCF_LEARN (1<<6) /* Lernt automatisch wenn struct faction == 0 */ diff --git a/src/common/kernel/xmlreader.c b/src/common/kernel/xmlreader.c index 5c460a6fa..b37531f74 100644 --- a/src/common/kernel/xmlreader.c +++ b/src/common/kernel/xmlreader.c @@ -1409,14 +1409,15 @@ parse_races(xmlDocPtr doc) if (xml_bvalue(node, "playerrace", false)) rc->flags |= RCF_PLAYERRACE; if (xml_bvalue(node, "scarepeasants", false)) rc->flags |= RCF_SCAREPEASANTS; + if (xml_bvalue(node, "cansteal", true)) rc->flags |= RCF_CANSTEAL; if (xml_bvalue(node, "cannotmove", false)) rc->flags |= RCF_CANNOTMOVE; if (xml_bvalue(node, "fly", false)) rc->flags |= RCF_FLY; if (xml_bvalue(node, "coastal", false)) rc->flags |= RCF_COASTAL; if (xml_bvalue(node, "unarmedguard", false)) rc->flags |= RCF_UNARMEDGUARD; if (xml_bvalue(node, "swim", false)) rc->flags |= RCF_SWIM; if (xml_bvalue(node, "walk", false)) rc->flags |= RCF_WALK; - if (xml_bvalue(node, "nolearn", false)) rc->flags |= RCF_NOLEARN; - if (xml_bvalue(node, "noteach", false)) rc->flags |= RCF_NOTEACH; + if (!xml_bvalue(node, "canlearn", true)) rc->flags |= RCF_NOLEARN; + if (!xml_bvalue(node, "canteach", true)) rc->flags |= RCF_NOTEACH; if (xml_bvalue(node, "horse", false)) rc->flags |= RCF_HORSE; if (xml_bvalue(node, "desert", false)) rc->flags |= RCF_DESERT; if (xml_bvalue(node, "absorbpeasants", false)) rc->flags |= RCF_ABSORBPEASANTS; diff --git a/src/eressea/server.cpp b/src/eressea/server.cpp index 8bb7fedb7..d93e11b02 100644 --- a/src/eressea/server.cpp +++ b/src/eressea/server.cpp @@ -571,11 +571,20 @@ load_inifile(const char * filename) { dictionary * d = iniparser_new(filename); if (d) { - g_basedir = iniparser_getstr(d, "common:base"); - g_resourcedir = iniparser_getstr(d, "common:res"); - xmlfile = iniparser_getstr(d, "common:xml"); - luafile = iniparser_getstr(d, "eressea:run"); + const char * str; + + lomem = iniparser_getint(d, "eressea:lomem", lomem)?0:1; quiet = iniparser_getint(d, "eressea:verbose", 0)?0:1; + str = iniparser_getstr(d, "eressea:run"); + if (str) luafile = str; + str = iniparser_getstr(d, "common:base"); + if (str) g_basedir = str; + str = iniparser_getstr(d, "common:res"); + if (str) g_resourcedir = str; + str = iniparser_getstr(d, "common:xml"); + if (str) xmlfile = str; + str = iniparser_getstr(d, "common:scripts"); + if (str) script_path = str; } inifile = d; } diff --git a/src/res/eressea/races.xml b/src/res/eressea/races.xml index 1fd8d7591..1c5179973 100644 --- a/src/res/eressea/races.xml +++ b/src/res/eressea/races.xml @@ -4,7 +4,7 @@ regaura="0.000000" weight="500" capacity="200" equipment="no" speed="1.000000" hp="1000" ac="4" damage="2d4" unarmedattack="10" unarmeddefense="10" attackmodifier="8" defensemodifier="8" - fly="no" walk="no" teach="no" getitem="yes"> + fly="no" walk="no" canteach="no" getitem="yes"> diff --git a/src/res/messages.xml b/src/res/messages.xml index 3e8e493db..ee49bc54f 100644 --- a/src/res/messages.xml +++ b/src/res/messages.xml @@ -616,6 +616,17 @@ "$unit($unit) in $region($region): '$order($command)' - $race($race,0) cannot be regrouped." "$unit($unit) in $region($region): '$order($command)' - $race($race,0) cannot be regrouped." + + + + + + + + "$unit($unit) in $region($region): '$order($command)' - $race($race,0) können nichts stehelen." + "$unit($unit) in $region($region): '$order($command)' - $race($race,0) cannot steal anything." + "$unit($unit) in $region($region): '$order($command)' - $race($race,0) cannot steal anything." + diff --git a/src/res/races.xml b/src/res/races.xml index dd876a4be..7660ec134 100644 --- a/src/res/races.xml +++ b/src/res/races.xml @@ -640,40 +640,40 @@ - + - + - + - + - + - + - + @@ -739,13 +739,13 @@ - + - + @@ -963,7 +963,7 @@ - + @@ -1022,7 +1022,7 @@ - + @@ -1040,7 +1040,7 @@ - + @@ -1058,7 +1058,7 @@ - + @@ -1074,7 +1074,7 @@ - + @@ -1089,7 +1089,7 @@ - + @@ -1104,7 +1104,7 @@ - + @@ -1147,7 +1147,7 @@ - + diff --git a/src/res/vinyambar/wdw-races.xml b/src/res/vinyambar/wdw-races.xml index cf931558c..5a8f619dd 100644 --- a/src/res/vinyambar/wdw-races.xml +++ b/src/res/vinyambar/wdw-races.xml @@ -2,7 +2,7 @@ - + @@ -32,7 +32,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -84,7 +84,7 @@ - + @@ -99,7 +99,7 @@ - + @@ -114,7 +114,7 @@ - + @@ -131,15 +131,15 @@ - - + + - - + + @@ -151,8 +151,8 @@ - - + + @@ -163,8 +163,8 @@ - - + + @@ -174,8 +174,8 @@ - - + + @@ -188,8 +188,8 @@ - - + + @@ -198,8 +198,8 @@ - - + + @@ -209,13 +209,13 @@ - + - + @@ -226,7 +226,7 @@ - + @@ -237,7 +237,7 @@ - + @@ -248,8 +248,8 @@ - - + + @@ -260,7 +260,7 @@ - +