Added check to remove wrist watches when amputating

This commit is contained in:
Pao
2023-02-28 11:46:13 +01:00
parent f399d91445
commit b4f5db561d
3 changed files with 61 additions and 27 deletions

View File

@@ -273,4 +273,19 @@ JCIO_Common.GetCanBeHeldTable = function(limbs_data)
return canBeHeld
end
-------------------------------
-------------------------------
JCIO_Common.FindItemInWornItems = function(player, checkString)
local wornItems = player:getWornItems()
for i = 1, wornItems:size() - 1 do -- Maybe wornItems:size()-1
local item = wornItems:get(i):getItem()
local itemFullType = item:getFullType()
if string.find(itemFullType, checkString) then
return item
end
end
return nil
end