rpg-engine 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/campaign/index.d.ts +1 -1
- package/dist/campaign/index.js +1 -1
- package/dist/campaign/settings.d.ts +6 -0
- package/dist/campaign/settings.js +22 -1
- package/dist/cli/cli.js +1 -1
- package/dist/cli/command-line.js +1 -1
- package/dist/commands/advance.d.ts +1 -1
- package/dist/commands/advance.js +6 -6
- package/dist/commands/ask.js +7 -7
- package/dist/commands/change/amounts.d.ts +32 -0
- package/dist/commands/change/amounts.js +150 -0
- package/dist/commands/change/change.d.ts +4 -54
- package/dist/commands/change/change.js +19 -749
- package/dist/commands/change/damage.d.ts +30 -0
- package/dist/commands/change/damage.js +73 -2
- package/dist/commands/change/dice.d.ts +34 -0
- package/dist/commands/change/dice.js +59 -0
- package/dist/commands/change/fields.d.ts +37 -0
- package/dist/commands/change/fields.js +156 -0
- package/dist/commands/change/holder.d.ts +48 -0
- package/dist/commands/change/holder.js +162 -0
- package/dist/commands/change/recipe-pace.js +1 -1
- package/dist/commands/change/recipe.d.ts +58 -0
- package/dist/commands/change/recipe.js +179 -0
- package/dist/commands/choices.js +3 -3
- package/dist/commands/config/config.d.ts +15 -0
- package/dist/commands/config/config.js +355 -0
- package/dist/commands/config/custom-levels.d.ts +7 -0
- package/dist/commands/config/custom-levels.js +32 -0
- package/dist/commands/{config.d.ts → config/dashboard.d.ts} +2 -24
- package/dist/commands/config/dashboard.js +171 -0
- package/dist/commands/config/entries.d.ts +17 -0
- package/dist/commands/config/entries.js +76 -0
- package/dist/commands/config/news.d.ts +7 -0
- package/dist/commands/config/news.js +88 -0
- package/dist/commands/config/shown.d.ts +9 -0
- package/dist/commands/config/shown.js +80 -0
- package/dist/commands/config/words.d.ts +27 -0
- package/dist/commands/config/words.js +204 -0
- package/dist/commands/effect.js +9 -9
- package/dist/commands/find.js +1 -1
- package/dist/commands/image.js +6 -6
- package/dist/commands/import/import.d.ts +0 -2
- package/dist/commands/import/import.js +45 -44
- package/dist/commands/import/run.js +1 -1
- package/dist/commands/index.js +3 -3
- package/dist/commands/init.js +2 -2
- package/dist/commands/install.js +1 -1
- package/dist/commands/instructions.js +6 -6
- package/dist/commands/mode.d.ts +2 -2
- package/dist/commands/mode.js +8 -8
- package/dist/commands/mood.js +4 -4
- package/dist/commands/move.js +10 -10
- package/dist/commands/package/consent.d.ts +11 -0
- package/dist/commands/package/consent.js +52 -0
- package/dist/commands/package/here.d.ts +51 -0
- package/dist/commands/package/here.js +128 -0
- package/dist/commands/package/install.d.ts +10 -0
- package/dist/commands/package/install.js +337 -0
- package/dist/commands/package/package.d.ts +18 -0
- package/dist/commands/package/package.js +236 -0
- package/dist/commands/package/result.d.ts +90 -0
- package/dist/commands/package/result.js +1 -0
- package/dist/commands/package/uninstall.d.ts +6 -0
- package/dist/commands/package/uninstall.js +70 -0
- package/dist/commands/rename.js +3 -3
- package/dist/commands/reveal.js +5 -5
- package/dist/commands/roll/roll.js +11 -9
- package/dist/commands/roll/tables.js +1 -1
- package/dist/commands/rules.d.ts +2 -2
- package/dist/commands/rules.js +3 -3
- package/dist/commands/save.d.ts +1 -1
- package/dist/commands/save.js +2 -2
- package/dist/commands/scene/close.d.ts +18 -0
- package/dist/commands/scene/close.js +179 -0
- package/dist/commands/scene/members.d.ts +14 -0
- package/dist/commands/scene/members.js +32 -0
- package/dist/commands/scene/open.d.ts +6 -0
- package/dist/commands/scene/open.js +298 -0
- package/dist/commands/scene/result.d.ts +98 -0
- package/dist/commands/scene/result.js +2 -0
- package/dist/commands/{scene.d.ts → scene/scene.d.ts} +10 -36
- package/dist/commands/scene/scene.js +210 -0
- package/dist/commands/scene/turns.d.ts +18 -0
- package/dist/commands/scene/turns.js +229 -0
- package/dist/commands/shared/{adventures.d.ts → books/adventures.d.ts} +5 -3
- package/dist/commands/shared/{adventures.js → books/adventures.js} +23 -19
- package/dist/commands/shared/{library-reader.js → books/library-reader.js} +3 -3
- package/dist/commands/shared/{library.d.ts → books/library.d.ts} +2 -2
- package/dist/commands/shared/{library.js → books/library.js} +9 -9
- package/dist/commands/shared/{rules.d.ts → books/rules.d.ts} +2 -2
- package/dist/commands/shared/{rules.js → books/rules.js} +5 -5
- package/dist/commands/shared/{system-texts.d.ts → books/system-texts.d.ts} +2 -2
- package/dist/commands/shared/{system-texts.js → books/system-texts.js} +9 -8
- package/dist/commands/shared/{page-words.d.ts → books/words.d.ts} +2 -2
- package/dist/commands/shared/{page-words.js → books/words.js} +4 -4
- package/dist/commands/shared/{checks.d.ts → campaign/checks.d.ts} +3 -3
- package/dist/commands/shared/{checks.js → campaign/checks.js} +7 -7
- package/dist/commands/shared/{images.d.ts → campaign/images.d.ts} +3 -3
- package/dist/commands/shared/{images.js → campaign/images.js} +5 -5
- package/dist/commands/shared/{mode.d.ts → campaign/mode.d.ts} +4 -4
- package/dist/commands/shared/{mode.js → campaign/mode.js} +24 -13
- package/dist/commands/shared/{money.d.ts → campaign/money.d.ts} +3 -3
- package/dist/commands/shared/{money.js → campaign/money.js} +2 -2
- package/dist/commands/shared/{offers.d.ts → campaign/offers.d.ts} +3 -3
- package/dist/commands/shared/{offers.js → campaign/offers.js} +3 -3
- package/dist/commands/shared/{outside.d.ts → campaign/outside.d.ts} +3 -3
- package/dist/commands/shared/{outside.js → campaign/outside.js} +7 -7
- package/dist/commands/shared/{parts.d.ts → campaign/parts.d.ts} +3 -3
- package/dist/commands/shared/{parts.js → campaign/parts.js} +3 -3
- package/dist/commands/shared/{problems.d.ts → campaign/problems.d.ts} +3 -3
- package/dist/commands/shared/{problems.js → campaign/problems.js} +17 -17
- package/dist/commands/shared/{quests.d.ts → campaign/quests.d.ts} +4 -4
- package/dist/commands/shared/{quests.js → campaign/quests.js} +6 -6
- package/dist/commands/shared/{saves.d.ts → campaign/saves.d.ts} +4 -4
- package/dist/commands/shared/{saves.js → campaign/saves.js} +10 -10
- package/dist/commands/shared/{theme.d.ts → campaign/theme.d.ts} +3 -3
- package/dist/commands/shared/{theme.js → campaign/theme.js} +1 -1
- package/dist/commands/shared/{world.d.ts → campaign/world.d.ts} +5 -5
- package/dist/commands/shared/{world.js → campaign/world.js} +17 -14
- package/dist/commands/shared/{knowledge.d.ts → characters/knowledge.d.ts} +3 -3
- package/dist/commands/shared/{knowledge.js → characters/knowledge.js} +4 -4
- package/dist/commands/shared/{moods.d.ts → characters/moods.d.ts} +3 -3
- package/dist/commands/shared/{moods.js → characters/moods.js} +3 -3
- package/dist/commands/shared/characters/orders.d.ts +4 -0
- package/dist/commands/shared/characters/orders.js +10 -0
- package/dist/commands/shared/{thoughts.d.ts → characters/thoughts.d.ts} +2 -2
- package/dist/commands/shared/{thoughts.js → characters/thoughts.js} +3 -3
- package/dist/commands/shared/{voices.d.ts → characters/voices.d.ts} +1 -1
- package/dist/commands/shared/{voices.js → characters/voices.js} +2 -2
- package/dist/commands/shared/examples.js +2 -2
- package/dist/commands/shared/packages/catalog.js +2 -2
- package/dist/commands/shared/packages/code.d.ts +1 -1
- package/dist/commands/shared/packages/code.js +8 -8
- package/dist/commands/shared/packages/extensions.d.ts +1 -1
- package/dist/commands/shared/packages/extensions.js +1 -1
- package/dist/commands/shared/packages/hooks.d.ts +1 -1
- package/dist/commands/shared/packages/hooks.js +1 -1
- package/dist/commands/shared/packages/widgets.d.ts +3 -3
- package/dist/commands/shared/packages/widgets.js +3 -3
- package/dist/commands/shared/{environment.d.ts → places/environment.d.ts} +1 -1
- package/dist/commands/shared/{environment.js → places/environment.js} +4 -4
- package/dist/commands/shared/{grid-moves.d.ts → places/grid-moves.d.ts} +4 -4
- package/dist/commands/shared/{grid-moves.js → places/grid-moves.js} +8 -7
- package/dist/commands/shared/{grids.d.ts → places/grids.d.ts} +4 -4
- package/dist/commands/shared/{grids.js → places/grids.js} +6 -6
- package/dist/commands/shared/{journey.d.ts → places/journey.d.ts} +3 -3
- package/dist/commands/shared/{journey.js → places/journey.js} +6 -6
- package/dist/commands/shared/{moves.d.ts → places/moves.d.ts} +2 -2
- package/dist/commands/shared/{moves.js → places/moves.js} +4 -4
- package/dist/commands/shared/{positions.d.ts → places/positions.d.ts} +2 -2
- package/dist/commands/shared/{positions.js → places/positions.js} +4 -4
- package/dist/commands/shared/{roads.d.ts → places/roads.d.ts} +5 -5
- package/dist/commands/shared/{roads.js → places/roads.js} +6 -6
- package/dist/commands/shared/{effects.d.ts → scene/effects.d.ts} +7 -7
- package/dist/commands/shared/{effects.js → scene/effects.js} +10 -10
- package/dist/commands/shared/{loot.d.ts → scene/loot.d.ts} +2 -2
- package/dist/commands/shared/{loot.js → scene/loot.js} +3 -3
- package/dist/commands/shared/{master-rolls.d.ts → scene/master-rolls.d.ts} +2 -2
- package/dist/commands/shared/{master-rolls.js → scene/master-rolls.js} +5 -5
- package/dist/commands/shared/{reminders.d.ts → scene/reminders.d.ts} +4 -4
- package/dist/commands/shared/{reminders.js → scene/reminders.js} +4 -4
- package/dist/commands/shared/{scene.d.ts → scene/scene.d.ts} +3 -3
- package/dist/commands/shared/{scene.js → scene/scene.js} +7 -7
- package/dist/commands/shared/{bonds.d.ts → sheet/bonds.d.ts} +3 -3
- package/dist/commands/shared/{bonds.js → sheet/bonds.js} +2 -2
- package/dist/commands/shared/{page-counters.d.ts → sheet/counters.d.ts} +3 -3
- package/dist/commands/shared/{page-counters.js → sheet/counters.js} +5 -5
- package/dist/commands/shared/{effect-layer.d.ts → sheet/effect-layer.d.ts} +2 -2
- package/dist/commands/shared/{effect-layer.js → sheet/effect-layer.js} +9 -6
- package/dist/commands/shared/sheet/effect-values.d.ts +9 -0
- package/dist/commands/shared/sheet/effect-values.js +69 -0
- package/dist/commands/shared/{experience.d.ts → sheet/experience.d.ts} +3 -3
- package/dist/commands/shared/{experience.js → sheet/experience.js} +5 -5
- package/dist/commands/shared/sheet/formula-problems.d.ts +8 -0
- package/dist/commands/shared/sheet/formula-problems.js +140 -0
- package/dist/commands/shared/sheet/formula-scope.d.ts +32 -0
- package/dist/commands/shared/sheet/formula-scope.js +235 -0
- package/dist/commands/shared/{limits.d.ts → sheet/limits.d.ts} +3 -3
- package/dist/commands/shared/{limits.js → sheet/limits.js} +5 -4
- package/dist/commands/shared/{progression.d.ts → sheet/progression.d.ts} +2 -2
- package/dist/commands/shared/{progression.js → sheet/progression.js} +4 -4
- package/dist/commands/shared/{sheet.d.ts → sheet/sheet.d.ts} +5 -5
- package/dist/commands/shared/{sheet.js → sheet/sheet.js} +11 -7
- package/dist/commands/shared/{stacks.d.ts → sheet/stacks.d.ts} +2 -2
- package/dist/commands/shared/{stacks.js → sheet/stacks.js} +4 -4
- package/dist/commands/shared/sheet/system-fields.d.ts +21 -0
- package/dist/commands/shared/sheet/system-fields.js +45 -0
- package/dist/commands/shared/{thresholds.d.ts → sheet/thresholds.d.ts} +1 -1
- package/dist/commands/shared/{thresholds.js → sheet/thresholds.js} +4 -4
- package/dist/commands/shared/{turn-uses.d.ts → sheet/turn-uses.d.ts} +3 -3
- package/dist/commands/shared/{turn-uses.js → sheet/turn-uses.js} +4 -3
- package/dist/commands/shared/{worked-out.d.ts → sheet/worked-out.d.ts} +11 -46
- package/dist/commands/shared/sheet/worked-out.js +291 -0
- package/dist/commands/shared/sheet/worked-text.d.ts +14 -0
- package/dist/commands/shared/sheet/worked-text.js +55 -0
- package/dist/commands/shared/{advance.d.ts → time/advance.d.ts} +3 -3
- package/dist/commands/shared/{advance.js → time/advance.js} +11 -11
- package/dist/commands/shared/{dice-pool.d.ts → time/dice-pool.d.ts} +3 -3
- package/dist/commands/shared/{dice-pool.js → time/dice-pool.js} +11 -11
- package/dist/commands/shared/{events.d.ts → time/events.d.ts} +5 -5
- package/dist/commands/shared/{events.js → time/events.js} +10 -13
- package/dist/commands/shared/{recipes.d.ts → time/recipes.d.ts} +3 -3
- package/dist/commands/shared/{recipes.js → time/recipes.js} +6 -5
- package/dist/commands/shared/{time.d.ts → time/time.d.ts} +4 -4
- package/dist/commands/shared/{time.js → time/time.js} +6 -6
- package/dist/commands/shared/{upkeep.d.ts → time/upkeep.d.ts} +3 -3
- package/dist/commands/shared/{upkeep.js → time/upkeep.js} +14 -13
- package/dist/commands/show.d.ts +3 -0
- package/dist/commands/show.js +28 -9
- package/dist/commands/status.d.ts +2 -1
- package/dist/commands/status.js +28 -22
- package/dist/commands/thoughts.js +3 -3
- package/dist/commands/trade.js +8 -8
- package/dist/commands/translate.d.ts +1 -1
- package/dist/commands/translate.js +3 -3
- package/dist/commands/travel/open.d.ts +1 -1
- package/dist/commands/travel/open.js +2 -2
- package/dist/commands/travel/route.js +7 -6
- package/dist/commands/travel/travel.d.ts +1 -1
- package/dist/commands/travel/travel.js +8 -8
- package/dist/commands/validate.js +3 -3
- package/dist/commands/view/journal.d.ts +2 -2
- package/dist/commands/view/journal.js +2 -2
- package/dist/commands/view/map.d.ts +1 -1
- package/dist/commands/view/map.js +6 -6
- package/dist/commands/view/memory.d.ts +16 -0
- package/dist/commands/view/memory.js +90 -0
- package/dist/commands/view/page.d.ts +32 -0
- package/dist/commands/view/page.js +163 -0
- package/dist/commands/view/place.d.ts +7 -2
- package/dist/commands/view/place.js +30 -12
- package/dist/commands/view/result.d.ts +245 -0
- package/dist/commands/view/result.js +1 -0
- package/dist/commands/view/saves.d.ts +6 -0
- package/dist/commands/view/saves.js +53 -0
- package/dist/commands/view/story.d.ts +32 -0
- package/dist/commands/view/story.js +227 -0
- package/dist/commands/view/view.d.ts +26 -292
- package/dist/commands/view/view.js +26 -534
- package/dist/commands/view/world.d.ts +1 -1
- package/dist/commands/view/world.js +3 -3
- package/dist/commands/write/checks.d.ts +42 -0
- package/dist/commands/write/checks.js +291 -0
- package/dist/commands/write/here.d.ts +1 -1
- package/dist/commands/write/here.js +5 -5
- package/dist/commands/write/inheritance.d.ts +40 -0
- package/dist/commands/write/inheritance.js +189 -0
- package/dist/commands/write/input.d.ts +29 -0
- package/dist/commands/write/input.js +124 -0
- package/dist/commands/write/layer.d.ts +36 -0
- package/dist/commands/write/layer.js +48 -0
- package/dist/commands/write/notes.d.ts +22 -0
- package/dist/commands/write/notes.js +76 -0
- package/dist/commands/write/progression.d.ts +27 -0
- package/dist/commands/write/progression.js +175 -0
- package/dist/commands/write/write.d.ts +1 -0
- package/dist/commands/write/write.js +32 -816
- package/dist/core/files.d.ts +2 -0
- package/dist/core/files.js +7 -0
- package/dist/core/{package-declarations.d.ts → packages/declarations.d.ts} +1 -1
- package/dist/core/{package-declarations.js → packages/declarations.js} +1 -1
- package/dist/core/session-store.js +3 -3
- package/dist/core/store.d.ts +2 -2
- package/dist/core/store.js +18 -4
- package/dist/dashboard/acts/acts.js +1 -1
- package/dist/dashboard/acts/sending.js +110 -0
- package/dist/dashboard/acts/sheet.js +2 -2
- package/dist/dashboard/acts/strip.js +1 -1
- package/dist/dashboard/address.js +6 -0
- package/dist/dashboard/api.js +1 -1
- package/dist/dashboard/app.js +47 -171
- package/dist/dashboard/dice/roller.js +1 -1
- package/dist/dashboard/dice/sets.js +2 -2
- package/dist/dashboard/dice/stage.js +1 -1
- package/dist/dashboard/dice/tray.js +6 -6
- package/dist/dashboard/guide/ar.md +5 -3
- package/dist/dashboard/guide/cs.md +5 -3
- package/dist/dashboard/guide/da.md +5 -3
- package/dist/dashboard/guide/de.md +5 -3
- package/dist/dashboard/guide/el.md +5 -3
- package/dist/dashboard/guide/en.md +2 -0
- package/dist/dashboard/guide/es.md +4 -2
- package/dist/dashboard/guide/fi.md +5 -3
- package/dist/dashboard/guide/fr.md +4 -2
- package/dist/dashboard/guide/he.md +4 -2
- package/dist/dashboard/guide/hi.md +6 -4
- package/dist/dashboard/guide/hu.md +4 -2
- package/dist/dashboard/guide/is.md +5 -3
- package/dist/dashboard/guide/it.md +3 -1
- package/dist/dashboard/guide/ja.md +7 -5
- package/dist/dashboard/guide/ko.md +6 -4
- package/dist/dashboard/guide/nb.md +4 -2
- package/dist/dashboard/guide/nl.md +5 -3
- package/dist/dashboard/guide/pl.md +4 -2
- package/dist/dashboard/guide/pt.md +4 -2
- package/dist/dashboard/guide/ro.md +5 -3
- package/dist/dashboard/guide/ru.md +5 -3
- package/dist/dashboard/guide/sv.md +5 -3
- package/dist/dashboard/guide/tr.md +6 -4
- package/dist/dashboard/guide/uk.md +4 -2
- package/dist/dashboard/guide/zh.md +5 -3
- package/dist/dashboard/help/help.js +3 -3
- package/dist/dashboard/i18n/ar.json +4 -0
- package/dist/dashboard/i18n/cs.json +4 -0
- package/dist/dashboard/i18n/da.json +4 -0
- package/dist/dashboard/i18n/de.json +4 -0
- package/dist/dashboard/i18n/el.json +4 -0
- package/dist/dashboard/i18n/es.json +4 -0
- package/dist/dashboard/i18n/fi.json +4 -0
- package/dist/dashboard/i18n/fr.json +4 -0
- package/dist/dashboard/i18n/he.json +4 -0
- package/dist/dashboard/i18n/hi.json +4 -0
- package/dist/dashboard/i18n/hu.json +4 -0
- package/dist/dashboard/i18n/is.json +4 -0
- package/dist/dashboard/i18n/it.json +4 -0
- package/dist/dashboard/i18n/ja.json +5 -1
- package/dist/dashboard/i18n/ko.json +4 -0
- package/dist/dashboard/i18n/nb.json +4 -0
- package/dist/dashboard/i18n/nl.json +4 -0
- package/dist/dashboard/i18n/pl.json +4 -0
- package/dist/dashboard/i18n/pt.json +4 -0
- package/dist/dashboard/i18n/ro.json +4 -0
- package/dist/dashboard/i18n/ru.json +4 -0
- package/dist/dashboard/i18n/sv.json +4 -0
- package/dist/dashboard/i18n/tr.json +4 -0
- package/dist/dashboard/i18n/uk.json +4 -0
- package/dist/dashboard/i18n/zh.json +4 -0
- package/dist/dashboard/{journal.js → journal/journal.js} +16 -16
- package/dist/dashboard/{notes.js → journal/notes.js} +4 -4
- package/dist/dashboard/kit.js +3 -3
- package/dist/dashboard/packages/ask-card.js +3 -3
- package/dist/dashboard/packages/catalog.js +196 -0
- package/dist/dashboard/packages/engine.js +87 -0
- package/dist/dashboard/packages/installed.js +53 -0
- package/dist/dashboard/packages/library.js +97 -0
- package/dist/dashboard/packages/outcomes.js +45 -0
- package/dist/dashboard/packages/packages.js +20 -576
- package/dist/dashboard/packages/page-code.js +15 -2
- package/dist/dashboard/packages/{package-page.js → page.js} +12 -5
- package/dist/dashboard/packages/rows.js +84 -0
- package/dist/dashboard/packages/share.js +44 -0
- package/dist/dashboard/packages/widgets.js +3 -3
- package/dist/dashboard/{card.js → parts/card.js} +1 -1
- package/dist/dashboard/{faces.js → parts/faces.js} +5 -5
- package/dist/dashboard/{game-words.js → parts/game-words.js} +1 -1
- package/dist/dashboard/{icons.js → parts/icons.js} +1 -1
- package/dist/dashboard/{labels.js → parts/labels.js} +2 -1
- package/dist/dashboard/{map-symbols.js → parts/map-symbols.js} +1 -1
- package/dist/dashboard/{markdown.js → parts/markdown.js} +2 -2
- package/dist/dashboard/{mood.js → parts/mood.js} +1 -1
- package/dist/dashboard/{refusals.js → parts/refusals.js} +1 -1
- package/dist/dashboard/{status.js → parts/status.js} +4 -4
- package/dist/dashboard/{widgets.js → parts/widgets.js} +2 -2
- package/dist/dashboard/place/key.js +24 -0
- package/dist/dashboard/place/paper.js +67 -0
- package/dist/dashboard/place/{map-sheet.js → sheet.js} +2 -2
- package/dist/dashboard/place/things.js +129 -0
- package/dist/dashboard/place/tokens.js +93 -0
- package/dist/dashboard/place/view.js +124 -0
- package/dist/dashboard/{asked-dice.js → play/asked-dice.js} +3 -3
- package/dist/dashboard/{asked.js → play/asked.js} +10 -10
- package/dist/dashboard/{choices.js → play/choices.js} +9 -9
- package/dist/dashboard/{requested.js → play/requested.js} +1 -1
- package/dist/dashboard/{rolls.js → play/rolls.js} +9 -9
- package/dist/dashboard/{scene.js → play/scene.js} +14 -14
- package/dist/dashboard/{turns.js → play/turns.js} +12 -12
- package/dist/dashboard/{language-choice.js → settings/language-choice.js} +1 -1
- package/dist/dashboard/{languages.js → settings/languages.js} +1 -1
- package/dist/dashboard/{saves.js → settings/saves.js} +8 -8
- package/dist/dashboard/{settings.js → settings/settings.js} +17 -15
- package/dist/dashboard/{setup.js → settings/setup.js} +5 -5
- package/dist/dashboard/{party.js → sheet/party.js} +8 -8
- package/dist/dashboard/{person-panel.js → sheet/person-panel.js} +4 -4
- package/dist/dashboard/{sheet.js → sheet/sheet.js} +17 -17
- package/dist/dashboard/{story.js → sheet/story.js} +3 -3
- package/dist/dashboard/{columns.js → shell/columns.js} +1 -1
- package/dist/dashboard/{footer.js → shell/footer.js} +3 -3
- package/dist/dashboard/{master.js → shell/master.js} +2 -2
- package/dist/dashboard/{notices.js → shell/notices.js} +3 -3
- package/dist/dashboard/{pages.js → shell/pages.js} +5 -5
- package/dist/dashboard/shell/shown.js +37 -0
- package/dist/dashboard/{table.js → shell/table.js} +2 -2
- package/dist/dashboard/{tabs.js → shell/tabs.js} +2 -2
- package/dist/dashboard/{top.js → shell/top.js} +7 -7
- package/dist/dashboard/style.css +74 -3
- package/dist/dashboard/world/calendar.js +4 -4
- package/dist/dashboard/world/drawing.js +92 -0
- package/dist/dashboard/world/key.js +21 -0
- package/dist/dashboard/world/lore.js +5 -5
- package/dist/dashboard/world/map-card.js +186 -0
- package/dist/dashboard/world/place-card.js +39 -0
- package/dist/dashboard/world/places.js +29 -0
- package/dist/dashboard/world/world.js +9 -341
- package/dist/extensions/extension.d.ts +1 -1
- package/dist/extensions/extension.js +1 -1
- package/dist/images/images.js +12 -9
- package/dist/index.d.ts +1 -1
- package/dist/languages/index.d.ts +1 -1
- package/dist/languages/index.js +1 -1
- package/dist/packages/npm.js +1 -1
- package/dist/page.d.ts +2 -2
- package/dist/page.js +1 -1
- package/dist/pages/check.js +23 -1
- package/dist/pages/containers.d.ts +1 -1
- package/dist/pages/containers.js +1 -1
- package/dist/pages/index.d.ts +4 -2
- package/dist/pages/index.js +4 -2
- package/dist/pages/inheritance.d.ts +2 -2
- package/dist/pages/layers.d.ts +50 -0
- package/dist/pages/layers.js +97 -0
- package/dist/pages/rename-page.js +1 -1
- package/dist/pages/stacks/writes.js +48 -22
- package/dist/pages/standard-fields.d.ts +1 -1
- package/dist/pages/system-pages.d.ts +5 -3
- package/dist/pages/system-pages.js +16 -7
- package/dist/pages/world.d.ts +8 -1
- package/dist/pages/world.js +16 -4
- package/dist/pages/write-layer.d.ts +18 -0
- package/dist/pages/write-layer.js +108 -0
- package/dist/pages/write-page.d.ts +2 -2
- package/dist/pages/write-page.js +2 -2
- package/dist/rules/index.d.ts +1 -1
- package/dist/rules/index.js +1 -1
- package/dist/rules/search.d.ts +1 -1
- package/dist/rules/shown.d.ts +1 -1
- package/dist/server/dashboard/choices.js +3 -3
- package/dist/server/dashboard/files.js +5 -5
- package/dist/server/dashboard/index.d.ts +2 -2
- package/dist/server/dashboard/index.js +2 -2
- package/dist/server/dashboard/news.js +4 -3
- package/dist/server/dashboard/player.js +1 -1
- package/dist/server/dashboard/writes.js +9 -7
- package/dist/server/mcp.js +28 -13
- package/dist/systems/campaign-data.d.ts +15 -0
- package/dist/systems/campaign-data.js +85 -0
- package/dist/systems/{system-code.d.ts → code.d.ts} +1 -1
- package/dist/systems/{system-code.js → code.js} +2 -2
- package/dist/systems/game-system.d.ts +7 -61
- package/dist/systems/game-system.js +1 -984
- package/dist/systems/index.d.ts +6 -3
- package/dist/systems/index.js +6 -3
- package/dist/systems/installed.d.ts +31 -0
- package/dist/systems/installed.js +89 -0
- package/dist/systems/maps.d.ts +3 -0
- package/dist/systems/maps.js +9 -0
- package/dist/systems/read.d.ts +3 -0
- package/dist/systems/read.js +471 -0
- package/dist/systems/schema.d.ts +289 -0
- package/dist/systems/schema.js +243 -0
- package/dist/systems/settings.d.ts +19 -0
- package/dist/systems/settings.js +78 -0
- package/dist/systems/versions.d.ts +12 -0
- package/dist/systems/versions.js +52 -0
- package/dist/testing/index.js +1 -1
- package/instructions/import.md +1 -1
- package/instructions/play.md +1 -1
- package/package.json +1 -1
- package/dist/commands/config.js +0 -948
- package/dist/commands/package.d.ts +0 -143
- package/dist/commands/package.js +0 -785
- package/dist/commands/scene.js +0 -894
- package/dist/commands/shared/worked-out.js +0 -805
- package/dist/dashboard/place/map-view.js +0 -417
- /package/dist/commands/shared/{library-reader.d.ts → books/library-reader.d.ts} +0 -0
- /package/dist/core/{package-api.d.ts → packages/api.d.ts} +0 -0
- /package/dist/core/{package-api.js → packages/api.js} +0 -0
- /package/dist/dashboard/{coins.js → parts/coins.js} +0 -0
- /package/dist/dashboard/{glass.js → parts/glass.js} +0 -0
- /package/dist/dashboard/{layout.js → parts/layout.js} +0 -0
- /package/dist/dashboard/{mood-faces.js → parts/mood-faces.js} +0 -0
- /package/dist/dashboard/{free-rolls.js → play/free-rolls.js} +0 -0
- /package/dist/dashboard/{reactions.js → play/reactions.js} +0 -0
- /package/dist/dashboard/{prefs.js → shell/prefs.js} +0 -0
- /package/dist/dashboard/{system-style.js → shell/system-style.js} +0 -0
- /package/dist/dashboard/{theme.js → shell/theme.js} +0 -0
- /package/dist/languages/{language-pack.d.ts → pack.d.ts} +0 -0
- /package/dist/languages/{language-pack.js → pack.js} +0 -0
- /package/dist/pages/{page-file.d.ts → file.d.ts} +0 -0
- /package/dist/pages/{page-file.js → file.js} +0 -0
- /package/dist/pages/{page-types.d.ts → types.d.ts} +0 -0
- /package/dist/pages/{page-types.js → types.js} +0 -0
- /package/dist/rules/{rule-book.d.ts → book.d.ts} +0 -0
- /package/dist/rules/{rule-book.js → book.js} +0 -0
- /package/dist/systems/{system-folders.d.ts → folders.d.ts} +0 -0
- /package/dist/systems/{system-folders.js → folders.js} +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "preact/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "preact/hooks";
|
|
3
|
+
import { CardHead } from "../parts/card.js";
|
|
4
|
+
import { Icon, iconPath } from "../parts/icons.js";
|
|
5
|
+
import { t } from "../text.js";
|
|
6
|
+
import { PackageRow, SaidNote, WorkNote } from "./rows.js";
|
|
7
|
+
// How often the library is read again while its books are being read, for their counts.
|
|
8
|
+
export const libraryReading = 5000;
|
|
9
|
+
/**
|
|
10
|
+
* This computer's library (D-491 (13)): said first to be added once to the computer and turned on in each campaign, as packages are, with how many this one
|
|
11
|
+
* uses; its folders, each with its books read, being read and skipped, whether this campaign uses it, and the bin; then the field that adds a folder or a book.
|
|
12
|
+
*/
|
|
13
|
+
export function LibraryTab({ view, problem, state, onAdd, onUse, onForget }) {
|
|
14
|
+
const entries = view?.entries ?? [];
|
|
15
|
+
const used = entries.filter((entry) => entry.used && entry.onComputer).length;
|
|
16
|
+
// A folder by its name; by its path when another has the same name.
|
|
17
|
+
const label = (entry) => (entries.filter((other) => shelfName(other.path) === shelfName(entry.path)).length > 1 ? entry.path : shelfName(entry.path));
|
|
18
|
+
return (_jsxs("section", { class: "card", "aria-labelledby": "packages-library", children: [_jsx(CardHead, { icon: iconPath("library"), title: _jsx("h3", { id: "packages-library", tabIndex: -1, children: t("Your books") }), ...(entries.length === 0 ? {} : { note: t("{count} in this campaign", { count: used }) }) }), _jsxs("div", { class: "card-body package-body", children: [_jsxs("p", { class: "library-scope", children: [_jsx(Icon, { name: "info" }), _jsxs("span", { children: [_jsx("strong", { children: t("Added once to this computer.") }), " ", t("Each campaign then turns on its own; the master searches them after the game system, citing the book and the page.")] })] }), problem !== undefined && _jsx("p", { class: "package-said problem", role: "alert", children: problem }), view !== undefined && entries.length === 0 && _jsx("p", { class: "package-note", children: t("None yet: add the folder of your manuals.") }), entries.length > 0 && (_jsx("ul", { class: "package-list", children: entries.map((entry) => (_jsx(LibraryRow, { entry: entry, label: label(entry), state: state(`library:${entry.path}`), onUse: (use) => onUse(entry.path, use, !entry.onComputer), onForget: () => onForget(entry.path, label(entry)) }, entry.path))) })), _jsx(LibraryField, { state: state("library"), onAdd: onAdd })] })] }));
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A folder or a book of the library: its name, its path under it, what is read of it, what was skipped with the engine's words; whether this campaign uses it,
|
|
22
|
+
* as a switch, and the bin that takes it off this computer. One the campaign lists and the computer has not, in red, with Add and Take out of this campaign.
|
|
23
|
+
*/
|
|
24
|
+
function LibraryRow({ entry, label, state, onUse, onForget }) {
|
|
25
|
+
const path = (_jsx("bdi", { dir: "ltr", class: "library-path", children: breakablePath(entry.path) }));
|
|
26
|
+
const name = _jsx("bdi", { children: shelfName(entry.path) });
|
|
27
|
+
if (!entry.onComputer) {
|
|
28
|
+
return (_jsxs(PackageRow, { tile: "alert", tone: "broken", name: name, about: _jsxs(_Fragment, { children: [path, _jsx("span", { class: "package-red", children: t("Not on this computer: the master does not search it until you add it again.") })] }), row: `library:${entry.path}`, actions: _jsxs(_Fragment, { children: [_jsxs("button", { type: "button", class: "button package-button", "aria-label": t("Add {path} again", { path: label }), "aria-disabled": state.busy, onClick: () => !state.busy && onUse(true), children: [_jsx(Icon, { name: "plus" }), t("Add")] }), _jsxs("button", { type: "button", class: "button package-button", "aria-label": t("Take {name} out of this campaign", { name: label }), "aria-disabled": state.busy, onClick: () => !state.busy && onUse(false), children: [_jsx(Icon, { name: "minus" }), t("Take out of this campaign")] })] }), children: [_jsx(WorkNote, { work: state.work }), _jsx(SaidNote, { said: state.said })] }));
|
|
29
|
+
}
|
|
30
|
+
return (_jsxs(PackageRow, { tile: "folder", tone: entry.missing ? "dim" : undefined, name: name, about: path, meta: libraryMeta(entry), row: `library:${entry.path}`, actions: _jsxs(_Fragment, { children: [_jsxs("label", { class: "package-use", children: [_jsx("input", { type: "checkbox", role: "switch", checked: entry.used, "aria-label": t("{path}: in this campaign", { path: label }), "aria-disabled": state.busy, onClick: (event) => {
|
|
31
|
+
event.preventDefault();
|
|
32
|
+
if (!state.busy) {
|
|
33
|
+
onUse(!entry.used);
|
|
34
|
+
}
|
|
35
|
+
} }), t("In this campaign")] }), _jsx("button", { type: "button", class: "icon-button package-bin tip-left", "aria-label": t("Take {path} off this computer…", { path: label }), "data-tip": t("Take off this computer…"), "aria-disabled": state.busy, onClick: () => !state.busy && onForget(), children: _jsx(Icon, { name: "clear" }) })] }), children: [entry.skipped.length > 0 && (_jsx("ul", { class: "library-skipped", children: entry.skipped.map((one) => (_jsxs("li", { children: [_jsx("bdi", { children: one.name }), ": ", skippedText(one.kind)] }, one.name))) })), _jsx(WorkNote, { work: state.work }), _jsx(SaidNote, { said: state.said })] }));
|
|
36
|
+
}
|
|
37
|
+
/** Why a book was skipped, in the player's words, with what to do. */
|
|
38
|
+
function skippedText(kind) {
|
|
39
|
+
const texts = {
|
|
40
|
+
password: t("it asks for a password to open: save a copy without one."),
|
|
41
|
+
drm: t("it is locked by DRM, which RPG Engine never opens."),
|
|
42
|
+
stuck: t("it stopped the reader twice: too big or damaged, or kept busy by another program. Close that program, or save the file again."),
|
|
43
|
+
denied: t("this computer does not let it be read: check who may open it."),
|
|
44
|
+
broken: t("it does not read: the file is damaged, or is not what its name says."),
|
|
45
|
+
};
|
|
46
|
+
return texts[kind];
|
|
47
|
+
}
|
|
48
|
+
/** The name a folder or a book of the library goes by: its last part, without a book's kind; a disk's whole path. */
|
|
49
|
+
function shelfName(path) {
|
|
50
|
+
const last = path.replace(/[\\/]+$/, "").split(/[\\/]/).at(-1) ?? "";
|
|
51
|
+
return last === "" || /^[a-z]:$/i.test(last) ? path : last.replace(/\.(md|txt|pdf|docx|odt|epub|html?)$/i, "");
|
|
52
|
+
}
|
|
53
|
+
/** What is read of a folder of the library, in the page's words: its books read and being read, those skipped, or that it is not there now, or holds too many. */
|
|
54
|
+
function libraryMeta(entry) {
|
|
55
|
+
if (entry.missing) {
|
|
56
|
+
return t("Not there now, as a disk taken out: its books stay known for when it is back.");
|
|
57
|
+
}
|
|
58
|
+
return [
|
|
59
|
+
entry.books === 1 ? t("1 book read") : t("{count} books read", { count: entry.books }),
|
|
60
|
+
entry.reading === 0 ? "" : entry.reading === 1 ? t("1 being read") : t("{count} being read", { count: entry.reading }),
|
|
61
|
+
entry.skipped.length === 0 ? "" : entry.skipped.length === 1 ? t("1 skipped") : t("{count} skipped", { count: entry.skipped.length }),
|
|
62
|
+
entry.crowded ? t("more than 300 documents: only the first are read; give the folder of this game's books") : "",
|
|
63
|
+
].filter((part) => part !== "").join(" · ");
|
|
64
|
+
}
|
|
65
|
+
/** A path that goes to a new line after its separators, as words do, and is copied as it is. */
|
|
66
|
+
function breakablePath(path) {
|
|
67
|
+
return path.split(/(?<=[\\/])/).flatMap((part, index) => (index === 0 ? [part] : [_jsx("wbr", {}, index), part]));
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The field that adds to the library: a folder or a book written by hand, as the browser gives no folder's path; what to give it, and that the computer asks the
|
|
71
|
+
* player's yes and never changes the folder. It empties once added.
|
|
72
|
+
*/
|
|
73
|
+
function LibraryField({ state, onAdd }) {
|
|
74
|
+
const [path, setPath] = useState("");
|
|
75
|
+
const [empty, setEmpty] = useState(false);
|
|
76
|
+
const sent = useRef(undefined);
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (state.said?.problem === false && sent.current === path) {
|
|
79
|
+
setPath("");
|
|
80
|
+
}
|
|
81
|
+
}, [state.said]);
|
|
82
|
+
const submit = () => {
|
|
83
|
+
const given = path.trim().replace(/^"(.*)"$/, "$1");
|
|
84
|
+
if (state.busy) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
setEmpty(given === "");
|
|
88
|
+
if (given !== "") {
|
|
89
|
+
sent.current = path;
|
|
90
|
+
onAdd(given);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
return (_jsxs("form", { class: "package-add", noValidate: true, onSubmit: (event) => {
|
|
94
|
+
event.preventDefault();
|
|
95
|
+
submit();
|
|
96
|
+
}, children: [_jsx("label", { class: "package-label", for: "library-path", children: t("A folder or a book of this computer") }), _jsxs("div", { class: "package-add-line", children: [_jsx("input", { id: "library-path", dir: "ltr", type: "text", enterKeyHint: "go", autocomplete: "off", spellcheck: false, maxLength: 1000, value: path, readOnly: state.work !== undefined, "aria-invalid": state.said?.problem === true || empty, "aria-describedby": "library-path-about", placeholder: "D:\\Books\\RPG", onInput: (event) => setPath(event.currentTarget.value) }), _jsxs("button", { type: "submit", class: "button package-button", "aria-disabled": state.busy, children: [_jsx(Icon, { name: "plus" }), t("Add")] })] }), _jsxs("p", { class: "package-note", id: "library-path-about", children: [t("Write or paste its full path: the browser does not give a folder's. Your computer asks your yes in a window, once, and nothing in the folder is ever changed."), " ", t("Text, or PDFs whose text can be selected, read best; a scanned PDF is read from the pictures of its pages, on Windows only, in a few minutes.")] }), empty && state.work === undefined && _jsx("p", { class: "package-said problem", role: "status", children: t("Write the path of a folder or a book first.") }), _jsx(WorkNote, { work: state.work }), _jsx(SaidNote, { said: state.said })] }));
|
|
97
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "preact/jsx-runtime";
|
|
2
|
+
import { t } from "../text.js";
|
|
3
|
+
/** What went wrong, in the page's words, with the engine's under them: the no, a computer with no window for the yes, the work of another package. */
|
|
4
|
+
export function failure(at, action, name, outcome) {
|
|
5
|
+
if (outcome.code === "declined") {
|
|
6
|
+
return { at, problem: true, text: t("You said no: nothing changed.") };
|
|
7
|
+
}
|
|
8
|
+
if (outcome.code === "no-window") {
|
|
9
|
+
const command = action === "library" ? `rpg config library --add "${name}"` : `rpg package install ${/\s/.test(name) ? `"${name}"` : name}`;
|
|
10
|
+
return { at, problem: true, text: t("No window for your yes opens on this computer: add it from your terminal, in the campaign's folder."), command };
|
|
11
|
+
}
|
|
12
|
+
if (outcome.code === "busy") {
|
|
13
|
+
return { at, problem: true, text: action === "library" ? t("One change at a time: wait for the one under way, then try again.") : t("One package at a time: wait for the one under way, then try again.") };
|
|
14
|
+
}
|
|
15
|
+
return { at, problem: true, text: action === "add" ? t("Nothing was added.") : t("Nothing changed."), why: outcome.error };
|
|
16
|
+
}
|
|
17
|
+
/** What an addition did, by the kind the engine recognized. */
|
|
18
|
+
export function addedText(kind) {
|
|
19
|
+
const texts = {
|
|
20
|
+
adventure: t("The adventure is in the campaign: the master brings it into the story when you want it."),
|
|
21
|
+
extension: t("The extension is in the campaign: it counts from now on."),
|
|
22
|
+
system: t("The game system is on this computer, for a new campaign."),
|
|
23
|
+
language: t("The language is on this computer, for every campaign."),
|
|
24
|
+
};
|
|
25
|
+
return kind === undefined ? t("Done.") : texts[kind];
|
|
26
|
+
}
|
|
27
|
+
/** What a change did, once done. */
|
|
28
|
+
export function doneText(action, name) {
|
|
29
|
+
const texts = {
|
|
30
|
+
update: t("{name} is updated.", { name }),
|
|
31
|
+
remove: t("{name} is out of the campaign: it stays on this computer.", { name }),
|
|
32
|
+
uninstall: t("{name} is off this computer.", { name }),
|
|
33
|
+
};
|
|
34
|
+
return texts[action];
|
|
35
|
+
}
|
|
36
|
+
/** What uninstalling does, by kind. */
|
|
37
|
+
export function uninstallText(what) {
|
|
38
|
+
if (what === "system") {
|
|
39
|
+
return _jsx("p", { children: t("It goes off this computer: a new campaign can no longer choose it. This campaign does not change.") });
|
|
40
|
+
}
|
|
41
|
+
if (what === "language") {
|
|
42
|
+
return _jsx("p", { children: t("It goes off this computer: the dashboard goes back to its own words in this language.") });
|
|
43
|
+
}
|
|
44
|
+
return (_jsxs(_Fragment, { children: [_jsx("p", { children: t("It goes off this computer, and out of this campaign. Another campaign that uses it asks to install it again.") }), _jsx("p", { class: "confirm-note", children: t("What it wrote in the campaign stays, and comes back if you install it again.") })] }));
|
|
45
|
+
}
|