mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-26 02:40:29 +01:00
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:
parent
366fc3bc65
commit
c5e9480d99
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user