1
0
mirror of https://github.com/mt-mods/unifieddyes.git synced 2024-12-24 09:40:29 +01:00

fix crash

when trying to airbrush unknown nodes or nodes without palettes.
This commit is contained in:
Vanessa Dannenberg 2018-10-19 16:00:05 -04:00
parent 545968517b
commit 334de564fd

View File

@ -667,7 +667,10 @@ function unifieddyes.on_airbrush(itemstack, player, pointed_thing)
local palette = nil local palette = nil
local fdir = 0 local fdir = 0
if def.palette == "unifieddyes_palette_extended.png" then if not def or not def.palette then
minetest.chat_send_player(player_name, "*** That node can't be colored -- it's either undefined or has no palette.")
return
elseif def.palette == "unifieddyes_palette_extended.png" then
palette = "extended" palette = "extended"
elseif def.palette == "unifieddyes_palette_colorwallmounted.png" then elseif def.palette == "unifieddyes_palette_colorwallmounted.png" then
palette = "wallmounted" palette = "wallmounted"