replacing ipairs with pairs

This commit is contained in:
Pao
2023-02-11 22:00:53 +01:00
parent 3ea76e8834
commit bd87cd7777
9 changed files with 22 additions and 28 deletions

View File

@@ -19,7 +19,7 @@ local function CheckIfPlayerIsInfected(player, toc_data)
end
-- Check for everything else
for _, v in ipairs(GetOtherBodyPartTypes()) do
for _, v in pairs(GetOtherBodyPartTypes()) do
if body_damage:getBodyPart(v):bitten() then
toc_data.Limbs.is_other_bodypart_infected = true -- Even one is enough, stop cycling if we find it
break
@@ -198,7 +198,7 @@ local function TocUpdateEveryTenMinutes()
local part_data = player:getModData().TOC.Limbs
--Experience for prosthesis user
for _, side in ipairs(TOC_sides) do
for _, side in pairs(TOC_sides) do
if part_data[side .. "_Hand"].is_prosthesis_equipped or part_data[side .. "_LowerArm"].is_prosthesis_equipped then
player:getXp():AddXP(Perks[side .. "_Hand"], 4)
end