entities

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateDistanceBetweenWaypoints

func CalculateDistanceBetweenWaypoints(x1, y1, x2, y2 int) float64

Calculate the distance between two waypoints

Types

type Agent

type Agent struct {
	models.Agent
	// contains filtered or unexported fields
}

func GetAgent

func GetAgent(c *client.Client) (*Agent, error)

func GetPublicAgent

func GetPublicAgent(c *client.Client, symbol string) (*Agent, error)

func ListPublicAgents

func ListPublicAgents(c *client.Client) ([]*Agent, error)

type Contract

type Contract struct {
	models.Contract
	// contains filtered or unexported fields
}

func GetContract

func GetContract(c *client.Client, symbol string) (*Contract, error)

func ListContracts

func ListContracts(c *client.Client) ([]*Contract, error)

func (*Contract) Accept

func (c *Contract) Accept() (*Agent, *Contract, error)

func (*Contract) DeliverCargo

func (c *Contract) DeliverCargo(shop *Ship, tradeGood models.GoodSymbol, units int) (*Contract, *models.Cargo, error)

func (*Contract) Fulfill

func (c *Contract) Fulfill() (*models.Agent, *models.Contract, error)

type Faction

type Faction struct {
	models.Faction
	// contains filtered or unexported fields
}

func GetFaction

func GetFaction(c *client.Client, symbol string) (*Faction, error)

func ListFactions

func ListFactions(c *client.Client) ([]*Faction, error)

type Item

type Item struct {
	// contains filtered or unexported fields
}

Item represents an item in the priority queue

type PriorityQueue

type PriorityQueue []*Item

PriorityQueue represents a priority queue of items

func (PriorityQueue) Len

func (pq PriorityQueue) Len() int

func (PriorityQueue) Less

func (pq PriorityQueue) Less(i, j int) bool

func (*PriorityQueue) Pop

func (pq *PriorityQueue) Pop() interface{}

func (*PriorityQueue) Push

func (pq *PriorityQueue) Push(x interface{})

func (PriorityQueue) Swap

func (pq PriorityQueue) Swap(i, j int)

type Ship

type Ship struct {
	models.Ship

	Graph models.Graph
	// contains filtered or unexported fields
}

func GetShip

func GetShip(c *client.Client, symbol string) (*Ship, error)

func ListShips

func ListShips(c *client.Client) ([]*Ship, error)

func PurchaseShip

func PurchaseShip(c *client.Client, shipType string, waypoint string) (*models.Agent, *Ship, *models.Transaction, error)

func (*Ship) CalculateFuelRequired

func (s *Ship) CalculateFuelRequired(distance float64, flightMode models.FlightMode) int

func (*Ship) CalculateTravelTime

func (s *Ship) CalculateTravelTime(distance float64, flightMode models.FlightMode) int

func (*Ship) Chart

func (s *Ship) Chart() (*models.Chart, *models.Waypoint, error)

func (*Ship) Dock

func (s *Ship) Dock() (*models.ShipNav, error)

func (*Ship) Extract

func (s *Ship) Extract() (*models.Extraction, error)

func (*Ship) ExtractWithSurvey

func (s *Ship) ExtractWithSurvey(survey models.Survey) (*models.Extraction, error)

func (*Ship) FetchCargo

func (s *Ship) FetchCargo() (*models.Cargo, error)

func (*Ship) FetchCooldown

func (s *Ship) FetchCooldown() (*models.ShipCooldown, error)

func (*Ship) FetchNavigationStatus

func (s *Ship) FetchNavigationStatus() (*models.ShipNav, error)

func (*Ship) GetMounts

func (*Ship) GetRepairPrice

func (s *Ship) GetRepairPrice() (*models.Transaction, error)

func (*Ship) GetRouteToDestination

func (s *Ship) GetRouteToDestination(destination string) (*models.PathfindingRoute, error)

func (*Ship) GetScrapPrice

func (s *Ship) GetScrapPrice() (*models.Transaction, error)

func (*Ship) InstallMount

func (s *Ship) InstallMount(mountSymbol models.MountSymbol) (*models.Agent, []models.ShipMount, *models.Cargo, *models.Transaction, error)

