-
Notifications
You must be signed in to change notification settings - Fork 27
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
feat(data): add injuries support to character data model #21
feat(data): add injuries support to character data model #21
Conversation
Work is completed on this PR. There's space for future improvements, like adding active effects support, but that's outside of the scope of this PR and the linked issue |
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.
Looks good! Just one small change for localization.
src/system/config.ts
Outdated
injuries: { | ||
[InjuryDuration.FleshWound]: { | ||
label: 'Flesh Wound', | ||
durationFormula: '1', | ||
}, | ||
[InjuryDuration.ShallowInjury]: { | ||
label: 'Shallow Injury', | ||
durationFormula: '1d6', | ||
}, | ||
[InjuryDuration.ViciousInjury]: { | ||
label: 'Vicious Injury', | ||
durationFormula: '6d6', | ||
}, | ||
[InjuryDuration.PermanentInjury]: { | ||
label: 'Permanent Injury', | ||
}, | ||
[InjuryDuration.Death]: { | ||
label: 'Death', | ||
}, | ||
}, |
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.
These labels need to be localized
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.
Whoops! Didn't notice that localization is in because I'm forked from main. I'll get those changes in shortly
c28d97f
to
b4b4eab
Compare
Alright, we're all localized now after a bit of repo rejiggering to be completely up-to-date with the release branch |
Partially addresses #5
Adding injury support to the character data model. While injuries themselves (among other conditions) should be Items or some other kind of EmbeddedDocument that lives in a character, we also want easy access to the number of injuries one has among their other conditions. We'll want a derived field for quick access to the number of injuries for Injury Rolls, as well as particular support for Injury Items.
Done:
injuries
field in the common actor data modelInjury
item typeduration
)injuries
data from owned Injury items