summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRealBadAngel <maciej.kasatkin@o2.pl>2015-11-14 11:29:16 +0100
committerRealBadAngel <maciej.kasatkin@o2.pl>2015-11-14 11:29:16 +0100
commit8ef83e8f7ebe4b78062fab325636d25ba9cb3a22 (patch)
tree62da5221233a9b3337c9474fe9285ce28e7d4644
parent798a885807a1e1d6f0e028dbf6dcdb5cc9517106 (diff)
Fix corium greifing disabling not working.
-rw-r--r--technic/machines/HV/nuclear_reactor.lua37
1 files changed, 14 insertions, 23 deletions
diff --git a/technic/machines/HV/nuclear_reactor.lua b/technic/machines/HV/nuclear_reactor.lua
index 24dd5cd..b3ddd6e 100644
--- a/technic/machines/HV/nuclear_reactor.lua
+++ b/technic/machines/HV/nuclear_reactor.lua
@@ -619,6 +619,10 @@ if damage_enabled then
end
-- radioactive materials that can result from destroying a reactor
+local corium_griefing = 1
+if (not technic.config:get_bool("enable_corium_griefing")) then
+ corium_griefing = 0
+end
for _, state in ipairs({ "flowing", "source" }) do
minetest.register_node("technic:corium_"..state, {
@@ -652,7 +656,7 @@ for _, state in ipairs({ "flowing", "source" }) do
groups = {
liquid = 2,
hot = 3,
- igniter = 1,
+ igniter = corium_griefing,
radioactive = (state == "source" and 32000 or 16000),
not_in_creative_inventory = (state == "flowing" and 1 or nil),
},
@@ -689,28 +693,15 @@ minetest.register_abm({
end,
})
-minetest.register_abm({
- nodenames = {"technic:corium_flowing"},
- neighbors = {"group:water"},
- interval = 1,
- chance = 1,
- action = function (pos, node)
- minetest.set_node(pos, {name="technic:chernobylite_block"})
- end,
-})
-
-local griefing = technic.config:get_bool("enable_corium_griefing")
-
-minetest.register_abm({
- nodenames = {"technic:corium_flowing"},
- interval = 5,
- chance = (griefing and 10 or 1),
- action = function (pos, node)
- minetest.set_node(pos, {name="technic:chernobylite_block"})
- end,
-})
-
-if griefing then
+if (corium_griefing == 1) then
+ minetest.register_abm({
+ nodenames = {"technic:corium_flowing"},
+ interval = 5,
+ chance = (10 or 1),
+ action = function (pos, node)
+ minetest.set_node(pos, {name="technic:chernobylite_block"})
+ end,
+ })
minetest.register_abm({
nodenames = { "technic:corium_source", "technic:corium_flowing" },
interval = 4,