Add some wieldview bug fixes from Carbone game by Calinou

This commit is contained in:
stujones11 2015-02-19 22:01:09 +00:00
parent 195d138da5
commit d95f494a94

View File

@ -21,11 +21,12 @@ 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
local inventory_image = minetest.registered_items[item].inventory_image if minetest.registered_items[item].inventory_image ~= "" then
if inventory_image and inventory_image ~= "" then texture = minetest.registered_items[item].inventory_image
texture = inventory_image elseif node_tiles == true and minetest.registered_items[item].tiles
elseif node_tiles == true and minetest.registered_items[item].tiles then and type(minetest.registered_items[item].tiles[1]) == "string"
texture = minetest.registered_items[item].tiles[1] and minetest.registered_items[item].tiles[1] ~= "" then
texture = minetest.inventorycube(minetest.registered_items[item].tiles[1])
end end
end end
if wieldview.transform[item] then if wieldview.transform[item] then