diff --git a/doc/gprof-v3.10.0-163-gdfab45d.txt b/doc/gprof-v3.10.0-163-gdfab45d.profile
similarity index 100%
rename from doc/gprof-v3.10.0-163-gdfab45d.txt
rename to doc/gprof-v3.10.0-163-gdfab45d.profile
diff --git a/res/core/common/items.xml b/res/core/common/items.xml
index 30926a844..63a07d88f 100644
--- a/res/core/common/items.xml
+++ b/res/core/common/items.xml
@@ -98,6 +98,11 @@
+
+
+
+
+
-
diff --git a/res/eressea/items.xml b/res/eressea/items.xml
index c0b8b5126..007f0277c 100644
--- a/res/eressea/items.xml
+++ b/res/eressea/items.xml
@@ -86,27 +86,9 @@
-
-
- -
-
-
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
+
diff --git a/res/eressea/strings.xml b/res/eressea/strings.xml
index f7497b810..4869014c5 100644
--- a/res/eressea/strings.xml
+++ b/res/eressea/strings.xml
@@ -116,18 +116,6 @@
Eine Geburtstagstorte mit 10 Kerzen. Herzlichen Glückwunsch, Eressea!
A birthday cake with 10 candles. Happy Birthday, Eressea!
-
- Dieses Fluggerät aus der Schmiede der Zwerge von Celeband galt wie die
- 'Ebene der Herausforderung' seit Urzeiten als verschollen, ja man
- zweifelte seine Existenz an. Die Sage überliefert, das derjenige, der
- sie auf der Spitze des Turmes seiner Gesinnung benutzt, als einziger
- die 'Ebene der Herausforderungen' verlassen kann.
-
-
- Glückwunsch, mein Kind. Du bist im Besitz des mächtigsten
- Artefaktes Eresseas. Ein Fluch, sagt man, liege auf ihm, denn
- niemand hat es bisher lange sein Eigen genannt...
-
Kleines trockenes Dauergebäck, m od. s; - u. -es, - u. -e
@@ -374,29 +362,6 @@
-
-
- Auge des Dämon
- eye of the demon
- oeil du démon
-
-
- Augen des Dämon
- eyes of the demon
- oeil du démon
-
-
- Schwinge des Greifen
- wing of the gryphon
- aile du griffon
-
-
- Schwingen des Greifen
- wings of the gryphon
- ailes du griffon
-
-
-
Adamantium
adamantium
diff --git a/scripts/tests/e2/e2features.lua b/scripts/tests/e2/e2features.lua
index a942480a9..da2a98d55 100644
--- a/scripts/tests/e2/e2features.lua
+++ b/scripts/tests/e2/e2features.lua
@@ -230,171 +230,6 @@ function test_no_uruk()
assert_equal(f1.race, "orc")
end
-function test_meow()
- local r = region.create(0, 0, "plain")
- local f = faction.create("noreply@eressea.de", "human", "de")
- local u = unit.create(f, r, 1)
- u:add_item("aoc", 1)
- u:clear_orders()
- u:add_order("BENUTZEN 1 Katzenamulett")
- process_orders()
- assert_equal(1, u:get_item("aoc"))
- assert_equal(1, r:count_msg_type('meow'))
-end
-
-function test_aurapotion50()
- eressea.settings.set("magic.regeneration.enable", "0")
- local r = region.create(0, 0, "plain")
- local f = faction.create("noreply@eressea.de", "human", "de")
- local u = unit.create(f, r, 1)
- u:add_item("aurapotion50", 1)
- u:set_skill('magic', 10);
- u.magic = 'gwyrrd'
- u.aura = 0
- u:clear_orders()
- u:add_order("BENUTZEN 1 Auratrank")
- process_orders()
- assert_equal(0, u:get_item("aurapotion50"))
- assert_equal(1, f:count_msg_type('aurapotion50'))
- assert_equal(50, u.aura)
-end
-
-function test_bagpipe()
- local r = region.create(0, 0, "plain")
- local f = faction.create("noreply@eressea.de", "human", "de")
- local u = unit.create(f, r, 1)
- u:add_item("bagpipeoffear", 1)
- u:clear_orders()
- u:add_order("BENUTZEN 1 Dudelsack")
- process_orders()
- assert_equal(1, u:get_item("bagpipeoffear"))
- assert_equal(1, f:count_msg_type('bagpipeoffear_faction'))
- assert_equal(1, r:count_msg_type('bagpipeoffear_region'))
-end
-
-function test_speedsail()
- local r = region.create(0, 0, "plain")
- local f = faction.create("noreply@eressea.de", "human", "de")
- local u = unit.create(f, r, 1)
- u.ship = ship.create(r, "boat")
- u:add_item("speedsail", 2)
- u:clear_orders()
- u:add_order("BENUTZEN 1 Sonnensegel")
- process_orders()
- assert_equal(1, u:get_item("speedsail"))
- assert_equal(1, f:count_msg_type('use_speedsail'))
-end
-
---[[
-function test_studypotion()
- local r = region.create(0, 0, "plain")
- local f = faction.create("noreply@eressea.de", "human", "de")
- local u = unit.create(f, r, 1)
- u:add_item("studypotion", 2)
- u:clear_orders()
- u:add_order("LERNE Unterhaltung")
- u:add_order("BENUTZEN 1 Lerntrank")
- process_orders()
- assert_equal(1, u:get_item("studypotion"))
-end
-]]--
-
-function test_antimagic()
- local r = region.create(0, 0, "plain")
- local f = faction.create("noreply@eressea.de", "human", "de")
- local u = unit.create(f, r, 1)
- u:add_item("antimagic", 2)
- u:clear_orders()
- u:add_order("BENUTZEN 1 Antimagiekristall")
- process_orders()
- assert_equal(1, r:count_msg_type('use_antimagiccrystal'))
- assert_equal(1, u:get_item("antimagic"))
-end
-
-function test_ointment()
- local r = region.create(0, 0, "plain")
- local f = faction.create("noreply@eressea.de", "human", "de")
- local u = unit.create(f, r, 1)
- local hp = u.hp
- u.hp = 1
- u:add_item("ointment", 1)
- u:clear_orders()
- u:add_order("BENUTZEN 1 Wundsalbe")
- process_orders()
- assert_equal(0, u:get_item("ointment"))
- assert_equal(1, f:count_msg_type('usepotion'))
- assert_equal(hp, u.hp)
-end
-
-function test_bloodpotion_demon()
- local r = region.create(0, 0, "plain")
- local f = faction.create("noreply@eressea.de", "demon", "de")
- local u = unit.create(f, r, 1)
- u:add_item("peasantblood", 1)
- u:clear_orders()
- u:add_order("BENUTZEN 1 Bauernblut")
- process_orders()
- assert_equal(0, u:get_item("peasantblood"))
- assert_equal(1, f:count_msg_type('usepotion'))
- assert_equal("demon", u.race)
-end
-
-function test_bloodpotion_other()
- local r = region.create(0, 0, "plain")
- local f = faction.create("noreply@eressea.de", "human", "de")
- local u = unit.create(f, r, 1)
- u:add_item("peasantblood", 1)
- u:clear_orders()
- u:add_order("BENUTZEN 1 Bauernblut")
- process_orders()
- assert_equal(0, u:get_item("peasantblood"))
- assert_equal(1, f:count_msg_type('usepotion'))
- assert_equal("smurf", u.race)
-end
-
-function test_foolpotion()
- local r = region.create(0, 0, "plain")
- local f = faction.create("noreply@eressea.de", "human", "de")
- local u = unit.create(f, r, 1)
- u:add_item("p7", 1)
- u:clear_orders()
- u:add_order("BENUTZEN 1 Dumpfbackenbrot 4242")
- process_orders()
- assert_equal(1, u:get_item("p7"))
- assert_equal(1, f:count_msg_type('feedback_unit_not_found'))
- local u2 = unit.create(f, r, 1)
-
- u:clear_orders()
- u:add_order("BENUTZEN 1 Dumpfbackenbrot " .. itoa36(u2.id))
- process_orders()
- assert_equal(1, u:get_item("p7"))
- assert_equal(1, f:count_msg_type('error64'))
-
- u:set_skill("stealth", 1);
- process_orders()
- assert_equal(0, u:get_item("p7"))
- assert_equal(1, f:count_msg_type('givedumb'))
-end
-
-function test_snowman()
- local r = region.create(0, 0, "glacier")
- local f = faction.create("noreply@eressea.de", "human", "de")
- local u = unit.create(f, r, 1)
- u:add_item("snowman", 1)
- u:clear_orders()
- u:add_order("BENUTZEN 1 Schneemann")
- process_orders()
- for u2 in r.units do
- if u2.id~=u.id then
- assert_equal("snowman", u2.race)
- assert_equal(1000, u2.hp)
- u = nil
- break
- end
- end
- assert_equal(nil, u)
-end
-
function test_block_movement()
eressea.settings.set("rules.guard.base_stop_prob", "0.3")
eressea.settings.set("rules.guard.amulet_stop_prob", "0.0")
diff --git a/scripts/tests/e2/init.lua b/scripts/tests/e2/init.lua
index afaac7209..4d916d1a9 100644
--- a/scripts/tests/e2/init.lua
+++ b/scripts/tests/e2/init.lua
@@ -8,6 +8,7 @@ require 'tests.e2.destroy'
require 'tests.e2.guard'
require 'tests.e2.spells'
require 'tests.e2.stealth'
+require 'tests.items'
require 'tests.orders'
require 'tests.common'
require 'tests.report'
diff --git a/scripts/tests/items.lua b/scripts/tests/items.lua
new file mode 100644
index 000000000..15d638a63
--- /dev/null
+++ b/scripts/tests/items.lua
@@ -0,0 +1,186 @@
+require "lunit"
+
+module("tests.items", package.seeall, lunit.testcase )
+
+function setup()
+ eressea.free_game()
+ eressea.settings.set("nmr.timeout", "0")
+ eressea.settings.set("rules.food.flags", "4")
+ eressea.settings.set("rules.ship.storms", "0")
+ eressea.settings.set("rules.encounters", "0")
+end
+
+function test_meow()
+ local r = region.create(0, 0, "plain")
+ local f = faction.create("noreply@eressea.de", "human", "de")
+ local u = unit.create(f, r, 1)
+ u:add_item("aoc", 1)
+ u:clear_orders()
+ u:add_order("BENUTZEN 1 Katzenamulett")
+ process_orders()
+ assert_equal(1, u:get_item("aoc"))
+ assert_equal(1, r:count_msg_type('meow'))
+end
+
+function test_aurapotion50()
+ eressea.settings.set("magic.regeneration.enable", "0")
+ local r = region.create(0, 0, "plain")
+ local f = faction.create("noreply@eressea.de", "human", "de")
+ local u = unit.create(f, r, 1)
+ u:add_item("aurapotion50", 1)
+ u:set_skill('magic', 10);
+ u.magic = 'gwyrrd'
+ u.aura = 0
+ u:clear_orders()
+ u:add_order("BENUTZEN 1 Auratrank")
+ process_orders()
+ assert_equal(0, u:get_item("aurapotion50"))
+ assert_equal(1, f:count_msg_type('aurapotion50'))
+ assert_equal(50, u.aura)
+end
+
+function test_bagpipe()
+ local r = region.create(0, 0, "plain")
+ local f = faction.create("noreply@eressea.de", "human", "de")
+ local u = unit.create(f, r, 1)
+ u:add_item("bagpipeoffear", 1)
+ u:clear_orders()
+ u:add_order("BENUTZEN 1 Dudelsack")
+ process_orders()
+ assert_equal(1, u:get_item("bagpipeoffear"))
+ assert_equal(1, f:count_msg_type('bagpipeoffear_faction'))
+ assert_equal(1, r:count_msg_type('bagpipeoffear_region'))
+end
+
+function test_speedsail()
+ local r = region.create(0, 0, "plain")
+ local f = faction.create("noreply@eressea.de", "human", "de")
+ local u = unit.create(f, r, 1)
+ u.ship = ship.create(r, "boat")
+ u:add_item("speedsail", 2)
+ u:clear_orders()
+ u:add_order("BENUTZEN 1 Sonnensegel")
+ process_orders()
+ assert_equal(1, u:get_item("speedsail"))
+ assert_equal(1, f:count_msg_type('use_speedsail'))
+end
+
+function test_skillpotion()
+ local r = region.create(0, 0, "plain")
+ local f = faction.create("noreply@eressea.de", "human", "de")
+ local u = unit.create(f, r, 1)
+ u:add_item("skillpotion", 2)
+ u:clear_orders()
+ u:add_order("BENUTZEN 1 Talenttrunk")
+ process_orders()
+ assert_equal(1, u:get_item("skillpotion"))
+ assert_equal(1, f:count_msg_type('skillpotion_use'))
+end
+
+function test_studypotion()
+ local r = region.create(0, 0, "plain")
+ local f = faction.create("noreply@eressea.de", "human", "de")
+ local u = unit.create(f, r, 1)
+ u:add_item("studypotion", 2)
+ u:clear_orders()
+ u:add_order("LERNE Unterhaltung")
+ u:add_order("BENUTZEN 1 Lerntrank")
+ process_orders()
+ assert_equal(1, u:get_item("studypotion"))
+end
+
+function test_antimagic()
+ local r = region.create(0, 0, "plain")
+ local f = faction.create("noreply@eressea.de", "human", "de")
+ local u = unit.create(f, r, 1)
+ u:add_item("antimagic", 2)
+ u:clear_orders()
+ u:add_order("BENUTZEN 1 Antimagiekristall")
+ process_orders()
+ assert_equal(1, r:count_msg_type('use_antimagiccrystal'))
+ assert_equal(1, u:get_item("antimagic"))
+end
+
+function test_ointment()
+ local r = region.create(0, 0, "plain")
+ local f = faction.create("noreply@eressea.de", "human", "de")
+ local u = unit.create(f, r, 1)
+ local hp = u.hp
+ u.hp = 1
+ u:add_item("ointment", 1)
+ u:clear_orders()
+ u:add_order("BENUTZEN 1 Wundsalbe")
+ process_orders()
+ assert_equal(0, u:get_item("ointment"))
+ assert_equal(1, f:count_msg_type('usepotion'))
+ assert_equal(hp, u.hp)
+end
+
+function test_bloodpotion_demon()
+ local r = region.create(0, 0, "plain")
+ local f = faction.create("noreply@eressea.de", "demon", "de")
+ local u = unit.create(f, r, 1)
+ u:add_item("peasantblood", 1)
+ u:clear_orders()
+ u:add_order("BENUTZEN 1 Bauernblut")
+ process_orders()
+ assert_equal(0, u:get_item("peasantblood"))
+ assert_equal(1, f:count_msg_type('usepotion'))
+ assert_equal("demon", u.race)
+end
+
+function test_bloodpotion_other()
+ local r = region.create(0, 0, "plain")
+ local f = faction.create("noreply@eressea.de", "human", "de")
+ local u = unit.create(f, r, 1)
+ u:add_item("peasantblood", 1)
+ u:clear_orders()
+ u:add_order("BENUTZEN 1 Bauernblut")
+ process_orders()
+ assert_equal(0, u:get_item("peasantblood"))
+ assert_equal(1, f:count_msg_type('usepotion'))
+ assert_equal("smurf", u.race)
+end
+
+function test_foolpotion()
+ local r = region.create(0, 0, "plain")
+ local f = faction.create("noreply@eressea.de", "human", "de")
+ local u = unit.create(f, r, 1)
+ u:add_item("p7", 1)
+ u:clear_orders()
+ u:add_order("BENUTZEN 1 Dumpfbackenbrot 4242")
+ process_orders()
+ assert_equal(1, u:get_item("p7"))
+ assert_equal(1, f:count_msg_type('feedback_unit_not_found'))
+ local u2 = unit.create(f, r, 1)
+
+ u:clear_orders()
+ u:add_order("BENUTZEN 1 Dumpfbackenbrot " .. itoa36(u2.id))
+ process_orders()
+ assert_equal(1, u:get_item("p7"))
+ assert_equal(1, f:count_msg_type('error64'))
+
+ u:set_skill("stealth", 1);
+ process_orders()
+ assert_equal(0, u:get_item("p7"))
+ assert_equal(1, f:count_msg_type('givedumb'))
+end
+
+function test_snowman()
+ local r = region.create(0, 0, "glacier")
+ local f = faction.create("noreply@eressea.de", "human", "de")
+ local u = unit.create(f, r, 1)
+ u:add_item("snowman", 1)
+ u:clear_orders()
+ u:add_order("BENUTZEN 1 Schneemann")
+ process_orders()
+ for u2 in r.units do
+ if u2.id~=u.id then
+ assert_equal("snowman", u2.race)
+ assert_equal(1000, u2.hp)
+ u = nil
+ break
+ end
+ end
+ assert_equal(nil, u)
+end
diff --git a/src/attributes/attributes.c b/src/attributes/attributes.c
index 42f5247fe..ae6869df8 100644
--- a/src/attributes/attributes.c
+++ b/src/attributes/attributes.c
@@ -112,6 +112,7 @@ void register_attributes(void)
at_register(&at_germs);
+ at_deprecate("hurting", a_readint); /* an old arena attribute */
at_deprecate("xontormiaexpress", a_readint); /* required for old datafiles */
at_deprecate("orcification", a_readint); /* required for old datafiles */
at_deprecate("lua", read_ext); /* required for old datafiles */
diff --git a/src/eressea.c b/src/eressea.c
index 8001355f1..2d53c2511 100755
--- a/src/eressea.c
+++ b/src/eressea.c
@@ -8,9 +8,6 @@
#if MUSEUM_MODULE
#include
#endif
-#if ARENA_MODULE
-#include
-#endif
#include
#include
#include
@@ -77,9 +74,6 @@ void game_init(void)
register_itemfunctions();
#if MUSEUM_MODULE
register_museum();
-#endif
-#if ARENA_MODULE
- register_arena();
#endif
wormholes_register();
diff --git a/src/gmtool.c b/src/gmtool.c
index 3551c3436..148aafe6d 100644
--- a/src/gmtool.c
+++ b/src/gmtool.c
@@ -26,9 +26,6 @@
#if MUSEUM_MODULE
#include
#endif
-#if ARENA_MODULE
-#include
-#endif
#include
#include
diff --git a/src/items.c b/src/items.c
index 9833ac6f7..197240d3e 100644
--- a/src/items.c
+++ b/src/items.c
@@ -70,9 +70,9 @@ struct order *ord)
if (amount > MAXGAIN) {
amount = MAXGAIN;
}
- teach->value += amount * 30;
- if (teach->value > MAXGAIN * 30) {
- teach->value = MAXGAIN * 30;
+ teach->value += amount * STUDYDAYS;
+ if (teach->value > MAXGAIN * STUDYDAYS) {
+ teach->value = MAXGAIN * STUDYDAYS;
}
i_change(&u->items, itype, -amount);
return 0;
@@ -80,7 +80,6 @@ struct order *ord)
}
return EUNUSABLE;
}
-
/* END studypotion */
/* BEGIN speedsail */
@@ -344,9 +343,9 @@ struct order *ord)
void register_itemfunctions(void)
{
register_demonseye();
- register_item_use(use_studypotion, "use_studypotion");
/* have tests: */
+ register_item_use(use_studypotion, "use_studypotion");
register_item_use(use_antimagiccrystal, "use_antimagic");
register_item_use(use_speedsail, "use_speedsail");
register_item_use(use_bagpipeoffear, "use_bagpipeoffear");
diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt
index 633c486f5..82dee9ec4 100644
--- a/src/modules/CMakeLists.txt
+++ b/src/modules/CMakeLists.txt
@@ -1,6 +1,5 @@
PROJECT(modules C)
SET(_FILES
-arena.c
autoseed.c
gmcmd.c
museum.c
diff --git a/src/modules/arena.c b/src/modules/arena.c
deleted file mode 100644
index fbc3f0673..000000000
--- a/src/modules/arena.c
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
-Copyright (c) 1998-2015, Enno Rehling
-Katja Zedel
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-**/
-
-#include
-#include
-
-#if ARENA_MODULE
-#include "arena.h"
-
-/* modules include */
-#include "score.h"
-
-/* items include */
-#include
-
-/* kernel includes */
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-
-/* util include */
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-
-/* libc include */
-#include
-#include
-#include
-#include
-
-/* exports: */
-plane *arena = NULL;
-
-/* local vars */
-#define CENTRAL_VOLCANO 1
-
-static region *tower_region[6];
-static region *start_region[6];
-
-static region *arena_region(int school)
-{
- return tower_region[school];
-}
-
-static building *arena_tower(int school)
-{
- return arena_region(school)->buildings;
-}
-
-static int leave_fail(unit * u)
-{
- ADDMSG(&u->faction->msgs, msg_message("arena_leave_fail", "unit", u));
- return 1;
-}
-
-static int
-leave_arena(struct unit *u, const struct item_type *itype, int amount,
-order * ord)
-{
- if (!u->building && leave_fail(u)) {
- return -1;
- }
- if (u->building != arena_tower(u->faction->magiegebiet) && leave_fail(u)) {
- return -1;
- }
- UNUSED_ARG(amount);
- UNUSED_ARG(ord);
- UNUSED_ARG(itype);
- assert(!"not implemented");
- return 0;
-}
-
-static int enter_fail(unit * u)
-{
- ADDMSG(&u->faction->msgs, msg_message("arena_enter_fail", "region unit",
- u->region, u));
- return 1;
-}
-
-static int
-enter_arena(unit * u, const item_type * itype, int amount, order * ord)
-{
- skill_t sk;
- region *r = u->region;
- unit *u2;
- int fee = 2000;
- UNUSED_ARG(ord);
- UNUSED_ARG(amount);
- UNUSED_ARG(itype);
- if (u->faction->score > fee * 5) {
- score_t score = u->faction->score / 5;
- if (score < INT_MAX) {
- fee = (int)score;
- }
- else {
- fee = INT_MAX;
- }
- }
- if (getplane(r) == arena)
- return -1;
- if (u->number != 1 && enter_fail(u))
- return -1;
- if (get_pooled(u, get_resourcetype(R_SILVER), GET_DEFAULT, fee) < fee
- && enter_fail(u))
- return -1;
- for (sk = 0; sk != MAXSKILLS; ++sk) {
- if (get_level(u, sk) > 1 && enter_fail(u))
- return -1;
- }
- for (u2 = r->units; u2; u2 = u2->next)
- if (u2->faction == u->faction)
- break;
-
- assert(!"not implemented");
- /*
- for (res=0;res!=MAXRESOURCES;++res) if (res!=R_SILVER && res!=R_ARENA_GATE && (is_item(res) || is_herb(res) || is_potion(res))) {
- int x = get_resource(u, res);
- if (x) {
- if (u2) {
- change_resource(u2, res, x);
- change_resource(u, res, -x);
- }
- else if (enter_fail(u)) return -1;
- }
- }
- */
- if (get_money(u) > fee) {
- if (u2)
- change_money(u2, get_money(u) - fee);
- else if (enter_fail(u))
- return -1;
- }
- ADDMSG(&u->faction->msgs, msg_message("arena_enter_fail", "region unit",
- u->region, u));
- use_pooled(u, itype->rtype, GET_SLACK | GET_RESERVE, 1);
- use_pooled(u, get_resourcetype(R_SILVER), GET_DEFAULT, fee);
- set_money(u, 109);
- fset(u, UFL_ANON_FACTION);
- move_unit(u, start_region[rng_int() % 6], NULL);
- return 0;
-}
-#ifdef CENTRAL_VOLCANO
-
-static int caldera_handle(trigger * t, void *data)
-{
- /* call an event handler on caldera.
- * data.v -> ( variant event, int timer )
- */
- building *b = (building *)t->data.v;
- if (b != NULL) {
- unit **up = &b->region->units;
- while (*up) {
- unit *u = *up;
- if (u->building == b) {
- message *msg;
- if (u->items) {
- item **ip = &u->items;
- msg = msg_message("caldera_handle_1", "unit items", u, u->items);
- while (*ip) {
- item *i = *ip;
- i_remove(ip, i);
- if (*ip == i)
- ip = &i->next;
- }
- }
- else {
- msg = msg_message("caldera_handle_0", "unit", u);
- }
- add_message(&u->region->msgs, msg);
- set_number(u, 0);
- }
- if (*up == u)
- up = &u->next;
- }
- }
- else {
- log_error("could not perform caldera::handle()\n");
- }
- UNUSED_ARG(data);
- return 0;
-}
-
-static void caldera_write(const trigger * t, struct storage *store)
-{
- building *b = (building *)t->data.v;
- write_building_reference(b, store);
-}
-
-static int caldera_read(trigger * t, struct gamedata *data)
-{
- int rb =
- read_reference(&t->data.v, data, read_building_reference,
- resolve_building);
- if (rb == 0 && !t->data.v) {
- return AT_READ_FAIL;
- }
- return AT_READ_OK;
-}
-
-struct trigger_type tt_caldera = {
- "caldera",
- NULL,
- NULL,
- caldera_handle,
- caldera_write,
- caldera_read
-};
-
-#endif
-
-void register_arena(void)
-{
- at_deprecate("hurting", a_readint);
- register_function((pf_generic)enter_arena, "enter_arena");
- register_function((pf_generic)leave_arena, "leave_arena");
- tt_register(&tt_caldera);
-}
-
-#endif /* def ARENA_MODULE */
diff --git a/src/modules/arena.h b/src/modules/arena.h
deleted file mode 100644
index 64bfc7e87..000000000
--- a/src/modules/arena.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-Copyright (c) 1998-2015, Enno Rehling
-Katja Zedel
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-**/
-
-#ifndef ARENA_H
-#define ARENA_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if ARENA_MODULE == 0
-#error "must define ARENA_MODULE to use this module"
-#endif
- /* exports: */
- extern struct plane *arena;
-
- extern void register_arena(void);
-#ifdef ARENA_CREATION
- extern void create_arena(void);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/src/settings.h b/src/settings.h
index b77e4687a..e7ec39305 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -31,7 +31,6 @@
* or both. We don't want separate binaries for different games
*/
#define MUSEUM_MODULE 1
-#define ARENA_MODULE 1
#undef REGIONOWNERS /* (WIP) region-owner uses HELP_TRAVEL to control entry to region */