summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2014-07-23 11:08:11 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2014-07-23 11:08:11 -0400
commit2d9e06c4791f613c8ca86f0d1a71579bcee4a566 (patch)
treeb230474ced279a868547bc9e7236e463d6c607e4
parent29c7ff5228864bcf5456f391b122c9eb477c754b (diff)
actually make the reactor core melt down when it should
(turns into a lava source, boils away the surrounding water)
-rw-r--r--technic/machines/HV/nuclear_reactor.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/technic/machines/HV/nuclear_reactor.lua b/technic/machines/HV/nuclear_reactor.lua
index 3f573bf..337bccf 100644
--- a/technic/machines/HV/nuclear_reactor.lua
+++ b/technic/machines/HV/nuclear_reactor.lua
@@ -123,6 +123,18 @@ end
local explode_reactor = function(pos)
print("A reactor exploded at "..minetest.pos_to_string(pos))
+ for x = -1, 1 do
+ for y = -1, 1 do
+ for z = -1, 1 do
+ local erase_pos = { x = pos.x + x, y = pos.y + y, z = pos.z + z }
+ local node = minetest.get_node(erase_pos)
+ if node.name == "default:water_source" or node.name == "default:water_flowing" then
+ minetest.set_node(erase_pos, {name = "air"})
+ end
+ end
+ end
+ end
+ minetest.set_node(pos, {name = "default:lava_source"})
end
local function damage_nearby_players(pos)