mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-12-25 18:00:19 +01:00
Auto-Generate delayers
This commit is contained in:
parent
813c0a83b0
commit
6772bc0112
@ -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",
|
description = "Delayer",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {
|
tiles = {
|
||||||
"mesecons_delayer_off_1.png",
|
"mesecons_delayer_off_"..tostring(i)..".png",
|
||||||
"mesecons_delayer_sides.png"
|
"mesecons_delayer_sides.png"
|
||||||
},
|
},
|
||||||
inventory_image = "mesecons_delayer_off_1.png",
|
inventory_image = "mesecons_delayer_off_1.png",
|
||||||
wield_image = "mesecons_delayer_off_1.png",
|
wield_image = "mesecons_delayer_off_1.png",
|
||||||
walkable = false,
|
walkable = true,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 },
|
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",
|
type = "fixed",
|
||||||
fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 },
|
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",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -24,165 +32,15 @@ minetest.register_node("mesecons_delayer:delayer_off_1", {
|
|||||||
drop = 'mesecons_delayer:delayer_off_1',
|
drop = 'mesecons_delayer:delayer_off_1',
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mesecons_delayer:delayer_off_2", {
|
|
||||||
description = "Delayer",
|
minetest.register_node("mesecons_delayer:delayer_on_"..tostring(i), {
|
||||||
|
description = "You hacker you",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {
|
tiles = {
|
||||||
"mesecons_delayer_off_2.png",
|
"mesecons_delayer_on_"..tostring(i)..".png",
|
||||||
"mesecons_delayer_sides.png"
|
"mesecons_delayer_sides.png"
|
||||||
},
|
},
|
||||||
inventory_image = "mesecons_delayer_off_2.png",
|
walkable = true,
|
||||||
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",
|
|
||||||
drawtype = "nodebox",
|
|
||||||
tiles = {
|
|
||||||
"mesecons_delayer_on_1.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,
|
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 },
|
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,
|
is_ground_content = true,
|
||||||
drop = 'mesecons_delayer:delayer_off_1',
|
drop = 'mesecons_delayer:delayer_off_1',
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user