Skip to content

Commit a1607ef

Browse files
authored
Merge pull request #1516 from amade-w/modtools-set-belief-personality
Fix for `modtools/set-personality` and improvement for `modtools/set-belief`
2 parents d286ffc + 3ffba3d commit a1607ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

modtools/set-belief.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ end
153153
-- Gives a list of all the unit's beliefs and their values.
154154
-- Returns a table where the keys are the belief names and its values are its strength
155155
-- If tiers is true, the value is the tier of the belief instead of the trait's strength
156-
local function getUnitBeliefList(unit, tiers)
156+
function getUnitBeliefList(unit, tiers)
157157
local list = {}
158158

159159
for id, beliefName in ipairs(df.value_type) do

modtools/set-personality.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function getUnitTraitCurrent(unit, trait)
8585
local base = getUnitTraitBase(unit, trait)
8686
local value = base
8787
if unit.status.current_soul.personality.temporary_trait_changes ~= nil then
88-
value = value + unit.status.current_soul.personality.temporary_trait_changes[trait]
88+
value = value + unit.status.current_soul.personality.temporary_trait_changes.traits[trait]
8989
end
9090

9191
return value

0 commit comments

Comments
 (0)