From 2b5664c0004b2f4ed8c712b8b6f75d9d3294c829 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sun, 26 Feb 2017 11:11:19 -0500 Subject: updated lots of mods: blox, bobblocks, homedecor, coloredwood, gloopblocks, moreblocks, plasticbox, replacer, solidcolor, stained_glass, technic, unifiedbricks, and unifieddyes (in most of these, it's to upgrade to the Unified Dyes "extended" palette) --- homedecor/bathroom_furniture.lua | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'homedecor/bathroom_furniture.lua') diff --git a/homedecor/bathroom_furniture.lua b/homedecor/bathroom_furniture.lua index 0e839fd..d7cd0c6 100644 --- a/homedecor/bathroom_furniture.lua +++ b/homedecor/bathroom_furniture.lua @@ -11,7 +11,8 @@ minetest.register_node("homedecor:bathroom_tiles_dark", { mesh = "homedecor_block_with_overlay.obj", paramtype = "light", paramtype2 = "color", - palette = "unifieddyes_palette.png", + palette = "unifieddyes_palette_extended.png", + place_param2 = 240, groups = {cracky=3, ud_param2_colorable = 1}, sounds = default.node_sound_stone_defaults(), after_dig_node = unifieddyes.after_dig_node @@ -27,7 +28,8 @@ minetest.register_node("homedecor:bathroom_tiles_medium", { mesh = "homedecor_block_with_overlay.obj", paramtype = "light", paramtype2 = "color", - palette = "unifieddyes_palette.png", + palette = "unifieddyes_palette_extended.png", + place_param2 = 240, groups = {cracky=3, ud_param2_colorable = 1}, sounds = default.node_sound_stone_defaults(), after_dig_node = unifieddyes.after_dig_node @@ -43,7 +45,8 @@ minetest.register_node("homedecor:bathroom_tiles_light", { mesh = "homedecor_block_with_overlay.obj", paramtype = "light", paramtype2 = "color", - palette = "unifieddyes_palette.png", + palette = "unifieddyes_palette_extended.png", + place_param2 = 240, groups = {cracky=3, ud_param2_colorable = 1}, sounds = default.node_sound_stone_defaults(), after_dig_node = unifieddyes.after_dig_node @@ -156,10 +159,29 @@ minetest.register_lbm({ color = color.."_s50" end - local paletteidx = unifieddyes.getpaletteidx("unifieddyes:"..color) + local paletteidx = unifieddyes.getpaletteidx("unifieddyes:"..color, "extended") minetest.set_node(pos, { name = newname, param2 = paletteidx }) local meta = minetest.get_meta(pos) meta:set_string("dye", "unifieddyes:"..color) + meta:set_string("palette", "ext") + end +}) + +minetest.register_lbm({ + name = "homedecor:recolor_bathroom_tiles", + label = "Convert bathroom tiles to use UD extended palette", + run_at_every_load = false, + nodenames = { + "homedecor:bathroom_tiles_light", + "homedecor:bathroom_tiles_medium", + "homedecor:bathroom_tiles_dark", + }, + action = function(pos, node) + local meta = minetest.get_meta(pos) + if meta:get_string("palette") ~= "ext" then + minetest.swap_node(pos, { name = node.name, param2 = unifieddyes.convert_classic_palette[node.param2] }) + meta:set_string("palette", "ext") + end end }) -- cgit v1.2.3