- Added OnlineGame info ( game name/pass ) (#32)

- Added IsInGame bool
- Added IsOnline bool :)
- Added IsInCharacterCreation bool
This commit is contained in:
Arto Simonyan
2024-08-16 12:29:50 +03:00
committed by GitHub
parent 52b0de329f
commit a356597630
2 changed files with 79 additions and 33 deletions

View File

@@ -28,21 +28,27 @@ type Data struct {
Corpse Corpse
Monsters Monsters
Corpses Monsters
Game OnlineGame
// First slice represents X and second Y
CollisionGrid [][]bool
PlayerUnit PlayerUnit
NPCs NPCs
Inventory Inventory
Objects Objects
AdjacentLevels []Level
Rooms []Room
OpenMenus OpenMenus
Roster Roster
HoverData HoverData
TerrorZones []area.ID
Quests quest.Quests
KeyBindings KeyBindings
LegacyGraphics bool
CollisionGrid [][]bool
PlayerUnit PlayerUnit
NPCs NPCs
Inventory Inventory
Objects Objects
AdjacentLevels []Level
Rooms []Room
OpenMenus OpenMenus
Roster Roster
HoverData HoverData
TerrorZones []area.ID
Quests quest.Quests
KeyBindings KeyBindings
LegacyGraphics bool
IsOnline bool
IsIngame bool
IsInCharCreationScreen bool
IsInCharSelectionScreen bool
IsInLobby bool
}
type Room struct {
@@ -57,6 +63,11 @@ type HoverData struct {
UnitType int
}
type OnlineGame struct {
LastGameName string
LastGamePassword string
}
func (r Room) GetCenter() Position {
return Position{
X: r.Position.X + r.Width/2,