mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-15 07:17:46 -04:00
Remove use of depricated table
This commit is contained in:
parent
d5590d1bf8
commit
d44db5faa8
@ -7,9 +7,9 @@ local core = require('openmw.core')
|
|||||||
-- @usage local auxCore = require('openmw_aux.core')
|
-- @usage local auxCore = require('openmw_aux.core')
|
||||||
local 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.
|
-- Checks if the provided armor is Heavy, Medium, or Light. Errors if invaid object supplied.
|
||||||
-- @function [parent=#core] getArmorType
|
-- @function [parent=#core] getArmorType
|
||||||
@ -47,11 +47,11 @@ function aux_core.getArmorType(armor)
|
|||||||
local armorTypeWeight = math.floor(core.getGMST(armorGMSTs[armorType]))
|
local armorTypeWeight = math.floor(core.getGMST(armorGMSTs[armorType]))
|
||||||
|
|
||||||
if weight <= armorTypeWeight * lightMultiplier then
|
if weight <= armorTypeWeight * lightMultiplier then
|
||||||
return SKILL.Lightarmor
|
return SKILL.lightarmor
|
||||||
elseif weight <= armorTypeWeight * medMultiplier then
|
elseif weight <= armorTypeWeight * medMultiplier then
|
||||||
return SKILL.Mediumarmor
|
return SKILL.mediumarmor
|
||||||
else
|
else
|
||||||
return SKILL.Heavyarmor
|
return SKILL.heavyarmor
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user