1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-07 19:10:23 +01:00

Avoid items that are not armor pieces or shields in armor inv

- Solves #253
This commit is contained in:
LeMagnesium 2015-08-30 16:09:44 +02:00
parent fcef658857
commit f5e8bc08b7

View File

@ -469,6 +469,9 @@ minetest.register_on_joinplayer(function(player)
local name = stack:get_name()
local player_inv = player:get_inventory()
local size = player_inv:get_size(listname)
if minetest.get_item_group(name, "armor_use") == 0 then
return 0
end
if name:find("shield") then
for i=1, size do
local stack = player_inv:get_stack(listname, i)