SHARE
TWEET

Untitled

a guest Apr 21st, 2014 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. minetest.register_node("curtains:red_closed", {
  2.         description = "Red Curtain",
  3.         tiles = {"wool_red.png"},
  4.         paramtype = "light",
  5.         paramtype2 = "wallmounted",
  6.         selection_box = {
  7.                 type = "wallmounted",
  8.                 --wall_top = = <default>
  9.                 --wall_bottom = = <default>
  10.                 --wall_side = = <default>
  11.         },
  12.         drawtype = "signlike",
  13.         walkable = false,
  14.         groups = {oddly_breakable_by_hand=1,flammable=2},
  15.         sounds = default.node_sound_leaves_defaults(),
  16.         on_punch = function(pos, node, clicker)
  17.                 playername = clicker:get_player_name()
  18.                 if minetest.is_protected(pos, playername) then
  19.                         minetest.record_protection_violation(pos, playername)
  20.                         return
  21.                 end
  22.                 minetest.add_node(pos, {name = "curtains:red_open"})
  23.         end
  24. })
  25.  
  26. minetest.register_node("curtains:red_open", {
  27.         description = "Red Curtain",
  28.         tiles = {"invisible.png"},
  29.         paramtype = "light",    
  30.         paramtype2 = "wallmounted",
  31.         selection_box = {
  32.                 type = "wallmounted",
  33.                 --wall_top = = <default>
  34.                 --wall_bottom = = <default>
  35.                 --wall_side = = <default>
  36.         },
  37.         drawtype = "signlike",
  38.         drop = "curtains:red_closed",
  39.         walkable = false,
  40.         groups = {oddly_breakable_by_hand=1,flammable=2},
  41.         sounds = default.node_sound_leaves_defaults(),
  42.         on_punch = function(pos, node, clicker)
  43.                 playername = clicker:get_player_name()
  44.                 if minetest.is_protected(pos, playername) then
  45.                         minetest.record_protection_violation(pos, playername)
  46.                         return
  47.                 end
  48.                 minetest.add_node(pos, {name = "curtains:red_closed"})
  49.         end
  50. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top