diff options
author | Jeija <norrepli@gmail.com> | 2012-08-10 21:50:07 +0200 |
---|---|---|
committer | Jeija <norrepli@gmail.com> | 2012-08-10 21:50:07 +0200 |
commit | 6772bc0112e5742558f97b02c6988ee909db4b86 (patch) | |
tree | e8d0ef4d751c20f61cd1089c2b217820e7172cad | |
parent | 813c0a83b08c22676e96f7b37b15cecdf49ce78f (diff) | |
download | mesecons-6772bc0112e5742558f97b02c6988ee909db4b86.tar mesecons-6772bc0112e5742558f97b02c6988ee909db4b86.tar.gz mesecons-6772bc0112e5742558f97b02c6988ee909db4b86.tar.bz2 mesecons-6772bc0112e5742558f97b02c6988ee909db4b86.tar.xz mesecons-6772bc0112e5742558f97b02c6988ee909db4b86.zip |
Auto-Generate delayers
-rw-r--r-- | mesecons_delayer/init.lua | 175 |
1 files changed, 17 insertions, 158 deletions
diff --git a/mesecons_delayer/init.lua b/mesecons_delayer/init.lua index 0c78c42..b07aaa4 100644 --- a/mesecons_delayer/init.lua +++ b/mesecons_delayer/init.lua @@ -1,13 +1,21 @@ -minetest.register_node("mesecons_delayer:delayer_off_1", { +for i = 1, 4 do +local groups = {} +if i == 1 then + groups = {bendy=2,snappy=1,dig_immediate=2} +else + groups = {bendy=2,snappy=1,dig_immediate=2, not_in_creative_inventory=1} +end + +minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), { description = "Delayer", drawtype = "nodebox", tiles = { - "mesecons_delayer_off_1.png", + "mesecons_delayer_off_"..tostring(i)..".png", "mesecons_delayer_sides.png" }, inventory_image = "mesecons_delayer_off_1.png", wield_image = "mesecons_delayer_off_1.png", - walkable = false, + walkable = true, selection_box = { type = "fixed", fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, @@ -16,7 +24,7 @@ minetest.register_node("mesecons_delayer:delayer_off_1", { type = "fixed", fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, }, - groups = {bendy=2,snappy=1,dig_immediate=2}, + groups = groups, paramtype = "light", paramtype2 = "facedir", sunlight_propagates = true, @@ -24,165 +32,15 @@ minetest.register_node("mesecons_delayer:delayer_off_1", { drop = 'mesecons_delayer:delayer_off_1', }) -minetest.register_node("mesecons_delayer:delayer_off_2", { - description = "Delayer", - drawtype = "nodebox", - tiles = { - "mesecons_delayer_off_2.png", - "mesecons_delayer_sides.png" - }, - inventory_image = "mesecons_delayer_off_2.png", - walkable = false, - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, - }, - groups = {bendy=2,snappy=1,dig_immediate=2,not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - drop = 'mesecons_delayer:delayer_off_1', -}) -minetest.register_node("mesecons_delayer:delayer_off_3", { - description = "Delayer", - drawtype = "nodebox", - tiles = { - "mesecons_delayer_off_3.png", - "mesecons_delayer_sides.png" - }, - inventory_image = "mesecons_delayer_off_3.png", - walkable = false, - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, - }, - groups = {bendy=2,snappy=1,dig_immediate=2,not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - drop = 'mesecons_delayer:delayer_off_1', -}) - -minetest.register_node("mesecons_delayer:delayer_off_4", { - description = "Delayer", - drawtype = "nodebox", - tiles = { - "mesecons_delayer_off_4.png", - "mesecons_delayer_sides.png" - }, - inventory_image = "mesecons_delayer_off_4.png", - walkable = false, - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, - }, - groups = {bendy=2,snappy=1,dig_immediate=2,not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - drop = 'mesecons_delayer:delayer_off_1', -}) - -minetest.register_node("mesecons_delayer:delayer_on_1", { - description = "Delayer", +minetest.register_node("mesecons_delayer:delayer_on_"..tostring(i), { + description = "You hacker you", drawtype = "nodebox", tiles = { - "mesecons_delayer_on_1.png", + "mesecons_delayer_on_"..tostring(i)..".png", "mesecons_delayer_sides.png" }, - inventory_image = "mesecons_delayer_on_1.png", - walkable = false, - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, - }, - groups = {bendy=2,snappy=1,dig_immediate=2,not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - drop = 'mesecons_delayer:delayer_off_1', -}) - -minetest.register_node("mesecons_delayer:delayer_on_2", { - description = "Delayer", - drawtype = "nodebox", - tiles = { - "mesecons_delayer_on_2.png", - "mesecons_delayer_sides.png" - }, - inventory_image = "mesecons_delayer_on_2.png", - walkable = false, - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, - }, - groups = {bendy=2,snappy=1,dig_immediate=2,not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - drop = 'mesecons_delayer:delayer_off_1', -}) - -minetest.register_node("mesecons_delayer:delayer_on_3", { - description = "Delayer", - drawtype = "nodebox", - tiles = { - "mesecons_delayer_on_3.png", - "mesecons_delayer_sides.png" - }, - inventory_image = "mesecons_delayer_on_3.png", - walkable = false, - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, - }, - groups = {bendy=2,snappy=1,dig_immediate=2,not_in_creative_inventory=1}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = true, - drop = 'mesecons_delayer:delayer_off_1', -}) - -minetest.register_node("mesecons_delayer:delayer_on_4", { - description = "Delayer", - drawtype = "nodebox", - tiles = { - "mesecons_delayer_on_4.png", - "mesecons_delayer_sides.png" - }, - inventory_image = "mesecons_delayer_on_4.png", - walkable = false, + walkable = true, selection_box = { type = "fixed", fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, @@ -198,6 +56,7 @@ minetest.register_node("mesecons_delayer:delayer_on_4", { is_ground_content = true, drop = 'mesecons_delayer:delayer_off_1', }) +end |