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,308 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Explore Screen - Main game exploration interface
|
|
3
|
+
* Uses the new section-based TUI architecture
|
|
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]="e18acd1a-9686-5694-8f86-471950f7df75")}catch(e){}}();
|
|
7
|
+
import { BaseScreen } from './BaseScreen.js';
|
|
8
|
+
import { ANSI } from '../../tui/Screen.js';
|
|
9
|
+
// Import section-based architecture
|
|
10
|
+
import { SectionManager, createGridLayout } from '../../tui/core/SectionManager.js';
|
|
11
|
+
import { MapSection } from '../../tui/sections/MapSection.js';
|
|
12
|
+
import { StatusSection } from '../../tui/sections/StatusSection.js';
|
|
13
|
+
import { ActionsSection } from '../../tui/sections/ActionsSection.js';
|
|
14
|
+
import { EventsSection } from '../../tui/sections/EventsSection.js';
|
|
15
|
+
export class ExploreScreen extends BaseScreen {
|
|
16
|
+
state = {
|
|
17
|
+
gameState: null,
|
|
18
|
+
npcs: [],
|
|
19
|
+
quests: [],
|
|
20
|
+
};
|
|
21
|
+
// Section management
|
|
22
|
+
sectionManager;
|
|
23
|
+
mapSection;
|
|
24
|
+
statusSection;
|
|
25
|
+
actionsSection;
|
|
26
|
+
eventsSection;
|
|
27
|
+
refreshInterval = null;
|
|
28
|
+
padding = 1;
|
|
29
|
+
constructor() {
|
|
30
|
+
super();
|
|
31
|
+
// Create section manager
|
|
32
|
+
this.sectionManager = new SectionManager();
|
|
33
|
+
// Create sections
|
|
34
|
+
this.mapSection = new MapSection();
|
|
35
|
+
this.statusSection = new StatusSection();
|
|
36
|
+
this.actionsSection = new ActionsSection();
|
|
37
|
+
this.eventsSection = new EventsSection();
|
|
38
|
+
// Register sections
|
|
39
|
+
this.sectionManager.register(this.mapSection);
|
|
40
|
+
this.sectionManager.register(this.statusSection);
|
|
41
|
+
this.sectionManager.register(this.actionsSection);
|
|
42
|
+
this.sectionManager.register(this.eventsSection);
|
|
43
|
+
// Set up navigation layout
|
|
44
|
+
// +-------+--------+
|
|
45
|
+
// | map | actions|
|
|
46
|
+
// +-------+ |
|
|
47
|
+
// | status| |
|
|
48
|
+
// +-------+--------+
|
|
49
|
+
// | events |
|
|
50
|
+
// +----------------+
|
|
51
|
+
const layout = createGridLayout([
|
|
52
|
+
['map', 'actions'],
|
|
53
|
+
['status', 'actions'],
|
|
54
|
+
['events', 'events'],
|
|
55
|
+
]);
|
|
56
|
+
this.sectionManager.setLayout(layout);
|
|
57
|
+
this.sectionManager.setDefaultFocus('actions');
|
|
58
|
+
// Set up callbacks
|
|
59
|
+
this.setupCallbacks();
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Set up section callbacks
|
|
63
|
+
*/
|
|
64
|
+
setupCallbacks() {
|
|
65
|
+
// Map travel callback
|
|
66
|
+
this.mapSection.setOnTravel((roomIndex) => {
|
|
67
|
+
if (!this.state.gameState)
|
|
68
|
+
return;
|
|
69
|
+
const connections = this.state.gameState.currentRoom.connections;
|
|
70
|
+
if (roomIndex < connections.length) {
|
|
71
|
+
const roomId = connections[roomIndex];
|
|
72
|
+
this.navigate({ type: 'travel', targetRoomId: roomId });
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
// Actions NPC select callback
|
|
76
|
+
this.actionsSection.setOnNpcSelect((npcIndex) => {
|
|
77
|
+
if (npcIndex < this.state.npcs.length) {
|
|
78
|
+
this.navigate({ type: 'dialog', npcId: this.state.npcs[npcIndex].id });
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
// Actions modal callback
|
|
82
|
+
this.actionsSection.setOnOpenModal((modal) => {
|
|
83
|
+
switch (modal) {
|
|
84
|
+
case 'inventory':
|
|
85
|
+
this.navigate({ type: 'inventory' });
|
|
86
|
+
break;
|
|
87
|
+
case 'character':
|
|
88
|
+
this.navigate({ type: 'character' });
|
|
89
|
+
break;
|
|
90
|
+
case 'quests':
|
|
91
|
+
this.navigate({ type: 'quests' });
|
|
92
|
+
break;
|
|
93
|
+
case 'workshop':
|
|
94
|
+
this.navigate({ type: 'workshop' });
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
async onEnter(params) {
|
|
100
|
+
await super.onEnter();
|
|
101
|
+
if (params) {
|
|
102
|
+
this.updateState(params.gameState, params.npcs, params.quests);
|
|
103
|
+
}
|
|
104
|
+
this.sectionManager.focusDefault();
|
|
105
|
+
this.startRefresh();
|
|
106
|
+
}
|
|
107
|
+
async onLeave() {
|
|
108
|
+
this.stopRefresh();
|
|
109
|
+
await super.onLeave();
|
|
110
|
+
}
|
|
111
|
+
startRefresh() {
|
|
112
|
+
this.stopRefresh();
|
|
113
|
+
this.refreshInterval = setInterval(() => {
|
|
114
|
+
if (this.isActive) {
|
|
115
|
+
this.render();
|
|
116
|
+
}
|
|
117
|
+
}, 200); // 5 FPS for clock updates
|
|
118
|
+
}
|
|
119
|
+
stopRefresh() {
|
|
120
|
+
if (this.refreshInterval) {
|
|
121
|
+
clearInterval(this.refreshInterval);
|
|
122
|
+
this.refreshInterval = null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Update game state
|
|
127
|
+
*/
|
|
128
|
+
updateState(gameState, npcs = [], quests = []) {
|
|
129
|
+
this.state.gameState = gameState;
|
|
130
|
+
this.state.npcs = npcs;
|
|
131
|
+
this.state.quests = quests;
|
|
132
|
+
// Update sections with new data
|
|
133
|
+
this.mapSection.update(gameState);
|
|
134
|
+
this.statusSection.update({
|
|
135
|
+
state: gameState,
|
|
136
|
+
npcs: npcs,
|
|
137
|
+
quests: quests,
|
|
138
|
+
});
|
|
139
|
+
this.actionsSection.update({
|
|
140
|
+
npcs: npcs,
|
|
141
|
+
quests: quests,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Add event to log
|
|
146
|
+
*/
|
|
147
|
+
addEvent(message) {
|
|
148
|
+
this.eventsSection.addEvent(message);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Calculate section bounds based on screen size
|
|
152
|
+
*/
|
|
153
|
+
calculateSectionBounds() {
|
|
154
|
+
const boundsMap = new Map();
|
|
155
|
+
const px = this.padding;
|
|
156
|
+
const py = this.padding + 3; // After header
|
|
157
|
+
const contentWidth = this.width - this.padding * 2;
|
|
158
|
+
const contentHeight = this.height - this.padding * 2 - 4; // Header + hint bar
|
|
159
|
+
// Calculate dimensions
|
|
160
|
+
const eventsHeight = Math.min(8, Math.floor(contentHeight * 0.25));
|
|
161
|
+
const mainAreaHeight = contentHeight - eventsHeight;
|
|
162
|
+
const menuWidth = Math.min(30, Math.floor(contentWidth * 0.32));
|
|
163
|
+
const leftWidth = contentWidth - menuWidth - 1;
|
|
164
|
+
const mapHeight = Math.min(10, Math.floor(mainAreaHeight * 0.55));
|
|
165
|
+
const statusHeight = mainAreaHeight - mapHeight;
|
|
166
|
+
// Map section (top-left)
|
|
167
|
+
boundsMap.set('map', {
|
|
168
|
+
x: px,
|
|
169
|
+
y: py,
|
|
170
|
+
width: leftWidth,
|
|
171
|
+
height: mapHeight,
|
|
172
|
+
});
|
|
173
|
+
// Status section (bottom-left)
|
|
174
|
+
boundsMap.set('status', {
|
|
175
|
+
x: px,
|
|
176
|
+
y: py + mapHeight,
|
|
177
|
+
width: leftWidth,
|
|
178
|
+
height: statusHeight,
|
|
179
|
+
});
|
|
180
|
+
// Actions section (right side)
|
|
181
|
+
boundsMap.set('actions', {
|
|
182
|
+
x: px + leftWidth,
|
|
183
|
+
y: py,
|
|
184
|
+
width: menuWidth + 1,
|
|
185
|
+
height: mainAreaHeight,
|
|
186
|
+
});
|
|
187
|
+
// Events section (bottom, full width)
|
|
188
|
+
boundsMap.set('events', {
|
|
189
|
+
x: px,
|
|
190
|
+
y: py + mainAreaHeight,
|
|
191
|
+
width: contentWidth,
|
|
192
|
+
height: eventsHeight,
|
|
193
|
+
});
|
|
194
|
+
return boundsMap;
|
|
195
|
+
}
|
|
196
|
+
render() {
|
|
197
|
+
if (!this.state.gameState)
|
|
198
|
+
return;
|
|
199
|
+
this.clear();
|
|
200
|
+
// Render header
|
|
201
|
+
this.renderHeader();
|
|
202
|
+
// Calculate and render sections
|
|
203
|
+
const boundsMap = this.calculateSectionBounds();
|
|
204
|
+
for (const section of this.sectionManager.getAll()) {
|
|
205
|
+
const bounds = boundsMap.get(section.id);
|
|
206
|
+
if (bounds) {
|
|
207
|
+
section.bounds = bounds;
|
|
208
|
+
const ctx = { screen: this.screen, bounds };
|
|
209
|
+
section.render(ctx);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// Render hint bar at bottom
|
|
213
|
+
this.renderHintBar();
|
|
214
|
+
this.flush();
|
|
215
|
+
}
|
|
216
|
+
renderHeader() {
|
|
217
|
+
if (!this.state.gameState)
|
|
218
|
+
return;
|
|
219
|
+
const state = this.state.gameState;
|
|
220
|
+
this.drawBox(0, 0, this.width, 3, '', true);
|
|
221
|
+
// Title
|
|
222
|
+
this.write(2, 1, 'IDLERPG.TERMINAL', ANSI.fg.cyan, undefined, ANSI.bold);
|
|
223
|
+
// Player info
|
|
224
|
+
const player = state.player;
|
|
225
|
+
this.write(25, 1, `Lv.${player.stats.level} ${player.name}`, ANSI.fg.yellow);
|
|
226
|
+
// HP bar
|
|
227
|
+
const hpPct = player.stats.hp / player.stats.maxHp;
|
|
228
|
+
const hpBars = Math.floor(hpPct * 10);
|
|
229
|
+
const hpBar = '\u2588'.repeat(hpBars) + '\u2591'.repeat(10 - hpBars);
|
|
230
|
+
this.write(45, 1, 'HP:', ANSI.fg.white);
|
|
231
|
+
this.write(49, 1, hpBar, hpPct > 0.5 ? ANSI.fg.green : hpPct > 0.25 ? ANSI.fg.yellow : ANSI.fg.red);
|
|
232
|
+
this.write(60, 1, `${player.stats.hp}/${player.stats.maxHp}`, ANSI.fg.white);
|
|
233
|
+
// Clock
|
|
234
|
+
const time = new Date().toLocaleTimeString('en-US', { hour12: false });
|
|
235
|
+
this.write(this.width - time.length - 2, 1, time, ANSI.fg.gray);
|
|
236
|
+
}
|
|
237
|
+
renderHintBar() {
|
|
238
|
+
const isAnyEntered = this.sectionManager.isAnyEntered();
|
|
239
|
+
let hints;
|
|
240
|
+
if (isAnyEntered) {
|
|
241
|
+
const sectionHint = this.sectionManager.getCurrentHint();
|
|
242
|
+
hints = sectionHint || 'Up/Down: navigate Enter: select Esc: exit';
|
|
243
|
+
}
|
|
244
|
+
else {
|
|
245
|
+
hints = 'Arrows: focus Enter: enter | 1-9: Travel I C Q W [M]enu';
|
|
246
|
+
}
|
|
247
|
+
this.write(1, this.height - 1, hints.slice(0, this.width - 2), ANSI.fg.gray);
|
|
248
|
+
}
|
|
249
|
+
async handleKey(key) {
|
|
250
|
+
// Global shortcuts (work regardless of section state)
|
|
251
|
+
if (await this.handleGlobalShortcut(key)) {
|
|
252
|
+
this.render();
|
|
253
|
+
return true;
|
|
254
|
+
}
|
|
255
|
+
// Delegate to section manager
|
|
256
|
+
if (this.sectionManager.handleKey(key)) {
|
|
257
|
+
this.render();
|
|
258
|
+
return true;
|
|
259
|
+
}
|
|
260
|
+
return false;
|
|
261
|
+
}
|
|
262
|
+
async handleGlobalShortcut(key) {
|
|
263
|
+
if (!key.raw)
|
|
264
|
+
return false;
|
|
265
|
+
// Number shortcuts for travel (always available)
|
|
266
|
+
if (/^[1-9]$/.test(key.raw) && this.state.gameState) {
|
|
267
|
+
const index = parseInt(key.raw) - 1;
|
|
268
|
+
const connections = this.state.gameState.currentRoom.connections;
|
|
269
|
+
if (index < connections.length) {
|
|
270
|
+
this.navigate({ type: 'travel', targetRoomId: connections[index] });
|
|
271
|
+
return true;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
// Modal shortcuts - ALWAYS available on main screen, regardless of section state
|
|
275
|
+
const modalShortcuts = {
|
|
276
|
+
'i': () => this.navigate({ type: 'inventory' }),
|
|
277
|
+
'c': () => this.navigate({ type: 'character' }),
|
|
278
|
+
'q': () => this.navigate({ type: 'quests' }),
|
|
279
|
+
'w': () => this.navigate({ type: 'workshop' }),
|
|
280
|
+
'm': () => this.navigate({ type: 'help' }), // Menu -> help for now
|
|
281
|
+
};
|
|
282
|
+
const modalAction = modalShortcuts[key.raw.toLowerCase()];
|
|
283
|
+
if (modalAction) {
|
|
284
|
+
modalAction();
|
|
285
|
+
return true;
|
|
286
|
+
}
|
|
287
|
+
// Other shortcuts (only when not entered in section)
|
|
288
|
+
const isEntered = this.sectionManager.isAnyEntered();
|
|
289
|
+
if (!isEntered) {
|
|
290
|
+
const otherShortcuts = {
|
|
291
|
+
'h': () => this.navigate({ type: 'help' }),
|
|
292
|
+
'n': () => {
|
|
293
|
+
if (this.state.npcs.length > 0) {
|
|
294
|
+
this.navigate({ type: 'dialog', npcId: this.state.npcs[0].id });
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
};
|
|
298
|
+
const action = otherShortcuts[key.raw.toLowerCase()];
|
|
299
|
+
if (action) {
|
|
300
|
+
action();
|
|
301
|
+
return true;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
//# sourceMappingURL=ExploreScreen.js.map
|
|
308
|
+
//# debugId=e18acd1a-9686-5694-8f86-471950f7df75
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExploreScreen.js","sources":["app/screens/ExploreScreen.ts"],"sourceRoot":"/","sourcesContent":["/**\r\n * Explore Screen - Main game exploration interface\r\n * Uses the new section-based TUI architecture\r\n */\r\n\r\nimport { BaseScreen } from './BaseScreen.js';\r\nimport { ANSI } from '../../tui/Screen.js';\r\nimport type { KeyEvent } from '../../tui/Input.js';\r\nimport type { GameState, Room } from '../../core/types.js';\r\nimport type { ExtendedNPC } from '../../npc/types.js';\r\nimport type { Quest } from '../../quest/types.js';\r\n\r\n// Import section-based architecture\r\nimport { SectionManager, createGridLayout } from '../../tui/core/SectionManager.js';\r\nimport { MapSection } from '../../tui/sections/MapSection.js';\r\nimport { StatusSection } from '../../tui/sections/StatusSection.js';\r\nimport { ActionsSection } from '../../tui/sections/ActionsSection.js';\r\nimport { EventsSection } from '../../tui/sections/EventsSection.js';\r\nimport type { Rect, RenderContext } from '../../tui/core/Component.js';\r\n\r\ninterface ExploreScreenState {\r\n gameState: GameState | null;\r\n npcs: ExtendedNPC[];\r\n quests: Quest[];\r\n}\r\n\r\nexport class ExploreScreen extends BaseScreen {\r\n private state: ExploreScreenState = {\r\n gameState: null,\r\n npcs: [],\r\n quests: [],\r\n };\r\n\r\n // Section management\r\n private sectionManager: SectionManager;\r\n private mapSection: MapSection;\r\n private statusSection: StatusSection;\r\n private actionsSection: ActionsSection;\r\n private eventsSection: EventsSection;\r\n\r\n private refreshInterval: NodeJS.Timeout | null = null;\r\n private padding: number = 1;\r\n\r\n constructor() {\r\n super();\r\n\r\n // Create section manager\r\n this.sectionManager = new SectionManager();\r\n\r\n // Create sections\r\n this.mapSection = new MapSection();\r\n this.statusSection = new StatusSection();\r\n this.actionsSection = new ActionsSection();\r\n this.eventsSection = new EventsSection();\r\n\r\n // Register sections\r\n this.sectionManager.register(this.mapSection);\r\n this.sectionManager.register(this.statusSection);\r\n this.sectionManager.register(this.actionsSection);\r\n this.sectionManager.register(this.eventsSection);\r\n\r\n // Set up navigation layout\r\n // +-------+--------+\r\n // | map | actions|\r\n // +-------+ |\r\n // | status| |\r\n // +-------+--------+\r\n // | events |\r\n // +----------------+\r\n const layout = createGridLayout([\r\n ['map', 'actions'],\r\n ['status', 'actions'],\r\n ['events', 'events'],\r\n ]);\r\n this.sectionManager.setLayout(layout);\r\n this.sectionManager.setDefaultFocus('actions');\r\n\r\n // Set up callbacks\r\n this.setupCallbacks();\r\n }\r\n\r\n /**\r\n * Set up section callbacks\r\n */\r\n private setupCallbacks(): void {\r\n // Map travel callback\r\n this.mapSection.setOnTravel((roomIndex) => {\r\n if (!this.state.gameState) return;\r\n const connections = this.state.gameState.currentRoom.connections;\r\n if (roomIndex < connections.length) {\r\n const roomId = connections[roomIndex];\r\n this.navigate({ type: 'travel', targetRoomId: roomId });\r\n }\r\n });\r\n\r\n // Actions NPC select callback\r\n this.actionsSection.setOnNpcSelect((npcIndex) => {\r\n if (npcIndex < this.state.npcs.length) {\r\n this.navigate({ type: 'dialog', npcId: this.state.npcs[npcIndex].id });\r\n }\r\n });\r\n\r\n // Actions modal callback\r\n this.actionsSection.setOnOpenModal((modal) => {\r\n switch (modal) {\r\n case 'inventory':\r\n this.navigate({ type: 'inventory' });\r\n break;\r\n case 'character':\r\n this.navigate({ type: 'character' });\r\n break;\r\n case 'quests':\r\n this.navigate({ type: 'quests' });\r\n break;\r\n case 'workshop':\r\n this.navigate({ type: 'workshop' });\r\n break;\r\n }\r\n });\r\n }\r\n\r\n async onEnter(params?: { gameState: GameState; npcs: ExtendedNPC[]; quests: Quest[] }): Promise<void> {\r\n await super.onEnter();\r\n if (params) {\r\n this.updateState(params.gameState, params.npcs, params.quests);\r\n }\r\n this.sectionManager.focusDefault();\r\n this.startRefresh();\r\n }\r\n\r\n async onLeave(): Promise<void> {\r\n this.stopRefresh();\r\n await super.onLeave();\r\n }\r\n\r\n private startRefresh(): void {\r\n this.stopRefresh();\r\n this.refreshInterval = setInterval(() => {\r\n if (this.isActive) {\r\n this.render();\r\n }\r\n }, 200); // 5 FPS for clock updates\r\n }\r\n\r\n private stopRefresh(): void {\r\n if (this.refreshInterval) {\r\n clearInterval(this.refreshInterval);\r\n this.refreshInterval = null;\r\n }\r\n }\r\n\r\n /**\r\n * Update game state\r\n */\r\n updateState(gameState: GameState, npcs: ExtendedNPC[] = [], quests: Quest[] = []): void {\r\n this.state.gameState = gameState;\r\n this.state.npcs = npcs;\r\n this.state.quests = quests;\r\n\r\n // Update sections with new data\r\n this.mapSection.update(gameState);\r\n this.statusSection.update({\r\n state: gameState,\r\n npcs: npcs,\r\n quests: quests,\r\n });\r\n this.actionsSection.update({\r\n npcs: npcs,\r\n quests: quests,\r\n });\r\n }\r\n\r\n /**\r\n * Add event to log\r\n */\r\n addEvent(message: string): void {\r\n this.eventsSection.addEvent(message);\r\n }\r\n\r\n /**\r\n * Calculate section bounds based on screen size\r\n */\r\n private calculateSectionBounds(): Map<string, Rect> {\r\n const boundsMap = new Map<string, Rect>();\r\n\r\n const px = this.padding;\r\n const py = this.padding + 3; // After header\r\n const contentWidth = this.width - this.padding * 2;\r\n const contentHeight = this.height - this.padding * 2 - 4; // Header + hint bar\r\n\r\n // Calculate dimensions\r\n const eventsHeight = Math.min(8, Math.floor(contentHeight * 0.25));\r\n const mainAreaHeight = contentHeight - eventsHeight;\r\n const menuWidth = Math.min(30, Math.floor(contentWidth * 0.32));\r\n const leftWidth = contentWidth - menuWidth - 1;\r\n const mapHeight = Math.min(10, Math.floor(mainAreaHeight * 0.55));\r\n const statusHeight = mainAreaHeight - mapHeight;\r\n\r\n // Map section (top-left)\r\n boundsMap.set('map', {\r\n x: px,\r\n y: py,\r\n width: leftWidth,\r\n height: mapHeight,\r\n });\r\n\r\n // Status section (bottom-left)\r\n boundsMap.set('status', {\r\n x: px,\r\n y: py + mapHeight,\r\n width: leftWidth,\r\n height: statusHeight,\r\n });\r\n\r\n // Actions section (right side)\r\n boundsMap.set('actions', {\r\n x: px + leftWidth,\r\n y: py,\r\n width: menuWidth + 1,\r\n height: mainAreaHeight,\r\n });\r\n\r\n // Events section (bottom, full width)\r\n boundsMap.set('events', {\r\n x: px,\r\n y: py + mainAreaHeight,\r\n width: contentWidth,\r\n height: eventsHeight,\r\n });\r\n\r\n return boundsMap;\r\n }\r\n\r\n render(): void {\r\n if (!this.state.gameState) return;\r\n\r\n this.clear();\r\n\r\n // Render header\r\n this.renderHeader();\r\n\r\n // Calculate and render sections\r\n const boundsMap = this.calculateSectionBounds();\r\n\r\n for (const section of this.sectionManager.getAll()) {\r\n const bounds = boundsMap.get(section.id);\r\n if (bounds) {\r\n section.bounds = bounds;\r\n const ctx: RenderContext = { screen: this.screen, bounds };\r\n section.render(ctx);\r\n }\r\n }\r\n\r\n // Render hint bar at bottom\r\n this.renderHintBar();\r\n\r\n this.flush();\r\n }\r\n\r\n private renderHeader(): void {\r\n if (!this.state.gameState) return;\r\n\r\n const state = this.state.gameState;\r\n this.drawBox(0, 0, this.width, 3, '', true);\r\n\r\n // Title\r\n this.write(2, 1, 'IDLERPG.TERMINAL', ANSI.fg.cyan, undefined, ANSI.bold);\r\n\r\n // Player info\r\n const player = state.player;\r\n this.write(25, 1, `Lv.${player.stats.level} ${player.name}`, ANSI.fg.yellow);\r\n\r\n // HP bar\r\n const hpPct = player.stats.hp / player.stats.maxHp;\r\n const hpBars = Math.floor(hpPct * 10);\r\n const hpBar = '\\u2588'.repeat(hpBars) + '\\u2591'.repeat(10 - hpBars);\r\n this.write(45, 1, 'HP:', ANSI.fg.white);\r\n this.write(49, 1, hpBar, hpPct > 0.5 ? ANSI.fg.green : hpPct > 0.25 ? ANSI.fg.yellow : ANSI.fg.red);\r\n this.write(60, 1, `${player.stats.hp}/${player.stats.maxHp}`, ANSI.fg.white);\r\n\r\n // Clock\r\n const time = new Date().toLocaleTimeString('en-US', { hour12: false });\r\n this.write(this.width - time.length - 2, 1, time, ANSI.fg.gray);\r\n }\r\n\r\n private renderHintBar(): void {\r\n const isAnyEntered = this.sectionManager.isAnyEntered();\r\n let hints: string;\r\n\r\n if (isAnyEntered) {\r\n const sectionHint = this.sectionManager.getCurrentHint();\r\n hints = sectionHint || 'Up/Down: navigate Enter: select Esc: exit';\r\n } else {\r\n hints = 'Arrows: focus Enter: enter | 1-9: Travel I C Q W [M]enu';\r\n }\r\n\r\n this.write(1, this.height - 1, hints.slice(0, this.width - 2), ANSI.fg.gray);\r\n }\r\n\r\n async handleKey(key: KeyEvent): Promise<boolean> {\r\n // Global shortcuts (work regardless of section state)\r\n if (await this.handleGlobalShortcut(key)) {\r\n this.render();\r\n return true;\r\n }\r\n\r\n // Delegate to section manager\r\n if (this.sectionManager.handleKey(key)) {\r\n this.render();\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private async handleGlobalShortcut(key: KeyEvent): Promise<boolean> {\r\n if (!key.raw) return false;\r\n\r\n // Number shortcuts for travel (always available)\r\n if (/^[1-9]$/.test(key.raw) && this.state.gameState) {\r\n const index = parseInt(key.raw) - 1;\r\n const connections = this.state.gameState.currentRoom.connections;\r\n if (index < connections.length) {\r\n this.navigate({ type: 'travel', targetRoomId: connections[index] });\r\n return true;\r\n }\r\n }\r\n\r\n // Modal shortcuts - ALWAYS available on main screen, regardless of section state\r\n const modalShortcuts: Record<string, () => void> = {\r\n 'i': () => this.navigate({ type: 'inventory' }),\r\n 'c': () => this.navigate({ type: 'character' }),\r\n 'q': () => this.navigate({ type: 'quests' }),\r\n 'w': () => this.navigate({ type: 'workshop' }),\r\n 'm': () => this.navigate({ type: 'help' }), // Menu -> help for now\r\n };\r\n\r\n const modalAction = modalShortcuts[key.raw.toLowerCase()];\r\n if (modalAction) {\r\n modalAction();\r\n return true;\r\n }\r\n\r\n // Other shortcuts (only when not entered in section)\r\n const isEntered = this.sectionManager.isAnyEntered();\r\n if (!isEntered) {\r\n const otherShortcuts: Record<string, () => void> = {\r\n 'h': () => this.navigate({ type: 'help' }),\r\n 'n': () => {\r\n if (this.state.npcs.length > 0) {\r\n this.navigate({ type: 'dialog', npcId: this.state.npcs[0].id });\r\n }\r\n },\r\n };\r\n\r\n const action = otherShortcuts[key.raw.toLowerCase()];\r\n if (action) {\r\n action();\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n"],"names":[],"mappings":"AAAA;;;GAGG;;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAM3C,oCAAoC;AACpC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AASpE,MAAM,OAAO,aAAc,SAAQ,UAAU;IACnC,KAAK,GAAuB;QAClC,SAAS,EAAE,IAAI;QACf,IAAI,EAAE,EAAE;QACR,MAAM,EAAE,EAAE;KACX,CAAC;IAEF,qBAAqB;IACb,cAAc,CAAiB;IAC/B,UAAU,CAAa;IACvB,aAAa,CAAgB;IAC7B,cAAc,CAAiB;IAC/B,aAAa,CAAgB;IAE7B,eAAe,GAA0B,IAAI,CAAC;IAC9C,OAAO,GAAW,CAAC,CAAC;IAE5B;QACE,KAAK,EAAE,CAAC;QAER,yBAAyB;QACzB,IAAI,CAA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AAC,CAAC;YACrD,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,EAAE,CAAC;gBACT,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF","debug_id":"e18acd1a-9686-5694-8f86-471950f7df75"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Help Screen - Game instructions and keybindings
|
|
3
|
+
*/
|
|
4
|
+
import { BaseScreen } from './BaseScreen.js';
|
|
5
|
+
import type { KeyEvent } from '../../tui/Input.js';
|
|
6
|
+
export declare class HelpScreen extends BaseScreen {
|
|
7
|
+
private scrollOffset;
|
|
8
|
+
onEnter(): Promise<void>;
|
|
9
|
+
render(): void;
|
|
10
|
+
handleKey(key: KeyEvent): Promise<boolean>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=HelpScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpScreen.d.ts","sourceRoot":"/","sources":["app/screens/HelpScreen.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAyDnD,qBAAa,UAAW,SAAQ,UAAU;IACxC,OAAO,CAAC,YAAY,CAAa;IAE3B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAK9B,MAAM,IAAI,IAAI;IAsER,SAAS,CAAC,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;CAwCjD"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Help Screen - Game instructions and keybindings
|
|
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]="df784fd7-be13-5233-9e46-5282b04b50d1")}catch(e){}}();
|
|
6
|
+
import { BaseScreen } from './BaseScreen.js';
|
|
7
|
+
import { ANSI } from '../../tui/Screen.js';
|
|
8
|
+
const HELP_SECTIONS = [
|
|
9
|
+
{
|
|
10
|
+
title: 'Navigation',
|
|
11
|
+
items: [
|
|
12
|
+
{ key: '↑/↓ or j/k', description: 'Move selection up/down' },
|
|
13
|
+
{ key: '←/→ or h/l', description: 'Switch tabs / navigate' },
|
|
14
|
+
{ key: 'Enter', description: 'Confirm selection' },
|
|
15
|
+
{ key: 'Esc', description: 'Go back / Cancel' },
|
|
16
|
+
{ key: '1-9', description: 'Quick travel to destination' },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: 'Quick Actions',
|
|
21
|
+
items: [
|
|
22
|
+
{ key: 'I', description: 'Open Inventory' },
|
|
23
|
+
{ key: 'C', description: 'Character Status' },
|
|
24
|
+
{ key: 'Q', description: 'Quest Log' },
|
|
25
|
+
{ key: 'W', description: 'Affix Workshop' },
|
|
26
|
+
{ key: 'N', description: 'Talk to NPC' },
|
|
27
|
+
{ key: 'H', description: 'This Help Screen' },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
title: 'Combat',
|
|
32
|
+
items: [
|
|
33
|
+
{ key: '1', description: 'Aggressive strategy' },
|
|
34
|
+
{ key: '2', description: 'Defensive strategy' },
|
|
35
|
+
{ key: '3', description: 'Balanced strategy' },
|
|
36
|
+
{ key: '4', description: 'Skill focus strategy' },
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
title: 'Dialog',
|
|
41
|
+
items: [
|
|
42
|
+
{ key: 'T', description: 'Free text input mode' },
|
|
43
|
+
{ key: '1-5', description: 'Select dialog option' },
|
|
44
|
+
{ key: 'Esc', description: 'End conversation' },
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: 'System',
|
|
49
|
+
items: [
|
|
50
|
+
{ key: 'Ctrl+S', description: 'Save Game' },
|
|
51
|
+
{ key: 'Ctrl+L', description: 'Load Game' },
|
|
52
|
+
{ key: 'Ctrl+C', description: 'Exit Game' },
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
export class HelpScreen extends BaseScreen {
|
|
57
|
+
scrollOffset = 0;
|
|
58
|
+
async onEnter() {
|
|
59
|
+
await super.onEnter();
|
|
60
|
+
this.scrollOffset = 0;
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
this.clear();
|
|
64
|
+
// Header
|
|
65
|
+
this.drawBox(0, 0, this.width, 3, '', true);
|
|
66
|
+
this.write(2, 1, 'HELP', ANSI.fg.cyan, undefined, ANSI.bold);
|
|
67
|
+
this.write(this.width - 20, 1, 'Esc to close', ANSI.fg.gray);
|
|
68
|
+
// Content area
|
|
69
|
+
const contentY = 3;
|
|
70
|
+
const contentHeight = this.height - 5;
|
|
71
|
+
this.drawBox(1, contentY, this.width - 2, contentHeight, 'Controls & Keys');
|
|
72
|
+
let lineY = contentY + 1;
|
|
73
|
+
const maxVisible = contentHeight - 2;
|
|
74
|
+
let totalLines = 0;
|
|
75
|
+
// Calculate total lines
|
|
76
|
+
for (const section of HELP_SECTIONS) {
|
|
77
|
+
totalLines += 2; // title + space
|
|
78
|
+
totalLines += section.items.length;
|
|
79
|
+
}
|
|
80
|
+
// Render sections
|
|
81
|
+
let currentLine = 0;
|
|
82
|
+
for (const section of HELP_SECTIONS) {
|
|
83
|
+
// Section title
|
|
84
|
+
if (currentLine >= this.scrollOffset && lineY < contentY + maxVisible) {
|
|
85
|
+
this.write(3, lineY, section.title, ANSI.fg.yellow, undefined, ANSI.bold);
|
|
86
|
+
lineY++;
|
|
87
|
+
}
|
|
88
|
+
currentLine++;
|
|
89
|
+
// Items
|
|
90
|
+
for (const item of section.items) {
|
|
91
|
+
if (currentLine >= this.scrollOffset && lineY < contentY + maxVisible) {
|
|
92
|
+
const keyWidth = 15;
|
|
93
|
+
const key = item.key.padEnd(keyWidth);
|
|
94
|
+
this.write(5, lineY, key, ANSI.fg.cyan);
|
|
95
|
+
this.write(5 + keyWidth, lineY, item.description, ANSI.fg.white);
|
|
96
|
+
lineY++;
|
|
97
|
+
}
|
|
98
|
+
currentLine++;
|
|
99
|
+
}
|
|
100
|
+
// Space between sections
|
|
101
|
+
if (currentLine >= this.scrollOffset && lineY < contentY + maxVisible) {
|
|
102
|
+
lineY++;
|
|
103
|
+
}
|
|
104
|
+
currentLine++;
|
|
105
|
+
}
|
|
106
|
+
// Scroll indicator
|
|
107
|
+
if (totalLines > maxVisible) {
|
|
108
|
+
const pct = this.scrollOffset / Math.max(1, totalLines - maxVisible);
|
|
109
|
+
this.write(this.width - 4, contentY + 1, '▲', this.scrollOffset > 0 ? ANSI.fg.white : ANSI.fg.gray);
|
|
110
|
+
this.write(this.width - 4, contentY + maxVisible - 1, '▼', this.scrollOffset < totalLines - maxVisible ? ANSI.fg.white : ANSI.fg.gray);
|
|
111
|
+
}
|
|
112
|
+
// Footer
|
|
113
|
+
this.write(3, this.height - 2, '↑↓ Scroll Esc Close', ANSI.fg.gray);
|
|
114
|
+
// Game info
|
|
115
|
+
const version = 'IDLERPG.TERMINAL v0.1.0';
|
|
116
|
+
this.write(this.width - version.length - 3, this.height - 2, version, ANSI.fg.gray);
|
|
117
|
+
this.flush();
|
|
118
|
+
}
|
|
119
|
+
async handleKey(key) {
|
|
120
|
+
switch (key.name) {
|
|
121
|
+
case 'up':
|
|
122
|
+
case 'k':
|
|
123
|
+
if (this.scrollOffset > 0) {
|
|
124
|
+
this.scrollOffset--;
|
|
125
|
+
this.render();
|
|
126
|
+
}
|
|
127
|
+
return true;
|
|
128
|
+
case 'down':
|
|
129
|
+
case 'j':
|
|
130
|
+
this.scrollOffset++;
|
|
131
|
+
this.render();
|
|
132
|
+
return true;
|
|
133
|
+
case 'pageup':
|
|
134
|
+
this.scrollOffset = Math.max(0, this.scrollOffset - 10);
|
|
135
|
+
this.render();
|
|
136
|
+
return true;
|
|
137
|
+
case 'pagedown':
|
|
138
|
+
this.scrollOffset += 10;
|
|
139
|
+
this.render();
|
|
140
|
+
return true;
|
|
141
|
+
case 'home':
|
|
142
|
+
this.scrollOffset = 0;
|
|
143
|
+
this.render();
|
|
144
|
+
return true;
|
|
145
|
+
case 'escape':
|
|
146
|
+
case 'h':
|
|
147
|
+
case 'return':
|
|
148
|
+
this.goBack();
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=HelpScreen.js.map
|
|
155
|
+
//# debugId=df784fd7-be13-5233-9e46-5282b04b50d1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpScreen.js","sources":["app/screens/HelpScreen.ts"],"sourceRoot":"/","sourcesContent":["/**\r\n * Help Screen - Game instructions and keybindings\r\n */\r\n\r\nimport { BaseScreen } from './BaseScreen.js';\r\nimport { ANSI } from '../../tui/Screen.js';\r\nimport type { KeyEvent } from '../../tui/Input.js';\r\nimport { getKeybindManager, KeybindManager } from '../Keybind.js';\r\n\r\ninterface HelpSection {\r\n title: string;\r\n items: { key: string; description: string }[];\r\n}\r\n\r\nconst HELP_SECTIONS: HelpSection[] = [\r\n {\r\n title: 'Navigation',\r\n items: [\r\n { key: '↑/↓ or j/k', description: 'Move selection up/down' },\r\n { key: '←/→ or h/l', description: 'Switch tabs / navigate' },\r\n { key: 'Enter', description: 'Confirm selection' },\r\n { key: 'Esc', description: 'Go back / Cancel' },\r\n { key: '1-9', description: 'Quick travel to destination' },\r\n ],\r\n },\r\n {\r\n title: 'Quick Actions',\r\n items: [\r\n { key: 'I', description: 'Open Inventory' },\r\n { key: 'C', description: 'Character Status' },\r\n { key: 'Q', description: 'Quest Log' },\r\n { key: 'W', description: 'Affix Workshop' },\r\n { key: 'N', description: 'Talk to NPC' },\r\n { key: 'H', description: 'This Help Screen' },\r\n ],\r\n },\r\n {\r\n title: 'Combat',\r\n items: [\r\n { key: '1', description: 'Aggressive strategy' },\r\n { key: '2', description: 'Defensive strategy' },\r\n { key: '3', description: 'Balanced strategy' },\r\n { key: '4', description: 'Skill focus strategy' },\r\n ],\r\n },\r\n {\r\n title: 'Dialog',\r\n items: [\r\n { key: 'T', description: 'Free text input mode' },\r\n { key: '1-5', description: 'Select dialog option' },\r\n { key: 'Esc', description: 'End conversation' },\r\n ],\r\n },\r\n {\r\n title: 'System',\r\n items: [\r\n { key: 'Ctrl+S', description: 'Save Game' },\r\n { key: 'Ctrl+L', description: 'Load Game' },\r\n { key: 'Ctrl+C', description: 'Exit Game' },\r\n ],\r\n },\r\n];\r\n\r\nexport class HelpScreen extends BaseScreen {\r\n private scrollOffset: number = 0;\r\n\r\n async onEnter(): Promise<void> {\r\n await super.onEnter();\r\n this.scrollOffset = 0;\r\n }\r\n\r\n render(): void {\r\n this.clear();\r\n\r\n // Header\r\n this.drawBox(0, 0, this.width, 3, '', true);\r\n this.write(2, 1, 'HELP', ANSI.fg.cyan, undefined, ANSI.bold);\r\n this.write(this.width - 20, 1, 'Esc to close', ANSI.fg.gray);\r\n\r\n // Content area\r\n const contentY = 3;\r\n const contentHeight = this.height - 5;\r\n this.drawBox(1, contentY, this.width - 2, contentHeight, 'Controls & Keys');\r\n\r\n let lineY = contentY + 1;\r\n const maxVisible = contentHeight - 2;\r\n let totalLines = 0;\r\n\r\n // Calculate total lines\r\n for (const section of HELP_SECTIONS) {\r\n totalLines += 2; // title + space\r\n totalLines += section.items.length;\r\n }\r\n\r\n // Render sections\r\n let currentLine = 0;\r\n for (const section of HELP_SECTIONS) {\r\n // Section title\r\n if (currentLine >= this.scrollOffset && lineY < contentY + maxVisible) {\r\n this.write(3, lineY, section.title, ANSI.fg.yellow, undefined, ANSI.bold);\r\n lineY++;\r\n }\r\n currentLine++;\r\n\r\n // Items\r\n for (const item of section.items) {\r\n if (currentLine >= this.scrollOffset && lineY < contentY + maxVisible) {\r\n const keyWidth = 15;\r\n const key = item.key.padEnd(keyWidth);\r\n this.write(5, lineY, key, ANSI.fg.cyan);\r\n this.write(5 + keyWidth, lineY, item.description, ANSI.fg.white);\r\n lineY++;\r\n }\r\n currentLine++;\r\n }\r\n\r\n // Space between sections\r\n if (currentLine >= this.scrollOffset && lineY < contentY + maxVisible) {\r\n lineY++;\r\n }\r\n currentLine++;\r\n }\r\n\r\n // Scroll indicator\r\n if (totalLines > maxVisible) {\r\n const pct = this.scrollOffset / Math.max(1, totalLines - maxVisible);\r\n this.write(this.width - 4, contentY + 1, '▲', this.scrollOffset > 0 ? ANSI.fg.white : ANSI.fg.gray);\r\n this.write(this.width - 4, contentY + maxVisible - 1, '▼', \r\n this.scrollOffset < totalLines - maxVisible ? ANSI.fg.white : ANSI.fg.gray);\r\n }\r\n\r\n // Footer\r\n this.write(3, this.height - 2, '↑↓ Scroll Esc Close', ANSI.fg.gray);\r\n\r\n // Game info\r\n const version = 'IDLERPG.TERMINAL v0.1.0';\r\n this.write(this.width - version.length - 3, this.height - 2, version, ANSI.fg.gray);\r\n\r\n this.flush();\r\n }\r\n\r\n async handleKey(key: KeyEvent): Promise<boolean> {\r\n switch (key.name) {\r\n case 'up':\r\n case 'k':\r\n if (this.scrollOffset > 0) {\r\n this.scrollOffset--;\r\n this.render();\r\n }\r\n return true;\r\n\r\n case 'down':\r\n case 'j':\r\n this.scrollOffset++;\r\n this.render();\r\n return true;\r\n\r\n case 'pageup':\r\n this.scrollOffset = Math.max(0, this.scrollOffset - 10);\r\n this.render();\r\n return true;\r\n\r\n case 'pagedown':\r\n this.scrollOffset += 10;\r\n this.render();\r\n return true;\r\n\r\n case 'home':\r\n this.scrollOffset = 0;\r\n this.render();\r\n return true;\r\n\r\n case 'escape':\r\n case 'h':\r\n case 'return':\r\n this.goBack();\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n"],"names":[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AAG,CAAC;YACT,KAAK,QAAQ;gBACX,IAAI,CAAC,MAAM,EAAE,CAAC;gBACd,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF","debug_id":"df784fd7-be13-5233-9e46-5282b04b50d1"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inventory Screen - InventoryItem management interface
|
|
3
|
+
*/
|
|
4
|
+
import { BaseScreen } from './BaseScreen.js';
|
|
5
|
+
import type { KeyEvent } from '../../tui/Input.js';
|
|
6
|
+
import type { Player } from '../../core/types.js';
|
|
7
|
+
export declare class InventoryScreen extends BaseScreen {
|
|
8
|
+
private state;
|
|
9
|
+
onEnter(params?: {
|
|
10
|
+
player: Player;
|
|
11
|
+
}): Promise<void>;
|
|
12
|
+
private getFilteredInventoryItems;
|
|
13
|
+
render(): void;
|
|
14
|
+
private renderTabs;
|
|
15
|
+
private renderInventoryItemList;
|
|
16
|
+
private renderDetails;
|
|
17
|
+
private renderEquipment;
|
|
18
|
+
private getInventoryItemIcon;
|
|
19
|
+
private getRarityColor;
|
|
20
|
+
private isEquipped;
|
|
21
|
+
private wrapText;
|
|
22
|
+
handleKey(key: KeyEvent): Promise<boolean>;
|
|
23
|
+
private equipSelected;
|
|
24
|
+
private useOrUnequipSelected;
|
|
25
|
+
private dropSelected;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=InventoryScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InventoryScreen.d.ts","sourceRoot":"/","sources":["app/screens/InventoryScreen.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAgC,MAAM,qBAAqB,CAAC;AAuBhF,qBAAa,eAAgB,SAAQ,UAAU;IAC7C,OAAO,CAAC,KAAK,CAKX;IAEI,OAAO,CAAC,MAAM,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IASzD,OAAO,CAAC,yBAAyB;IAoBjC,MAAM,IAAI,IAAI;IA4Bd,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,uBAAuB;IAyC/B,OAAO,CAAC,aAAa;IA6DrB,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,QAAQ;IAkBV,SAAS,CAAC,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;IAgFhD,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,oBAAoB;IAe5B,OAAO,CAAC,YAAY;CAarB"}
|