From da66780a569712c23ae4f2996cfb4608a9f9d69d Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Fri, 1 Apr 2016 20:02:19 -0400 Subject: copy all standard Dreambuilder mods in from the old subgame (exactly as last supplied there, updates to these mods will follow later) --- castle/rope.lua | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 castle/rope.lua (limited to 'castle/rope.lua') diff --git a/castle/rope.lua b/castle/rope.lua new file mode 100644 index 0000000..23ebea8 --- /dev/null +++ b/castle/rope.lua @@ -0,0 +1,121 @@ +minetest.register_node("castle:ropes",{ + description = "Rope", + drawtype = "nodebox", + sunlight_propagates = true, + tiles = {"castle_ropes.png"}, + groups = {choppy=3,snappy=3,oddly_breakable_by_hand=3,flammable=1}, + paramtype = "light", + climbable = true, + walkable = false, + node_box = { + type = "fixed", + fixed = { + {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}, + }, + }, + selection_box = { + type = "fixed", + fixed = { + {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}, + }, + }, +}) + +minetest.register_craft({ + output = "castle:ropes", + recipe = { + {"farming:string"}, + {"farming:string"}, + {"farming:string"}, + } +}) + +minetest.register_node("castle:box_rope", { + description = "Rope from Ropebox", + drawtype = "nodebox", + paramtype = "light", + sunlight_propagates = true, + tiles = {"castle_ropes.png"}, + groups = {not_in_creative_inventory=1}, + climbable = true, + walkable = false, + diggable = false, + node_box = { + type = "fixed", + fixed = { + {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}, + }, + }, + selection_box = { + type = "fixed", + fixed = { + {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}, + }, + }, + after_destruct = function(pos,oldnode) + local node = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}) + if node.name == "castle:box_rope" then + minetest.remove_node({x=pos.x,y=pos.y-1,z=pos.z}) + end + end, +}) + +minetest.register_node("castle:ropebox", { + description = "Ropebox", + drawtype = "nodebox", + sunlight_propagates = true, + tiles = {"castle_ropebox_top.png", + "castle_ropebox_top.png", + "castle_ropebox_side_1.png", + "castle_ropebox_side_1.png", + "castle_ropebox_side_2.png", + "castle_ropebox_side_2.png"}, + paramtype = "light", + paramtype2 = "facedir", + groups = {choppy=3}, + node_box = { + type = "fixed", + fixed = { + {-2/16, -2/16, -4/16, 2/16, 2/16, 4/16}, + {-2/16, -4/16, -2/16, 2/16, 4/16, 2/16}, + {-2/16, -3/16, -3/16, 2/16, 3/16, 3/16}, + {-3/16, -2/16, -2/16, -2/16, 8/16, 2/16}, + {2/16, -2/16, -2/16, 3/16, 8/16, 2/16}, + {-1/16, -8/16, -1/16, 1/16, -4/16, 1/16}, + }, + }, + after_destruct = function(pos,oldnode) + local node = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}) + if node.name == "castle:box_rope" then + minetest.remove_node({x=pos.x,y=pos.y-1,z=pos.z}) + end + end, +}) + +minetest.register_abm({ + nodenames = {"castle:ropebox"}, + interval = 1, + chance = 1, + action = function(pos, node) + if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name ~= 'air' then return end + minetest.add_node({x=pos.x,y=pos.y-1,z=pos.z}, {name="castle:box_rope"}) + end +}) + +minetest.register_abm({ + nodenames = {"castle:box_rope"}, + interval = 1, + chance = 1, + action = function(pos, node) + if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name ~= 'air' then return end + minetest.add_node({x=pos.x,y=pos.y-1,z=pos.z}, {name="castle:box_rope"}) + end +}) + +minetest.register_craft({ + output = "castle:ropebox", + recipe = { + {"default:wood"}, + {"castle:ropes"}, + } +}) -- cgit v1.2.3