minetest.register_node("loud_walking:plate_glass", { description = "Plate Glass", drawtype = "glasslike", paramtype = "light", sunlight_propagates = true, tiles = {"loud_walking_plate_glass.png"}, light_source = 8, use_texture_alpha = true, is_ground_content = false, groups = {cracky = 3, level=1}, sounds = default.node_sound_stone_defaults(), }) minetest.register_node("loud_walking:scrith", { description = "Scrith", paramtype = "light", tiles = {"default_obsidian.png"}, use_texture_alpha = true, is_ground_content = false, groups = {}, sounds = default.node_sound_stone_defaults(), }) local node = loud_walking.clone_node("default:glass") node.groups = {} minetest.register_node("loud_walking:transparent_scrith", node) minetest.register_node("loud_walking:controls", { description = "Alien control system", paramtype = "light", tiles = {"loud_walking_controls.png"}, use_texture_alpha = true, is_ground_content = false, groups = {}, sounds = default.node_sound_stone_defaults(), on_punch = function(pos, node, puncher, pointed_thing) if not puncher:is_player() then return end local sr = math.random(20) if sr < 3 then puncher:set_hp(puncher:get_hp() - sr) elseif sr < 6 then local pos = puncher:getpos() if sr == 3 then pos.x = pos.x + (math.random(-50, 50) * 160) elseif sr == 4 then pos.y = pos.y + (math.random(-50, 50) * 160) elseif sr == 5 then pos.z = pos.z + (math.random(-50, 50) * 160) end if pos.x > -31000 and pos.x < 31000 and pos.y > -31000 and pos.y < 31000 and pos.z > -31000 and pos.z < 31000 then puncher:setpos(pos) end elseif sr == 6 then for z1 = -4, 4 do for y1 = -4, 4 do for x1 = -4, 4 do local p = {x = pos.x + x1, y = pos.y + y1, z = pos.z + z1} local node = minetest.get_node(p) if node and node.name == "air" then minetest.set_node(p, {name="fire:basic_flame"}) end end end end elseif sr == 7 then puncher:set_hp(20) elseif sr == 8 then minetest.set_timeofday(math.random(100)/100) elseif sr == 9 then local pos = puncher:getpos() for z1 = -1, 1 do for x1 = -1, 1 do minetest.set_node({x = pos.x + x1, y = pos.y - 1, z = pos.z + z1}, {name="air"}) end end elseif sr == 10 then minetest.set_node(pos, {name="air"}) else minetest.chat_send_player(puncher:get_player_name(), "Please do not press this button again.") end end })