1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2024-12-27 03:00:40 +01:00

Only load formspec when armor inventory selected

This commit is contained in:
stujones11 2013-06-26 22:55:55 +01:00
parent eeb69e1280
commit d7a87a515b

View File

@ -94,8 +94,8 @@ end
minetest.register_on_player_receive_fields(function(player, formname, fields)
local name = player:get_player_name()
local formspec = armor.formspec:gsub("player_name", name)
if fields.armor then
local formspec = armor.formspec:gsub("player_name", name)
inventory_plus.set_inventory_formspec(player, formspec)
return
end