Documentation ¶
Index ¶
Constants ¶
const DisplayPages = 3
const FileCargo = "Cargo.json"
FileCargo is the name of the processed Cargo file
Variables ¶
var Mfd = mfd.Display{Pages: make([]mfd.Page, DisplayPages)}
Mfd is the MFD display structure that will be used by this module. The number of pages should not be changed
var MfdLock = sync.RWMutex{}
MfdLock locks the current MFD for reads and writes
var PrevMfd = Mfd.Copy()
PrevMfd is the previous Mfd written to file, to be used for comparisons and avoid superflous updates.
Functions ¶
func RefreshDisplay ¶ added in v1.1.1
func RefreshDisplay()
RefreshDisplay updates the display with the current state
Types ¶
type CargoLine ¶
type CargoLine struct { Name string Count int Stolen int NameLocalized string `json:"Name_Localised"` }
CargoLine struct to load individual items in the cargo
type EDSMTarget ¶ added in v1.1.1
EDSMTarget indicates a system targeted by the FSD drive for a jump
type Journalstate ¶
type Journalstate struct { Location EDSMTarget }
Journalstate encapsulates the player state baed on the journal
func ParseJournalLine ¶
func ParseJournalLine(line []byte) Journalstate
ParseJournalLine parses a single line of the journal and returns the new state after parsing.
type Location ¶
type Location struct { Type LocationType SystemAddress int64 StarSystem string Body string BodyID int64 BodyType string Latitude float64 Longitude float64 }
Location indicates the players current location in the game
type LocationType ¶ added in v1.1.1
type LocationType int
LocationType indicates where in a system the player is
const ( // LocationSystem means the player is somewhere in the system, not close to a body LocationSystem LocationType = iota // LocationPlanet means the player is close to a planetary body LocationPlanet // LocationLanded indicates the player has touched down LocationLanded // LocationDocked indicates the player has docked at a station (or outpost) LocationDocked )