Commit graph

57 commits

Author SHA1 Message Date
fyorl
9b19f8b590
[#32] Draw available tracked resources from world actors rather than system model. 2022-01-13 15:14:37 +00:00
fyorl
db34d156af
[#27] Do not throw an error when dropping an item onto a hotbar slot. 2022-01-13 13:31:46 +00:00
fyorl
d799fb1c56
[#25] Ensure resource attribute values are clamped between their min and max. Ensure token attribute update deltas are applied correctly to resource attributes. Draw attribute bars appropriately when attribute min is non-zero. 2022-01-13 13:31:41 +00:00
Andrew
abc9e949a7 Merge branch '28-attribute-groups' into 'master'
28: Fix issue with reserved groups

Closes #28

See merge request foundrynet/worldbuilding!20
2022-01-12 17:44:21 +00:00
Matt Smith
6eee073a24 28: Fix issue with reserved groups 2022-01-12 17:44:20 +00:00
Andrew
7d8eb74ee7 Merge branch '37-overrided-getBarAttribute' into 'master'
37: Fix custom attribute token bars being marked as not editable in token HUD

Closes #37

See merge request foundrynet/worldbuilding!21
2022-01-05 18:42:52 +00:00
Lich
e723598a6c 37: Fix custom attribute token bars being marked as not editable in token HUD 2022-01-05 18:42:52 +00:00
Kim Mantas
93d86fc459 Merge branch '0.6.x' into 'master'
[#36] Fix incorrect variable reference.

See merge request foundrynet/worldbuilding!19
2021-12-21 15:18:10 +00:00
fyorl
e8aa4a462e
[#36] Fix incorrect variable reference. 2021-12-21 14:19:14 +00:00
Kim Mantas
9a84692489 Merge branch '0.6.x' into 'master'
Release 0.6.1

See merge request foundrynet/worldbuilding!18
2021-12-13 17:28:10 +00:00
Kim Mantas
57f7c67272 Merge branch 'v8-compat' into '0.6.x'
[#35] Use different ID attributes for sidebar documents depending on foundry version.

See merge request foundrynet/worldbuilding!17
2021-12-13 17:27:22 +00:00
fyorl
84562bd9c2
[#35] Use different ID attributes for sidebar documents depending on foundry version. 2021-12-13 17:16:03 +00:00
Kim Mantas
bea3bf18d1 Merge branch '0.6.x' into 'master'
Update for v9 compatibility.

See merge request foundrynet/worldbuilding!16
2021-12-13 15:55:05 +00:00
fyorl
e966775723
Update for v9 compatibility. 2021-12-13 15:45:53 +00:00
Andrew
fb0add4cbc Update Simple Worldbuilding for Foundry 0.8.x Compatibility 2021-05-23 19:35:02 -04:00
Andrew
ee8814b76a Remove outdated GPLv3 License tag from the code header 2021-05-03 10:01:22 -04:00
Andrew
e53d4a7e52 Merge branch '22-attribute-roll-bug' into 'master'
22: Refactor roll attributes in helper class

Closes #22

See merge request foundrynet/worldbuilding!12
2020-10-30 16:08:33 +00:00
Matt Smith
b385af307a 22: Refactor roll attributes in helper class
- Updated `rollData` in helper.js to use actor as the data source rather
  than the object. This allows for items to reference attributes by
  assuming the parent actor is the source of truth and item attributes
  would be referenced as either `@item.attr` or `@items.ITEMNAME.attr`
- Refactored formula replacement to prevent values from being replaced
  with 0s unintentionally.
2020-10-30 10:21:58 -05:00
Andrew
5560fc24d4 Simplify macro creation for formula attributes 2020-10-19 18:30:53 -07:00
Andrew
6bf056b3d4 Tidy the worldbuilding system for 0.40 release 2020-10-19 17:34:32 -07:00
Andrew
d641ff96b0 Merge branch 'add-073-support' into 'master'
Add support for Foundry 0.7.3

See merge request foundrynet/worldbuilding!11
2020-10-12 18:24:36 +00:00
Matt Smith
8daec8bd92 Add support for Foundry 0.7.3
- 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.
2020-10-09 19:49:56 -05:00
Andrew
f69f9c80ea Merge branch '10-item-attr-groups' into 'master'
10: Add item attribute groups

See merge request foundrynet/worldbuilding!10
2020-10-06 17:20:00 +00:00
Matt Smith
8b958dd232 10: Refactor actor sheet code
- 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.
2020-10-06 17:20:00 +00:00
Andrew
8a2ba78203 Ensure worldbuilding changes are working on legacy worldbuilding world and adjust attribute form styling 2020-09-28 09:21:11 -07:00
Andrew
977fb4b76b Merge branch '10-attribute-groups' into 'master'
Add attribute groups to actors

See merge request foundrynet/worldbuilding!9
2020-09-28 15:54:14 +00:00
Matt Smith
f69e3841ff 10: Add attribute groups base implementation
- Added support for attribute groups
- Added rollable buttons to formula attributes
- Added additional i18n translation strings
2020-09-28 15:54:14 +00:00
Andrew
c515f8d5b7 Merge branch '9-actor-templates-integration' into 'master'
9: Add actor templates

See merge request foundrynet/worldbuilding!8
2020-08-31 02:09:21 +00:00
Matt Smith
bac1d023c3 9: Add POC for actor templates
- 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.
2020-08-31 02:09:21 +00:00
Andrew
d3f030b4f7 Merge branch '12-resource-attr' into 'master'
12: Add resource attribute type

Closes #12

See merge request foundrynet/worldbuilding!7
2020-08-24 19:33:19 +00:00
Matt Smith
50041d510c 12: Add resource attribute type
- 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.
2020-08-22 12:49:52 -05:00
Andrew
9bb368d9e2 Merge branch '14-item-rolls' 2020-08-09 20:51:49 -07:00
Andrew
ef009146f2 Merge branch '3-fix-add-remove-attr' into 'master'
3: Fix issue with adding and removing attributes

Closes #3

See merge request foundrynet/worldbuilding!6
2020-08-10 03:47:14 +00:00
Andrew
b1ec86b3aa Merge branch '8-formula-attributes' into 'master'
8: Add formula (derived) attributes

Closes #8

See merge request foundrynet/worldbuilding!3
2020-08-10 03:42:55 +00:00
Matt Smith
a490448a15 9: Add formula (derived) attributes
- 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.
2020-08-10 03:42:55 +00:00
Matt Smith
d0ec294164 3: Fix issue with adding and removing 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.
2020-08-09 21:03:17 -05:00
Matt Smith
9ae2cce47a 14: Tweak styles, tweak roll template
- 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.
2020-08-09 20:25:48 -05:00
Matt Smith
786d4095a9 8: Add rolls to items on actor sheets
- 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.
2020-08-09 16:37:16 -05:00
Matt Smith
00dfec6014 8: Refactor formula attributes
- 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.
2020-08-09 15:30:04 -05:00
Matt Smith
7c676b14ee 9: Add formula (derived) attributes
- 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.
2020-08-06 23:21:15 -05:00
Andrew
3e2a95f5f1 Merge branch '1-add-init-system-setting' into 'master'
Resolve "Add a system setting to configure the preferred initiative formula that should be used"

Closes #1

See merge request foundrynet/worldbuilding!2
2020-07-27 18:14:08 +00:00
Matt Smith
ba02ddee4f Add customizable initiative. 2020-07-27 18:14:08 +00:00
Andrew
c2d939aa1c Merge branch 'master' into 'master'
System name is worldbuilding not dnd5e

See merge request foundrynet/worldbuilding!1
2020-06-11 16:53:04 +00:00
Norman J. Harman Jr
a534ff133c System name is worldbuilding not dnd5e
Guessing the dnd5e was copy paste typo.
2020-05-26 03:07:29 -05:00
Andrew
2293592cf8 Correct update download link point back at 0.35 still 2020-05-12 22:35:46 -07:00
Andrew
d66a64b939 Update the Simple Worldbuilding system for compatibility with 0.5.6 2020-05-12 18:08:48 -07:00
Andrew
d405a18f53 Improve Simple Worldbuilding sheet layout and macro syntax 2020-04-18 16:14:51 -07:00
Andrew
6dbee061d6 Target 034 tag for download URL 2020-04-14 17:25:21 -07:00
Andrew
20e8f8fa20 Update to 0.34 for compatibility with core 0.5.5 2020-04-14 17:22:06 -07:00
Andrew
57b5be22dc Update SWB system for FVTT version 0.5.2 2020-03-30 20:49:30 -07:00