Fixes
This commit is contained in:
parent
39b273ad1c
commit
e17370a89f
4 changed files with 23 additions and 10 deletions
12
Data.lua
12
Data.lua
|
|
@ -12,12 +12,12 @@ AltSystem.Data.SkillLevels = {
|
|||
["Master"] = 4,
|
||||
}
|
||||
|
||||
-- The "Unskilled" entry is always the first (default) skill
|
||||
local UNSKILLED_ENTRY = { name = "Unskilled", level = "Unskilled", modifier = -4 }
|
||||
-- The "Inept" entry is always the first (default) skill
|
||||
local UNSKILLED_ENTRY = { name = "Inept", level = "Inept", modifier = -4 }
|
||||
|
||||
-- Default/fallback skill list used when no TRP3 profile skills are found
|
||||
local DEFAULT_SKILLS = {
|
||||
{ name = "Unskilled", level = "Unskilled", modifier = -4 },
|
||||
{ name = "Inept", level = "Inept", modifier = -4 },
|
||||
{ name = "Novice Skill", level = "Novice", modifier = -2 },
|
||||
{ name = "Adept Skill", level = "Adept", modifier = 0 },
|
||||
{ name = "Expert Skill", level = "Expert", modifier = 2 },
|
||||
|
|
@ -56,12 +56,12 @@ local function ParseSkillLevel(numericValue)
|
|||
end
|
||||
|
||||
-- Fetch skills from the current TRP3 profile's personality traits.
|
||||
-- Returns an array of skill entries, always starting with "Unskilled".
|
||||
-- Returns an array of skill entries, always starting with "Inept".
|
||||
-- Falls back to the default list if no profile or no valid skills are found.
|
||||
function AltSystem.Data:RefreshSkills()
|
||||
local skills = {}
|
||||
|
||||
-- Always add Unskilled as the first entry
|
||||
-- Always add Inept as the first entry
|
||||
table.insert(skills, { name = UNSKILLED_ENTRY.name, level = UNSKILLED_ENTRY.level, modifier = UNSKILLED_ENTRY.modifier })
|
||||
|
||||
local foundAny = false
|
||||
|
|
@ -89,7 +89,7 @@ function AltSystem.Data:RefreshSkills()
|
|||
end
|
||||
end
|
||||
|
||||
-- If no valid skills were found, use the default fallback list (skip first "Unskilled" since we already added it)
|
||||
-- If no valid skills were found, use the default fallback list (skip first "Inept" since we already added it)
|
||||
if not foundAny then
|
||||
skills = {}
|
||||
for _, skill in ipairs(DEFAULT_SKILLS) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue