mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-24 12:35:09 +00:00
Paintings: Tweak selectionboxes
This commit is contained in:
parent
3bd160f414
commit
d2cacf285d
1 changed files with 15 additions and 12 deletions
|
@ -105,19 +105,22 @@ local set_entity = function(object)
|
|||
..xsize..","..ysize..", motive number "..ent._motive.."!")
|
||||
return
|
||||
end
|
||||
if wallm == 4 or wallm == 5 then
|
||||
object:set_properties({
|
||||
selectionbox = { exmin, eymin, -1/64, exmax, eymax, 1/64 },
|
||||
visual_size = visual_size,
|
||||
textures = { wood, wood, wood, wood, painting, wood },
|
||||
})
|
||||
else
|
||||
object:set_properties({
|
||||
selectionbox = { -1/64, eymin, exmin, 1/64, eymax, exmax },
|
||||
visual_size = visual_size,
|
||||
textures = { wood, wood, wood, wood, painting, wood },
|
||||
})
|
||||
local box
|
||||
if wallm == 2 then
|
||||
box = { -3/128, eymin, exmin, 1/64, eymax, exmax }
|
||||
elseif wallm == 3 then
|
||||
box = { -1/64, eymin, exmin, 3/128, eymax, exmax }
|
||||
elseif wallm == 4 then
|
||||
box = { exmin, eymin, -3/128, exmax, eymax, 1/64 }
|
||||
elseif wallm == 5 then
|
||||
box = { exmin, eymin, -1/64, exmax, eymax, 3/128 }
|
||||
end
|
||||
object:set_properties({
|
||||
selectionbox = box,
|
||||
visual_size = visual_size,
|
||||
textures = { wood, wood, wood, wood, painting, wood },
|
||||
})
|
||||
|
||||
local dir = minetest.wallmounted_to_dir(wallm)
|
||||
if not dir then
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue