summer/portacenere.lua

71 lines
2.1 KiB
Lua
Raw Normal View History

2024-06-28 15:44:25 +03:00
local Portacenere_list = {
{ "Red Portacenere", "red" },
{ "Orange Portacenere", "orange" },
{ "Black Portacenere", "black" },
{ "Yellow Portacenere", "yellow" },
{ "Green Portacenere", "green" },
{ "Blue Portacenere", "blue" },
{ "Violet Portacenere", "violet" },
{ "White Portacenere", "white" },
2024-06-28 15:44:25 +03:00
}
for i in ipairs(Portacenere_list) do
local Portaceneredesc = Portacenere_list[i][1]
local colour = Portacenere_list[i][2]
minetest.register_node("summer:Portacenere_" .. colour .. "", {
description = Portaceneredesc .. "",
drawtype = "mesh",
2024-06-28 15:44:25 +03:00
mesh = "portacenere_o.obj",
tiles = { "portacenere_" .. colour .. ".png",
},
-- inventory_image = "summer_ombo_n_"..colour..".png",
-- wield_image = {"summer_ombo_n_"..colour..".png",
--},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
walkable = false,
selection_box = {
type = "fixed",
fixed = { -0.130, -0.5, -0.130, 0.25, -0.25, 0 },
},
groups = { snappy = 2, cracky = 3, oddly_breakable_by_hand = 3, not_in_creative_inventory = 0 },
2024-06-28 15:44:25 +03:00
--sounds = default.node_sound_glass_defaults(),
drop = "summer:Portacenere_" .. colour .. "_ch",
2024-06-28 15:44:25 +03:00
on_rightclick = function(pos, node, clicker)
node.name = "summer:Portacenere_" .. colour .. "_ch"
minetest.set_node(pos, node)
end,
2024-06-28 15:44:25 +03:00
})
minetest.register_node("summer:Portacenere_" .. colour .. "_ch", {
description = Portaceneredesc .. " ch",
drawtype = "mesh",
2024-06-28 15:44:25 +03:00
mesh = "portacenere_c.obj",
tiles = { "portacenere_" .. colour .. ".png",
},
-- inventory_image = "summer_ombc_n_"..colour..".png",
--wield_image = {"summer_ombc_n_"..colour..".png",
--},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
walkable = false,
selection_box = {
type = "fixed",
fixed = { -0.130, -0.5, -0.130, 0.25, -0.25, 0 },
},
groups = { snappy = 2, cracky = 3, oddly_breakable_by_hand = 3, not_in_creative_inventory = 1 },
2024-06-28 15:44:25 +03:00
--sounds = default.node_sound_glass_defaults(),
drop = "summer:Portacenere_" .. colour .. "ch",
2024-06-28 15:44:25 +03:00
on_rightclick = function(pos, node, clicker)
node.name = "summer:Portacenere_" .. colour .. ""
minetest.set_node(pos, node)
end,
2024-06-28 15:44:25 +03:00
})
end