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

switch to colored itemstacks

with full crafting recipes
(requires Unified Dyes commit 2a816534 or later)

known issues:

standing lamp bypasses vertical stack check
bed expansion changes the color of the first-placed bed
to match the second when creating a king bed.
This commit is contained in:
Vanessa Dannenberg
2018-08-22 05:08:48 -04:00
parent 9e69a6db73
commit a8729575ab
14 changed files with 272 additions and 97 deletions

View File

@ -60,10 +60,11 @@ end
function lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing)
local node = minetest.get_node(pos)
local colorbits = node.param2 - (node.param2 % 8)
local yaw = placer:get_look_yaw()
local dir = minetest.yaw_to_dir(yaw-1.5)
local fdir = minetest.dir_to_wallmounted(dir)
minetest.swap_node(pos, { name = node.name, param2 = fdir })
minetest.swap_node(pos, { name = node.name, param2 = fdir+colorbits })
end
dofile(minetest.get_modpath("lrfurn").."/longsofas.lua")