From 485e8f0ce49bc0360bcb989c5de51e14fb2c3eae Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 23 Mar 2017 19:28:56 +0100 Subject: [PATCH] Revert "add failing test for skill bonus from mine, start work" This reverts commit ab87b1da852f8e25016e6dc390b11c0bceea38ac. --- scripts/tests/e2/adamantium.lua | 6 ------ src/economy.c | 14 ++++---------- src/kernel/building.h | 1 - 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/scripts/tests/e2/adamantium.lua b/scripts/tests/e2/adamantium.lua index 0def0772f..8cb703f33 100644 --- a/scripts/tests/e2/adamantium.lua +++ b/scripts/tests/e2/adamantium.lua @@ -49,11 +49,5 @@ function test_adamantium2() process_orders() assert_equal(1, u1:get_item("adamantium")) assert_equal(adamantium - 1, r:get_resource("adamantium")) - - -- mines give +1 to mining. mining 16 should give 2 adamantium - u1:set_skill("mining", 15) - process_orders() - assert_equal(3, u1:get_item("adamantium")) - assert_equal(adamantium - 3, r:get_resource("adamantium")) end diff --git a/src/economy.c b/src/economy.c index 971cbe794..ce174dd09 100644 --- a/src/economy.c +++ b/src/economy.c @@ -923,7 +923,7 @@ static void allocate_resource(unit * u, const resource_type * rtype, int want) allocation *al; const resource_type *rring; int amount, skill, skill_mod = 0; - variant save_mod = frac_make(1, 1); + variant save_mod; /* momentan kann man keine ressourcen abbauen, wenn man daf�r * Materialverbrauch hat: */ @@ -950,15 +950,9 @@ static void allocate_resource(unit * u, const resource_type * rtype, int want) return; } } - if (u->building && u->building->type->modifiers) { - building *b = inside_building(u); - if (b) { - message *msg = get_modifiers(u, b->type->modifiers, &save_mod, &skill_mod); - if (msg) { - ADDMSG(&u->faction->msgs, msg); - return; - } - } + else { + save_mod.sa[0] = 1; + save_mod.sa[1] = 1; } /* Bergw�chter k�nnen Abbau von Eisen/Laen durch Bewachen verhindern. diff --git a/src/kernel/building.h b/src/kernel/building.h index 88fe9bedd..6d66aa9ab 100644 --- a/src/kernel/building.h +++ b/src/kernel/building.h @@ -73,7 +73,6 @@ extern "C" { void(*age) (struct building *); double(*taxes) (const struct building *, int size); struct attrib *attribs; - struct resource_mod *modifiers; } building_type; extern struct selist *buildingtypes;