From f5e8bc08b7a749c6ddab4a814ec3059ddf5faabe Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sun, 30 Aug 2015 16:09:44 +0200 Subject: [PATCH] Avoid items that are not armor pieces or shields in armor inv - Solves #253 --- mods/3d_armor/3d_armor/armor.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/3d_armor/3d_armor/armor.lua b/mods/3d_armor/3d_armor/armor.lua index 7531351a..d9621e1e 100755 --- a/mods/3d_armor/3d_armor/armor.lua +++ b/mods/3d_armor/3d_armor/armor.lua @@ -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)