2023-08-07 17:56:31 -05:00
|
|
|
local pieces = {
|
|
|
|
{
|
|
|
|
_position = "000",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,-0.6,-0.5,0.5,-0.5,0.5},
|
|
|
|
{-0.5,-0.5,-0.5,-0.45,0.5,0.5},
|
|
|
|
{-0.5,-1.5,-0.5,0.5,-0.6,-0.45},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_car_floor.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^celevator_car_wall_bottom.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "001",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,-0.6,-0.5,0.5,-0.5,0.5},
|
|
|
|
{-0.5,-0.5,-0.5,-0.45,0.5,0.5},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_car_floor.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^celevator_car_wall_bottom.png^celevator_car_wall_vent.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "002",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,-0.6,-0.5,0.5,-0.5,0.5},
|
|
|
|
{-0.5,-0.5,-0.5,-0.45,0.5,0.5},
|
|
|
|
{-0.45,-0.5,0.45,0.5,0.5,0.5},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_car_floor.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^celevator_car_wall_bottom.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^celevator_car_wall_bottom.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "100",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,-0.6,-0.5,0.5,-0.5,0.5},
|
|
|
|
{0.45,-0.5,-0.5,0.5,0.5,0.5},
|
|
|
|
{-0.5,-1.5,-0.5,0.5,-0.6,-0.45},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_car_floor.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^celevator_car_wall_bottom.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "101",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,-0.6,-0.5,0.5,-0.5,0.5},
|
|
|
|
{0.45,-0.5,-0.5,0.5,0.5,0.5},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_car_floor.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^celevator_car_wall_bottom.png^celevator_car_wall_vent.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "102",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,-0.6,-0.5,0.5,-0.5,0.5},
|
|
|
|
{0.45,-0.5,-0.5,0.5,0.5,0.5},
|
|
|
|
{-0.5,-0.5,0.45,0.45,0.5,0.5},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_car_floor.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^celevator_car_wall_bottom.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^celevator_car_wall_bottom.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "010",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,-0.5,-0.5,-0.45,0.5,0.5},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "011",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,-0.5,-0.5,-0.45,0.5,0.5},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^celevator_car_handrail_end.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "012",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,-0.5,-0.5,-0.45,0.5,0.5},
|
|
|
|
{-0.45,-0.5,0.45,0.5,0.5,0.5},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^(celevator_car_handrail_end.png^[transformFX)",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^celevator_car_handrail_end.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "110",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{0.45,-0.5,-0.5,0.5,0.5,0.5},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^(celevator_car_handrail_end.png^[transformFX)",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "111",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{0.45,-0.5,-0.5,0.5,0.5,0.5},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^celevator_car_handrail_center.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "112",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{0.45,-0.5,-0.5,0.5,0.5,0.5},
|
|
|
|
{-0.5,-0.5,0.45,0.45,0.5,0.5},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^celevator_car_handrail_end.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png^(celevator_car_handrail_end.png^[transformFX)",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "020",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,0.5,-0.5,0.5,0.6,0.5},
|
|
|
|
{-0.5,-0.5,-0.5,-0.45,0.5,0.5},
|
|
|
|
{-0.5,0.6,-0.4,0.5,1,-0.1},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_ceiling.png",
|
|
|
|
"celevator_car_wallpaper.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "021",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,0.5,-0.5,0.5,0.6,0.5},
|
|
|
|
{-0.5,-0.5,-0.5,-0.45,0.5,0.5},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_ceiling.png",
|
|
|
|
"celevator_car_wallpaper.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "022",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,0.5,-0.5,0.5,0.6,0.5},
|
|
|
|
{-0.5,-0.5,-0.5,-0.45,0.5,0.5},
|
|
|
|
{-0.45,-0.5,0.45,0.5,0.5,0.5},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_ceiling.png",
|
|
|
|
"celevator_car_wallpaper.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "120",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,0.5,-0.5,0.5,0.6,0.5},
|
|
|
|
{0.45,-0.5,-0.5,0.5,0.5,0.5},
|
|
|
|
{-0.5,0.6,-0.4,0.5,1,-0.1},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_ceiling.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "121",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,0.5,-0.5,0.5,0.6,0.5},
|
|
|
|
{0.45,-0.5,-0.5,0.5,0.5,0.5},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_ceiling.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
_position = "122",
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5,0.5,-0.5,0.5,0.6,0.5},
|
|
|
|
{0.45,-0.5,-0.5,0.5,0.5,0.5},
|
|
|
|
{-0.5,-0.5,0.45,0.45,0.5,0.5},
|
|
|
|
},
|
|
|
|
},
|
2023-08-08 17:22:37 -05:00
|
|
|
tiles = {
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_ceiling.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png",
|
|
|
|
"celevator_cabinet_sides.png",
|
|
|
|
"celevator_car_wallpaper.png",
|
|
|
|
},
|
2023-08-07 17:56:31 -05:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
for _,def in ipairs(pieces) do
|
|
|
|
def.groups = {
|
|
|
|
dig_immediate = 2,
|
2023-08-08 22:16:42 -05:00
|
|
|
_celevator_car = 1,
|
2023-08-07 17:56:31 -05:00
|
|
|
}
|
2023-08-08 22:16:42 -05:00
|
|
|
local xp = tonumber(string.sub(def._position,1,1))
|
|
|
|
local yp = tonumber(string.sub(def._position,2,2))
|
|
|
|
local zp = tonumber(string.sub(def._position,3,3))
|
|
|
|
if xp > 0 then
|
|
|
|
def.groups._connects_xm = 1
|
|
|
|
end
|
|
|
|
if xp < 1 then
|
|
|
|
def.groups._connects_xp = 1
|
|
|
|
end
|
|
|
|
if yp > 0 then
|
|
|
|
def.groups._connects_ym = 1
|
|
|
|
end
|
|
|
|
if yp < 2 then
|
|
|
|
def.groups._connects_yp = 1
|
|
|
|
end
|
|
|
|
if zp > 0 then
|
|
|
|
def.groups._connects_zm = 1
|
|
|
|
end
|
|
|
|
if zp < 2 then
|
|
|
|
def.groups._connects_zp = 1
|
|
|
|
end
|
2023-08-07 17:56:31 -05:00
|
|
|
def.paramtype = "light"
|
|
|
|
def.paramtype2 = "4dir"
|
|
|
|
def.drawtype = "nodebox"
|
|
|
|
def.description = "Car "..def._position
|
2023-08-08 22:16:42 -05:00
|
|
|
def.light_source = 9
|
2023-08-07 17:56:31 -05:00
|
|
|
minetest.register_node("celevator:car_"..def._position,def)
|
|
|
|
end
|