summaryrefslogtreecommitdiff
path: root/unifieddyes
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-09-13 22:34:39 -0400
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-09-13 22:34:39 -0400
commitaf02750c7ab30c48482575461b06d7ef37c359a7 (patch)
treeb3ad7a55c7f5b0187fa58f50bd1a7d021c344a3b /unifieddyes
parentb8892ef667c78b8d9be95eede93cfb96f54691f8 (diff)
downloaddreambuilder_modpack-af02750c7ab30c48482575461b06d7ef37c359a7.tar
dreambuilder_modpack-af02750c7ab30c48482575461b06d7ef37c359a7.tar.gz
dreambuilder_modpack-af02750c7ab30c48482575461b06d7ef37c359a7.tar.bz2
dreambuilder_modpack-af02750c7ab30c48482575461b06d7ef37c359a7.tar.xz
dreambuilder_modpack-af02750c7ab30c48482575461b06d7ef37c359a7.zip
update homedecor, coloredwood, and unifieddyes
Diffstat (limited to 'unifieddyes')
-rw-r--r--unifieddyes/init.lua23
1 files changed, 15 insertions, 8 deletions
diff --git a/unifieddyes/init.lua b/unifieddyes/init.lua
index 8f6de0f..c371b69 100644
--- a/unifieddyes/init.lua
+++ b/unifieddyes/init.lua
@@ -654,12 +654,14 @@ function unifieddyes.on_airbrush(itemstack, player, pointed_thing)
local palette = nil
local fdir = 0
- if def.paramtype2 == "color" then
+ if def.palette == "unifieddyes_palette_extended.png" then
palette = "extended"
- elseif def.paramtype2 == "colorwallmounted" then
+ elseif def.palette == "unifieddyes_palette_colorwallmounted.png" then
palette = "wallmounted"
fdir = node.param2 % 8
- elseif def.paramtype2 == "colorfacedir" then
+ elseif def.palette ~= "unifieddyes_palette_extended.png"
+ and def.palette ~= "unifieddyes_palette_colorwallmounted.png"
+ and string.find(def.palette, "unifieddyes_palette_") then
palette = "split"
fdir = node.param2 % 32
else
@@ -871,19 +873,24 @@ function unifieddyes.show_airbrush_form(player)
local last_right_click = unifieddyes.player_last_right_clicked[player_name]
if last_right_click then
- if last_right_click.def and last_right_click.def.paramtype2 then
- if last_right_click.def.paramtype2 == "colorwallmounted" then
+ if last_right_click.def and last_right_click.def.palette then
+ if last_right_click.def.palette == "unifieddyes_palette_colorwallmounted.png" then
nodepalette = "wallmounted"
- elseif last_right_click.def.paramtype2 == "color" then
+ elseif last_right_click.def.palette == "unifieddyes_palette_extended.png" then
t[#t+1] = "label[0.5,8.25;(Right-clicked a node that supports all 256 colors, showing them all)]"
showall = true
- elseif last_right_click.def.paramtype2 == "colorfacedir" then
+ elseif last_right_click.def.palette ~= "unifieddyes_palette_extended.png"
+ and last_right_click.def.palette ~= "unifieddyes_palette_colorwallmounted.png"
+ and string.find(last_right_click.def.palette, "unifieddyes_palette_") then
nodepalette = "split"
end
end
end
- if not last_right_click.def.groups or not last_right_click.def.groups.ud_param2_colorable then
+ if not last_right_click.def.groups
+ or not last_right_click.def.groups.ud_param2_colorable
+ or not last_right_click.def.palette
+ or not string.find(last_right_click.def.palette, "unifieddyes_palette_") then
t[#t+1] = "label[0.5,8.25;(Right-clicked a node not supported by the Airbrush, showing all colors)]"
end