Error check for OnProsthesisEquipped

This commit is contained in:
ZioPao
2024-08-21 01:55:59 +02:00
parent dd0d48cd08
commit 4d2b62e4a1

View File

@@ -168,7 +168,11 @@ function ISUnequipAction:perform()
local highestAmputatedLimbs = CachedDataHandler.GetHighestAmputatedLimbs(getPlayer():getUsername())
if highestAmputatedLimbs then
local hal = highestAmputatedLimbs[side]
triggerEvent("OnProsthesisUnequipped", hal)
if hal then
-- This could break if amputated limbs aren't cached for some reason
triggerEvent("OnProsthesisUnequipped", hal)
end
end
end
end