From 6ecb115465168d701bd84f21307432c3846e5073 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Sun, 26 Aug 2018 22:27:43 -0400 Subject: warn the user to open the color selector instead of crashing if they have no color set :-) --- init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/init.lua b/init.lua index b812ccb..26bed25 100644 --- a/init.lua +++ b/init.lua @@ -655,6 +655,14 @@ function unifieddyes.on_airbrush(itemstack, player, pointed_thing) return end + if not painting_with then + minetest.chat_send_player(player_name, "*** You need to set a color first.") + minetest.chat_send_player(player_name, "*** Right-click any random node to open the color selector,") + minetest.chat_send_player(player_name, "*** or shift+right-click a colorized node to use its color.") + minetest.chat_send_player(player_name, "*** Be sure to click \"Accept\", or the color you select will be ignored.") + return + end + if not def.palette then minetest.chat_send_player(player_name, "That node can't be colored.") return -- cgit v1.2.3