mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-12-23 00:20:17 +01:00
fix collision boxes on shutters
This commit is contained in:
parent
931a5b0746
commit
464f378166
@ -16,11 +16,18 @@ local shutters = {
|
|||||||
{"white", "White"},
|
{"white", "White"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local shutter_cbox = {
|
||||||
|
type = "wallmounted",
|
||||||
|
wall_top = { -0.5, 0.4375, -0.5, 0.5, 0.5, 0.5 },
|
||||||
|
wall_bottom = { -0.5, -0.5, -0.5, 0.5, -0.4375, 0.5 },
|
||||||
|
wall_side = { -0.5, -0.5, -0.5, -0.4375, 0.5, 0.5 },
|
||||||
|
}
|
||||||
|
|
||||||
for i in ipairs(shutters) do
|
for i in ipairs(shutters) do
|
||||||
local name = shutters[i][1]
|
local name = shutters[i][1]
|
||||||
local desc = shutters[i][2]
|
local desc = shutters[i][2]
|
||||||
|
|
||||||
homedecor.register("shutter_"..name, {
|
homedecor.register("shutter_"..name, {
|
||||||
mesh = "homedecor_window_shutter.obj",
|
mesh = "homedecor_window_shutter.obj",
|
||||||
tiles = { "homedecor_window_shutter_"..name..".png" },
|
tiles = { "homedecor_window_shutter_"..name..".png" },
|
||||||
description = S("Wooden Shutter ("..desc..")"),
|
description = S("Wooden Shutter ("..desc..")"),
|
||||||
@ -30,11 +37,12 @@ homedecor.register("shutter_"..name, {
|
|||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
groups = { snappy = 3 },
|
groups = { snappy = 3 },
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
selection_box = {
|
selection_box = shutter_cbox,
|
||||||
type = "wallmounted",
|
node_box = shutter_cbox,
|
||||||
-- wall_side = { -0.5, -0.5, 0.44, 0.5, 0.5, 0.5 }
|
-- collision_box doesn't accept type="wallmounted", but node_box
|
||||||
},
|
-- does. Said nodeboxes create a custom collision box but are
|
||||||
})
|
-- invisible themselves because drawtype="mesh".
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")
|
minetest.register_alias("homedecor:shutter_purple", "homedecor:shutter_violet")
|
||||||
|
Loading…
Reference in New Issue
Block a user