From c4b898e9688fda5807696090a119b790361f5a4f Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 13 Dec 2014 11:53:16 +0100 Subject: [PATCH] remove some inactive #define macros and the code that goes with them. mostly rules that were experimental, but have made it into common use (not worth the effort of making them configurable). --- src/kernel/config.c | 2 -- src/laws.c | 6 ------ src/settings.h | 14 +------------- src/study.c | 10 ---------- 4 files changed, 1 insertion(+), 31 deletions(-) diff --git a/src/kernel/config.c b/src/kernel/config.c index 3dd22b159..e782cccff 100644 --- a/src/kernel/config.c +++ b/src/kernel/config.c @@ -231,10 +231,8 @@ int LongHunger(const struct unit *u) if (u != NULL) { if (!fval(u, UFL_HUNGER)) return false; -#ifdef NEW_DAEMONHUNGER_RULE if (u_race(u) == get_race(RC_DAEMON)) return false; -#endif } if (rule < 0 || gamecookie != global.cookie) { gamecookie = global.cookie; diff --git a/src/laws.c b/src/laws.c index 44bec3642..3d5e4ae37 100755 --- a/src/laws.c +++ b/src/laws.c @@ -151,7 +151,6 @@ static void age_unit(region * r, unit * u) u_race(u)->age(u); } } -#ifdef ASTRAL_ITEM_RESTRICTIONS if (u->region && is_astral(u->region)) { item **itemp = &u->items; while (*itemp) { @@ -168,7 +167,6 @@ static void age_unit(region * r, unit * u) itemp = &itm->next; } } -#endif } static void live(region * r) @@ -3606,11 +3604,7 @@ void monthly_healing(void) p *= heal_factor(u); if (u->hp < umhp) { -#ifdef NEW_DAEMONHUNGER_RULE double maxheal = _max(u->number, umhp / 20.0); -#else - double maxheal = _max(u->number, umhp / 10.0); -#endif int addhp; struct building *b = inside_building(u); const struct building_type *btype = b ? b->type : NULL; diff --git a/src/settings.h b/src/settings.h index d682d8119..bcf42e799 100644 --- a/src/settings.h +++ b/src/settings.h @@ -24,14 +24,11 @@ #define NEWATSROI 0 /* Vermehrungsrate Bauern in 1/10000. -* Evt. Berechnungsfehler, reale Vermehrungsraten scheinen höher. */ +* TODO: Evt. Berechnungsfehler, reale Vermehrungsraten scheinen höher. */ #define PEASANTGROWTH 10 #define BATTLE_KILLS_PEASANTS 20 #define PEASANTLUCK 10 -#define ASTRAL_ITEM_RESTRICTIONS /* keine grossen dinge im astralraum */ -#define NEW_DAEMONHUNGER_RULE -#define NEW_COMBATSKILLS_RULE #define ROW_FACTOR 3 /* factor for combat row advancement rule */ /* optional game components. TODO: These should either be @@ -43,14 +40,5 @@ #define ARENA_MODULE 1 #define DUNGEON_MODULE 0 #define CHANGED_CROSSBOWS 0 /* use the WTF_ARMORPIERCING flag */ -#undef GLOBAL_WARMING /* number of turns before global warming sets in */ - -#if defined(BINDINGS_LUABIND) -# undef BINDINGS_TOLUA -#elif defined(BINDINGS_TOLUA) -# undef BINDINGS_LUABIND -#else -# define BINDINGS_TOLUA /* new default */ -#endif #undef REGIONOWNERS /* (WIP) region-owner uses HELP_TRAVEL to control entry to region */ diff --git a/src/study.c b/src/study.c index 6bc889a59..b3b414da6 100644 --- a/src/study.c +++ b/src/study.c @@ -328,13 +328,8 @@ int teach_cmd(unit * u, struct order *ord) } while (sk != NOSKILL); while (teaching && student) { if (student->faction == u->faction) { -#ifdef NEW_DAEMONHUNGER_RULE if (LongHunger(student)) continue; -#else - if (fval(student, UFL_HUNGER)) - continue; -#endif if (getkeyword(student->thisorder) == K_STUDY) { /* Input ist nun von student->thisorder !! */ init_order(student->thisorder); @@ -358,13 +353,8 @@ int teach_cmd(unit * u, struct order *ord) while (teaching && student) { if (student->faction != u->faction && alliedunit(u, student->faction, HELP_GUARD)) { -#ifdef NEW_DAEMONHUNGER_RULE if (LongHunger(student)) continue; -#else - if (fval(student, UFL_HUNGER)) - continue; -#endif if (getkeyword(student->thisorder) == K_STUDY) { /* Input ist nun von student->thisorder !! */ init_order(student->thisorder);