From 9c9457e1f50ebdd943695a4cce6b88fa552370f3 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Wed, 22 Aug 2018 22:28:28 -0400 Subject: update castles modpack, blox, bobblocks, coloredwood, technic, gloopblocks, homedecor, ilights, led marquee, plasticbox, solidcolor, stained_glass, unified bricks, and unified dyes In most of these, the update is to shift over to the new "old" coloring paradigm in Unified Dyes. See its forum thread for details. --- lrfurn/armchairs.lua | 13 +++++++++++-- lrfurn/init.lua | 3 ++- lrfurn/longsofas.lua | 13 +++++++++++-- lrfurn/sofas.lua | 13 +++++++++++-- 4 files changed, 35 insertions(+), 7 deletions(-) (limited to 'lrfurn') diff --git a/lrfurn/armchairs.lua b/lrfurn/armchairs.lua index 1155050..fcb84e5 100644 --- a/lrfurn/armchairs.lua +++ b/lrfurn/armchairs.lua @@ -25,9 +25,7 @@ minetest.register_node("lrfurn:armchair", { node_box = armchair_cbox, after_place_node = function(pos, placer, itemstack, pointed_thing) unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) - unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing) end, - after_dig_node = unifieddyes.after_dig_node, on_rotate = unifieddyes.fix_after_screwdriver_nsew, on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) if not clicker:is_player() then @@ -58,6 +56,17 @@ minetest.register_craft({ } }) +unifieddyes.register_color_craft({ + output = "lrfurn:armchair", + palette = "wallmounted", + type = "shapeless", + neutral_node = "lrfurn:armchair", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } +}) + -- convert old static nodes to param2 color lrfurn.old_static_armchairs = {} diff --git a/lrfurn/init.lua b/lrfurn/init.lua index 0ac264c..97cc586 100644 --- a/lrfurn/init.lua +++ b/lrfurn/init.lua @@ -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") diff --git a/lrfurn/longsofas.lua b/lrfurn/longsofas.lua index 05db65d..eeb3ca2 100644 --- a/lrfurn/longsofas.lua +++ b/lrfurn/longsofas.lua @@ -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 = {} diff --git a/lrfurn/sofas.lua b/lrfurn/sofas.lua index de1b784..6f89bea 100644 --- a/lrfurn/sofas.lua +++ b/lrfurn/sofas.lua @@ -26,7 +26,6 @@ minetest.register_node("lrfurn:sofa", { 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:sofa", { 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:sofa", + palette = "wallmounted", + type = "shapeless", + neutral_node = "lrfurn:sofa", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } +}) + -- convert old static nodes to param2 color lrfurn.old_static_sofas = {} -- cgit v1.2.3