mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-12-23 17:12:21 +01:00
Allow armor textures to be specified by the tool definition
This commit is contained in:
parent
e1caf0ab0c
commit
64ec3dcf93
@ -171,7 +171,10 @@ armor.set_player_armor = function(self, player)
|
|||||||
if v == false then
|
if v == false then
|
||||||
local level = def.groups["armor_"..k]
|
local level = def.groups["armor_"..k]
|
||||||
if level then
|
if level then
|
||||||
local texture = item:gsub("%:", "_")
|
local texture = def.texture
|
||||||
|
if not texture then
|
||||||
|
texture = item:gsub("%:", "_")
|
||||||
|
end
|
||||||
table.insert(textures, texture..".png")
|
table.insert(textures, texture..".png")
|
||||||
preview = preview.."^"..texture.."_preview.png"
|
preview = preview.."^"..texture.."_preview.png"
|
||||||
armor_level = armor_level + level
|
armor_level = armor_level + level
|
||||||
|
Loading…
Reference in New Issue
Block a user