1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-14 20:00:17 +02:00

make sofas and coffee table place with long axis left-to-right

(e.g. front of sofa faces you)
This commit is contained in:
Vanessa Ezekowitz
2017-02-22 16:38:19 -05:00
parent f32fdad4ff
commit 06342cbd86
4 changed files with 56 additions and 82 deletions

View File

@ -24,13 +24,13 @@ minetest.register_node("lrfurn:sofa", {
node_box = sofa_cbox,
on_rotate = screwdriver.disallow,
after_place_node = function(pos, placer, itemstack, pointed_thing)
unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing)
lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing)
local playername = placer:get_player_name()
if minetest.is_protected(pos, placer:get_player_name()) then return true end
local fdir = minetest.dir_to_facedir(placer:get_look_dir(), false)
if lrfurn.check_forward(pos, fdir, false, placer) then
if lrfurn.check_right(pos, fdir, false, placer) then
if not creative.is_enabled_for(playername) then
itemstack:take_item()
end