diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-02-26 11:11:19 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-02-26 11:11:19 -0500 |
commit | 2b5664c0004b2f4ed8c712b8b6f75d9d3294c829 (patch) | |
tree | 2d1f641ae5a98fafcc8564670bd9e0077da900d2 /plasticbox | |
parent | 7315a13c3a5369688fffef20ab6a5877f506a459 (diff) | |
download | dreambuilder_modpack-2b5664c0004b2f4ed8c712b8b6f75d9d3294c829.tar dreambuilder_modpack-2b5664c0004b2f4ed8c712b8b6f75d9d3294c829.tar.gz dreambuilder_modpack-2b5664c0004b2f4ed8c712b8b6f75d9d3294c829.tar.bz2 dreambuilder_modpack-2b5664c0004b2f4ed8c712b8b6f75d9d3294c829.tar.xz dreambuilder_modpack-2b5664c0004b2f4ed8c712b8b6f75d9d3294c829.zip |
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)
Diffstat (limited to 'plasticbox')
-rw-r--r-- | plasticbox/init.lua | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/plasticbox/init.lua b/plasticbox/init.lua index 96366f3..afbeed8 100644 --- a/plasticbox/init.lua +++ b/plasticbox/init.lua @@ -5,8 +5,9 @@ minetest.register_node("plasticbox:plasticbox", { groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, ud_param2_colorable = 1}, sounds = 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, }) stairsplus:register_all("plasticbox", "plasticbox", "plasticbox:plasticbox", { @@ -70,3 +71,21 @@ minetest.register_lbm({ minetest.set_node(pos,node) end, }) + +minetest.register_lbm({ + name = "plasticbox:recolor", + label = "Convert to new palette", + nodenames = {"plasticbox:plasticbox"}, + 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 +}) |