The docs don't specify the def values so I'm just assuming they always start at zero and go up sequentially.
Originally Posted by Baertram
Just as a heads-up:
You could even strip the [number] indices at the table in lua if the values are non-gap numbers 1, 2, 3, 4, 5, ... n
Lua Code:
local CURRENCY_CHANGE_REASON_STRINGS = { "CURRENCY_CHANGE_REASON_ABILITY_UPGRADE_PURCHASE", "CURRENCY_CHANGE_REASON_ACHIEVEMENT", -- all the other values "CURRENCY_CHANGE_REASON_VENDOR_REPAIR", }
If there is a gap though you need the number as else it will just always increase by 1 autoamtically and get out of sync with the real values of the constants!
I guess, as you generate the entries via python code you will just always create the indices
|