Documentation
¶
Index ¶
- Constants
- Variables
- func GetPurchaseResult(tradeGood TradeGood, codes []string) int
- func GetSaleResult(tradeGood TradeGood, codes []string) int
- func IsValidTradeCode(code string) bool
- type FreightLot
- type FreightTrade
- type Name
- type NoDmError
- type PassengerTrade
- type Planet
- type PriceModifier
- type PriceModifiers
- type Sector
- type SectorList
- type SpeculativeTrade
- type TonsType
- type Trade
- type TradeGood
- func (t *TradeGood) CalculateAvailability(mod int)
- func (t *TradeGood) GetPurchaseDm(code string) (int, error)
- func (t *TradeGood) GetSaleDm(code string) (int, error)
- func (t *TradeGood) IsAvailable(code string) bool
- func (t *TradeGood) IsCommon() bool
- func (t *TradeGood) IsIllegal() bool
- func (t *TradeGood) PurchaseDmsString() string
- func (t *TradeGood) SaleDmsString() string
- func (t *TradeGood) SetPurchasePrice(popSize int, tradeCodes []string, brokerSkill int)
- func (t *TradeGood) SetSalePrice(popSize int, tradeCodes []string, brokerSkill int)
- func (t *TradeGood) String() string
- type TradeGoods
- type Uwp
Constants ¶
View Source
const ( MAJOR_CARGO = "Major" MINOR_CARGO = "Minor" INCIDENTAL_CARGO = "Incidental" MAIL = "Mail" )
View Source
const ( HIGH = "High" MIDDLE = "Middle" BASIC = "Basic" LOW = "Low" )
Variables ¶
View Source
var CodeOffset = map[string]int{}
Functions ¶
func GetPurchaseResult ¶
func GetSaleResult ¶
func IsValidTradeCode ¶
Types ¶
type FreightLot ¶
type FreightLot struct { CargoType string LotCount int Lots []FreightTrade }
func NewFreightLot ¶
func NewFreightLot(cargoType string) *FreightLot
func (*FreightLot) Description ¶
func (f *FreightLot) Description() string
type FreightTrade ¶
func NewFreightTrade ¶
func NewFreightTrade(cargoType, cargo string) *FreightTrade
func (*FreightTrade) Description ¶
func (f *FreightTrade) Description() string
type NoDmError ¶
type NoDmError struct {
// contains filtered or unexported fields
}
func NewNoDmError ¶
type PassengerTrade ¶
func (*PassengerTrade) Description ¶
func (p *PassengerTrade) Description() string
type PriceModifier ¶
type PriceModifier struct { Result int `json:"result"` PurchaseModifier float32 `json:"purchase_mod"` SaleModifier float32 `json:"sale_mod"` }
func GetPriceModifier ¶
func GetPriceModifier(num int) (PriceModifier, error)
type PriceModifiers ¶
type PriceModifiers []PriceModifier
type SectorList ¶
type SectorList []Sector
func NewSectorList ¶
func NewSectorList(data []byte) (SectorList, error)
type SpeculativeTrade ¶
func (*SpeculativeTrade) Description ¶
func (s *SpeculativeTrade) Description() string
type TradeGood ¶
type TradeGood struct { Id string `json:"id"` Type string `json:"type"` Availability []string `json:"availability"` Tons TonsType `json:"tons"` BasePrice int `json:"base_price"` PurchaseDm map[string]int `json:"purchase_dms"` SaleDm map[string]int `json:"sale_dms"` PurchasePrice int `json:"-"` SalePrice int `json:"-"` AvailableTons int `json:"-"` ReasonAdded []string `json:"-"` // contains filtered or unexported fields }
func GetAvailableForCodes ¶
func GetTradeGoodById ¶
func NewTradeGood ¶
func (*TradeGood) CalculateAvailability ¶
func (*TradeGood) IsAvailable ¶
func (*TradeGood) PurchaseDmsString ¶
func (*TradeGood) SaleDmsString ¶
func (*TradeGood) SetPurchasePrice ¶
func (*TradeGood) SetSalePrice ¶
type TradeGoods ¶
type TradeGoods []TradeGood
func GetAllTradeGoods ¶
func GetAllTradeGoods() TradeGoods
func GetTradeGoodsByIds ¶
func GetTradeGoodsByIds(ids []string) TradeGoods
Click to show internal directories.
Click to hide internal directories.