Config setting to nerf corium

For use on servers that have a mainly creative purpose, the setting
enable_corium_griefing=false will prevent corium from flowing far or
unpredictably and from destroying nodes other than water.  All reactor
meltdowns will stay contained.
This commit is contained in:
Zefram 2014-07-23 22:13:45 +01:00 committed by Vanessa Ezekowitz
parent 366fc3bc65
commit c5e9480d99
2 changed files with 23 additions and 18 deletions

View File

@ -13,6 +13,7 @@ local defaults = {
enable_marble_generation = "true", enable_marble_generation = "true",
enable_granite_generation = "true", enable_granite_generation = "true",
enable_wind_mill = "false", enable_wind_mill = "false",
enable_corium_griefing = "true",
} }
for k, v in pairs(defaults) do for k, v in pairs(defaults) do

View File

@ -351,15 +351,18 @@ minetest.register_abm({
end, end,
}) })
local griefing = technic.config:get_bool("enable_corium_griefing")
minetest.register_abm({ minetest.register_abm({
nodenames = {"technic:corium_flowing"}, nodenames = {"technic:corium_flowing"},
interval = 5, interval = 5,
chance = 10, chance = (griefing and 10 or 1),
action = function (pos, node) action = function (pos, node)
minetest.set_node(pos, {name="technic:chernobylite_block"}) minetest.set_node(pos, {name="technic:chernobylite_block"})
end, end,
}) })
if griefing then
minetest.register_abm({ minetest.register_abm({
nodenames = { "technic:corium_source", "technic:corium_flowing" }, nodenames = { "technic:corium_source", "technic:corium_flowing" },
interval = 4, interval = 4,
@ -378,3 +381,4 @@ minetest.register_abm({
end end
end, end,
}) })
end