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) --- solidcolor/init.lua | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'solidcolor') diff --git a/solidcolor/init.lua b/solidcolor/init.lua index 0334340..407fc61 100644 --- a/solidcolor/init.lua +++ b/solidcolor/init.lua @@ -5,8 +5,9 @@ minetest.register_node("solidcolor:block", { groups = {dig_immediate=2,ud_param2_colorable=1}, sounds = (default and default.node_sound_stone_defaults()), paramtype2 = "color", - palette = "unifieddyes_palette.png", + palette = "unifieddyes_palette_extended.png", after_dig_node = unifieddyes.after_dig_node, + place_param2 = 240, }) minetest.register_craft( { @@ -16,3 +17,21 @@ minetest.register_craft( { { "dye:white", "dye:white"}, }, }) + +minetest.register_lbm({ + name = "solidcolor:recolor", + label = "Convert to new palette", + nodenames = {"solidcolor:block"}, + action = function(pos, node) + local meta = minetest.get_meta(pos) + if meta:get_string("palette") ~= "ext" then + if node.param2 == 0 then + node.param2 = 240 + else + node.param2 = unifieddyes.convert_classic_palette[node.param2] + end + minetest.swap_node(pos,node) + meta:set_string("palette", "ext") + end + end +}) -- cgit v1.2.3