actually make the reactor core melt down when it should
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Wed, 23 Jul 2014 15:08:11 +0000 (11:08 -0400)
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Wed, 23 Jul 2014 15:08:11 +0000 (11:08 -0400)
(turns into a lava source, boils away the surrounding water)

technic/machines/HV/nuclear_reactor.lua

index 3f573bf23b2884d5b25a60b4540605c2b90ad175..337bccf2aa3ce9533cd71ae0291979e1eb8e61d1 100644 (file)
@@ -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)