func (*Ship) Jettison

func (s *Ship) Jettison(goodSymbol models.GoodSymbol, units int) (*models.Cargo, error)

func (*Ship) Jump

func (s *Ship) Jump(systemSymbol string) (*models.ShipNav, *models.ShipCooldown, *models.Transaction, *models.Agent, error)

func (*Ship) Navigate

func (s *Ship) Navigate(waypointSymbol string) (*models.FuelDetails, *models.ShipNav, []models.Event, error)

func (*Ship) NegotiateContract

func (s *Ship) NegotiateContract() (*models.Contract, error)

func (*Ship) Orbit

func (s *Ship) Orbit() (*models.ShipNav, error)

func (*Ship) PurchaseCargo

func (s *Ship) PurchaseCargo(goodSymbol models.GoodSymbol, units int) (*models.Agent, *models.Cargo, *models.Transaction, error)

func (*Ship) Refine

func (s *Ship) Refine(produce string) (*models.Produced, *models.Consumed, error)

func (*Ship) Refuel

func (s *Ship) Refuel(amount int, fromCargo bool) (*models.Agent, *models.FuelDetails, *models.Transaction, error)

func (*Ship) RemoveMount

func (s *Ship) RemoveMount(mountSymbol models.MountSymbol) (*models.Agent, []models.ShipMount, *models.Cargo, *models.Transaction, error)

func (*Ship) RepairShip

func (s *Ship) RepairShip() (*models.Ship, *models.Transaction, error)

func (*Ship) ScanSystems

func (s *Ship) ScanSystems() (*models.ShipCooldown, []models.System, error)

func (*Ship) ScanWaypoints

func (s *Ship) ScanWaypoints() (*models.ShipCooldown, []models.Waypoint, error)

func (*Ship) ScrapShip

func (s *Ship) ScrapShip() (*models.Transaction, error)

func (*Ship) SellCargo

func (s *Ship) SellCargo(goodSymbol models.GoodSymbol, units int) (*models.Agent, *models.Cargo, *models.Transaction, error)

func (*Ship) SetFlightMode

func (s *Ship) SetFlightMode(flightmode models.FlightMode) error

func (*Ship) Siphon

func (s *Ship) Siphon() (*models.Extraction, error)

func (*Ship) Survey

func (s *Ship) Survey() ([]models.Survey, error)

func (*Ship) TransferCargo

func (s *Ship) TransferCargo(goodSymbol models.GoodSymbol, units int, shipSymbol string) (*models.Cargo, error)

func (*Ship) Warp

func (s *Ship) Warp(waypointSymbol string) (*models.FuelDetails, *models.ShipNav, error)

type System

type System struct {
	models.System
	// contains filtered or unexported fields
}

func GetSystem

func GetSystem(c *client.Client, symbol string) (*System, error)

func ListSystems

func ListSystems(c *client.Client) ([]*System, error)

func (*System) FetchWaypoint

func (s *System) FetchWaypoint(symbol string) (*models.Waypoint, error)

func (*System) GetConstructionSite

func (s *System) GetConstructionSite(waypointSymbol string) (*models.ConstructionSite, error)

func (*System) GetJumpGate

func (s *System) GetJumpGate(waypointSymbol string) (*models.JumpGate, error)

func (*System) GetMarket

func (s *System) GetMarket(waypointSymbol string) (*models.Market, error)

func (*System) GetShipyard

func (s *System) GetShipyard(waypointSymbol string) (*models.Shipyard, error)

func (*System) GetWaypointsWithTrait

func (s *System) GetWaypointsWithTrait(trait string, waypointType string) ([]*models.Waypoint, error)

func (*System) ListWaypoints

func (s *System) ListWaypoints(trait models.WaypointTrait, waypointType models.WaypointType) ([]*models.Waypoint, *models.Meta, error)

func (*System) SupplyConstructionSite

func (s *System) SupplyConstructionSite(shipSymbol string, waypointSymbol string, good models.GoodSymbol, quantity int) error

Jump to

Keyboard shortcuts

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