1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-16 20:50:22 +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

@ -26,7 +26,6 @@ minetest.register_node("lrfurn:longsofa", {
on_rotate = screwdriver.disallow,
after_place_node = function(pos, placer, itemstack, pointed_thing)
lrfurn.fix_sofa_rotation_nsew(pos, placer, itemstack, pointed_thing)
unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing)
local playername = placer:get_player_name()
if minetest.is_protected(pos, placer:get_player_name()) then return true end
@ -42,7 +41,6 @@ minetest.register_node("lrfurn:longsofa", {
end
return itemstack
end,
after_dig_node = unifieddyes.after_dig_node,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if not clicker:is_player() then
return itemstack
@ -72,6 +70,17 @@ minetest.register_craft({
}
})
unifieddyes.register_color_craft({
output = "lrfurn:longsofa",
palette = "wallmounted",
type = "shapeless",
neutral_node = "lrfurn:longsofa",
recipe = {
"NEUTRAL_NODE",
"MAIN_DYE"
}
})
-- convert old static nodes to param2 colorization
lrfurn.old_static_longsofas = {}