Add option to turn off fortresses

Some people just can't stand the coolness.
master
Chris N 2014-08-07 11:11:24 -10:00
parent 13aae2952a
commit 87ac0a6706
2 changed files with 8 additions and 2 deletions

View File

@ -50,6 +50,9 @@ setting("number", "fortcha", 0.0003) --chance of fortresses
--realm limits for Dungeon Masters' Lair
setting("number", "dm_top", -4000) --upper limit
setting("number", "dm_bot", -5000) --lower limit
--should fortresses and fountains spawn?
setting("bool", "fortresses", true)
setting("bool", "fountains", true)
--minimum number of items in chests found in fortresses
setting("number", "min_items", 2)

View File

@ -22,6 +22,9 @@ if caverealms.config.falling_icicles == true then
print("[caverealms] falling icicles enabled.")
end
local FORTRESSES = caverealms.config.fortresses --true | Should fortresses spawn?
local FOUNTAINS = caverealms.config.fountains --true | Should fountains spawn?
-- Parameters
local YMIN = caverealms.config.ymin -- Approximate realm limits.
@ -284,10 +287,10 @@ minetest.register_on_generated(function(minp, maxp, seed)
if math.random() < FLACHA then --neverending flames
data[ai] = c_flame
end
if math.random() < FOUNCHA then --DM FOUNTAIN
if math.random() < FOUNCHA and FOUNTAINS then --DM FOUNTAIN
data[ai] = c_fountain
end
if math.random() < FORTCHA then --DM FORTRESS
if math.random() < FORTCHA and FORTRESSES then --DM FORTRESS
data[ai] = c_fortress
end
end