github issue #606

disable volcano terrain change for snowglobe test
This commit is contained in:
Enno Rehling 2016-11-18 13:30:24 +01:00
parent 7d874f1606
commit ecbd0ba83c
2 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@ function setup()
eressea.settings.set("nmr.timeout", "0") eressea.settings.set("nmr.timeout", "0")
eressea.settings.set("rules.grow.formula", "0") eressea.settings.set("rules.grow.formula", "0")
eressea.settings.set("rules.peasants.growth.factor", "0") eressea.settings.set("rules.peasants.growth.factor", "0")
eressea.settings.set("volcano.active.percent", "4")
end end
function test_snowglobe_fail() function test_snowglobe_fail()

View File

@ -284,7 +284,8 @@ void volcano_update(void)
} }
} }
else if (r->terrain == t_volcano) { 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)); ADDMSG(&r->msgs, msg_message("volcanostartsmoke", "region", r));
r->terrain = t_active; r->terrain = t_active;
} }