Documentation
¶
Index ¶
- Constants
- type App
- type ChunkExplorerModel
- func (m *ChunkExplorerModel) GetHarvestMsg() string
- func (m *ChunkExplorerModel) HarvestNode(msg tea.Msg) tea.Cmd
- func (m ChunkExplorerModel) Init() tea.Cmd
- func (m *ChunkExplorerModel) Reset()
- func (m *ChunkExplorerModel) SetSize(width, height int)
- func (m ChunkExplorerModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m ChunkExplorerModel) View() string
- type DatabaseModel
- type MenuChoice
- type MenuModel
- type NodeGeneratorModel
- type OverviewModel
- type SessionMonitorModel
- type SwitchViewMsg
- type ViewType
Constants ¶
const ( KeyHarvest = "H" // Harvest node directly KeyHarvestTick = "enter" // Harvest node directly KeyHarvestTickAlt = " " // Alternative harvest (space) )
Key binding constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the main application model
func NewApp ¶
func NewApp(database *sql.DB, queries *db.Queries, chunkManager *chunk.Manager, playerManager *player.Manager, startView string) *App
NewApp creates a new application instance
type ChunkExplorerModel ¶
type ChunkExplorerModel struct {
// contains filtered or unexported fields
}
ChunkExplorerModel handles the chunk visualization view
func NewChunkExplorerModel ¶
func NewChunkExplorerModel(database *sql.DB, queries *db.Queries, chunkManager *chunk.Manager, playerManager *player.Manager) ChunkExplorerModel
NewChunkExplorerModel creates a new chunk explorer model
func (*ChunkExplorerModel) GetHarvestMsg ¶
func (m *ChunkExplorerModel) GetHarvestMsg() string
GetHarvestMsg returns the current harvest message
func (*ChunkExplorerModel) HarvestNode ¶
func (m *ChunkExplorerModel) HarvestNode(msg tea.Msg) tea.Cmd
HarvestNode directly harvests the node under the cursor using the new API
func (ChunkExplorerModel) Init ¶
func (m ChunkExplorerModel) Init() tea.Cmd
Init initializes the chunk explorer
func (*ChunkExplorerModel) Reset ¶
func (m *ChunkExplorerModel) Reset()
Reset cleans up the harvesting state when leaving the screen
func (*ChunkExplorerModel) SetSize ¶
func (m *ChunkExplorerModel) SetSize(width, height int)
SetSize updates the chunk explorer size
func (ChunkExplorerModel) View ¶
func (m ChunkExplorerModel) View() string
View renders the chunk explorer
type DatabaseModel ¶
type DatabaseModel struct {
// contains filtered or unexported fields
}
DatabaseModel handles the database inspector view
func NewDatabaseModel ¶
func NewDatabaseModel(database *sql.DB, queries *db.Queries) DatabaseModel
NewDatabaseModel creates a new database model
func (DatabaseModel) Init ¶
func (m DatabaseModel) Init() tea.Cmd
Init initializes the database model
func (*DatabaseModel) SetSize ¶
func (m *DatabaseModel) SetSize(width, height int)
SetSize updates the database model size
func (DatabaseModel) View ¶
func (m DatabaseModel) View() string
View renders the database inspector
type MenuChoice ¶
MenuChoice represents a menu option
type MenuModel ¶
type MenuModel struct {
// contains filtered or unexported fields
}
MenuModel handles the main menu view
type NodeGeneratorModel ¶
type NodeGeneratorModel struct {
// contains filtered or unexported fields
}
NodeGeneratorModel handles the node generator view
func NewNodeGeneratorModel ¶
func NewNodeGeneratorModel(database *sql.DB, queries *db.Queries, chunkManager *chunk.Manager) NodeGeneratorModel
NewNodeGeneratorModel creates a new node generator model
func (NodeGeneratorModel) Init ¶
func (m NodeGeneratorModel) Init() tea.Cmd
Init initializes the node generator
func (*NodeGeneratorModel) SetSize ¶
func (m *NodeGeneratorModel) SetSize(width, height int)
SetSize updates the node generator size
func (NodeGeneratorModel) View ¶
func (m NodeGeneratorModel) View() string
View renders the node generator
type OverviewModel ¶
type OverviewModel struct {
// contains filtered or unexported fields
}
OverviewModel handles the system overview view
func NewOverviewModel ¶
func NewOverviewModel(database *sql.DB, queries *db.Queries) OverviewModel
NewOverviewModel creates a new overview model
func (*OverviewModel) SetSize ¶
func (m *OverviewModel) SetSize(width, height int)
SetSize updates the overview size
type SessionMonitorModel ¶
type SessionMonitorModel struct {
// contains filtered or unexported fields
}
SessionMonitorModel handles the session monitoring view
func NewSessionMonitorModel ¶
func NewSessionMonitorModel(database *sql.DB, queries *db.Queries) SessionMonitorModel
NewSessionMonitorModel creates a new session monitor model
func (SessionMonitorModel) Init ¶
func (m SessionMonitorModel) Init() tea.Cmd
Init initializes the session monitor
func (*SessionMonitorModel) SetSize ¶
func (m *SessionMonitorModel) SetSize(width, height int)
SetSize updates the session monitor size
func (SessionMonitorModel) View ¶
func (m SessionMonitorModel) View() string
View renders the session monitor
type SwitchViewMsg ¶
type SwitchViewMsg struct {
View ViewType
}
SwitchViewMsg is a message to switch views
func NewSwitchViewMsg ¶
func NewSwitchViewMsg(view ViewType) SwitchViewMsg
NewSwitchViewMsg creates a new switch view message