Add trapdoor/door model specification (#2371)

This commit is contained in:
An0n3m0us
2022-01-30 12:54:37 +00:00
committed by GitHub
parent a5547a3a76
commit 172b62f802
2 changed files with 21 additions and 8 deletions

View File

@ -670,10 +670,14 @@ function doors.register_trapdoor(name, def)
local def_opened = table.copy(def)
local def_closed = table.copy(def)
def_closed.node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -6/16, 0.5}
}
if def.nodebox_closed and def.nodebox_opened then
def_closed.node_box = def.nodebox_closed
else
def_closed.node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -6/16, 0.5}
}
end
def_closed.selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -6/16, 0.5}
@ -687,10 +691,14 @@ function doors.register_trapdoor(name, def)
def.tile_side
}
def_opened.node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 6/16, 0.5, 0.5, 0.5}
}
if def.nodebox_opened and def.nodebox_closed then
def_opened.node_box = def.nodebox_opened
else
def_opened.node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 6/16, 0.5, 0.5, 0.5}
}
end
def_opened.selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, 6/16, 0.5, 0.5, 0.5}