idlerpg.sh 0.1.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/README.md +171 -0
- package/dist/affix/AffixRegistry.d.ts +68 -0
- package/dist/affix/AffixRegistry.d.ts.map +1 -0
- package/dist/affix/AffixRegistry.js +245 -0
- package/dist/affix/AffixRegistry.js.map +1 -0
- package/dist/affix/PluginLoader.d.ts +66 -0
- package/dist/affix/PluginLoader.d.ts.map +1 -0
- package/dist/affix/PluginLoader.js +321 -0
- package/dist/affix/PluginLoader.js.map +1 -0
- package/dist/affix/builtin.d.ts +6 -0
- package/dist/affix/builtin.d.ts.map +1 -0
- package/dist/affix/builtin.js +311 -0
- package/dist/affix/builtin.js.map +1 -0
- package/dist/affix/index.d.ts +8 -0
- package/dist/affix/index.d.ts.map +1 -0
- package/dist/affix/index.js +11 -0
- package/dist/affix/index.js.map +1 -0
- package/dist/affix/types.d.ts +152 -0
- package/dist/affix/types.d.ts.map +1 -0
- package/dist/affix/types.js +8 -0
- package/dist/affix/types.js.map +1 -0
- package/dist/ai/PlayKitClient.d.ts +208 -0
- package/dist/ai/PlayKitClient.d.ts.map +1 -0
- package/dist/ai/PlayKitClient.js +721 -0
- package/dist/ai/PlayKitClient.js.map +1 -0
- package/dist/ai/index.d.ts +5 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +8 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/app/App.d.ts +85 -0
- package/dist/app/App.d.ts.map +1 -0
- package/dist/app/App.js +296 -0
- package/dist/app/App.js.map +1 -0
- package/dist/app/EventBus.d.ts +222 -0
- package/dist/app/EventBus.d.ts.map +1 -0
- package/dist/app/EventBus.js +88 -0
- package/dist/app/EventBus.js.map +1 -0
- package/dist/app/Keybind.d.ts +83 -0
- package/dist/app/Keybind.d.ts.map +1 -0
- package/dist/app/Keybind.js +184 -0
- package/dist/app/Keybind.js.map +1 -0
- package/dist/app/Router.d.ts +123 -0
- package/dist/app/Router.d.ts.map +1 -0
- package/dist/app/Router.js +142 -0
- package/dist/app/Router.js.map +1 -0
- package/dist/app/ScreenManager.d.ts +97 -0
- package/dist/app/ScreenManager.d.ts.map +1 -0
- package/dist/app/ScreenManager.js +216 -0
- package/dist/app/ScreenManager.js.map +1 -0
- package/dist/app/index.d.ts +14 -0
- package/dist/app/index.d.ts.map +1 -0
- package/dist/app/index.js +19 -0
- package/dist/app/index.js.map +1 -0
- package/dist/app/screens/BaseScreen.d.ts +101 -0
- package/dist/app/screens/BaseScreen.d.ts.map +1 -0
- package/dist/app/screens/BaseScreen.js +132 -0
- package/dist/app/screens/BaseScreen.js.map +1 -0
- package/dist/app/screens/CharacterCreationScreen.d.ts +42 -0
- package/dist/app/screens/CharacterCreationScreen.d.ts.map +1 -0
- package/dist/app/screens/CharacterCreationScreen.js +467 -0
- package/dist/app/screens/CharacterCreationScreen.js.map +1 -0
- package/dist/app/screens/CombatScreen.d.ts +30 -0
- package/dist/app/screens/CombatScreen.d.ts.map +1 -0
- package/dist/app/screens/CombatScreen.js +309 -0
- package/dist/app/screens/CombatScreen.js.map +1 -0
- package/dist/app/screens/DialogScreen.d.ts +29 -0
- package/dist/app/screens/DialogScreen.d.ts.map +1 -0
- package/dist/app/screens/DialogScreen.js +295 -0
- package/dist/app/screens/DialogScreen.js.map +1 -0
- package/dist/app/screens/ExploreScreen.d.ts +50 -0
- package/dist/app/screens/ExploreScreen.d.ts.map +1 -0
- package/dist/app/screens/ExploreScreen.js +308 -0
- package/dist/app/screens/ExploreScreen.js.map +1 -0
- package/dist/app/screens/HelpScreen.d.ts +12 -0
- package/dist/app/screens/HelpScreen.d.ts.map +1 -0
- package/dist/app/screens/HelpScreen.js +155 -0
- package/dist/app/screens/HelpScreen.js.map +1 -0
- package/dist/app/screens/InventoryScreen.d.ts +27 -0
- package/dist/app/screens/InventoryScreen.d.ts.map +1 -0
- package/dist/app/screens/InventoryScreen.js +326 -0
- package/dist/app/screens/InventoryScreen.js.map +1 -0
- package/dist/app/screens/PrologueScreen.d.ts +24 -0
- package/dist/app/screens/PrologueScreen.d.ts.map +1 -0
- package/dist/app/screens/PrologueScreen.js +176 -0
- package/dist/app/screens/PrologueScreen.js.map +1 -0
- package/dist/app/screens/TitleScreen.d.ts +42 -0
- package/dist/app/screens/TitleScreen.d.ts.map +1 -0
- package/dist/app/screens/TitleScreen.js +380 -0
- package/dist/app/screens/TitleScreen.js.map +1 -0
- package/dist/app/screens/TravelScreen.d.ts +22 -0
- package/dist/app/screens/TravelScreen.d.ts.map +1 -0
- package/dist/app/screens/TravelScreen.js +122 -0
- package/dist/app/screens/TravelScreen.js.map +1 -0
- package/dist/app/screens/index.d.ts +14 -0
- package/dist/app/screens/index.d.ts.map +1 -0
- package/dist/app/screens/index.js +17 -0
- package/dist/app/screens/index.js.map +1 -0
- package/dist/commands/CommandRegistry.d.ts +91 -0
- package/dist/commands/CommandRegistry.d.ts.map +1 -0
- package/dist/commands/CommandRegistry.js +159 -0
- package/dist/commands/CommandRegistry.js.map +1 -0
- package/dist/commands/index.d.ts +7 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +10 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/core/Actor.d.ts +103 -0
- package/dist/core/Actor.d.ts.map +1 -0
- package/dist/core/Actor.js +409 -0
- package/dist/core/Actor.js.map +1 -0
- package/dist/core/Combat.d.ts +37 -0
- package/dist/core/Combat.d.ts.map +1 -0
- package/dist/core/Combat.js +294 -0
- package/dist/core/Combat.js.map +1 -0
- package/dist/core/DungeonRunner.d.ts +169 -0
- package/dist/core/DungeonRunner.d.ts.map +1 -0
- package/dist/core/DungeonRunner.js +627 -0
- package/dist/core/DungeonRunner.js.map +1 -0
- package/dist/core/Game.d.ts +133 -0
- package/dist/core/Game.d.ts.map +1 -0
- package/dist/core/Game.js +644 -0
- package/dist/core/Game.js.map +1 -0
- package/dist/core/IdleCombat.d.ts +61 -0
- package/dist/core/IdleCombat.d.ts.map +1 -0
- package/dist/core/IdleCombat.js +461 -0
- package/dist/core/IdleCombat.js.map +1 -0
- package/dist/core/IdleGameManager.d.ts +198 -0
- package/dist/core/IdleGameManager.d.ts.map +1 -0
- package/dist/core/IdleGameManager.js +688 -0
- package/dist/core/IdleGameManager.js.map +1 -0
- package/dist/core/IdleSaveManager.d.ts +109 -0
- package/dist/core/IdleSaveManager.d.ts.map +1 -0
- package/dist/core/IdleSaveManager.js +296 -0
- package/dist/core/IdleSaveManager.js.map +1 -0
- package/dist/core/NewGameFlowManager.d.ts +64 -0
- package/dist/core/NewGameFlowManager.d.ts.map +1 -0
- package/dist/core/NewGameFlowManager.js +153 -0
- package/dist/core/NewGameFlowManager.js.map +1 -0
- package/dist/core/Player.d.ts +65 -0
- package/dist/core/Player.d.ts.map +1 -0
- package/dist/core/Player.js +261 -0
- package/dist/core/Player.js.map +1 -0
- package/dist/core/RoomHandlers.d.ts +75 -0
- package/dist/core/RoomHandlers.d.ts.map +1 -0
- package/dist/core/RoomHandlers.js +383 -0
- package/dist/core/RoomHandlers.js.map +1 -0
- package/dist/core/SaveManager.d.ts +84 -0
- package/dist/core/SaveManager.d.ts.map +1 -0
- package/dist/core/SaveManager.js +281 -0
- package/dist/core/SaveManager.js.map +1 -0
- package/dist/core/SaveMigration.d.ts +69 -0
- package/dist/core/SaveMigration.d.ts.map +1 -0
- package/dist/core/SaveMigration.js +408 -0
- package/dist/core/SaveMigration.js.map +1 -0
- package/dist/core/StateAdapter.d.ts +79 -0
- package/dist/core/StateAdapter.d.ts.map +1 -0
- package/dist/core/StateAdapter.js +397 -0
- package/dist/core/StateAdapter.js.map +1 -0
- package/dist/core/Team.d.ts +145 -0
- package/dist/core/Team.d.ts.map +1 -0
- package/dist/core/Team.js +371 -0
- package/dist/core/Team.js.map +1 -0
- package/dist/core/TeamCombat.d.ts +88 -0
- package/dist/core/TeamCombat.d.ts.map +1 -0
- package/dist/core/TeamCombat.js +405 -0
- package/dist/core/TeamCombat.js.map +1 -0
- package/dist/core/TeamDungeonRunner.d.ts +186 -0
- package/dist/core/TeamDungeonRunner.d.ts.map +1 -0
- package/dist/core/TeamDungeonRunner.js +758 -0
- package/dist/core/TeamDungeonRunner.js.map +1 -0
- package/dist/core/TimeManager.d.ts +114 -0
- package/dist/core/TimeManager.d.ts.map +1 -0
- package/dist/core/TimeManager.js +318 -0
- package/dist/core/TimeManager.js.map +1 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +12 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/timeConstants.d.ts +135 -0
- package/dist/core/timeConstants.d.ts.map +1 -0
- package/dist/core/timeConstants.js +157 -0
- package/dist/core/timeConstants.js.map +1 -0
- package/dist/core/types.d.ts +780 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +16 -0
- package/dist/core/types.js.map +1 -0
- package/dist/data/continents/index.d.ts +163 -0
- package/dist/data/continents/index.d.ts.map +1 -0
- package/dist/data/continents/index.js +31 -0
- package/dist/data/continents/index.js.map +1 -0
- package/dist/data/continents/verdantia.d.ts +294 -0
- package/dist/data/continents/verdantia.d.ts.map +1 -0
- package/dist/data/continents/verdantia.js +327 -0
- package/dist/data/continents/verdantia.js.map +1 -0
- package/dist/handlers/DialogHandler.d.ts +95 -0
- package/dist/handlers/DialogHandler.d.ts.map +1 -0
- package/dist/handlers/DialogHandler.js +450 -0
- package/dist/handlers/DialogHandler.js.map +1 -0
- package/dist/handlers/SaveLoadHandler.d.ts +60 -0
- package/dist/handlers/SaveLoadHandler.d.ts.map +1 -0
- package/dist/handlers/SaveLoadHandler.js +187 -0
- package/dist/handlers/SaveLoadHandler.js.map +1 -0
- package/dist/handlers/TitleScreenHandler.d.ts +43 -0
- package/dist/handlers/TitleScreenHandler.d.ts.map +1 -0
- package/dist/handlers/TitleScreenHandler.js +508 -0
- package/dist/handlers/TitleScreenHandler.js.map +1 -0
- package/dist/handlers/WorkshopHandler.d.ts +75 -0
- package/dist/handlers/WorkshopHandler.d.ts.map +1 -0
- package/dist/handlers/WorkshopHandler.js +401 -0
- package/dist/handlers/WorkshopHandler.js.map +1 -0
- package/dist/handlers/index.d.ts +12 -0
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +14 -0
- package/dist/handlers/index.js.map +1 -0
- package/dist/handlers/types.d.ts +34 -0
- package/dist/handlers/types.d.ts.map +1 -0
- package/dist/handlers/types.js +8 -0
- package/dist/handlers/types.js.map +1 -0
- package/dist/i18n/en.d.ts +3 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +130 -0
- package/dist/i18n/en.js.map +1 -0
- package/dist/i18n/index.d.ts +40 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +105 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/types.d.ts +133 -0
- package/dist/i18n/types.d.ts.map +1 -0
- package/dist/i18n/types.js +8 -0
- package/dist/i18n/types.js.map +1 -0
- package/dist/i18n/zh.d.ts +3 -0
- package/dist/i18n/zh.d.ts.map +1 -0
- package/dist/i18n/zh.js +130 -0
- package/dist/i18n/zh.js.map +1 -0
- package/dist/instrument.d.ts +8 -0
- package/dist/instrument.d.ts.map +1 -0
- package/dist/instrument.js +33 -0
- package/dist/instrument.js.map +1 -0
- package/dist/main-new.d.ts +12 -0
- package/dist/main-new.d.ts.map +1 -0
- package/dist/main-new.js +32 -0
- package/dist/main-new.js.map +1 -0
- package/dist/main.d.ts +7 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +2816 -0
- package/dist/main.js.map +1 -0
- package/dist/map/ContinentManager.d.ts +88 -0
- package/dist/map/ContinentManager.d.ts.map +1 -0
- package/dist/map/ContinentManager.js +241 -0
- package/dist/map/ContinentManager.js.map +1 -0
- package/dist/map/DungeonGenerator.d.ts +32 -0
- package/dist/map/DungeonGenerator.d.ts.map +1 -0
- package/dist/map/DungeonGenerator.js +615 -0
- package/dist/map/DungeonGenerator.js.map +1 -0
- package/dist/map/MapGenerator.d.ts +27 -0
- package/dist/map/MapGenerator.d.ts.map +1 -0
- package/dist/map/MapGenerator.js +485 -0
- package/dist/map/MapGenerator.js.map +1 -0
- package/dist/map/index.d.ts +5 -0
- package/dist/map/index.d.ts.map +1 -0
- package/dist/map/index.js +8 -0
- package/dist/map/index.js.map +1 -0
- package/dist/npc/NPCGenerator.d.ts +68 -0
- package/dist/npc/NPCGenerator.d.ts.map +1 -0
- package/dist/npc/NPCGenerator.js +468 -0
- package/dist/npc/NPCGenerator.js.map +1 -0
- package/dist/npc/NPCManager.d.ts +86 -0
- package/dist/npc/NPCManager.d.ts.map +1 -0
- package/dist/npc/NPCManager.js +217 -0
- package/dist/npc/NPCManager.js.map +1 -0
- package/dist/npc/fixedNPCs.d.ts +7 -0
- package/dist/npc/fixedNPCs.d.ts.map +1 -0
- package/dist/npc/fixedNPCs.js +196 -0
- package/dist/npc/fixedNPCs.js.map +1 -0
- package/dist/npc/index.d.ts +9 -0
- package/dist/npc/index.d.ts.map +1 -0
- package/dist/npc/index.js +12 -0
- package/dist/npc/index.js.map +1 -0
- package/dist/npc/traits.d.ts +33 -0
- package/dist/npc/traits.d.ts.map +1 -0
- package/dist/npc/traits.js +795 -0
- package/dist/npc/traits.js.map +1 -0
- package/dist/npc/types.d.ts +193 -0
- package/dist/npc/types.d.ts.map +1 -0
- package/dist/npc/types.js +9 -0
- package/dist/npc/types.js.map +1 -0
- package/dist/quest/QuestManager.d.ts +79 -0
- package/dist/quest/QuestManager.d.ts.map +1 -0
- package/dist/quest/QuestManager.js +273 -0
- package/dist/quest/QuestManager.js.map +1 -0
- package/dist/quest/index.d.ts +6 -0
- package/dist/quest/index.d.ts.map +1 -0
- package/dist/quest/index.js +9 -0
- package/dist/quest/index.js.map +1 -0
- package/dist/quest/types.d.ts +81 -0
- package/dist/quest/types.d.ts.map +1 -0
- package/dist/quest/types.js +8 -0
- package/dist/quest/types.js.map +1 -0
- package/dist/strategy/StrategyExecutor.d.ts +159 -0
- package/dist/strategy/StrategyExecutor.d.ts.map +1 -0
- package/dist/strategy/StrategyExecutor.js +479 -0
- package/dist/strategy/StrategyExecutor.js.map +1 -0
- package/dist/strategy/StrategyParser.d.ts +48 -0
- package/dist/strategy/StrategyParser.d.ts.map +1 -0
- package/dist/strategy/StrategyParser.js +321 -0
- package/dist/strategy/StrategyParser.js.map +1 -0
- package/dist/strategy/defaultStrategy.d.ts +40 -0
- package/dist/strategy/defaultStrategy.d.ts.map +1 -0
- package/dist/strategy/defaultStrategy.js +254 -0
- package/dist/strategy/defaultStrategy.js.map +1 -0
- package/dist/strategy/index.d.ts +8 -0
- package/dist/strategy/index.d.ts.map +1 -0
- package/dist/strategy/index.js +14 -0
- package/dist/strategy/index.js.map +1 -0
- package/dist/tui/ExploreMenu.d.ts +106 -0
- package/dist/tui/ExploreMenu.d.ts.map +1 -0
- package/dist/tui/ExploreMenu.js +282 -0
- package/dist/tui/ExploreMenu.js.map +1 -0
- package/dist/tui/GameUI.d.ts +313 -0
- package/dist/tui/GameUI.d.ts.map +1 -0
- package/dist/tui/GameUI.js +2116 -0
- package/dist/tui/GameUI.js.map +1 -0
- package/dist/tui/GameUIAdapter.d.ts +207 -0
- package/dist/tui/GameUIAdapter.d.ts.map +1 -0
- package/dist/tui/GameUIAdapter.js +1342 -0
- package/dist/tui/GameUIAdapter.js.map +1 -0
- package/dist/tui/Input.d.ts +139 -0
- package/dist/tui/Input.d.ts.map +1 -0
- package/dist/tui/Input.js +278 -0
- package/dist/tui/Input.js.map +1 -0
- package/dist/tui/Menu.d.ts +110 -0
- package/dist/tui/Menu.d.ts.map +1 -0
- package/dist/tui/Menu.js +365 -0
- package/dist/tui/Menu.js.map +1 -0
- package/dist/tui/Screen.d.ts +228 -0
- package/dist/tui/Screen.d.ts.map +1 -0
- package/dist/tui/Screen.js +502 -0
- package/dist/tui/Screen.js.map +1 -0
- package/dist/tui/components/Box.d.ts +36 -0
- package/dist/tui/components/Box.d.ts.map +1 -0
- package/dist/tui/components/Box.js +43 -0
- package/dist/tui/components/Box.js.map +1 -0
- package/dist/tui/components/List.d.ts +69 -0
- package/dist/tui/components/List.d.ts.map +1 -0
- package/dist/tui/components/List.js +136 -0
- package/dist/tui/components/List.js.map +1 -0
- package/dist/tui/components/ProgressBar.d.ts +42 -0
- package/dist/tui/components/ProgressBar.d.ts.map +1 -0
- package/dist/tui/components/ProgressBar.js +75 -0
- package/dist/tui/components/ProgressBar.js.map +1 -0
- package/dist/tui/components/index.d.ts +8 -0
- package/dist/tui/components/index.d.ts.map +1 -0
- package/dist/tui/components/index.js +11 -0
- package/dist/tui/components/index.js.map +1 -0
- package/dist/tui/core/BaseSection.d.ts +98 -0
- package/dist/tui/core/BaseSection.d.ts.map +1 -0
- package/dist/tui/core/BaseSection.js +174 -0
- package/dist/tui/core/BaseSection.js.map +1 -0
- package/dist/tui/core/Component.d.ts +61 -0
- package/dist/tui/core/Component.d.ts.map +1 -0
- package/dist/tui/core/Component.js +32 -0
- package/dist/tui/core/Component.js.map +1 -0
- package/dist/tui/core/Section.d.ts +101 -0
- package/dist/tui/core/Section.d.ts.map +1 -0
- package/dist/tui/core/Section.js +24 -0
- package/dist/tui/core/Section.js.map +1 -0
- package/dist/tui/core/SectionManager.d.ts +108 -0
- package/dist/tui/core/SectionManager.d.ts.map +1 -0
- package/dist/tui/core/SectionManager.js +258 -0
- package/dist/tui/core/SectionManager.js.map +1 -0
- package/dist/tui/core/index.d.ts +9 -0
- package/dist/tui/core/index.d.ts.map +1 -0
- package/dist/tui/core/index.js +12 -0
- package/dist/tui/core/index.js.map +1 -0
- package/dist/tui/index.d.ts +15 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +23 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/screens/BaseScreen.d.ts +62 -0
- package/dist/tui/screens/BaseScreen.d.ts.map +1 -0
- package/dist/tui/screens/BaseScreen.js +55 -0
- package/dist/tui/screens/BaseScreen.js.map +1 -0
- package/dist/tui/screens/CombatScreen.d.ts +43 -0
- package/dist/tui/screens/CombatScreen.d.ts.map +1 -0
- package/dist/tui/screens/CombatScreen.js +125 -0
- package/dist/tui/screens/CombatScreen.js.map +1 -0
- package/dist/tui/screens/DialogScreen.d.ts +53 -0
- package/dist/tui/screens/DialogScreen.d.ts.map +1 -0
- package/dist/tui/screens/DialogScreen.js +90 -0
- package/dist/tui/screens/DialogScreen.js.map +1 -0
- package/dist/tui/screens/DungeonScreen.d.ts +80 -0
- package/dist/tui/screens/DungeonScreen.d.ts.map +1 -0
- package/dist/tui/screens/DungeonScreen.js +317 -0
- package/dist/tui/screens/DungeonScreen.js.map +1 -0
- package/dist/tui/screens/ExploreScreen.d.ts +69 -0
- package/dist/tui/screens/ExploreScreen.d.ts.map +1 -0
- package/dist/tui/screens/ExploreScreen.js +224 -0
- package/dist/tui/screens/ExploreScreen.js.map +1 -0
- package/dist/tui/screens/SectionScreen.d.ts +84 -0
- package/dist/tui/screens/SectionScreen.d.ts.map +1 -0
- package/dist/tui/screens/SectionScreen.js +156 -0
- package/dist/tui/screens/SectionScreen.js.map +1 -0
- package/dist/tui/screens/TitleScreen.d.ts +40 -0
- package/dist/tui/screens/TitleScreen.d.ts.map +1 -0
- package/dist/tui/screens/TitleScreen.js +253 -0
- package/dist/tui/screens/TitleScreen.js.map +1 -0
- package/dist/tui/screens/TownScreen.d.ts +98 -0
- package/dist/tui/screens/TownScreen.d.ts.map +1 -0
- package/dist/tui/screens/TownScreen.js +370 -0
- package/dist/tui/screens/TownScreen.js.map +1 -0
- package/dist/tui/screens/TravelScreen.d.ts +67 -0
- package/dist/tui/screens/TravelScreen.d.ts.map +1 -0
- package/dist/tui/screens/TravelScreen.js +286 -0
- package/dist/tui/screens/TravelScreen.js.map +1 -0
- package/dist/tui/screens/index.d.ts +8 -0
- package/dist/tui/screens/index.d.ts.map +1 -0
- package/dist/tui/screens/index.js +17 -0
- package/dist/tui/screens/index.js.map +1 -0
- package/dist/tui/sections/ActionsSection.d.ts +71 -0
- package/dist/tui/sections/ActionsSection.d.ts.map +1 -0
- package/dist/tui/sections/ActionsSection.js +184 -0
- package/dist/tui/sections/ActionsSection.js.map +1 -0
- package/dist/tui/sections/DungeonSection.d.ts +65 -0
- package/dist/tui/sections/DungeonSection.d.ts.map +1 -0
- package/dist/tui/sections/DungeonSection.js +144 -0
- package/dist/tui/sections/DungeonSection.js.map +1 -0
- package/dist/tui/sections/EventsSection.d.ts +50 -0
- package/dist/tui/sections/EventsSection.d.ts.map +1 -0
- package/dist/tui/sections/EventsSection.js +134 -0
- package/dist/tui/sections/EventsSection.js.map +1 -0
- package/dist/tui/sections/MapSection.d.ts +66 -0
- package/dist/tui/sections/MapSection.d.ts.map +1 -0
- package/dist/tui/sections/MapSection.js +669 -0
- package/dist/tui/sections/MapSection.js.map +1 -0
- package/dist/tui/sections/StatusSection.d.ts +47 -0
- package/dist/tui/sections/StatusSection.d.ts.map +1 -0
- package/dist/tui/sections/StatusSection.js +133 -0
- package/dist/tui/sections/StatusSection.js.map +1 -0
- package/dist/tui/sections/TeamSection.d.ts +71 -0
- package/dist/tui/sections/TeamSection.d.ts.map +1 -0
- package/dist/tui/sections/TeamSection.js +224 -0
- package/dist/tui/sections/TeamSection.js.map +1 -0
- package/dist/tui/sections/TravelingSection.d.ts +51 -0
- package/dist/tui/sections/TravelingSection.d.ts.map +1 -0
- package/dist/tui/sections/TravelingSection.js +106 -0
- package/dist/tui/sections/TravelingSection.js.map +1 -0
- package/dist/tui/sections/index.d.ts +9 -0
- package/dist/tui/sections/index.d.ts.map +1 -0
- package/dist/tui/sections/index.js +12 -0
- package/dist/tui/sections/index.js.map +1 -0
- package/dist/ui/Terminal.d.ts +68 -0
- package/dist/ui/Terminal.d.ts.map +1 -0
- package/dist/ui/Terminal.js +297 -0
- package/dist/ui/Terminal.js.map +1 -0
- package/dist/ui/index.d.ts +5 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +8 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/utils/configMigration.d.ts +14 -0
- package/dist/utils/configMigration.d.ts.map +1 -0
- package/dist/utils/configMigration.js +92 -0
- package/dist/utils/configMigration.js.map +1 -0
- package/dist/utils/errorHandler.d.ts +86 -0
- package/dist/utils/errorHandler.d.ts.map +1 -0
- package/dist/utils/errorHandler.js +224 -0
- package/dist/utils/errorHandler.js.map +1 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +43 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/weapon/WeaponFactory.d.ts +32 -0
- package/dist/weapon/WeaponFactory.d.ts.map +1 -0
- package/dist/weapon/WeaponFactory.js +216 -0
- package/dist/weapon/WeaponFactory.js.map +1 -0
- package/dist/weapon/index.d.ts +5 -0
- package/dist/weapon/index.d.ts.map +1 -0
- package/dist/weapon/index.js +8 -0
- package/dist/weapon/index.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Travel Screen - Shows travel progress with animated map
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e82ab1df-da6c-506a-be8d-960c770b7572")}catch(e){}}();
|
|
6
|
+
import { BaseScreen } from '../../app/screens/BaseScreen.js';
|
|
7
|
+
import { ANSI } from '../Screen.js';
|
|
8
|
+
import { getStrings } from '../../i18n/index.js';
|
|
9
|
+
/**
|
|
10
|
+
* Travel Screen - Animated travel progress display
|
|
11
|
+
*/
|
|
12
|
+
export class TravelScreen extends BaseScreen {
|
|
13
|
+
data = null;
|
|
14
|
+
padding = 2;
|
|
15
|
+
headerHeight = 3;
|
|
16
|
+
onCancel;
|
|
17
|
+
/**
|
|
18
|
+
* Set cancel handler
|
|
19
|
+
*/
|
|
20
|
+
setOnCancel(handler) {
|
|
21
|
+
this.onCancel = handler;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Update travel data
|
|
25
|
+
*/
|
|
26
|
+
updateData(data) {
|
|
27
|
+
this.data = data;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Handle key input
|
|
31
|
+
*/
|
|
32
|
+
async handleKey(key) {
|
|
33
|
+
if (key.name === 'escape') {
|
|
34
|
+
this.onCancel?.();
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Render the travel screen
|
|
41
|
+
*/
|
|
42
|
+
render() {
|
|
43
|
+
if (!this.data)
|
|
44
|
+
return;
|
|
45
|
+
const { state, fromRoom, toRoom, progress, duration, events } = this.data;
|
|
46
|
+
const px = this.padding;
|
|
47
|
+
const py = this.padding;
|
|
48
|
+
const width = this.width - this.padding * 2;
|
|
49
|
+
const height = this.height - this.padding * 2;
|
|
50
|
+
this.screen.clear();
|
|
51
|
+
// Header
|
|
52
|
+
this.renderHeader(state.player, width, px, py);
|
|
53
|
+
// Layout dimensions
|
|
54
|
+
const menuWidth = Math.min(32, Math.floor(width * 0.35));
|
|
55
|
+
const leftWidth = width - menuWidth - 2;
|
|
56
|
+
const mapHeight = Math.min(14, Math.floor((height - this.headerHeight - 4) * 0.55));
|
|
57
|
+
const statusHeight = height - this.headerHeight - mapHeight - 4;
|
|
58
|
+
// Travel Map (left side, top)
|
|
59
|
+
this.renderTravelMap(px + 1, py + this.headerHeight, leftWidth, mapHeight, fromRoom, toRoom, progress);
|
|
60
|
+
// Travel Status (left side, bottom)
|
|
61
|
+
this.renderTravelStatus(px + 1, py + this.headerHeight + mapHeight, leftWidth, statusHeight, fromRoom?.name || 'Unknown', toRoom?.name || 'Unknown', progress, duration, events);
|
|
62
|
+
// Travel Info (right side)
|
|
63
|
+
this.renderTravelInfo(px + leftWidth + 1, py + this.headerHeight, menuWidth, height - this.headerHeight - 1, fromRoom?.name || 'Unknown', toRoom?.name || 'Unknown', progress, duration);
|
|
64
|
+
// Bottom hint
|
|
65
|
+
this.screen.write(px + 1, py + height - 1, '[ESC] Cancel Travel', ANSI.fg.yellow);
|
|
66
|
+
this.screen.render();
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Render header
|
|
70
|
+
*/
|
|
71
|
+
renderHeader(player, width, x, y) {
|
|
72
|
+
const s = getStrings();
|
|
73
|
+
this.screen.drawBox(x, y, width, 3, '', true);
|
|
74
|
+
this.screen.write(x + 2, y + 1, 'IDLERPG.TERMINAL', ANSI.fg.cyan, undefined, ANSI.bold);
|
|
75
|
+
const playerInfo = `${s.status.level}.${player.stats.level} ${player.name}`;
|
|
76
|
+
this.screen.write(x + 25, y + 1, playerInfo, ANSI.fg.yellow);
|
|
77
|
+
// HP bar
|
|
78
|
+
const hpText = `${s.status.hp}:`;
|
|
79
|
+
this.screen.write(x + 45, y + 1, hpText, ANSI.fg.white);
|
|
80
|
+
this.screen.drawProgressBar(x + 49, y + 1, 10, player.stats.hp, player.stats.maxHp, ANSI.fg.red);
|
|
81
|
+
this.screen.write(x + 60, y + 1, `${player.stats.hp}/${player.stats.maxHp}`, ANSI.fg.white);
|
|
82
|
+
// Time
|
|
83
|
+
const time = new Date().toLocaleTimeString('en-US', { hour12: false });
|
|
84
|
+
this.screen.write(x + width - time.length - 2, y + 1, time, ANSI.fg.gray);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Render travel map with animated player position
|
|
88
|
+
*/
|
|
89
|
+
renderTravelMap(x, y, width, height, fromRoom, toRoom, progress) {
|
|
90
|
+
// Animated title
|
|
91
|
+
const dots = '.'.repeat(Math.floor(Date.now() / 300) % 4);
|
|
92
|
+
this.screen.drawBox(x, y, width, height, `Traveling${dots}`);
|
|
93
|
+
const mapY = y + 2;
|
|
94
|
+
const mapX = x + 2;
|
|
95
|
+
const mapWidth = width - 4;
|
|
96
|
+
const mapHeight = height - 5;
|
|
97
|
+
const centerX = mapX + Math.floor(mapWidth / 2);
|
|
98
|
+
const centerY = mapY + Math.floor(mapHeight / 2);
|
|
99
|
+
if (!fromRoom || !toRoom) {
|
|
100
|
+
this.screen.write(centerX - 5, centerY, 'Traveling...', ANSI.fg.yellow);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
// Calculate positions
|
|
104
|
+
const fromPos = fromRoom.position;
|
|
105
|
+
const toPos = toRoom.position;
|
|
106
|
+
const dx = toPos.x - fromPos.x;
|
|
107
|
+
const dy = toPos.y - fromPos.y;
|
|
108
|
+
const dz = toPos.floor - fromPos.floor;
|
|
109
|
+
const distance = Math.sqrt(dx * dx + dy * dy) + Math.abs(dz) * 2;
|
|
110
|
+
const normalizedDist = Math.min(1, distance / 5);
|
|
111
|
+
const maxOffsetX = Math.floor(mapWidth / 3 * (0.5 + normalizedDist * 0.5));
|
|
112
|
+
const maxOffsetY = Math.floor(mapHeight / 3 * (0.5 + normalizedDist * 0.5));
|
|
113
|
+
let fromScreenX = centerX;
|
|
114
|
+
let fromScreenY = centerY;
|
|
115
|
+
let toScreenX = centerX;
|
|
116
|
+
let toScreenY = centerY;
|
|
117
|
+
if (Math.abs(dx) > Math.abs(dy)) {
|
|
118
|
+
fromScreenX = centerX - maxOffsetX;
|
|
119
|
+
toScreenX = centerX + maxOffsetX;
|
|
120
|
+
const vertOffset = Math.sign(dy) * Math.min(Math.abs(dy), maxOffsetY / 2);
|
|
121
|
+
fromScreenY = centerY - Math.floor(vertOffset / 2);
|
|
122
|
+
toScreenY = centerY + Math.floor(vertOffset / 2);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
fromScreenY = centerY - maxOffsetY;
|
|
126
|
+
toScreenY = centerY + maxOffsetY;
|
|
127
|
+
const horizOffset = Math.sign(dx) * Math.min(Math.abs(dx), maxOffsetX / 2);
|
|
128
|
+
fromScreenX = centerX - Math.floor(horizOffset / 2);
|
|
129
|
+
toScreenX = centerX + Math.floor(horizOffset / 2);
|
|
130
|
+
}
|
|
131
|
+
// Draw background dots
|
|
132
|
+
for (let ty = mapY; ty < mapY + mapHeight; ty++) {
|
|
133
|
+
for (let tx = mapX; tx < mapX + mapWidth; tx += 3) {
|
|
134
|
+
if (Math.random() < 0.3) {
|
|
135
|
+
this.screen.write(tx, ty, '.', ANSI.fg.gray);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
// Draw path
|
|
140
|
+
this.drawPath(fromScreenX, fromScreenY, toScreenX, toScreenY, ANSI.fg.gray);
|
|
141
|
+
// Draw traveled portion
|
|
142
|
+
const traveledX = Math.round(fromScreenX + (toScreenX - fromScreenX) * progress);
|
|
143
|
+
const traveledY = Math.round(fromScreenY + (toScreenY - fromScreenY) * progress);
|
|
144
|
+
this.drawPath(fromScreenX, fromScreenY, traveledX, traveledY, ANSI.fg.green, '=');
|
|
145
|
+
// Draw origin room
|
|
146
|
+
const fromSymbol = this.getRoomSymbol(fromRoom);
|
|
147
|
+
this.screen.write(fromScreenX - 1, fromScreenY, `[${fromSymbol}]`, ANSI.fg.gray);
|
|
148
|
+
const fromLabel = fromRoom.name.slice(0, 10);
|
|
149
|
+
this.screen.write(fromScreenX - Math.floor(fromLabel.length / 2), fromScreenY + 1, fromLabel, ANSI.fg.gray);
|
|
150
|
+
// Draw destination room
|
|
151
|
+
const toSymbol = this.getRoomSymbol(toRoom);
|
|
152
|
+
this.screen.write(toScreenX - 1, toScreenY, `[${toSymbol}]`, ANSI.fg.brightYellow);
|
|
153
|
+
const toLabel = toRoom.name.slice(0, 10);
|
|
154
|
+
this.screen.write(toScreenX - Math.floor(toLabel.length / 2), toScreenY - 1, toLabel, ANSI.fg.yellow);
|
|
155
|
+
// Draw player position
|
|
156
|
+
const playerX = Math.round(fromScreenX + (toScreenX - fromScreenX) * progress);
|
|
157
|
+
const playerY = Math.round(fromScreenY + (toScreenY - fromScreenY) * progress);
|
|
158
|
+
const playerFrame = Date.now() % 500 < 250 ? '@' : '*';
|
|
159
|
+
this.screen.write(playerX - 1, playerY, `[${playerFrame}]`, ANSI.fg.brightGreen);
|
|
160
|
+
// Progress percentage
|
|
161
|
+
const pct = Math.floor(progress * 100);
|
|
162
|
+
this.screen.write(x + width - 6, y + 1, `${pct}%`, ANSI.fg.cyan);
|
|
163
|
+
// Legend
|
|
164
|
+
const legendY = y + height - 2;
|
|
165
|
+
const distInfo = `Distance: ${Math.floor(distance * 10)}m`;
|
|
166
|
+
this.screen.write(x + 2, legendY, distInfo, ANSI.fg.gray);
|
|
167
|
+
this.screen.write(x + width - 20, legendY, '[@]You -> [*]Dest', ANSI.fg.gray);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Draw a path between two points
|
|
171
|
+
*/
|
|
172
|
+
drawPath(fromX, fromY, toX, toY, color, char) {
|
|
173
|
+
const dx = toX - fromX;
|
|
174
|
+
const dy = toY - fromY;
|
|
175
|
+
const steps = Math.max(Math.abs(dx), Math.abs(dy));
|
|
176
|
+
if (steps === 0)
|
|
177
|
+
return;
|
|
178
|
+
for (let i = 1; i < steps; i++) {
|
|
179
|
+
const t = i / steps;
|
|
180
|
+
const px = Math.round(fromX + dx * t);
|
|
181
|
+
const py = Math.round(fromY + dy * t);
|
|
182
|
+
let pathChar = char || '.';
|
|
183
|
+
if (!char) {
|
|
184
|
+
if (Math.abs(dx) > Math.abs(dy) * 2) {
|
|
185
|
+
pathChar = '-';
|
|
186
|
+
}
|
|
187
|
+
else if (Math.abs(dy) > Math.abs(dx) * 2) {
|
|
188
|
+
pathChar = '|';
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
this.screen.write(px, py, pathChar, color);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Get room symbol
|
|
196
|
+
*/
|
|
197
|
+
getRoomSymbol(room) {
|
|
198
|
+
const symbols = {
|
|
199
|
+
town: 'T',
|
|
200
|
+
dungeon_entrance: 'D',
|
|
201
|
+
combat: '!',
|
|
202
|
+
shop: 'S',
|
|
203
|
+
treasure: '$',
|
|
204
|
+
boss: 'B',
|
|
205
|
+
event: 'E',
|
|
206
|
+
rest: 'R',
|
|
207
|
+
empty: '.',
|
|
208
|
+
};
|
|
209
|
+
return symbols[room.type] || '?';
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Render travel status panel
|
|
213
|
+
*/
|
|
214
|
+
renderTravelStatus(x, y, width, height, fromName, toName, progress, duration, events) {
|
|
215
|
+
this.screen.drawBox(x, y, width, height, 'Journey');
|
|
216
|
+
let lineY = y + 1;
|
|
217
|
+
// Progress bar
|
|
218
|
+
const progressPercent = Math.floor(progress * 100);
|
|
219
|
+
this.screen.write(x + 2, lineY, `Progress: ${progressPercent}%`, ANSI.fg.white);
|
|
220
|
+
lineY++;
|
|
221
|
+
this.screen.drawProgressBar(x + 2, lineY, Math.min(40, width - 6), progress, 1);
|
|
222
|
+
lineY++;
|
|
223
|
+
// Time remaining
|
|
224
|
+
const remaining = Math.ceil(duration * (1 - progress));
|
|
225
|
+
this.screen.write(x + 2, lineY, `Time remaining: ${remaining}s`, ANSI.fg.gray);
|
|
226
|
+
lineY += 2;
|
|
227
|
+
// Events during travel
|
|
228
|
+
if (events.length > 0 && lineY < y + height - 1) {
|
|
229
|
+
this.screen.write(x + 2, lineY, '- Events -', ANSI.fg.cyan);
|
|
230
|
+
lineY++;
|
|
231
|
+
const maxEvents = Math.min(events.length, height - (lineY - y) - 1);
|
|
232
|
+
for (let i = 0; i < maxEvents; i++) {
|
|
233
|
+
const event = events[events.length - maxEvents + i];
|
|
234
|
+
this.screen.write(x + 2, lineY, `* ${event}`.slice(0, width - 4), ANSI.fg.white);
|
|
235
|
+
lineY++;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Render travel info panel
|
|
241
|
+
*/
|
|
242
|
+
renderTravelInfo(x, y, width, height, fromName, toName, progress, duration) {
|
|
243
|
+
this.screen.drawBox(x, y, width, height, 'Travel');
|
|
244
|
+
let lineY = y + 1;
|
|
245
|
+
// From/To info
|
|
246
|
+
this.screen.write(x + 2, lineY, '> Journey', ANSI.fg.cyan, undefined, ANSI.bold);
|
|
247
|
+
lineY += 2;
|
|
248
|
+
this.screen.write(x + 2, lineY, 'From:', ANSI.fg.gray);
|
|
249
|
+
lineY++;
|
|
250
|
+
this.screen.write(x + 3, lineY, fromName.slice(0, width - 5), ANSI.fg.white);
|
|
251
|
+
lineY += 2;
|
|
252
|
+
this.screen.write(x + 2, lineY, 'To:', ANSI.fg.yellow);
|
|
253
|
+
lineY++;
|
|
254
|
+
this.screen.write(x + 3, lineY, toName.slice(0, width - 5), ANSI.fg.brightYellow);
|
|
255
|
+
lineY += 2;
|
|
256
|
+
// Visual progress
|
|
257
|
+
const progressPercent = Math.floor(progress * 100);
|
|
258
|
+
this.screen.write(x + 2, lineY, '-'.repeat(width - 6), ANSI.fg.gray);
|
|
259
|
+
lineY++;
|
|
260
|
+
// Animated travel indicator
|
|
261
|
+
const barWidth = width - 6;
|
|
262
|
+
const filledWidth = Math.floor(progress * barWidth);
|
|
263
|
+
const travelerFrame = ['>', '>'][Math.floor(Date.now() / 300) % 2];
|
|
264
|
+
this.screen.write(x + 2, lineY, '.'.repeat(barWidth), ANSI.fg.gray);
|
|
265
|
+
this.screen.write(x + 2, lineY, '='.repeat(filledWidth), ANSI.fg.green);
|
|
266
|
+
if (filledWidth < barWidth) {
|
|
267
|
+
this.screen.write(x + 2 + filledWidth, lineY, travelerFrame, ANSI.fg.brightGreen);
|
|
268
|
+
}
|
|
269
|
+
lineY++;
|
|
270
|
+
this.screen.write(x + 2, lineY, `${progressPercent}% complete`, ANSI.fg.cyan);
|
|
271
|
+
lineY += 2;
|
|
272
|
+
// Time info
|
|
273
|
+
const remaining = Math.ceil(duration * (1 - progress));
|
|
274
|
+
const elapsed = Math.floor(duration * progress);
|
|
275
|
+
this.screen.write(x + 2, lineY, `${remaining}s remaining`, ANSI.fg.gray);
|
|
276
|
+
lineY++;
|
|
277
|
+
this.screen.write(x + 2, lineY, `${elapsed}s traveled`, ANSI.fg.gray);
|
|
278
|
+
lineY += 2;
|
|
279
|
+
// Cancel hint
|
|
280
|
+
const hintY = y + height - 3;
|
|
281
|
+
this.screen.write(x + 2, hintY, '-'.repeat(width - 6), ANSI.fg.gray);
|
|
282
|
+
this.screen.write(x + 2, hintY + 1, '[ESC] Cancel', ANSI.fg.yellow);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
//# sourceMappingURL=TravelScreen.js.map
|
|
286
|
+
//# debugId=e82ab1df-da6c-506a-be8d-960c770b7572
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TravelScreen.js","sources":["tui/screens/TravelScreen.ts"],"sourceRoot":"/","sourcesContent":["/**\r\n * Travel Screen - Shows travel progress with animated map\r\n */\r\n\r\nimport { BaseScreen } from '../../app/screens/BaseScreen.js';\r\nimport type { KeyEvent } from '../Input.js';\r\nimport { ANSI, MAP_SYMBOLS } from '../Screen.js';\r\nimport { getStrings } from '../../i18n/index.js';\r\nimport type { GameState, Room, Player } from '../../core/types.js';\r\n\r\n/**\r\n * Travel Screen Data\r\n */\r\nexport interface TravelScreenData {\r\n state: GameState;\r\n fromRoom: Room | null;\r\n toRoom: Room | null;\r\n progress: number;\r\n duration: number;\r\n events: string[];\r\n}\r\n\r\n/**\r\n * Travel Screen - Animated travel progress display\r\n */\r\nexport class TravelScreen extends BaseScreen {\r\n private data: TravelScreenData | null = null;\r\n private padding: number = 2;\r\n private headerHeight: number = 3;\r\n private onCancel?: () => void;\r\n\r\n /**\r\n * Set cancel handler\r\n */\r\n setOnCancel(handler: () => void): void {\r\n this.onCancel = handler;\r\n }\r\n\r\n /**\r\n * Update travel data\r\n */\r\n updateData(data: TravelScreenData): void {\r\n this.data = data;\r\n }\r\n\r\n /**\r\n * Handle key input\r\n */\r\n async handleKey(key: KeyEvent): Promise<boolean> {\r\n if (key.name === 'escape') {\r\n this.onCancel?.();\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Render the travel screen\r\n */\r\n render(): void {\r\n if (!this.data) return;\r\n\r\n const { state, fromRoom, toRoom, progress, duration, events } = this.data;\r\n const px = this.padding;\r\n const py = this.padding;\r\n const width = this.width - this.padding * 2;\r\n const height = this.height - this.padding * 2;\r\n\r\n this.screen.clear();\r\n\r\n // Header\r\n this.renderHeader(state.player, width, px, py);\r\n\r\n // Layout dimensions\r\n const menuWidth = Math.min(32, Math.floor(width * 0.35));\r\n const leftWidth = width - menuWidth - 2;\r\n const mapHeight = Math.min(14, Math.floor((height - this.headerHeight - 4) * 0.55));\r\n const statusHeight = height - this.headerHeight - mapHeight - 4;\r\n\r\n // Travel Map (left side, top)\r\n this.renderTravelMap(px + 1, py + this.headerHeight, leftWidth, mapHeight, fromRoom, toRoom, progress);\r\n\r\n // Travel Status (left side, bottom)\r\n this.renderTravelStatus(\r\n px + 1, py + this.headerHeight + mapHeight, leftWidth, statusHeight,\r\n fromRoom?.name || 'Unknown', toRoom?.name || 'Unknown', progress, duration, events\r\n );\r\n\r\n // Travel Info (right side)\r\n this.renderTravelInfo(\r\n px + leftWidth + 1, py + this.headerHeight, menuWidth, height - this.headerHeight - 1,\r\n fromRoom?.name || 'Unknown', toRoom?.name || 'Unknown', progress, duration\r\n );\r\n\r\n // Bottom hint\r\n this.screen.write(px + 1, py + height - 1, '[ESC] Cancel Travel', ANSI.fg.yellow);\r\n\r\n this.screen.render();\r\n }\r\n\r\n /**\r\n * Render header\r\n */\r\n private renderHeader(player: Player, width: number, x: number, y: number): void {\r\n const s = getStrings();\r\n this.screen.drawBox(x, y, width, 3, '', true);\r\n this.screen.write(x + 2, y + 1, 'IDLERPG.TERMINAL', ANSI.fg.cyan, undefined, ANSI.bold);\r\n\r\n const playerInfo = `${s.status.level}.${player.stats.level} ${player.name}`;\r\n this.screen.write(x + 25, y + 1, playerInfo, ANSI.fg.yellow);\r\n\r\n // HP bar\r\n const hpText = `${s.status.hp}:`;\r\n this.screen.write(x + 45, y + 1, hpText, ANSI.fg.white);\r\n this.screen.drawProgressBar(x + 49, y + 1, 10, player.stats.hp, player.stats.maxHp, ANSI.fg.red);\r\n this.screen.write(x + 60, y + 1, `${player.stats.hp}/${player.stats.maxHp}`, ANSI.fg.white);\r\n\r\n // Time\r\n const time = new Date().toLocaleTimeString('en-US', { hour12: false });\r\n this.screen.write(x + width - time.length - 2, y + 1, time, ANSI.fg.gray);\r\n }\r\n\r\n /**\r\n * Render travel map with animated player position\r\n */\r\n private renderTravelMap(\r\n x: number, y: number, width: number, height: number,\r\n fromRoom: Room | null, toRoom: Room | null, progress: number\r\n ): void {\r\n // Animated title\r\n const dots = '.'.repeat(Math.floor(Date.now() / 300) % 4);\r\n this.screen.drawBox(x, y, width, height, `Traveling${dots}`);\r\n\r\n const mapY = y + 2;\r\n const mapX = x + 2;\r\n const mapWidth = width - 4;\r\n const mapHeight = height - 5;\r\n const centerX = mapX + Math.floor(mapWidth / 2);\r\n const centerY = mapY + Math.floor(mapHeight / 2);\r\n\r\n if (!fromRoom || !toRoom) {\r\n this.screen.write(centerX - 5, centerY, 'Traveling...', ANSI.fg.yellow);\r\n return;\r\n }\r\n\r\n // Calculate positions\r\n const fromPos = fromRoom.position;\r\n const toPos = toRoom.position;\r\n const dx = toPos.x - fromPos.x;\r\n const dy = toPos.y - fromPos.y;\r\n const dz = toPos.floor - fromPos.floor;\r\n const distance = Math.sqrt(dx * dx + dy * dy) + Math.abs(dz) * 2;\r\n const normalizedDist = Math.min(1, distance / 5);\r\n\r\n const maxOffsetX = Math.floor(mapWidth / 3 * (0.5 + normalizedDist * 0.5));\r\n const maxOffsetY = Math.floor(mapHeight / 3 * (0.5 + normalizedDist * 0.5));\r\n\r\n let fromScreenX = centerX;\r\n let fromScreenY = centerY;\r\n let toScreenX = centerX;\r\n let toScreenY = centerY;\r\n\r\n if (Math.abs(dx) > Math.abs(dy)) {\r\n fromScreenX = centerX - maxOffsetX;\r\n toScreenX = centerX + maxOffsetX;\r\n const vertOffset = Math.sign(dy) * Math.min(Math.abs(dy), maxOffsetY / 2);\r\n fromScreenY = centerY - Math.floor(vertOffset / 2);\r\n toScreenY = centerY + Math.floor(vertOffset / 2);\r\n } else {\r\n fromScreenY = centerY - maxOffsetY;\r\n toScreenY = centerY + maxOffsetY;\r\n const horizOffset = Math.sign(dx) * Math.min(Math.abs(dx), maxOffsetX / 2);\r\n fromScreenX = centerX - Math.floor(horizOffset / 2);\r\n toScreenX = centerX + Math.floor(horizOffset / 2);\r\n }\r\n\r\n // Draw background dots\r\n for (let ty = mapY; ty < mapY + mapHeight; ty++) {\r\n for (let tx = mapX; tx < mapX + mapWidth; tx += 3) {\r\n if (Math.random() < 0.3) {\r\n this.screen.write(tx, ty, '.', ANSI.fg.gray);\r\n }\r\n }\r\n }\r\n\r\n // Draw path\r\n this.drawPath(fromScreenX, fromScreenY, toScreenX, toScreenY, ANSI.fg.gray);\r\n\r\n // Draw traveled portion\r\n const traveledX = Math.round(fromScreenX + (toScreenX - fromScreenX) * progress);\r\n const traveledY = Math.round(fromScreenY + (toScreenY - fromScreenY) * progress);\r\n this.drawPath(fromScreenX, fromScreenY, traveledX, traveledY, ANSI.fg.green, '=');\r\n\r\n // Draw origin room\r\n const fromSymbol = this.getRoomSymbol(fromRoom);\r\n this.screen.write(fromScreenX - 1, fromScreenY, `[${fromSymbol}]`, ANSI.fg.gray);\r\n const fromLabel = fromRoom.name.slice(0, 10);\r\n this.screen.write(fromScreenX - Math.floor(fromLabel.length / 2), fromScreenY + 1, fromLabel, ANSI.fg.gray);\r\n\r\n // Draw destination room\r\n const toSymbol = this.getRoomSymbol(toRoom);\r\n this.screen.write(toScreenX - 1, toScreenY, `[${toSymbol}]`, ANSI.fg.brightYellow);\r\n const toLabel = toRoom.name.slice(0, 10);\r\n this.screen.write(toScreenX - Math.floor(toLabel.length / 2), toScreenY - 1, toLabel, ANSI.fg.yellow);\r\n\r\n // Draw player position\r\n const playerX = Math.round(fromScreenX + (toScreenX - fromScreenX) * progress);\r\n const playerY = Math.round(fromScreenY + (toScreenY - fromScreenY) * progress);\r\n const playerFrame = Date.now() % 500 < 250 ? '@' : '*';\r\n this.screen.write(playerX - 1, playerY, `[${playerFrame}]`, ANSI.fg.brightGreen);\r\n\r\n // Progress percentage\r\n const pct = Math.floor(progress * 100);\r\n this.screen.write(x + width - 6, y + 1, `${pct}%`, ANSI.fg.cyan);\r\n\r\n // Legend\r\n const legendY = y + height - 2;\r\n const distInfo = `Distance: ${Math.floor(distance * 10)}m`;\r\n this.screen.write(x + 2, legendY, distInfo, ANSI.fg.gray);\r\n this.screen.write(x + width - 20, legendY, '[@]You -> [*]Dest', ANSI.fg.gray);\r\n }\r\n\r\n /**\r\n * Draw a path between two points\r\n */\r\n private drawPath(\r\n fromX: number, fromY: number, toX: number, toY: number,\r\n color: string, char?: string\r\n ): void {\r\n const dx = toX - fromX;\r\n const dy = toY - fromY;\r\n const steps = Math.max(Math.abs(dx), Math.abs(dy));\r\n\r\n if (steps === 0) return;\r\n\r\n for (let i = 1; i < steps; i++) {\r\n const t = i / steps;\r\n const px = Math.round(fromX + dx * t);\r\n const py = Math.round(fromY + dy * t);\r\n\r\n let pathChar = char || '.';\r\n if (!char) {\r\n if (Math.abs(dx) > Math.abs(dy) * 2) {\r\n pathChar = '-';\r\n } else if (Math.abs(dy) > Math.abs(dx) * 2) {\r\n pathChar = '|';\r\n }\r\n }\r\n\r\n this.screen.write(px, py, pathChar, color);\r\n }\r\n }\r\n\r\n /**\r\n * Get room symbol\r\n */\r\n private getRoomSymbol(room: Room): string {\r\n const symbols: Record<string, string> = {\r\n town: 'T',\r\n dungeon_entrance: 'D',\r\n combat: '!',\r\n shop: 'S',\r\n treasure: '$',\r\n boss: 'B',\r\n event: 'E',\r\n rest: 'R',\r\n empty: '.',\r\n };\r\n return symbols[room.type] || '?';\r\n }\r\n\r\n /**\r\n * Render travel status panel\r\n */\r\n private renderTravelStatus(\r\n x: number, y: number, width: number, height: number,\r\n fromName: string, toName: string, progress: number, duration: number, events: string[]\r\n ): void {\r\n this.screen.drawBox(x, y, width, height, 'Journey');\r\n\r\n let lineY = y + 1;\r\n\r\n // Progress bar\r\n const progressPercent = Math.floor(progress * 100);\r\n this.screen.write(x + 2, lineY, `Progress: ${progressPercent}%`, ANSI.fg.white);\r\n lineY++;\r\n this.screen.drawProgressBar(x + 2, lineY, Math.min(40, width - 6), progress, 1);\r\n lineY++;\r\n\r\n // Time remaining\r\n const remaining = Math.ceil(duration * (1 - progress));\r\n this.screen.write(x + 2, lineY, `Time remaining: ${remaining}s`, ANSI.fg.gray);\r\n lineY += 2;\r\n\r\n // Events during travel\r\n if (events.length > 0 && lineY < y + height - 1) {\r\n this.screen.write(x + 2, lineY, '- Events -', ANSI.fg.cyan);\r\n lineY++;\r\n const maxEvents = Math.min(events.length, height - (lineY - y) - 1);\r\n for (let i = 0; i < maxEvents; i++) {\r\n const event = events[events.length - maxEvents + i];\r\n this.screen.write(x + 2, lineY, `* ${event}`.slice(0, width - 4), ANSI.fg.white);\r\n lineY++;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Render travel info panel\r\n */\r\n private renderTravelInfo(\r\n x: number, y: number, width: number, height: number,\r\n fromName: string, toName: string, progress: number, duration: number\r\n ): void {\r\n this.screen.drawBox(x, y, width, height, 'Travel');\r\n\r\n let lineY = y + 1;\r\n\r\n // From/To info\r\n this.screen.write(x + 2, lineY, '> Journey', ANSI.fg.cyan, undefined, ANSI.bold);\r\n lineY += 2;\r\n\r\n this.screen.write(x + 2, lineY, 'From:', ANSI.fg.gray);\r\n lineY++;\r\n this.screen.write(x + 3, lineY, fromName.slice(0, width - 5), ANSI.fg.white);\r\n lineY += 2;\r\n\r\n this.screen.write(x + 2, lineY, 'To:', ANSI.fg.yellow);\r\n lineY++;\r\n this.screen.write(x + 3, lineY, toName.slice(0, width - 5), ANSI.fg.brightYellow);\r\n lineY += 2;\r\n\r\n // Visual progress\r\n const progressPercent = Math.floor(progress * 100);\r\n this.screen.write(x + 2, lineY, '-'.repeat(width - 6), ANSI.fg.gray);\r\n lineY++;\r\n\r\n // Animated travel indicator\r\n const barWidth = width - 6;\r\n const filledWidth = Math.floor(progress * barWidth);\r\n const travelerFrame = ['>', '>'][Math.floor(Date.now() / 300) % 2];\r\n\r\n this.screen.write(x + 2, lineY, '.'.repeat(barWidth), ANSI.fg.gray);\r\n this.screen.write(x + 2, lineY, '='.repeat(filledWidth), ANSI.fg.green);\r\n if (filledWidth < barWidth) {\r\n this.screen.write(x + 2 + filledWidth, lineY, travelerFrame, ANSI.fg.brightGreen);\r\n }\r\n lineY++;\r\n\r\n this.screen.write(x + 2, lineY, `${progressPercent}% complete`, ANSI.fg.cyan);\r\n lineY += 2;\r\n\r\n // Time info\r\n const remaining = Math.ceil(duration * (1 - progress));\r\n const elapsed = Math.floor(duration * progress);\r\n this.screen.write(x + 2, lineY, `${remaining}s remaining`, ANSI.fg.gray);\r\n lineY++;\r\n this.screen.write(x + 2, lineY, `${elapsed}s traveled`, ANSI.fg.gray);\r\n lineY += 2;\r\n\r\n // Cancel hint\r\n const hintY = y + height - 3;\r\n this.screen.write(x + 2, hintY, '-'.repeat(width - 6), ANSI.fg.gray);\r\n this.screen.write(x + 2, hintY + 1, '[ESC] Cancel', ANSI.fg.yellow);\r\n }\r\n}\r\n"],"names":[],"mappings":"AAAA;;GAEG;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,EAAE,IAAI,EAAe,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAejD;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,UAAU;IAClC,IAAI,GAA4B,IAAI,CAAC;IACrC,OAAO,GAAW,CAAC,CAAC;IACpB,YAAY,GAAW,CAAC,CAAC;IACzB,QAAQ,CAAc;IAE9B;;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AC;IACtE,CAAC;CACF","debug_id":"e82ab1df-da6c-506a-be8d-960c770b7572"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["tui/screens/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,oBAAoB,CAAC;AAGnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TUI Screens Module
|
|
3
|
+
* Exports the SectionScreen base class and IdleRPG screens
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="83398e15-8de2-5a58-8e28-8f5b5adfd4d4")}catch(e){}}();
|
|
7
|
+
export * from './SectionScreen.js';
|
|
8
|
+
// IdleRPG Screens
|
|
9
|
+
export * from './DungeonScreen.js';
|
|
10
|
+
export * from './TownScreen.js';
|
|
11
|
+
// Reference implementations (not exported to avoid conflicts with src/app/screens/)
|
|
12
|
+
// - ExploreScreen.ts
|
|
13
|
+
// - TravelScreen.ts
|
|
14
|
+
// - CombatScreen.ts
|
|
15
|
+
// - DialogScreen.ts
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
17
|
+
//# debugId=83398e15-8de2-5a58-8e28-8f5b5adfd4d4
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["tui/screens/index.ts"],"sourceRoot":"/","sourcesContent":["/**\r\n * TUI Screens Module\r\n * Exports the SectionScreen base class and IdleRPG screens\r\n */\r\n\r\nexport * from './SectionScreen.js';\r\n\r\n// IdleRPG Screens\r\nexport * from './DungeonScreen.js';\r\nexport * from './TownScreen.js';\r\n\r\n// Reference implementations (not exported to avoid conflicts with src/app/screens/)\r\n// - ExploreScreen.ts\r\n// - TravelScreen.ts\r\n// - CombatScreen.ts\r\n// - DialogScreen.ts\r\n"],"names":[],"mappings":"AAAA;;;GAGG;;;AAEH,cAAc,oBAAoB,CAAC;AAEnC,kBAAkB;AAClB,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAEhC,oFAAoF;AACpF,qBAAqB;AACrB,oBAAoB;AACpB,oBAAoB;AACpB,oBAAoB","debug_id":"83398e15-8de2-5a58-8e28-8f5b5adfd4d4"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Actions Section - NPC list and quick actions menu
|
|
3
|
+
*/
|
|
4
|
+
import { BaseSection } from '../core/BaseSection.js';
|
|
5
|
+
import type { RenderContext } from '../core/Component.js';
|
|
6
|
+
import type { KeyEvent } from '../Input.js';
|
|
7
|
+
import type { ExtendedNPC } from '../../npc/types.js';
|
|
8
|
+
import type { Quest } from '../../quest/types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Action item types
|
|
11
|
+
*/
|
|
12
|
+
export interface ActionItem {
|
|
13
|
+
type: 'npc' | 'action';
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Actions section data
|
|
19
|
+
*/
|
|
20
|
+
export interface ActionsData {
|
|
21
|
+
npcs: ExtendedNPC[];
|
|
22
|
+
quests: Quest[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Actions Section - Shows NPCs and quick actions
|
|
26
|
+
*/
|
|
27
|
+
export declare class ActionsSection extends BaseSection {
|
|
28
|
+
private npcs;
|
|
29
|
+
private quests;
|
|
30
|
+
private items;
|
|
31
|
+
private onNpcSelect?;
|
|
32
|
+
private onOpenModal?;
|
|
33
|
+
constructor();
|
|
34
|
+
/**
|
|
35
|
+
* Set callback for NPC selection
|
|
36
|
+
*/
|
|
37
|
+
setOnNpcSelect(callback: (npcIndex: number) => void): void;
|
|
38
|
+
/**
|
|
39
|
+
* Set callback for opening modals
|
|
40
|
+
*/
|
|
41
|
+
setOnOpenModal(callback: (modal: 'inventory' | 'character' | 'quests' | 'workshop') => void): void;
|
|
42
|
+
/**
|
|
43
|
+
* Update section data
|
|
44
|
+
*/
|
|
45
|
+
update(data: ActionsData): void;
|
|
46
|
+
/**
|
|
47
|
+
* Build the items list
|
|
48
|
+
*/
|
|
49
|
+
private buildItems;
|
|
50
|
+
/**
|
|
51
|
+
* Render actions content
|
|
52
|
+
*/
|
|
53
|
+
protected renderContent(ctx: RenderContext): void;
|
|
54
|
+
/**
|
|
55
|
+
* Render a single action item
|
|
56
|
+
*/
|
|
57
|
+
private renderActionItem;
|
|
58
|
+
/**
|
|
59
|
+
* Get number of items
|
|
60
|
+
*/
|
|
61
|
+
getItemCount(): number;
|
|
62
|
+
/**
|
|
63
|
+
* Activate selected item
|
|
64
|
+
*/
|
|
65
|
+
activateItem(): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Handle custom keys (shortcuts)
|
|
68
|
+
*/
|
|
69
|
+
protected handleCustomKey(key: KeyEvent): boolean;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=ActionsSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionsSection.d.ts","sourceRoot":"/","sources":["tui/sections/ActionsSection.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAA0B,MAAM,wBAAwB,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,MAAM,EAAE,KAAK,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,KAAK,CAAoB;IAGjC,OAAO,CAAC,WAAW,CAAC,CAA6B;IACjD,OAAO,CAAC,WAAW,CAAC,CAAqE;;IAezF;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;IAI1D;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,KAAK,IAAI,GAAG,IAAI;IAIlG;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IAM/B;;OAEG;IACH,OAAO,CAAC,UAAU;IA8BlB;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI;IAuCjD;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAaxB;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,YAAY,IAAI,OAAO;IA0BvB;;OAEG;IACH,SAAS,CAAC,eAAe,CAAC,GAAG,EAAE,QAAQ,GAAG,OAAO;CAiBlD"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Actions Section - NPC list and quick actions menu
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="704eb02d-f3de-515d-9383-9594e4393a38")}catch(e){}}();
|
|
6
|
+
import { BaseSection } from '../core/BaseSection.js';
|
|
7
|
+
import { ANSI } from '../Screen.js';
|
|
8
|
+
/**
|
|
9
|
+
* Actions Section - Shows NPCs and quick actions
|
|
10
|
+
*/
|
|
11
|
+
export class ActionsSection extends BaseSection {
|
|
12
|
+
npcs = [];
|
|
13
|
+
quests = [];
|
|
14
|
+
items = [];
|
|
15
|
+
// Callbacks for actions
|
|
16
|
+
onNpcSelect;
|
|
17
|
+
onOpenModal;
|
|
18
|
+
constructor() {
|
|
19
|
+
const config = {
|
|
20
|
+
id: 'actions',
|
|
21
|
+
title: 'Actions',
|
|
22
|
+
canEnter: true,
|
|
23
|
+
hints: {
|
|
24
|
+
focused: 'Enter: enter',
|
|
25
|
+
entered: 'Up/Down: select Enter: confirm Esc: exit',
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
super(config);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Set callback for NPC selection
|
|
32
|
+
*/
|
|
33
|
+
setOnNpcSelect(callback) {
|
|
34
|
+
this.onNpcSelect = callback;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Set callback for opening modals
|
|
38
|
+
*/
|
|
39
|
+
setOnOpenModal(callback) {
|
|
40
|
+
this.onOpenModal = callback;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Update section data
|
|
44
|
+
*/
|
|
45
|
+
update(data) {
|
|
46
|
+
this.npcs = data.npcs;
|
|
47
|
+
this.quests = data.quests;
|
|
48
|
+
this.buildItems();
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Build the items list
|
|
52
|
+
*/
|
|
53
|
+
buildItems() {
|
|
54
|
+
this.items = [];
|
|
55
|
+
// Add NPCs
|
|
56
|
+
for (let i = 0; i < this.npcs.length; i++) {
|
|
57
|
+
const npc = this.npcs[i];
|
|
58
|
+
this.items.push({
|
|
59
|
+
type: 'npc',
|
|
60
|
+
id: `npc_${i}`,
|
|
61
|
+
label: npc.name,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
// Add quick actions
|
|
65
|
+
const quickActions = [
|
|
66
|
+
{ id: 'inventory', label: '[I] Inventory' },
|
|
67
|
+
{ id: 'character', label: '[C] Character' },
|
|
68
|
+
{ id: 'quests', label: `[Q] Quests (${this.quests.length})` },
|
|
69
|
+
{ id: 'workshop', label: '[W] Workshop' },
|
|
70
|
+
];
|
|
71
|
+
for (const action of quickActions) {
|
|
72
|
+
this.items.push({
|
|
73
|
+
type: 'action',
|
|
74
|
+
id: action.id,
|
|
75
|
+
label: action.label,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Render actions content
|
|
81
|
+
*/
|
|
82
|
+
renderContent(ctx) {
|
|
83
|
+
const { screen, bounds } = ctx;
|
|
84
|
+
const { x, y, width, height } = bounds;
|
|
85
|
+
let lineY = y + 1;
|
|
86
|
+
const maxItems = height - 3;
|
|
87
|
+
let itemIndex = 0;
|
|
88
|
+
// NPCs section
|
|
89
|
+
if (this.npcs.length > 0 && lineY < y + maxItems) {
|
|
90
|
+
screen.write(x + 2, lineY, '* NPCs', ANSI.fg.cyan, undefined, ANSI.bold);
|
|
91
|
+
lineY++;
|
|
92
|
+
for (let i = 0; i < Math.min(this.npcs.length, 4); i++) {
|
|
93
|
+
if (lineY >= y + maxItems)
|
|
94
|
+
break;
|
|
95
|
+
const npc = this.npcs[i];
|
|
96
|
+
const rel = npc.playerRelationship > 0 ? '+' : npc.playerRelationship < 0 ? '-' : '';
|
|
97
|
+
const label = `${npc.name} ${rel}`;
|
|
98
|
+
this.renderActionItem(ctx, itemIndex, label, lineY);
|
|
99
|
+
lineY++;
|
|
100
|
+
itemIndex++;
|
|
101
|
+
}
|
|
102
|
+
lineY++;
|
|
103
|
+
}
|
|
104
|
+
// Quick actions section (no header, directly show actions)
|
|
105
|
+
if (lineY < y + height - 2) {
|
|
106
|
+
// Start from where NPCs left off
|
|
107
|
+
const actionsStartIndex = this.npcs.length;
|
|
108
|
+
for (let i = actionsStartIndex; i < this.items.length; i++) {
|
|
109
|
+
if (lineY >= y + height - 2)
|
|
110
|
+
break;
|
|
111
|
+
const item = this.items[i];
|
|
112
|
+
this.renderActionItem(ctx, i, item.label, lineY);
|
|
113
|
+
lineY++;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Render a single action item
|
|
119
|
+
*/
|
|
120
|
+
renderActionItem(ctx, index, label, lineY) {
|
|
121
|
+
const { screen, bounds } = ctx;
|
|
122
|
+
const { x, width } = bounds;
|
|
123
|
+
const isSelected = this.state.entered && this.state.selectedIndex === index;
|
|
124
|
+
const fg = isSelected ? ANSI.fg.black : ANSI.fg.white;
|
|
125
|
+
const bg = isSelected ? ANSI.bg.cyan : undefined;
|
|
126
|
+
const indicator = isSelected ? '>' : ' ';
|
|
127
|
+
screen.write(x + 1, lineY, indicator, ANSI.fg.yellow);
|
|
128
|
+
screen.write(x + 3, lineY, label.slice(0, width - 5).padEnd(width - 5), fg, bg);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Get number of items
|
|
132
|
+
*/
|
|
133
|
+
getItemCount() {
|
|
134
|
+
return this.items.length;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Activate selected item
|
|
138
|
+
*/
|
|
139
|
+
activateItem() {
|
|
140
|
+
const item = this.items[this.state.selectedIndex];
|
|
141
|
+
if (!item)
|
|
142
|
+
return false;
|
|
143
|
+
if (item.type === 'npc') {
|
|
144
|
+
const npcIndex = parseInt(item.id.replace('npc_', ''), 10);
|
|
145
|
+
this.onNpcSelect?.(npcIndex);
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
if (item.type === 'action') {
|
|
149
|
+
const modalActions = {
|
|
150
|
+
'inventory': 'inventory',
|
|
151
|
+
'character': 'character',
|
|
152
|
+
'quests': 'quests',
|
|
153
|
+
'workshop': 'workshop',
|
|
154
|
+
};
|
|
155
|
+
if (modalActions[item.id]) {
|
|
156
|
+
this.onOpenModal?.(modalActions[item.id]);
|
|
157
|
+
return true;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Handle custom keys (shortcuts)
|
|
164
|
+
*/
|
|
165
|
+
handleCustomKey(key) {
|
|
166
|
+
// Quick shortcuts for actions
|
|
167
|
+
if (key.raw) {
|
|
168
|
+
const shortcuts = {
|
|
169
|
+
'i': 'inventory',
|
|
170
|
+
'c': 'character',
|
|
171
|
+
'q': 'quests',
|
|
172
|
+
'w': 'workshop',
|
|
173
|
+
};
|
|
174
|
+
const modal = shortcuts[key.raw.toLowerCase()];
|
|
175
|
+
if (modal) {
|
|
176
|
+
this.onOpenModal?.(modal);
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=ActionsSection.js.map
|
|
184
|
+
//# debugId=704eb02d-f3de-515d-9383-9594e4393a38
|