ThreeTAG / Palladium

GNU General Public License v3.0
14 stars 11 forks source link

Scriptable Abilities can add unique properties, that is a property unique per entry #22

Closed Spyeedy closed 1 year ago

Spyeedy commented 1 year ago

AbilityBuilder#addUniqueProperty allows one to register unique properties for their scriptable ability. The previously mentioned method populates a variable in AbilityBuilder, uniqueProperties. This variable is then used in ScriptableAbility#registerUniqueProperties to register the unique properties.

There is also a demo of the unique properties in action, in the custom_ability_with_property.js script: adding, setting and getting a unique property. The unique property comments in the script needs to be checked by Lucas

Note I had to edit AbilityEntry#setUniquePropertyByName to "fix" the JS value. I'm not too sure if this "fix" is appropriate to do. I'll leave it to Lucas xD