-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#342, #2538] Display race on sheet, add singleton logic to race & background items #2541
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 tasks
4894854
to
f1dcd4e
Compare
Fyorl
requested changes
Nov 6, 2023
49f3200
to
9867fd4
Compare
9867fd4
to
d4333a6
Compare
@Fyorl I added a bit of data preparation code to ensure that background labels from before the reference was added continue working displaying properly. |
Fyorl
requested changes
Nov 6, 2023
Fyorl
requested changes
Nov 6, 2023
…n logic to race & background items
… missing JSDoc comments
992be5e
to
3b36add
Compare
Fyorl
approved these changes
Nov 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you Jeff
56 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Displays race item above background on features tab of character sheet.
Adds a
LocalDocumentField
to reference a single item on an actor, and replacebackground
&race
properties with this new field. This field has afallback
option so that if the item isn't found, then string is displayed (allowing existing hand-typed Race and Background values to continue displaying properly).Used a mixin for
Item5e
andActor5e
that forwards socket event handler requests to their data models, allowing each type to add custom socket event handler behavior. This behavior is used inRaceData
andBackgroundData
to setsystem.details.race
andsystem.details.background
to reference any newly added items, and unset it when they are deleted. This is also used for any item marked with thesingleton
metadata property to only allow one to be created at a time.I've also tweaked all of our current socket event handlers to ensure they return
false
if the parent handler returnsfalse
so we can properly prevent items from being created.