edreader

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2021 License: GPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const DisplayPages = 3
View Source
const FileCargo = "Cargo.json"

FileCargo is the name of the processed Cargo file

Variables

View Source
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

View Source
var MfdLock = sync.RWMutex{}

MfdLock locks the current MFD for reads and writes

View Source
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

func Start

func Start(cfg conf.Conf)

Start starts the Elite Dangerous journal reader routine

func Stop

func Stop()

Stop closes the watcher again

Types

type Cargo

type Cargo struct {
	Count     int
	Inventory []CargoLine
}

Cargo struct to load the cargo file saved by ED

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

type EDSMTarget struct {
	Name          string
	SystemAddress int64
}

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
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL