edreader

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: GPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const FileCargo = "Cargo.json"

FileCargo is the name of the processed Cargo file

Variables

View Source
var Mfd = mfd.Display{
	Pages: []mfd.Page{
		mfd.Page{
			Lines: []string{commanderHeader},
		},
		mfd.Page{
			Lines: []string{"Cargo: "},
		},
		mfd.Page{
			Lines: []string{locationHeader},
		},
	},
}

Mfd is the MFD display structure that will be used by this module. The number of pages should not be changed

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 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 Journalstate

type Journalstate struct {
	Commander string
	Credits   int64
	Ship      string

	Location

	Rank
	Reputation
}

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 {
	Docked      bool
	Supercruise bool

	StationName       string
	StationType       string
	StationAllegiance string

	StarSystem       string
	SystemSecurity   string
	SystemAllegiance string
	SystemFaction    string
	Body             string
	BodyType         string

	Latitude       float64
	Longitude      float64
	HasCoordinates bool
}

Location indicates the players current location in the game

type Rank

type Rank struct {
	Combat, Trade, Explore, Empire, Federation, CQC string
}

Rank encapsulates the player's rank

type Reputation

type Reputation struct {
	Empire, Federation, Alliance float64
}

Reputation indicates the player's reputation with the different factions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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