mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-11-22 20:43:43 +01:00
Fix crash if wielditem inventory image is nil
This commit is contained in:
parent
6f7a0ea7fc
commit
7eebc378a6
@ -21,8 +21,9 @@ wieldview.get_item_texture = function(self, item)
|
|||||||
local texture = "3d_armor_trans.png"
|
local texture = "3d_armor_trans.png"
|
||||||
if item ~= "" then
|
if item ~= "" then
|
||||||
if minetest.registered_items[item] then
|
if minetest.registered_items[item] then
|
||||||
if minetest.registered_items[item].inventory_image ~= "" then
|
local inventory_image = minetest.registered_items[item].inventory_image
|
||||||
texture = minetest.registered_items[item].inventory_image
|
if inventory_image and inventory_image ~= "" then
|
||||||
|
texture = inventory_image
|
||||||
elseif node_tiles == true and minetest.registered_items[item].tiles then
|
elseif node_tiles == true and minetest.registered_items[item].tiles then
|
||||||
texture = minetest.registered_items[item].tiles[1]
|
texture = minetest.registered_items[item].tiles[1]
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user