Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- minetest.register_node("curtains:red_closed", {
- description = "Red Curtain",
- tiles = {"wool_red.png"},
- paramtype = "light",
- paramtype2 = "wallmounted",
- selection_box = {
- type = "wallmounted",
- --wall_top = = <default>
- --wall_bottom = = <default>
- --wall_side = = <default>
- },
- drawtype = "signlike",
- walkable = false,
- groups = {oddly_breakable_by_hand=1,flammable=2},
- sounds = default.node_sound_leaves_defaults(),
- on_punch = function(pos, node, clicker)
- playername = clicker:get_player_name()
- if minetest.is_protected(pos, playername) then
- minetest.record_protection_violation(pos, playername)
- return
- end
- minetest.add_node(pos, {name = "curtains:red_open"})
- end
- })
- minetest.register_node("curtains:red_open", {
- description = "Red Curtain",
- tiles = {"invisible.png"},
- paramtype = "light",
- paramtype2 = "wallmounted",
- selection_box = {
- type = "wallmounted",
- --wall_top = = <default>
- --wall_bottom = = <default>
- --wall_side = = <default>
- },
- drawtype = "signlike",
- drop = "curtains:red_closed",
- walkable = false,
- groups = {oddly_breakable_by_hand=1,flammable=2},
- sounds = default.node_sound_leaves_defaults(),
- on_punch = function(pos, node, clicker)
- playername = clicker:get_player_name()
- if minetest.is_protected(pos, playername) then
- minetest.record_protection_violation(pos, playername)
- return
- end
- minetest.add_node(pos, {name = "curtains:red_closed"})
- end
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement