|
feat(game): do[]-эффекты в контенте через EffectSink; QuestEffect-свитч удалён
- data/effects.ts: реестр DIALOGUE_CUSTOM (plant_flowers) — имена сюжетных эффектов, как FLAGS/VARS. - systems/DialogueEffects.ts: DialogueEffectSink + applyDialogueEffect (give/take в сумку, sound, toast, custom; unknown kind — тихий игнор, валидатор = error). - DialogueSystem: registerSink + runner.onEffect → sink. - Контент на do[]: elder_hand_in.accept → custom plant_flowers; trader_first.give_cloth → giveItem cloth. Удалены QuestEffect, EXTRA_EFFECTS, questEffectFor, поле QuestStage.effect и ручной switch в onDialogueFinished (custom откладывается до конца диалога — кат-сцена не рвёт реплику). - Валидатор: do[].id give/take ∈ ITEMS, custom ∈ DIALOGUE_CUSTOM (error). - Сценарий interact-world: первый advance теперь догоняет печать — двойное нажатие. - Тесты: give/take в Inventory, custom до sink, unknown игнор. Co-Authored-By: Claude Code <noreply@anthropic.com> |
|---|
|
|
| apps/game/src/data/__tests__/quests.test.ts |
|---|
| apps/game/src/data/dialogues.ts |
|---|
| apps/game/src/data/effects.ts 0 → 100644 |
|---|
| apps/game/src/data/quests.ts |
|---|
| apps/game/src/data/validate.ts |
|---|
| apps/game/src/scenes/LocationScene.ts |
|---|
| apps/game/src/systems/DialogueEffects.ts 0 → 100644 |
|---|
| apps/game/src/systems/DialogueSystem.ts |
|---|
| apps/game/tools/checks/interact-world.mjs |
|---|