Remove use of depricated table

This commit is contained in:
Zackhasacat 2023-10-21 19:09:13 -05:00
parent d5590d1bf8
commit d44db5faa8

View File

@ -7,9 +7,9 @@ local core = require('openmw.core')
-- @usage local auxCore = require('openmw_aux.core')
local aux_core = {}
local SKILL = core.SKILL
local SKILL = types.NPC.stats.skills
local armorSkillString = {[SKILL.Heavyarmor] = "Heavy",[SKILL.Mediumarmor] = "Medium", [SKILL.Lightarmor] = "Light"}
local armorSkillString = {[SKILL.heavyarmor] = "Heavy",[SKILL.mediumarmor] = "Medium", [SKILL.lightarmor] = "Light"}
---
-- Checks if the provided armor is Heavy, Medium, or Light. Errors if invaid object supplied.
-- @function [parent=#core] getArmorType
@ -47,11 +47,11 @@ function aux_core.getArmorType(armor)
local armorTypeWeight = math.floor(core.getGMST(armorGMSTs[armorType]))
if weight <= armorTypeWeight * lightMultiplier then
return SKILL.Lightarmor
return SKILL.lightarmor
elseif weight <= armorTypeWeight * medMultiplier then
return SKILL.Mediumarmor
return SKILL.mediumarmor
else
return SKILL.Heavyarmor
return SKILL.heavyarmor
end
end