mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Fix crash in mcl_dye when converting unicolor
This commit is contained in:
parent
daeb04485e
commit
702755b99e
1 changed files with 6 additions and 1 deletions
|
@ -93,7 +93,12 @@ end
|
||||||
|
|
||||||
-- Takes an unicolor group name (e.g. “unicolor_white”) and returns a corresponding dye name (if it exists), nil otherwise.
|
-- Takes an unicolor group name (e.g. “unicolor_white”) and returns a corresponding dye name (if it exists), nil otherwise.
|
||||||
mcl_dye.unicolor_to_dye = function(unicolor_group)
|
mcl_dye.unicolor_to_dye = function(unicolor_group)
|
||||||
return "mcl_dye:" .. dyelocal.unicolor_to_dye_id[unicolor_group]
|
local color = dyelocal.unicolor_to_dye_id[unicolor_group]
|
||||||
|
if color then
|
||||||
|
return "mcl_dye:" .. color
|
||||||
|
else
|
||||||
|
return nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Define items
|
-- Define items
|
||||||
|
|
Loading…
Reference in a new issue