Closed xyzzy42 closed 2 months ago
Turns out setFlag()
didn't work the way I thought it did. It doesn't set a flag to the object supplied, but rather merges the object into the existing flag. Removing an implement flag not on the character sheet anymore needs an explicit "-=impSlug": true
in the flags object. Fixed this in latest push.
Thanks for doing this. It's something I wanted to get around to eventually but haven't had the chance to.
Big rework of manage implements and the selectedImplements flags. It's half the size of the existing code. The individual commits do smaller pieces and have detailed descriptions.
Main features:
selectedImplements
, e.g. slug, translated name, adept status, etc. They weren't really used anymore. Just the uuids of the selected inventory items are there now. Old actors will just have the extra fields linger around and they'll be ignored harmlessly. Clearing implements will clearselectedImplements
totally and make a new one.attributes.implements
objects.item.grantedBy
orimplements[implement].baseFeat.description
instead of searching through all items on the actor. There's also fewer places that do this, so adding dedication support (which is not done here) should mean fewer places to edit.Implement
base class.