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:
parent
fcef658857
commit
f5e8bc08b7
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user