- Fixed an issue with the actor/item creation dialog that prevented
it from working on Foundry 0.7.x versions.
- Removed obsolete translation string.
- Bumped minimum core version now that 0.7.3 is in beta.
- Refactored actor-sheet.js to move most of its logic into a separate
helper.js module as static methods on a new SimpleHelper class. This
doesn't add anything functional at the moment, but it's in
preparation of re-using the same code for the item-sheet.js file.
- This commit adds a proof-of-concept for retrieving actor template
types. These are actors using the `worldbuilding.isTemplate` flag set
to true. If there are multiple actors with that flag set to true,
clicking the create actor button will pull up a prompt to choose from
one of those types, which will then create an actor by duplicating
the template actor's data. The flag will be unset on the new actor.
- Added a resource attribute type to both actors and items with the keys
min, value, and max.
- Added translation strings for the sublabels on resources.
- Added a new "Formula" attribute type for both actors and items.
- When iterating through attributes, formula attributes are noted in an
array so that they can be iterated through in a second pass to
evaluate their referenced attributes. The second iteration just
handles attribute replacement rather than rolling the formula, that's
deferred until the attributes are used in an actual roll formula.
- Items also have the same behavior. If an attribute isn't on the item,
it will fall back to check the parent actor instead.
- Likely areas with issues would be formula attributes that reference
other formula attributes, or item formula attributes that reference
actor formula attributes.
- Applied patch by @imposeren to handle bug with removing and adding
attributes. This patch resolves the issue by refactoring the attribute
creation logic to use loop to choose a safer default attribute key
before creation.
- Adjusted styles of item buttons.
- Fixed an issue with item buttons when not using shorthand syntax.
- Updated the `roll.toMessage()` call to include the player/actor name
and the item/attribute name.
- Utilized the revisions made to roll syntax to allow for rollable
buttons on item lists on actor sheets. Rolls are evaluated using
`@items.ITEM.KEY`, where ITEM is the item name (slugified), and KEY is
an attribute key for a formula attribute.
- Divided getRollData() into several helper methods to make it more
organized.
- Cleaned up usage of shorthand checks, but haven't entirely
consolidated them yet. There's room to improve this, but further
consolidation would likely require a regex to handle mapping inline
roll syntax in the formulas to use the `@attr.KEY.value` format when
`@KEY` is detected. This seemed like a solid compromise for now.
- Refactored the _replaceData() helper method to match the Roll class'
upcoming syntax, and added TODO comments to replace them once it's
ready.
- Added a new "Formula" attribute type for both actors and items.
- When iterating through attributes, formula attributes are noted in an
array so that they can be iterated through in a second pass to
evaluate their referenced attributes. The second iteration just
handles attribute replacement rather than rolling the formula, that's
deferred until the attributes are used in an actual roll formula.
- Items also have the same behavior. If an attribute isn't on the item,
it will fall back to check the parent actor instead.
- Likely areas with issues would be formula attributes that reference
other formula attributes, or item formula attributes that reference
actor formula attributes.