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) --- plantlife_modpack/vines/nodes.lua | 83 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 plantlife_modpack/vines/nodes.lua (limited to 'plantlife_modpack/vines/nodes.lua') diff --git a/plantlife_modpack/vines/nodes.lua b/plantlife_modpack/vines/nodes.lua new file mode 100644 index 0000000..9d7df00 --- /dev/null +++ b/plantlife_modpack/vines/nodes.lua @@ -0,0 +1,83 @@ +minetest.register_node("vines:rope_block", { + description = "Rope", + sunlight_propagates = true, + paramtype = "light", + tiles = { + "default_wood.png^vines_rope.png", + "default_wood.png^vines_rope.png", + "default_wood.png", + "default_wood.png", + "default_wood.png^vines_rope.png", + "default_wood.png^vines_rope.png", + }, + groups = { flammable=2, choppy=2, oddly_breakable_by_hand=1 }, + after_place_node = function(pos) + local p = {x=pos.x, y=pos.y-1, z=pos.z} + local n = minetest.get_node(p) + if n.name == "air" then + minetest.add_node(p, {name="vines:rope_end"}) + end + end, + after_dig_node = function(pos, node, digger) + local p = {x=pos.x, y=pos.y-1, z=pos.z} + local n = minetest.get_node(p) + while ( n.name == 'vines:rope' or n.name == 'vines:rope_end' ) do + minetest.remove_node(p) + p = {x=p.x, y=p.y-1, z=p.z} + n = minetest.get_node(p) + end + end +}) + +minetest.register_node("vines:rope", { + description = "Rope", + walkable = false, + climbable = true, + sunlight_propagates = true, + paramtype = "light", + drop = "", + tiles = { "vines_rope.png" }, + drawtype = "plantlike", + groups = {flammable=2, not_in_creative_inventory=1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, + }, +}) + +minetest.register_node("vines:rope_end", { + description = "Rope", + walkable = false, + climbable = true, + sunlight_propagates = true, + paramtype = "light", + drop = "", + tiles = { "vines_rope_end.png" }, + drawtype = "plantlike", + groups = {flammable=2, not_in_creative_inventory=1}, + sounds = default.node_sound_leaves_defaults(), + after_place_node = function(pos) + yesh = {x = pos.x, y= pos.y-1, z=pos.z} + minetest.add_node(yesh, {name="vines:rope"}) + end, + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, + }, + on_construct = function( pos ) + local timer = minetest.get_node_timer( pos ) + timer:start( 1 ) + end, + on_timer = function( pos, elapsed ) + local p = {x=pos.x, y=pos.y-1, z=pos.z} + local n = minetest.get_node(p) + if n.name == "air" then + minetest.set_node(pos, {name="vines:rope"}) + minetest.add_node(p, {name="vines:rope_end"}) + else + local timer = minetest.get_node_timer( pos ) + timer:start( 1 ) + end + end +}) -- cgit v1.2.3