-
Notifications
You must be signed in to change notification settings - Fork 25
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: add cosmere initiative system #33
Conversation
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.
No real comments on the implementation. Some minor style/typescript comments & tips. However when I run it locally I get an error when adding a combatant to a combat.
Error: An error occurred while rendering CosmereCombatTracker 24. The partial combatant could not be found
It looks like the combatant partial is not getting preloaded. (Maybe something when wrong when merging with release-0.1.0?) Preloading of partials should be set up in the preloadHandlebarsTemplates
function, found at: util/handlebars/index.ts
); | ||
} | ||
|
||
//toggles combatant turn speed on clicking the "fast/slow" text on the combat tracker window |
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 can also be set up as a doc comment
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.
Not exactly sure what you mean here. Can you elaborate a bit?
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.
If you use JSDoc comments (comments starting with /**
) instead of regular comments, then your comment will show up alongside intellisense on most IDEs. Have a look at the Actor document for some examples.
Broadly: Any comments that explain the functionality (for someone who might want to use that function/variable/parameter/etc.) should be doc comments. Any comments that explain the implementation should be regular comments.
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 was a pretty good explanation. I hadn't used JSDoc comments before so I didn't realize they did that for intellisense. I've expanded the comments in the code I've added.
Yeah, when switching to the 0.1.0 branch I moved the template into preloadHandleBarTemplates, but didn't commit the updated function. Fixed that and implemented most of the other changes you mentioned. |
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.
Noticed a few more things that I'd missed/hadn't been able to check yet last time.
New PR due to changing to the 0.1.0 branch:
Overrides Foundry's default initiative rolling system to use the Cosmere RPGs slow/fast popcorn style initiative system. Implements a bucket/phases system to group combatants based on turn speed and whether they are a player character or an adversary. Defaults all combatants to slow turn speed when they are added to the combat. Added buttons to the combat tracker allowing them to switch turn speed and indicate they have acted for the turn, and set some basic styling for the combat-tracker template.
Done: