From ecbd0ba83c113b8bf6f6b89b635317b224c48e8b Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 18 Nov 2016 13:30:24 +0100 Subject: [PATCH] github issue #606 disable volcano terrain change for snowglobe test --- scripts/tests/xmas.lua | 1 + src/volcano.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/tests/xmas.lua b/scripts/tests/xmas.lua index 3667de0b6..153052d5a 100644 --- a/scripts/tests/xmas.lua +++ b/scripts/tests/xmas.lua @@ -7,6 +7,7 @@ function setup() eressea.settings.set("nmr.timeout", "0") eressea.settings.set("rules.grow.formula", "0") eressea.settings.set("rules.peasants.growth.factor", "0") + eressea.settings.set("volcano.active.percent", "4") end function test_snowglobe_fail() diff --git a/src/volcano.c b/src/volcano.c index bd8c56b30..60beeaed7 100644 --- a/src/volcano.c +++ b/src/volcano.c @@ -284,7 +284,8 @@ void volcano_update(void) } } else if (r->terrain == t_volcano) { - if (rng_int() % 100 < 4) { + int volcano_chance = config_get_int("volcano.active.percent", 4); + if (rng_int() % 100 < volcano_chance) { ADDMSG(&r->msgs, msg_message("volcanostartsmoke", "region", r)); r->terrain = t_active; }