summaryrefslogtreecommitdiff
path: root/unifieddyes
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-10-12 07:57:26 -0400
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-10-12 07:57:26 -0400
commitef6f6484b05d5b7650bff9a3ecbc7d2d6e6a8d35 (patch)
tree21457e616cdf69fffaa8a50cce15f41750ed8e99 /unifieddyes
parent0d094bed13f1700ea2ef1924ecf089c9d96dda83 (diff)
downloaddreambuilder_modpack-ef6f6484b05d5b7650bff9a3ecbc7d2d6e6a8d35.tar
dreambuilder_modpack-ef6f6484b05d5b7650bff9a3ecbc7d2d6e6a8d35.tar.gz
dreambuilder_modpack-ef6f6484b05d5b7650bff9a3ecbc7d2d6e6a8d35.tar.bz2
dreambuilder_modpack-ef6f6484b05d5b7650bff9a3ecbc7d2d6e6a8d35.tar.xz
dreambuilder_modpack-ef6f6484b05d5b7650bff9a3ecbc7d2d6e6a8d35.zip
update bees, coloredwood, digidisplay, farming redo,
moreblocks, technic, travelnet, and unified dyes
Diffstat (limited to 'unifieddyes')
-rw-r--r--unifieddyes/init.lua17
1 files changed, 11 insertions, 6 deletions
diff --git a/unifieddyes/init.lua b/unifieddyes/init.lua
index 838d67e..07d6864 100644
--- a/unifieddyes/init.lua
+++ b/unifieddyes/init.lua
@@ -172,20 +172,25 @@ minetest.register_on_placenode(
end
if not string.find(itemstack:to_string(), "palette_index") then
- local param2 = 0
+ local param2
local color = 0
- if def.palette == "unifieddyes_palette_extended.png" then
+ if def.palette == "unifieddyes_palette_extended.png"
+ and def.paramtype2 == "color" then
param2 = 240
color = 240
- elseif def.palette == "unifieddyes_palette_colorwallmounted.png" then
+ elseif def.palette == "unifieddyes_palette_colorwallmounted.png"
+ and def.paramtype2 == "colorwallmounted" then
param2 = newnode.param2 % 8
- else -- it's a split palette
+ elseif string.find(def.palette, "unifieddyes_palette_")
+ and def.paramtype2 == "colorfacedir" then -- it's a split palette
param2 = newnode.param2 % 32
end
- minetest.swap_node(pos, {name = newnode.name, param2 = param2})
- minetest.get_meta(pos):set_int("palette_index", color)
+ if param2 then
+ minetest.swap_node(pos, {name = newnode.name, param2 = param2})
+ minetest.get_meta(pos):set_int("palette_index", color)
+ end
end
end
)