[seaglass] Correction pour Minetest 5

- Ajoute support des "inner" et "outer" stairs
- Corrige crash quand punch node
This commit is contained in:
Sys Quatre 2019-08-15 19:09:45 +02:00
parent 5ec73557de
commit b2fc8936bf

View File

@ -1,248 +1,107 @@
-- NODES -- NODES
local repl = {
["off"] = "",
["on"] = "off",
}
minetest.register_node("seaglass:seaglass", { local colors = {"yellow", "red", "blue", "white", "black"}
description = "Standard seaglass on",
drawtype = "glasslike",
tiles = {"seaglass_seaglass.png"},
inventory_image = minetest.inventorycube("seaglass_seaglass.png"),
paramtype = "light",
sunlight_propagates = true,
light_source = 14,
is_ground_content = true,
drop = 'seaglass:seaglassoff',
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, nocolor=1, shine=1, not_in_creative_inventory=1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("seaglass:seaglass_yellow", { local function register_glass(suffix, color, cgroups)
description = "Seaglass yellow on", -- suffix : bool (false:off | true:on)
drawtype = "glasslike", local desc = "Seaglass "
tiles = {"seaglass_seaglass_yellow.png"},
inventory_image = minetest.inventorycube("seaglass_seaglass_yellow.png"),
paramtype = "light",
sunlight_propagates = true,
light_source = 14,
is_ground_content = true,
drop = 'seaglass:seaglassoff_yellow',
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, color_yellow=1, shine=1, yellowshine=1, not_in_creative_inventory=1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("seaglass:seaglass_red", { local col, c = "", ""
description = "Seaglass red on", if color and color ~= "" then
drawtype = "glasslike", col,c = color, "_"..color
tiles = {"seaglass_seaglass_red.png"}, desc = desc..color.." "
inventory_image = minetest.inventorycube("seaglass_seaglass_red.png"), end
paramtype = "light",
sunlight_propagates = true,
light_source = 14,
is_ground_content = true,
drop = 'seaglass:seaglassoff_red',
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, color_red=1, shine=1, redshine=1, not_in_creative_inventory=1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("seaglass:seaglass_blue", { local l, light, ls = "", "on", 7
description = "Seaglass blue on", if not suffix then
drawtype = "glasslike", l,light = "off","off"
tiles = {"seaglass_seaglass_blue.png"}, ls = 0
inventory_image = minetest.inventorycube("seaglass_seaglass_blue.png"), end
paramtype = "light",
sunlight_propagates = true,
light_source = 14,
is_ground_content = true,
drop = 'seaglass:seaglassoff_blue',
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, color_blue=1, shine=1, blueshine=1, not_in_creative_inventory=1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("seaglass:seaglass_white", { desc = desc..light
description = "Seaglass white on",
drawtype = "glasslike",
tiles = {"seaglass_seaglass_white.png"},
inventory_image = minetest.inventorycube("seaglass_seaglass_white.png"),
paramtype = "light",
sunlight_propagates = true,
light_source = 14,
is_ground_content = true,
drop = 'seaglass:seaglassoff_white',
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, color_white=1, shine=1, whiteshine=1, not_in_creative_inventory=1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("seaglass:seaglass_black", { minetest.register_node(
description = "Seaglass black on", "seaglass:seaglass"..l..c,
drawtype = "glasslike", {
tiles = {"seaglass_seaglass_black.png"}, description = desc,
inventory_image = minetest.inventorycube("seaglass_seaglass_black.png"), drawtype = "glasslike",
paramtype = "light", tiles = {"seaglass_seaglass"..c..".png"},
sunlight_propagates = true, inventory_image = minetest.inventorycube("seaglass_seaglass"..c..".png"),
light_source = 14, paramtype = "light",
is_ground_content = true, sunlight_propagates = true,
drop = 'seaglass:seaglassoff_black', light_source = ls,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, color_black=1, shine=1, blackshine=1, not_in_creative_inventory=1}, is_ground_content = true,
sounds = default.node_sound_glass_defaults(), drop = "seaglass:seaglassoff"..c,
}) groups = cgroups, -- {snappy=2,cracky=3,oddly_breakable_by_hand=3, nocolor=1, shine=1, not_in_creative_inventory=1},
sounds = default.node_sound_glass_defaults(),
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
node.name = "seaglass:seaglass"..repl[light]..c
minetest.set_node(pos, node)
end,
})
minetest.register_node("seaglass:seaglassoff", { stairs.register_stair_and_slab("seaglass"..l..c, "seaglass:seaglass"..l..c,
description = "Standard seaglass off", cgroups,
drawtype = "glasslike", {"seaglass_seaglass"..c..".png"},
tiles = {"seaglass_seaglass.png"}, "Seaglass stair "..light.." "..col,
inventory_image = minetest.inventorycube("seaglass_seaglass.png"), "Seaglass slab "..light.." "..col,
paramtype = "light", default.node_sound_glass_defaults())
sunlight_propagates = true,
is_ground_content = true,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, nocolor=1, noshine=1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("seaglass:seaglassoff_yellow", { for _,i in ipairs({"slab", "stair", "stair_outer", "stair_inner"}) do
description = "Seaglass yellow off", minetest.override_item(
drawtype = "glasslike", "stairs:"..i.."_seaglass"..l..c,
tiles = {"seaglass_seaglass_yellow.png"}, {
inventory_image = minetest.inventorycube("seaglass_seaglass_yellow.png"), light_source = ls,
paramtype = "light", drop = "stairs:"..i.."_seaglassoff"..c,
sunlight_propagates = true, on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
is_ground_content = true, node.name = "stairs:"..i.."_seaglass"..repl[light]..c
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, color_yellow=1, noshine=1}, minetest.set_node(pos, node)
sounds = default.node_sound_glass_defaults(), end
}) })
if suffix then
minetest.register_alias("stairsshine:"..i.."_seaglass"..c, "stairs:"..i.."_seaglass"..c)
end
end
minetest.register_node("seaglass:seaglassoff_red", { end
description = "Seaglass red off",
drawtype = "glasslike",
tiles = {"seaglass_seaglass_red.png"},
inventory_image = minetest.inventorycube("seaglass_seaglass_red.png"),
paramtype = "light",
sunlight_propagates = true,
is_ground_content = true,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, color_red=1, noshine=1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("seaglass:seaglassoff_blue", { for _,color in ipairs(colors) do
description = "Seaglass blue off", local groups_off = {noshine=1, snappy=2, cracky=3, oddly_breakable_by_hand=3}
drawtype = "glasslike", local groups_on = {not_in_creative_inventory=1, shine=1, snappy=2, cracky=3, oddly_breakable_by_hand=3}
tiles = {"seaglass_seaglass_blue.png"},
inventory_image = minetest.inventorycube("seaglass_seaglass_blue.png"),
paramtype = "light",
sunlight_propagates = true,
is_ground_content = true,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, color_blue=1, noshine=1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("seaglass:seaglassoff_white", { if color == "yellow" then
description = "Seaglass white off", groups_off.color_yellow = 1
drawtype = "glasslike", groups_on.color_yellow = 1
tiles = {"seaglass_seaglass_white.png"}, groups_on.yellowshine = 1
inventory_image = minetest.inventorycube("seaglass_seaglass_white.png"), elseif color == "red" then
paramtype = "light", groups_off.color_red = 1
sunlight_propagates = true, groups_on.color_red = 1
is_ground_content = true, groups_on.redshine = 1
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, color_white=1, noshine=1}, elseif color == "blue" then
sounds = default.node_sound_glass_defaults(), groups_off.color_blue = 1
}) groups_on.color_blue = 1
groups_on.blueshine = 1
elseif color == "white" then
groups_off.color_white = 1
groups_on.color_white = 1
groups_on.whiteshine = 1
elseif color == "black" then
groups_off.color_black = 1
groups_on.color_black = 1
groups_on.blackshine = 1
end
minetest.register_node("seaglass:seaglassoff_black", { register_glass(false, color, groups_off)
description = "Seaglass black off", register_glass(true, color, groups_on)
drawtype = "glasslike", end
tiles = {"seaglass_seaglass_black.png"},
inventory_image = minetest.inventorycube("seaglass_seaglass_black.png"),
paramtype = "light",
sunlight_propagates = true,
is_ground_content = true,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, color_black=1, noshine=1},
sounds = default.node_sound_glass_defaults(),
})
register_glass(false, nil, {snappy=2,cracky=3,oddly_breakable_by_hand=3, nocolor=1, noshine=1})
-- STAIRS register_glass(true, nil, {snappy=2,cracky=3,oddly_breakable_by_hand=3, nocolor=1, shine=1, not_in_creative_inventory=1})
stairsshine.register_stair_and_slab("seaglass", "seaglass:seaglass",
{snappy=2,cracky=3,oddly_breakable_by_hand=3, nocolor=1, shine=1, not_in_creative_inventory=1},
{"seaglass_seaglass.png"},
"Seaglass stair on",
"Seaglass slab on",
default.node_sound_glass_defaults())
stairsshine.register_stair_and_slab("seaglass_yellow", "seaglass:seaglass_yellow",
{snappy=2,cracky=3,oddly_breakable_by_hand=3, color_yellow=1, shine=1, yellowshine=1, not_in_creative_inventory=1},
{"seaglass_seaglass_yellow.png"},
"seaglass stair on yellow",
"seaglass slab on yellow",
default.node_sound_glass_defaults())
stairsshine.register_stair_and_slab("seaglass_red", "seaglass:seaglass_red",
{snappy=2,cracky=3,oddly_breakable_by_hand=3, color_red=1, shine=1, redshine=1, not_in_creative_inventory=1},
{"seaglass_seaglass_red.png"},
"Seaglass stair on red",
"Seaglass slab on red",
default.node_sound_glass_defaults())
stairsshine.register_stair_and_slab("seaglass_blue", "seaglass:seaglass_blue",
{snappy=2,cracky=3,oddly_breakable_by_hand=3, color_blue=1, shine=1, blueshine=1, not_in_creative_inventory=1},
{"seaglass_seaglass_blue.png"},
"Seaglass stair on blue",
"Seaglass slab on blue",
default.node_sound_glass_defaults())
stairsshine.register_stair_and_slab("seaglass_white", "seaglass:seaglass_white",
{snappy=2,cracky=3,oddly_breakable_by_hand=3, color_white=1, shine=1, whiteshine=1, not_in_creative_inventory=1},
{"seaglass_seaglass_white.png"},
"Seaglass stair on white",
"Seaglass slab on white",
default.node_sound_glass_defaults())
stairsshine.register_stair_and_slab("seaglass_black", "seaglass:seaglass_black",
{snappy=2,cracky=3,oddly_breakable_by_hand=3, color_black=1, shine=1, blackshine=1, not_in_creative_inventory=1},
{"seaglass_seaglass_black.png"},
"Seaglass stair on black ",
"Seaglass slab on black",
default.node_sound_glass_defaults())
stairs.register_stair_and_slab("seaglassoff", "seaglass:seaglassoff",
{snappy=2,cracky=3,oddly_breakable_by_hand=3, nocolor=1, noshine=1},
{"seaglass_seaglass.png"},
"Seaglass stair off",
"Seaglass slab off",
default.node_sound_glass_defaults())
stairs.register_stair_and_slab("seaglassoff_yellow", "seaglass:seaglassoff_yellow",
{snappy=2,cracky=3,oddly_breakable_by_hand=3, color_yellow=1, noshine=1},
{"seaglass_seaglass_yellow.png"},
"seaglass stair off yellow",
"seaglass slab off yellow",
default.node_sound_glass_defaults())
stairs.register_stair_and_slab("seaglassoff_red", "seaglass:seaglassoff_red",
{snappy=2,cracky=3,oddly_breakable_by_hand=3, color_red=1, noshine=1},
{"seaglass_seaglass_red.png"},
"Seaglass stair off red",
"Seaglass slab off red",
default.node_sound_glass_defaults())
stairs.register_stair_and_slab("seaglassoff_blue", "seaglass:seaglassoff_blue",
{snappy=2,cracky=3,oddly_breakable_by_hand=3, color_blue=1, noshine=1},
{"seaglass_seaglass_blue.png"},
"Seaglass stair off blue",
"Seaglass slab off blue",
default.node_sound_glass_defaults())
stairs.register_stair_and_slab("seaglassoff_white", "seaglass:seaglassoff_white",
{snappy=2,cracky=3,oddly_breakable_by_hand=3, color_white=1, noshine=1},
{"seaglass_seaglass_white.png"},
"Seaglass stair off white",
"Seaglass slab off white",
default.node_sound_glass_defaults())
stairs.register_stair_and_slab("seaglassoff_black", "seaglass:seaglassoff_black",
{snappy=2,cracky=3,oddly_breakable_by_hand=3, color_black=1, noshine=1},
{"seaglass_seaglass_black.png"},
"Seaglass stair off black ",
"Seaglass slab off black",
default.node_sound_glass_defaults())
-- CRAFTING -- CRAFTING
@ -290,444 +149,61 @@ register_seaglass_craft("seaglass:seaglass_blue", {'seaglass:seaglassoff_blue'})
register_seaglass_craft("seaglass:seaglass_white", {'seaglass:seaglassoff_white'}) register_seaglass_craft("seaglass:seaglass_white", {'seaglass:seaglassoff_white'})
register_seaglass_craft("seaglass:seaglass_black", {'seaglass:seaglassoff_black'}) register_seaglass_craft("seaglass:seaglass_black", {'seaglass:seaglassoff_black'})
register_seaglass_craft("stairsshine:stair_seaglass", {'stairs:stair_seaglassoff'}) register_seaglass_craft("stairs:stair_seaglass", {'stairs:stair_seaglassoff'})
register_seaglass_craft("stairsshine:stair_seaglass_yellow", {'stairs:stair_seaglassoff_yellow'}) register_seaglass_craft("stairs:stair_seaglass_yellow", {'stairs:stair_seaglassoff_yellow'})
register_seaglass_craft("stairsshine:stair_seaglass_red", {'stairs:stair_seaglassoff_red'}) register_seaglass_craft("stairs:stair_seaglass_red", {'stairs:stair_seaglassoff_red'})
register_seaglass_craft("stairsshine:stair_seaglass_blue", {'stairs:stair_seaglassoff_blue'}) register_seaglass_craft("stairs:stair_seaglass_blue", {'stairs:stair_seaglassoff_blue'})
register_seaglass_craft("stairsshine:stair_seaglass_white", {'stairs:stair_seaglassoff_white'}) register_seaglass_craft("stairs:stair_seaglass_white", {'stairs:stair_seaglassoff_white'})
register_seaglass_craft("stairsshine:stair_seaglass_black", {'stairs:stair_seaglassoff_black'}) register_seaglass_craft("stairs:stair_seaglass_black", {'stairs:stair_seaglassoff_black'})
register_seaglass_craft("stairs:stair_seaglassoff", {'stairsshine:stair_seaglass'}) register_seaglass_craft("stairs:stair_seaglassoff", {'stairs:stair_seaglass'})
register_seaglass_craft("stairs:stair_seaglassoff_yellow", {'stairsshine:stair_seaglass_yellow'}) register_seaglass_craft("stairs:stair_seaglassoff_yellow", {'stairs:stair_seaglass_yellow'})
register_seaglass_craft("stairs:stair_seaglassoff_red", {'stairsshine:stair_seaglass_red'}) register_seaglass_craft("stairs:stair_seaglassoff_red", {'stairs:stair_seaglass_red'})
register_seaglass_craft("stairs:stair_seaglassoff_blue", {'stairsshine:stair_seaglass_blue'}) register_seaglass_craft("stairs:stair_seaglassoff_blue", {'stairs:stair_seaglass_blue'})
register_seaglass_craft("stairs:stair_seaglassoff_white", {'stairsshine:stair_seaglass_white'}) register_seaglass_craft("stairs:stair_seaglassoff_white", {'stairs:stair_seaglass_white'})
register_seaglass_craft("stairs:stair_seaglassoff_black", {'stairsshine:stair_seaglass_black'}) register_seaglass_craft("stairs:stair_seaglassoff_black", {'stairs:stair_seaglass_black'})
register_seaglass_craft("stairsshine:slab_seaglass", {'stairs:slab_seaglassoff'}) register_seaglass_craft("stairs:stair_outer_seaglass", {'stairs:stair_outer_seaglassoff'})
register_seaglass_craft("stairsshine:slab_seaglass_yellow", {'stairs:slab_seaglassoff_yellow'}) register_seaglass_craft("stairs:stair_outer_seaglass_yellow", {'stairs:stair_outer_seaglassoff_yellow'})
register_seaglass_craft("stairsshine:slab_seaglass_red", {'stairs:slab_seaglassoff_red'}) register_seaglass_craft("stairs:stair_outer_seaglass_red", {'stairs:stair_outer_seaglassoff_red'})
register_seaglass_craft("stairsshine:slab_seaglass_blue", {'stairs:slab_seaglassoff_blue'}) register_seaglass_craft("stairs:stair_outer_seaglass_blue", {'stairs:stair_outer_seaglassoff_blue'})
register_seaglass_craft("stairsshine:slab_seaglass_white", {'stairs:slab_seaglassoff_white'}) register_seaglass_craft("stairs:stair_outer_seaglass_white", {'stairs:stair_outer_seaglassoff_white'})
register_seaglass_craft("stairsshine:slab_seaglass_black", {'stairs:slab_seaglassoff_black'}) register_seaglass_craft("stairs:stair_outer_seaglass_black", {'stairs:stair_outer_seaglassoff_black'})
register_seaglass_craft("stairs:slab_seaglassoff", {'stairsshine:slab_seaglass'}) register_seaglass_craft("stairs:stair_outer_seaglassoff", {'stairs:stair_outer_seaglass'})
register_seaglass_craft("stairs:slab_seaglassoff_yellow", {'stairsshine:slab_seaglass_yellow'}) register_seaglass_craft("stairs:stair_outer_seaglassoff_yellow", {'stairs:stair_outer_seaglass_yellow'})
register_seaglass_craft("stairs:slab_seaglassoff_red", {'stairsshine:slab_seaglass_red'}) register_seaglass_craft("stairs:stair_outer_seaglassoff_red", {'stairs:stair_outer_seaglass_red'})
register_seaglass_craft("stairs:slab_seaglassoff_blue", {'stairsshine:slab_seaglass_blue'}) register_seaglass_craft("stairs:stair_outer_seaglassoff_blue", {'stairs:stair_outer_seaglass_blue'})
register_seaglass_craft("stairs:slab_seaglassoff_white", {'stairsshine:slab_seaglass_white'}) register_seaglass_craft("stairs:stair_outer_seaglassoff_white", {'stairs:stair_outer_seaglass_white'})
register_seaglass_craft("stairs:slab_seaglassoff_black", {'stairsshine:slab_seaglass_black'}) register_seaglass_craft("stairs:stair_outer_seaglassoff_black", {'stairs:stair_outer_seaglass_black'})
register_seaglass_craft("stairs:stair_inner_seaglass", {'stairs:stair_inner_seaglassoff'})
register_seaglass_craft("stairs:stair_inner_seaglass_yellow", {'stairs:stair_inner_seaglassoff_yellow'})
register_seaglass_craft("stairs:stair_inner_seaglass_red", {'stairs:stair_inner_seaglassoff_red'})
register_seaglass_craft("stairs:stair_inner_seaglass_blue", {'stairs:stair_inner_seaglassoff_blue'})
register_seaglass_craft("stairs:stair_inner_seaglass_white", {'stairs:stair_inner_seaglassoff_white'})
register_seaglass_craft("stairs:stair_inner_seaglass_black", {'stairs:stair_inner_seaglassoff_black'})
-- FUNCTIONS register_seaglass_craft("stairs:stair_inner_seaglassoff", {'stairs:stair_inner_seaglass'})
register_seaglass_craft("stairs:stair_inner_seaglassoff_yellow", {'stairs:stair_inner_seaglass_yellow'})
register_seaglass_craft("stairs:stair_inner_seaglassoff_red", {'stairs:stair_inner_seaglass_red'})
register_seaglass_craft("stairs:stair_inner_seaglassoff_blue", {'stairs:stair_inner_seaglass_blue'})
register_seaglass_craft("stairs:stair_inner_seaglassoff_white", {'stairs:stair_inner_seaglass_white'})
register_seaglass_craft("stairs:stair_inner_seaglassoff_black", {'stairs:stair_inner_seaglass_black'})
register_seaglass_craft("stairs:slab_seaglass", {'stairs:slab_seaglassoff'})
register_seaglass_craft("stairs:slab_seaglass_yellow", {'stairs:slab_seaglassoff_yellow'})
register_seaglass_craft("stairs:slab_seaglass_red", {'stairs:slab_seaglassoff_red'})
register_seaglass_craft("stairs:slab_seaglass_blue", {'stairs:slab_seaglassoff_blue'})
register_seaglass_craft("stairs:slab_seaglass_white", {'stairs:slab_seaglassoff_white'})
register_seaglass_craft("stairs:slab_seaglass_black", {'stairs:slab_seaglassoff_black'})
local on_lamp_puncher = function (pos, node, puncher) register_seaglass_craft("stairs:slab_seaglassoff", {'stairs:slab_seaglass'})
if node.name == "seaglass:seaglass" then register_seaglass_craft("stairs:slab_seaglassoff_yellow", {'stairs:slab_seaglass_yellow'})
minetest.add_node(pos, {name="seaglass:seaglassoff"}) register_seaglass_craft("stairs:slab_seaglassoff_red", {'stairs:slab_seaglass_red'})
nodeupdate(pos) register_seaglass_craft("stairs:slab_seaglassoff_blue", {'stairs:slab_seaglass_blue'})
elseif node.name == "seaglass:seaglassoff" then register_seaglass_craft("stairs:slab_seaglassoff_white", {'stairs:slab_seaglass_white'})
minetest.add_node(pos, {name="seaglass:seaglass"}) register_seaglass_craft("stairs:slab_seaglassoff_black", {'stairs:slab_seaglass_black'})
nodeupdate(pos)
elseif node.name == "seaglass:seaglass_yellow" then
minetest.add_node(pos, {name="seaglass:seaglassoff_yellow"})
nodeupdate(pos)
elseif node.name == "seaglass:seaglassoff_yellow" then
minetest.add_node(pos, {name="seaglass:seaglass_yellow"})
nodeupdate(pos)
elseif node.name == "seaglass:seaglass_red" then
minetest.add_node(pos, {name="seaglass:seaglassoff_red"})
nodeupdate(pos)
elseif node.name == "seaglass:seaglassoff_red" then
minetest.add_node(pos, {name="seaglass:seaglass_red"})
nodeupdate(pos)
elseif node.name == "seaglass:seaglass_blue" then
minetest.add_node(pos, {name="seaglass:seaglassoff_blue"})
nodeupdate(pos)
elseif node.name == "seaglass:seaglassoff_blue" then
minetest.add_node(pos, {name="seaglass:seaglass_blue"})
nodeupdate(pos)
elseif node.name == "seaglass:seaglass_white" then
minetest.add_node(pos, {name="seaglass:seaglassoff_white"})
nodeupdate(pos)
elseif node.name == "seaglass:seaglassoff_white" then
minetest.add_node(pos, {name="seaglass:seaglass_white"})
nodeupdate(pos)
elseif node.name == "seaglass:seaglass_black" then
minetest.add_node(pos, {name="seaglass:seaglassoff_black"})
nodeupdate(pos)
elseif node.name == "seaglass:seaglassoff_black" then
minetest.add_node(pos, {name="seaglass:seaglass_black"})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass" and node.param2 == 0 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff", param2 = 0})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff" and node.param2 == 0 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass", param2 = 0})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass" and node.param2 == 1 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff", param2 = 1})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff" and node.param2 == 1 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass", param2 = 1})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass" and node.param2 == 2 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff", param2 = 2})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff" and node.param2 == 2 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass", param2 = 2})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass" and node.param2 == 3 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff", param2 = 3})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff" and node.param2 == 3 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass", param2 = 3})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass" and node.param2 == 20 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff" and node.param2 == 20 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass" and node.param2 == 21 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff", param2 = 21})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff" and node.param2 == 21 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass", param2 = 21})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass" and node.param2 == 22 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff", param2 = 22})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff" and node.param2 == 22 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass", param2 = 22})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass" and node.param2 == 23 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff", param2 = 23})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff" and node.param2 == 23 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass", param2 = 23})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_yellow" and node.param2 == 0 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_yellow", param2 = 0})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_yellow" and node.param2 == 0 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_yellow", param2 = 0})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_yellow" and node.param2 == 1 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_yellow", param2 = 1})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_yellow" and node.param2 == 1 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_yellow", param2 = 1})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_yellow" and node.param2 == 2 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_yellow", param2 = 2})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_yellow" and node.param2 == 2 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_yellow", param2 = 2})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_yellow" and node.param2 == 3 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_yellow", param2 = 3})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_yellow" and node.param2 == 3 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_yellow", param2 = 3})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_yellow" and node.param2 == 20 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_yellow", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_yellow" and node.param2 == 20 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_yellow", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_yellow" and node.param2 == 21 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_yellow", param2 = 21})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_yellow" and node.param2 == 21 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_yellow", param2 = 21})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_yellow" and node.param2 == 22 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_yellow", param2 = 22})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_yellow" and node.param2 == 22 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_yellow", param2 = 22})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_yellow" and node.param2 == 23 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_yellow", param2 = 23})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_yellow" and node.param2 == 23 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_yellow", param2 = 23})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_red" and node.param2 == 0 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_red", param2 = 0})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_red" and node.param2 == 0 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_red", param2 = 0})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_red" and node.param2 == 1 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_red", param2 = 1})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_red" and node.param2 == 1 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_red", param2 = 1})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_red" and node.param2 == 2 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_red", param2 = 2})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_red" and node.param2 == 2 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_red", param2 = 2})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_red" and node.param2 == 3 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_red", param2 = 3})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_red" and node.param2 == 3 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_red", param2 = 3})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_red" and node.param2 == 20 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_red", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_red" and node.param2 == 20 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_red", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_red" and node.param2 == 21 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_red", param2 = 21})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_red" and node.param2 == 21 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_red", param2 = 21})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_red" and node.param2 == 22 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_red", param2 = 22})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_red" and node.param2 == 22 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_red", param2 = 22})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_red" and node.param2 == 23 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_red", param2 = 23})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_red" and node.param2 == 23 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_red", param2 = 23})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_blue" and node.param2 == 0 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_blue", param2 = 0})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_blue" and node.param2 == 0 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_blue", param2 = 0})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_blue" and node.param2 == 1 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_blue", param2 = 1})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_blue" and node.param2 == 1 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_blue", param2 = 1})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_blue" and node.param2 == 2 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_blue", param2 = 2})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_blue" and node.param2 == 2 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_blue", param2 = 2})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_blue" and node.param2 == 3 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_blue", param2 = 3})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_blue" and node.param2 == 3 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_blue", param2 = 3})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_blue" and node.param2 == 20 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_blue", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_blue" and node.param2 == 20 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_blue", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_blue" and node.param2 == 21 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_blue", param2 = 21})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_blue" and node.param2 == 21 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_blue", param2 = 21})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_blue" and node.param2 == 22 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_blue", param2 = 22})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_blue" and node.param2 == 22 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_blue", param2 = 22})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_blue" and node.param2 == 23 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_blue", param2 = 23})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_blue" and node.param2 == 23 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_blue", param2 = 23})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_white" and node.param2 == 0 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_white", param2 = 0})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_white" and node.param2 == 0 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_white", param2 = 0})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_white" and node.param2 == 1 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_white", param2 = 1})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_white" and node.param2 == 1 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_white", param2 = 1})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_white" and node.param2 == 2 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_white", param2 = 2})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_white" and node.param2 == 2 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_white", param2 = 2})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_white" and node.param2 == 3 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_white", param2 = 3})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_white" and node.param2 == 3 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_white", param2 = 3})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_white" and node.param2 == 20 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_white", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_white" and node.param2 == 20 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_white", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_white" and node.param2 == 21 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_white", param2 = 21})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_white" and node.param2 == 21 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_white", param2 = 21})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_white" and node.param2 == 22 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_white", param2 = 22})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_white" and node.param2 == 22 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_white", param2 = 22})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_white" and node.param2 == 23 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_white", param2 = 23})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_white" and node.param2 == 23 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_white", param2 = 23})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_black" and node.param2 == 0 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_black", param2 = 0})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_black" and node.param2 == 0 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_black", param2 = 0})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_black" and node.param2 == 1 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_black", param2 = 1})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_black" and node.param2 == 1 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_black", param2 = 1})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_black" and node.param2 == 2 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_black", param2 = 2})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_black" and node.param2 == 2 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_black", param2 = 2})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_black" and node.param2 == 3 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_black", param2 = 3})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_black" and node.param2 == 3 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_black", param2 = 3})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_black" and node.param2 == 20 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_black", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_black" and node.param2 == 20 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_black", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_black" and node.param2 == 21 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_black", param2 = 21})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_black" and node.param2 == 21 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_black", param2 = 21})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_black" and node.param2 == 22 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_black", param2 = 22})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_black" and node.param2 == 22 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_black", param2 = 22})
nodeupdate(pos)
elseif node.name == "stairsshine:stair_seaglass_black" and node.param2 == 23 then
minetest.add_node(pos, {name="stairs:stair_seaglassoff_black", param2 = 23})
nodeupdate(pos)
elseif node.name == "stairs:stair_seaglassoff_black" and node.param2 == 23 then
minetest.add_node(pos, {name="stairsshine:stair_seaglass_black", param2 = 23})
nodeupdate(pos)
elseif node.name == "stairsshine:slab_seaglass" and node.param2 == 20 then
minetest.add_node(pos, {name="stairs:slab_seaglassoff", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairs:slab_seaglassoff" and node.param2 == 20 then
minetest.add_node(pos, {name="stairsshine:slab_seaglass", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairsshine:slab_seaglass" then
minetest.add_node(pos, {name="stairs:slab_seaglassoff"})
nodeupdate(pos)
elseif node.name == "stairs:slab_seaglassoff" then
minetest.add_node(pos, {name="stairsshine:slab_seaglass"})
nodeupdate(pos)
elseif node.name == "stairsshine:slab_seaglass_yellow" and node.param2 == 20 then
minetest.add_node(pos, {name="stairs:slab_seaglassoff_yellow", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairs:slab_seaglassoff_yellow" and node.param2 == 20 then
minetest.add_node(pos, {name="stairsshine:slab_seaglass_yellow", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairsshine:slab_seaglass_yellow" then
minetest.add_node(pos, {name="stairs:slab_seaglassoff_yellow"})
nodeupdate(pos)
elseif node.name == "stairs:slab_seaglassoff_yellow" then
minetest.add_node(pos, {name="stairsshine:slab_seaglass_yellow"})
nodeupdate(pos)
elseif node.name == "stairsshine:slab_seaglass_red" and node.param2 == 20 then
minetest.add_node(pos, {name="stairs:slab_seaglassoff_red", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairs:slab_seaglassoff_red" and node.param2 == 20 then
minetest.add_node(pos, {name="stairsshine:slab_seaglass_red", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairsshine:slab_seaglass_red" then
minetest.add_node(pos, {name="stairs:slab_seaglassoff_red"})
nodeupdate(pos)
elseif node.name == "stairs:slab_seaglassoff_red" then
minetest.add_node(pos, {name="stairsshine:slab_seaglass_red"})
nodeupdate(pos)
elseif node.name == "stairsshine:slab_seaglass_blue" and node.param2 == 20 then
minetest.add_node(pos, {name="stairs:slab_seaglassoff_blue", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairs:slab_seaglassoff_blue" and node.param2 == 20 then
minetest.add_node(pos, {name="stairsshine:slab_seaglass_blue", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairsshine:slab_seaglass_blue" then
minetest.add_node(pos, {name="stairs:slab_seaglassoff_blue"})
nodeupdate(pos)
elseif node.name == "stairs:slab_seaglassoff_blue" then
minetest.add_node(pos, {name="stairsshine:slab_seaglass_blue"})
nodeupdate(pos)
elseif node.name == "stairsshine:slab_seaglass_white" and node.param2 == 20 then
minetest.add_node(pos, {name="stairs:slab_seaglassoff_white", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairs:slab_seaglassoff_white" and node.param2 == 20 then
minetest.add_node(pos, {name="stairsshine:slab_seaglass_white", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairsshine:slab_seaglass_white" then
minetest.add_node(pos, {name="stairs:slab_seaglassoff_white"})
nodeupdate(pos)
elseif node.name == "stairs:slab_seaglassoff_white" then
minetest.add_node(pos, {name="stairsshine:slab_seaglass_white"})
nodeupdate(pos)
elseif node.name == "stairsshine:slab_seaglass_black" and node.param2 == 20 then
minetest.add_node(pos, {name="stairs:slab_seaglassoff_black", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairs:slab_seaglassoff_black" and node.param2 == 20 then
minetest.add_node(pos, {name="stairsshine:slab_seaglass_black", param2 = 20})
nodeupdate(pos)
elseif node.name == "stairsshine:slab_seaglass_black" then
minetest.add_node(pos, {name="stairs:slab_seaglassoff_black"})
nodeupdate(pos)
elseif node.name == "stairs:slab_seaglassoff_black" then
minetest.add_node(pos, {name="stairsshine:slab_seaglass_black"})
nodeupdate(pos) else
return
end
end
minetest.register_on_punchnode(on_lamp_puncher)
-- ALIASES -- ALIASES