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