mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-01 03:20:03 -04:00
Add trapdoor model for default trapdoors only
This commit is contained in:
parent
a55197bd89
commit
9d308c1039
1 changed files with 36 additions and 22 deletions
|
@ -644,17 +644,24 @@ 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, -5/16},
|
||||
{-0.5, -0.5, 5/16, 0.5, -6/16, 0.5},
|
||||
{-0.5, -0.5, -5/16, -5/16, -6/16, 5/16},
|
||||
{5/16, -0.5, -5/16, 0.5, -6/16, 5/16},
|
||||
{-5/16, -0.5, -2/16, 5/16, -6/16, 2/16},
|
||||
{-2/16, -0.5, -5/16, 2/16, -6/16, 6/16}
|
||||
}
|
||||
}
|
||||
if name == "doors:trapdoor" or name == "doors:trapdoor_steel" then
|
||||
def_closed.node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -6/16, -5/16},
|
||||
{-0.5, -0.5, 5/16, 0.5, -6/16, 0.5},
|
||||
{-0.5, -0.5, -5/16, -5/16, -6/16, 5/16},
|
||||
{5/16, -0.5, -5/16, 0.5, -6/16, 5/16},
|
||||
{-5/16, -0.5, -2/16, 5/16, -6/16, 2/16},
|
||||
{-2/16, -0.5, -5/16, 2/16, -6/16, 6/16}
|
||||
}
|
||||
}
|
||||
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}
|
||||
|
@ -668,17 +675,24 @@ function doors.register_trapdoor(name, def)
|
|||
def.tile_side
|
||||
}
|
||||
|
||||
def_opened.node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, 6/16, -5/16, 0.5, 0.5},
|
||||
{5/16, -0.5, 6/16, 0.5, 0.5, 0.5},
|
||||
{-5/16, 5/16, 6/16, 5/16, 0.5, 0.5},
|
||||
{-5/16, -0.5, 6/16, 5/16, -5/16, 0.5},
|
||||
{-2/16, -6/16, 6/16, 2/16, 5/16, 0.5},
|
||||
{-5/16, -2/16, 6/16, 5/16, 2/16, 0.5}
|
||||
}
|
||||
}
|
||||
if name == "doors:trapdoor" or name == "doors:trapdoor_steel" then
|
||||
def_opened.node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, 6/16, -5/16, 0.5, 0.5},
|
||||
{5/16, -0.5, 6/16, 0.5, 0.5, 0.5},
|
||||
{-5/16, 5/16, 6/16, 5/16, 0.5, 0.5},
|
||||
{-5/16, -0.5, 6/16, 5/16, -5/16, 0.5},
|
||||
{-2/16, -6/16, 6/16, 2/16, 5/16, 0.5},
|
||||
{-5/16, -2/16, 6/16, 5/16, 2/16, 0.5}
|
||||
}
|
||||
}
|
||||
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}
|
||||
|
|
Loading…
Add table
Reference in a new issue