Repository navigation
feat(system-builder): conditions on tokens, server side (4e2a1) - #217
Merged
Merged
Conversation
A token's conditions live in a new locations.conditions column, JSON
[{ id, left? }], and in token_vitals, so each game system keeps its own and a
switch swaps them with the token's health (tokens/vitals.js FIELDS).
PUT /api/locations/:id/conditions sets the whole list, as the injuries route
does: for whoever may change the token's health (tokenAccess.mayChangeHealth),
a player's list following them onto every token of theirs. Each entry must be a
condition the running system offers (runtime.conditionsIn: a published custom
system's own, or the standard set with no modifiers under a built-in game). One
that ends after rounds starts at its own rounds unless `left` is given; unknown
ids, duplicates, rounds outside 1 to 99 and more than 60 are refused by name.
The public token list shows which conditions a token has to everyone and the
rounds left only to the GM and granted editors. GET
/api/systems/conditions/:system lists a system's conditions publicly, with
modifiers only for the GM and editors.
Checked on a copy of a real database: both columns added, every token starting
with none.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A token's conditions live in a new locations.conditions column, JSON [{ id, left? }], and in token_vitals, so each game system keeps its own and a switch swaps them with the token's health (tokens/vitals.js FIELDS).
PUT /api/locations/:id/conditions sets the whole list, as the injuries route does: for whoever may change the token's health (tokenAccess.mayChangeHealth), a player's list following them onto every token of theirs. Each entry must be a condition the running system offers (runtime.conditionsIn: a published custom system's own, or the standard set with no modifiers under a built-in game). One that ends after rounds starts at its own rounds unless
leftis given; unknown ids, duplicates, rounds outside 1 to 99 and more than 60 are refused by name.The public token list shows which conditions a token has to everyone and the rounds left only to the GM and granted editors. GET /api/systems/conditions/:system lists a system's conditions publicly, with modifiers only for the GM and editors.
Checked on a copy of a real database: both columns added, every token starting with none.
Summary
Test plan
Pre-merge checklist
Code quality:
Version & Release:
frontend/package.jsonversiondocker-compose.ymlAPP_VERSIONCHANGELOG.mdwith release notesBefore merging to main:
Related issues