mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-08-19 20:44:10 +02: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"
|
||||
if item ~= "" then
|
||||
if minetest.registered_items[item] then
|
||||
if minetest.registered_items[item].inventory_image ~= "" then
|
||||
texture = minetest.registered_items[item].inventory_image
|
||||
local inventory_image = 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
|
||||
texture = minetest.registered_items[item].tiles[1]
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user