diff options
author | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2018-08-27 20:01:15 -0400 |
---|---|---|
committer | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2018-08-27 20:01:15 -0400 |
commit | d53fb146dd9ba5bc126e326de2e3c1327f70623f (patch) | |
tree | 6eb175e223fb00b36d24525d739f1f29e33cd597 | |
parent | 5b1051f8ae7de0c4657d872ab57140ab7aca0552 (diff) | |
download | unifieddyes-d53fb146dd9ba5bc126e326de2e3c1327f70623f.tar unifieddyes-d53fb146dd9ba5bc126e326de2e3c1327f70623f.tar.gz unifieddyes-d53fb146dd9ba5bc126e326de2e3c1327f70623f.tar.bz2 unifieddyes-d53fb146dd9ba5bc126e326de2e3c1327f70623f.tar.xz unifieddyes-d53fb146dd9ba5bc126e326de2e3c1327f70623f.zip |
show the player's current painting-with color,
if no color is selected, if any
if no painting-with and no selected, shows a "?"
-rw-r--r-- | init.lua | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -829,6 +829,7 @@ end function unifieddyes.show_airbrush_form(player) if not player then return end local player_name = player:get_player_name() + local painting_with = unifieddyes.player_selected_dye[player_name] or unifieddyes.player_current_dye[player_name] local creative = creative and creative.is_enabled_for(player_name) local inv = player:get_inventory() @@ -874,7 +875,7 @@ function unifieddyes.show_airbrush_form(player) overlay = "^unifieddyes_available_overlay.png" end - if dye == unifieddyes.player_selected_dye[player_name] then + if dye == painting_with then overlay = "^unifieddyes_select_overlay.png" selindic = "unifieddyes_white_square.png"..colorize..overlay.."]".. "tooltip["..val..hue..sat..";"..val..hue..sat.."]" @@ -926,7 +927,7 @@ function unifieddyes.show_airbrush_form(player) overlay = "^unifieddyes_available_overlay.png" end - if dye == unifieddyes.player_selected_dye[player_name] then + if dye == painting_with then overlay = "^unifieddyes_select_overlay.png" selindic = "unifieddyes_white_square.png"..colorize..overlay.."]".. "tooltip["..val..hue..sat..";"..val..hue..sat.."]" @@ -966,7 +967,7 @@ function unifieddyes.show_airbrush_form(player) overlay = "^unifieddyes_available_overlay.png" end - if dye == unifieddyes.player_selected_dye[player_name] then + if dye == painting_with then overlay = "^unifieddyes_select_overlay.png" slindic = "unifieddyes_white_square.png"..colorize..overlay.."]".. "tooltip["..grey2..";"..grey2.."]" @@ -995,10 +996,10 @@ function unifieddyes.show_airbrush_form(player) "button_exit[11,8;2,1;cancel;Cancel]".. "button_exit[13,8;2,1;accept;Accept]" - if unifieddyes.player_selected_dye[player_name] then + if painting_with then base_form = base_form.. "label[1,"..(7.5+vs)..";Selected dye: ".. - unifieddyes.player_selected_dye[player_name].."]" + painting_with.."]" end minetest.show_formspec(player_name, "unifieddyes:dye_select_form", base_form) |