OneWayRoute
extends Route
in package
Table of Contents
Properties
- $buyDi : int
- $buyPortRace : int
- $buySectorId : int
- $goodId : int
- $path : Path
- $sellDi : int
- $sellPortRace : int
- $sellSectorId : int
Methods
- __construct() : mixed
- Construct a one-way route for buying a specific trade good at one port and selling it at another.
- containsPort() : bool
- getBuyDi() : int
- getBuyPortRace() : int
- getBuySectorId() : int
- getExpMultiplierSum() : int
- getGoodID() : int
- getGoodName() : string
- getMoneyMultiplierSum() : int
- getOneWayRoutes() : array<int, OneWayRoute>
- Recurse through the Route tree to get an ordered list.
- getOverallExpMultiplier() : float
- getOverallMoneyMultiplier() : float
- getPath() : Path
- getPortSectorIDs() : array<string|int, int>
- Provides a list of sector IDs for all ports in the Route.
- getRouteString() : string
- getSellDi() : int
- getSellPortRace() : int
- getSellSectorId() : int
- getTurnsForRoute() : int
Properties
$buyDi read-only
private
int
$buyDi
$buyPortRace read-only
private
int
$buyPortRace
$buySectorId read-only
private
int
$buySectorId
$goodId read-only
private
int
$goodId
$path read-only
private
Path
$path
$sellDi read-only
private
int
$sellDi
$sellPortRace read-only
private
int
$sellPortRace
$sellSectorId read-only
private
int
$sellSectorId
Methods
__construct()
Construct a one-way route for buying a specific trade good at one port and selling it at another.
public
__construct(int $buySectorId, int $sellSectorId, int $buyPortRace, int $sellPortRace, int $buyDi, int $sellDi, Path $path, int $goodId) : mixed
NOTE: Transactions are from the perspective of the player (not the port).
Parameters
- $buySectorId : int
- $sellSectorId : int
- $buyPortRace : int
- $sellPortRace : int
- $buyDi : int
- $sellDi : int
- $path : Path
- $goodId : int
containsPort()
public
containsPort(int $sectorID) : bool
Parameters
- $sectorID : int
Return values
boolgetBuyDi()
public
getBuyDi() : int
Return values
intgetBuyPortRace()
public
getBuyPortRace() : int
Return values
intgetBuySectorId()
public
getBuySectorId() : int
Return values
intgetExpMultiplierSum()
public
getExpMultiplierSum() : int
Return values
intgetGoodID()
public
getGoodID() : int
Return values
intgetGoodName()
public
getGoodName() : string
Return values
stringgetMoneyMultiplierSum()
public
getMoneyMultiplierSum() : int
Return values
intgetOneWayRoutes()
Recurse through the Route tree to get an ordered list.
public
getOneWayRoutes() : array<int, OneWayRoute>
Return values
array<int, OneWayRoute>getOverallExpMultiplier()
public
getOverallExpMultiplier() : float
Return values
floatgetOverallMoneyMultiplier()
public
getOverallMoneyMultiplier() : float
Return values
floatgetPath()
public
getPath() : Path
Return values
PathgetPortSectorIDs()
Provides a list of sector IDs for all ports in the Route.
public
getPortSectorIDs() : array<string|int, int>
Return values
array<string|int, int>getRouteString()
public
getRouteString() : string
Return values
stringgetSellDi()
public
getSellDi() : int
Return values
intgetSellPortRace()
public
getSellPortRace() : int
Return values
intgetSellSectorId()
public
getSellSectorId() : int
Return values
intgetTurnsForRoute()
public
getTurnsForRoute() : int