Some changes

This commit is contained in:
2026-06-11 19:59:31 -05:00
parent 2f2ea060b1
commit eec429147b
150 changed files with 16615 additions and 262 deletions
+26
View File
@@ -0,0 +1,26 @@
# System Conventions
## Battle
- Fighters live in `BATTLE.fighterMap: Dictionary[BattlePosition, BattleFighter]`
- `BattleFighter` is pure data (no Node); `BattleFighterScene` is the 3D visual
- Battle flow is driven by `BattleCutsceneAction.playerDecisionCallable` which loops via `CUTSCENE_ADD_END`
- New moves → add static preset in [battle/fighter/BattleMove.gd](../../battle/fighter/BattleMove.gd), add `perform()` logic in [battle/action/BattleMove.gd](../../battle/action/BattleMove.gd)
## Entities (Overworld)
- All interactable world objects extend `Entity` (CharacterBody3D)
- Interaction type set via `@export var interactType:InteractType`
- Interaction routing lives in `EntityInteractableArea.onInteract()` — add new `InteractType` values there
- NPC conversation entities: set `interactType = CONVERSATION`, assign `dialogueResource` (a `.dialogue` file) and `dialogueTitle` (section to start from, default `"start"`)
## Items
- Register new items in [item/Item.gd](../../item/Item.gd) — add to `Id` enum and call `itemDefine()`
- Item ID order in the enum **must match** insertion order into `ITEM_DATA`
## UI
- `UI.TEXTBOX.setTextAndWait(text)` — show dialogue and await player dismiss (use `await`)
- Movement is blocked automatically when `UI.TEXTBOX` is visible (`EntityMovement._canMove()` checks this)
- Menus extend `ClosableMenu` for open/close/toggle + `closed`/`opened` signals