summaryrefslogtreecommitdiff
path: root/homedecor/bathroom_furniture.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-26 11:11:19 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-26 11:11:19 -0500
commit2b5664c0004b2f4ed8c712b8b6f75d9d3294c829 (patch)
tree2d1f641ae5a98fafcc8564670bd9e0077da900d2 /homedecor/bathroom_furniture.lua
parent7315a13c3a5369688fffef20ab6a5877f506a459 (diff)
downloaddreambuilder_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 'homedecor/bathroom_furniture.lua')
-rw-r--r--homedecor/bathroom_furniture.lua30
1 files changed, 26 insertions, 4 deletions
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
})