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) minetest.register_on_player_receive_fields(function(player, formname, fields)
local name = player:get_player_name() local name = player:get_player_name()
local formspec = armor.formspec:gsub("player_name", name)
if fields.armor then if fields.armor then
local formspec = armor.formspec:gsub("player_name", name)
inventory_plus.set_inventory_formspec(player, formspec) inventory_plus.set_inventory_formspec(player, formspec)
return return
end end