How cholopol/cholopol-tetris-inventory-system works
CTIS is a Godot/.NET grid-inventory system. Its main workflow is pointer interaction with item grids, inventory command validation and simulation, then projection of the resulting state into view models and Godot views. The broader product includes irregular-item geometry and hit testing, nested containers, auto-organization, floating-window/context-menu interactions, multi-slot saves, and a built-in data editor. Several links reflect README-described capabilities; sampled source confirms service dispatch/projection and save handling, but not all UI wiring.
Main entry points: InventoryService.cs Inventory Service · InventorySimulation.cs Command Simulation · JsonSaveLoadService.cs JSON Save Service · TetrisGridView.cs Grid View
Components 20
Godot Interaction
- Grid View
addons/ctis/Godot/Views/TetrisGridView.cs - Pointer Session
addons/ctis/Godot/PointerGridSession.cs - Shape Hit Test
addons/ctis/Godot/ShapeHitTest.cs - Floating Windows
CTIS_Demo/demo/_Scripts/FloatingInventoryWindows.cs - Context Menu
CTIS_Demo/demo/_Scripts/ContextMenuWindow.cs - Mobile Settings
addons/ctis/Godot/Services/MobileSettingsManager.cs
Inventory Core
- Inventory Service
addons/ctis/Core/Services/InventoryService.cs - Inventory Commands
addons/ctis/Core/Data/InventoryCommands.cs - Command Simulation
addons/ctis/Core/Logic/InventorySimulation.cs - Placement Logic
addons/ctis/Core/Logic/InventoryLogic.cs - Shape Geometry
addons/ctis/Core/Logic/OccupancyBoard.cs
State and Saves
- Inventory Tree
addons/ctis/Core/Services/InventoryTreeCache.cs - Item Catalog
addons/ctis/Core/Services/CatalogStore.cs - Item VM Registry
addons/ctis/Core/Services/ItemVmRegistry.cs - Grid View Models
addons/ctis/Core/ViewModels/TetrisGridVM.cs - JSON Save Service
addons/ctis/Core/Services/JsonSaveLoadService.cs - Save Slot Store
addons/ctis/Godot/GodotSaveSlotStore.cs
Data Authoring
- Data Editor
addons/ctis/Godot/Editor/CtisDataEditorWindow.cs - Data Loaders
addons/ctis/Godot/Data/ItemCatalogLoader.cs
Other components
- Player
Connections 18
- Player → Grid View: interacts with
- Grid View → Pointer Session: handles pointer
- Pointer Session → Inventory Service: issues commands
- Grid View → Shape Hit Test: tests shapes
- Inventory Service → Command Simulation: applies command
- Command Simulation → Inventory Tree: updates state
- Command Simulation → Item Catalog: checks items
- Command Simulation → Placement Logic: checks placement
- Inventory Service → Item VM Registry: projects items
- Inventory Service → Grid View Models: refreshes grids
- Inventory Service → Inventory Tree: reads state
- Shape Geometry → Placement Logic: supports occupancy
- Context Menu → Floating Windows: opens item panels
- JSON Save Service → Inventory Tree: reads and restores
- JSON Save Service → Item Catalog: checks version
- JSON Save Service → Save Slot Store: reads and writes
- Data Loaders → Item Catalog: loads catalog
- Data Editor → Data Loaders: edits data