-
Notifications
You must be signed in to change notification settings - Fork 376
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
Automate increase and decrease to item repair #15915
base: master
Are you sure you want to change the base?
Conversation
This looks good, but would you mind making it |
@stwlam Made the requested change! |
@@ -404,6 +404,7 @@ interface VersatileWeaponOption { | |||
interface CharacterCraftingData { | |||
formulas: CraftingFormulaData[]; | |||
entries: Record<string, Partial<CraftingEntryData>>; | |||
repair: { value: 5 }; |
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.
This should be value: number, as this is a type
@@ -461,7 +461,7 @@ class CharacterPF2e<TParent extends TokenDocumentPF2e | null = TokenDocumentPF2e | |||
} | |||
|
|||
// Indicate that crafting formulas stored directly on the actor are deletable | |||
system.crafting = fu.mergeObject({ formulas: [], entries: {} }, system.crafting ?? {}); | |||
system.crafting = fu.mergeObject({ formulas: [], entries: {}, repair: { value: 5 } }, system.crafting ?? {}); |
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.
This allows persisted values to override the default of 5, when only rule elements should be able to modify the repair value. You might need to do system.crafting.repair = { value: 5 };
after this line.
Can you foresee other values being inside system.crafting.repair? I'm wondering if we can't replace |
Added automation for the repair macro.
It will now check the new "repairValue" data point under actor.system.crafting to allow for customization of the amount of HP that can be repaired with the macro. The default is set to 5 as per the base repair action.
Crafter's Eyepiece has been updated with two new rules to add to repairValue and to add a flavor note about the updated repair numbers.
This should close #10958
(Apologies for the two closed PRs, I had some issues with them but it's all resolved now)