if (minetest.get_modpath("intllib")) then dofile(minetest.get_modpath("intllib").."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else S = function ( s ) return s end end minetest.register_node("pseudonodes:pseudo_block", { description = S("pseudo-block"), drawtype = "glasslike", paramtype = "light", tiles = { "pseudonodes_pseudo_block.png" }, inventory_image = minetest.inventorycube("pseudonodes_pseudo_block.png"), groups = { pseudo = 1 }, sunlight_propagates = true, walkable = false, sounds = { dig = { name="", gain = 0 } }, alpha = 0, stack_max = 9999, drop = "", on_blast = function() end, }) minetest.register_node("pseudonodes:replacable_pseudo_block", { description = S("replacable pseudo-block"), drawtype = "glasslike", paramtype = "light", tiles = { "pseudonodes_replacable_pseudo_block.png" }, inventory_image = minetest.inventorycube("pseudonodes_replacable_pseudo_block.png"), groups = { pseudo = 1 }, sunlight_propagates = true, walkable = false, sounds = { dig = { name="", gain = 0 } }, alpha = 0, buildable_to = true, stack_max = 9999, drop = "", on_blast = function() end, }) minetest.register_node("pseudonodes:pseudo_block_timer", { description = S("timed pseudo-block"), drawtype = "glasslike", paramtype = "light", tiles = { { image="pseudonodes_pseudo_block_timer_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2} } }, inventory_image = minetest.inventorycube("pseudonodes_pseudo_block_timer.png"), groups = { pseudo = 1 }, sunlight_propagates = true, walkable = false, sounds = { dig = { name="", gain = 0 } }, alpha = 0, stack_max = 9999, drop = "", on_construct = function(pos) local timer = minetest.get_node_timer(pos) timer:start(5) end, on_timer = function(pos,elapsed) minetest.remove_node(pos) end, on_blast = function() end, }) minetest.register_node("pseudonodes:replacable_pseudo_block_timer", { description = S("replacable timed pseudo-block"), drawtype = "glasslike", paramtype = "light", tiles = { { image="pseudonodes_replacable_pseudo_block_timer_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2} } }, inventory_image = minetest.inventorycube("pseudonodes_replacable_pseudo_block_timer.png"), groups = { pseudo = 1 }, sunlight_propagates = true, walkable = false, sounds = { dig = { name="", gain = 0 } }, alpha = 0, buildable_to = true, stack_max = 9999, drop = "", on_construct = function(pos) local timer = minetest.get_node_timer(pos) timer:start(5) end, on_timer = function(pos,elapsed) minetest.remove_node(pos) end, on_blast = function() end, }) minetest.register_node("pseudonodes:switch_block_off", { description = S("switch block (off)"), drawtype = "glasslike", paramtype = "light", tiles = { "pseudonodes_switch_block_off.png" }, inventory_image = minetest.inventorycube("pseudonodes_switch_block_off.png"), sunlight_propagates = true, walkable = false, sounds = { dig = { name="", gain = 0 } }, groups = { pseudo = 1 }, alpha = 0, stack_max = 9999, drop = "", on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) local newnode = node newnode.name = "pseudonodes:switch_block_on" minetest.swap_node(pos, newnode) return itemstack end, on_blast = function() end, }) minetest.register_node("pseudonodes:switch_block_on", { description = S("switch block (on)"), tiles = { "pseudonodes_switch_block_on.png" }, inventory_image = minetest.inventorycube("pseudonodes_switch_block_on.png"), groups = { pseudo = 1 }, diggable = true, walkable = true, stack_max = 9999, drop = "", on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) local newnode = node newnode.name = "pseudonodes:switch_block_off" minetest.swap_node(pos, newnode) return itemstack end, on_blast = function(pos, intensity) minetest.set_node(pos, {name="pseudonodes:switch_block_off"}) end, }) minetest.register_tool("pseudonodes:pick", { description = S("pseudo-pick"), inventory_image = "pseudonodes_pick.png", tool_capabilities = { groupcaps = { pseudo = { times = {[1]=0}, maxlevel=1, maxwear=0 }}, }, })