Unity: getValue called by handler returns previous value
I noticed that my Total Encumbrance extension isn't quite behaving itself in FGU.
I have this line in onInit:
Code:
DB.addHandler(DB.getPath('charsheet.*.inventorylist.*.carried'), 'onUpdate', applyPenalties)
which eventually triggers a getValue:
Code:
local total = DB.getValue(nodeChar, 'encumbrance.total', 0)
which in FGC returns the value after toggling the 'carried/equipped/dropped' button that triggers this code, but in FGU returns the value before clicking the button.
Is there a simple alternative that will return the value after clicking on both systems?
Pathfinder ruleset.