configs_export

package
v0.106.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: AGPL-3.0 Imports: 29 Imported by: 8

Documentation

Index

Constants

View Source
const (
	BaseLootableName     = "Lootable"
	BaseLootableFaction  = "Wrecks and Missions"
	BaseLootableNickname = "base_loots"
)

It fixes issue of Guns obtainable only via wrecks being invisible

Variables

View Source
var LogOgE = math.Log10(math.E)
View Source
var Pi180 = 180 / math.Pi // number turning radians to degrees
View Source
var TypeClassRegex *regexp.Regexp

Functions

func Buyable added in v0.33.0

func Buyable(Bases map[cfgtype.BaseUniNick]*GoodAtBase) bool

func DistanceForVecs added in v0.54.0

func DistanceForVecs(Pos1 *semantic.Vect, Pos2 *semantic.Vect) (float64, error)

func Empty added in v0.33.0

func Empty(phrase string) bool

func EnhanceBasesWithServerOverrides added in v0.85.0

func EnhanceBasesWithServerOverrides(bases []*Base, commodities []*Commodity)

func GetMaxRadius added in v0.54.1

func GetMaxRadius(Size *semantic.Vect) (float64, error)

func GetPricePerVoume added in v0.57.0

func GetPricePerVoume(price int, volume float64) float64

func InitRegexExpression added in v0.24.0

func InitRegexExpression(expression string) *regexp.Regexp

func IsAnyVignetteWithinNPCSpawnRange added in v0.55.0

func IsAnyVignetteWithinNPCSpawnRange(system *systems_mapped.System, npc_spawn_zone *systems_mapped.MissionPatrolZone) bool

func NameWithSpacesOnly added in v0.15.0

func NameWithSpacesOnly(word string) bool

func StrPosToVectorPos added in v0.103.2

func StrPosToVectorPos(value string) *cfgtype.Vector

func VectorToSectorCoord added in v0.70.0

func VectorToSectorCoord(system *universe_mapped.System, pos cfgtype.Vector) string

Types

type Ammo added in v0.49.0

type Ammo struct {
	Name  string
	Price int

	HitPts           int
	Volume           float64
	MunitionLifetime float64

	Nickname     string
	NicknameHash flhash.HashCode
	NameID       int
	InfoID       int
	SeekerType   string
	SeekerRange  int
	SeekerFovDeg int

	Bases map[cfgtype.BaseUniNick]*GoodAtBase

	*DiscoveryTechCompat

	AmmoLimit AmmoLimit
	Mass      float64
}

type AmmoLimit added in v0.80.0

type AmmoLimit struct {
	// Disco stuff
	AmountInCatridge *int
	MaxCatridges     *int
}

type Base

type Base struct {
	Name               string
	Archetypes         []string
	Nickname           cfgtype.BaseUniNick
	NicknameHash       flhash.HashCode
	FactionName        string
	System             string
	SystemNickname     string
	SystemNicknameHash flhash.HashCode
	Region             string
	StridName          int
	InfocardID         int
	Infocard           InfocardKey
	File               utils_types.FilePath
	BGCS_base_run_by   string
	MarketGoodsPerNick map[CommodityKey]MarketGood
	Pos                cfgtype.Vector
	SectorCoord        string

	IsTransportUnreachable bool

	Missions BaseMissions
	BaseAllTradeRoutes
	BaseAllRoutes
	MiningInfo

	Reachable bool
}

func FilterToUserfulBases added in v0.33.0

func FilterToUserfulBases(bases []*Base) []*Base

func FitlerToUsefulOres added in v0.69.0

func FitlerToUsefulOres(bases []*Base) []*Base

type BaseAllRoutes added in v0.78.0

type BaseAllRoutes struct {
	AllRoutes []*ComboRoute
}

type BaseAllTradeRoutes added in v0.78.0

type BaseAllTradeRoutes struct {
	TradeRoutes        []*ComboTradeRoute
	BestTransportRoute *TradeRoute
	BestFrigateRoute   *TradeRoute
	BestFreighterRoute *TradeRoute
}

type BaseInfo added in v0.50.0

type BaseInfo struct {
	BaseName    string
	SystemName  string
	Region      string
	FactionName string
	BasePos     cfgtype.Vector
	SectorCoord string
}

type BaseMissions added in v0.52.0

type BaseMissions struct {
	MinOffers         int
	MaxOffers         int
	Factions          []MissioNFaction
	NpcRanksAtBaseMap map[int]bool
	NpcRanksAtBase    []int

	EnemiesAtBaseMap map[string]EnemyFaction

	MinMoneyAward int
	MaxMoneyAward int
	Vignettes     int
	Err           error
}

type BaseRoute added in v0.78.0

type BaseRoute struct {
	*Route
	FromBase *Base
	ToBase   *Base
}

func NewBaseRoute added in v0.78.0

func NewBaseRoute(g *GraphResults, FromBase *Base, ToBase *Base) *BaseRoute

type Bribe added in v0.70.3

type Bribe struct {
	BaseNickname string
	BaseInfo
	Chance float64
}

type BurstFire added in v0.79.0

type BurstFire struct {
	SustainedRefire float64
	Ammo            int
	ReloadTime      float64

	SustainedHullDamagePerSec      float64
	SustainedAvgShieldDamagePerSec float64
	SustainedEnergyDamagePerSec    float64
	SustainedPowerUsagePerSec      float64
}

type ComboRoute added in v0.78.0

type ComboRoute struct {
	Transport *BaseRoute
	Frigate   *BaseRoute
	Freighter *BaseRoute
}

type ComboTradeRoute added in v0.65.0

type ComboTradeRoute struct {
	Transport *TradeRoute
	Frigate   *TradeRoute
	Freighter *TradeRoute
}

type Commodity added in v0.19.0

type Commodity struct {
	Nickname              string
	NicknameHash          flhash.HashCode
	Name                  string
	Combinable            bool
	Volume                float64
	ShipClass             cfgtype.ShipClass
	NameID                int
	InfocardID            int
	Infocard              InfocardKey
	Bases                 map[cfgtype.BaseUniNick]*GoodAtBase
	PriceBestBaseBuysFor  int
	PriceBestBaseSellsFor int
	ProffitMargin         int
	BaseAllTradeRoutes
	Mass float64
}

type CommodityKey added in v0.88.0

type CommodityKey string

func GetCommodityKey added in v0.88.0

func GetCommodityKey(nickname string, ship_class cfgtype.ShipClass) CommodityKey

type CompatibleIDsForTractor added in v0.58.0

type CompatibleIDsForTractor struct {
	TechCompat float64
	Tractor    Tractor
}

type CounterMeasure added in v0.35.0

type CounterMeasure struct {
	Name  string
	Price int

	HitPts        int
	AIRange       int
	Lifetime      int
	Range         int
	DiversionPctg int

	Lootable     bool
	Nickname     string
	NicknameHash flhash.HashCode
	NameID       int
	InfoID       int

	Bases map[cfgtype.BaseUniNick]*GoodAtBase

	*DiscoveryTechCompat

	AmmoLimit AmmoLimit
	Mass      float64
}

type DamageBonus added in v0.21.0

type DamageBonus struct {
	Type     string
	Modifier float64
}

type DefenseMode added in v0.102.0

type DefenseMode int

func (DefenseMode) ToStr added in v0.102.0

func (d DefenseMode) ToStr() string

type DiffToMoney added in v0.52.0

type DiffToMoney struct {
	MinLevel   float64
	MoneyAward int
}

type DiscoGun added in v0.82.0

type DiscoGun struct {
	ArmorPen float64
}

type DiscoShip added in v0.82.0

type DiscoShip struct {
	ArmorMult float64
}

type DiscoveryIDRephacks added in v0.71.0

type DiscoveryIDRephacks struct {
	Rephacks map[cfgtype.FactionNick]Rephack
}

func (DiscoveryIDRephacks) GetRephacksList added in v0.71.0

func (r DiscoveryIDRephacks) GetRephacksList() []Rephack

type DiscoveryTechCompat added in v0.44.0

type DiscoveryTechCompat struct {
	TechcompatByID map[cfgtype.TractorID]float64
	TechCell       string
}

func CalculateTechCompat added in v0.44.0

func CalculateTechCompat(Discovery *configs_mapped.DiscoveryConfig, ids []Tractor, nickname string) *DiscoveryTechCompat

type EnemyFaction added in v0.55.0

type EnemyFaction struct {
	Faction
	NpcExist bool
}

type Engine added in v0.29.0

type Engine struct {
	Name  string
	Price int

	CruiseSpeed      int
	CruiseChargeTime int
	LinearDrag       int
	MaxForce         int
	ReverseFraction  float64
	ImpulseSpeed     float64

	HpType          string
	HpTypeHash      flhash.HashCode
	FlameEffect     string
	FlameEffectHash flhash.HashCode
	TrailEffect     string
	TrailEffectHash flhash.HashCode

	Nickname     string
	NicknameHash flhash.HashCode
	NameID       int
	InfoID       int

	Bases map[cfgtype.BaseUniNick]*GoodAtBase
	*DiscoveryTechCompat
	Mass float64
}

func (Engine) GetNickname added in v0.92.0

func (g Engine) GetNickname() string

func (Engine) GetTechCompat added in v0.92.0

func (g Engine) GetTechCompat() *DiscoveryTechCompat

type EquipmentSlot added in v0.27.0

type EquipmentSlot struct {
	SlotName     string
	AllowedEquip []string
}

type ExportOptions added in v0.101.0

type ExportOptions struct {
	trades.MappingOptions
}

type Exporter

type Exporter struct {
	Configs *configs_mapped.MappedConfigs
	Hashes  map[string]flhash.HashCode

	Bases            []*Base
	MiningOperations []*Base

	Factions     []Faction
	Infocards    Infocards
	Commodities  []*Commodity
	Guns         []Gun
	Missiles     []Gun
	Mines        []Mine
	Shields      []Shield
	Thrusters    []Thruster
	Ships        []Ship
	Tractors     []Tractor
	TractorsByID map[cfgtype.TractorID]Tractor
	Engines      []Engine
	CMs          []CounterMeasure
	Scanners     []Scanner
	Ammos        []Ammo
	PoBs         []*PoB
	PoBGoods     []*PoBGood
	// contains filtered or unexported fields
}

func Export added in v0.13.0

func Export(configs *configs_mapped.MappedConfigs, options ExportOptions) *Exporter

func NewExporter

func NewExporter(configs *configs_mapped.MappedConfigs, opts ...OptExport) *Exporter

func (*Exporter) AllRoutes added in v0.78.0

func (e *Exporter) AllRoutes(
	bases []*Base,
) []*Base

func (*Exporter) Buyable added in v0.61.2

func (e *Exporter) Buyable(Bases map[cfgtype.BaseUniNick]*GoodAtBase) bool

func (*Exporter) EnhanceBasesWithIsTransportReachable added in v0.87.0

func (e *Exporter) EnhanceBasesWithIsTransportReachable(
	bases []*Base,
	transports_graph *GraphResults,
)

func (*Exporter) EnhanceBasesWithLoot added in v0.95.2

func (e *Exporter) EnhanceBasesWithLoot(bases []*Base) []*Base

func (*Exporter) EnhanceBasesWithPobCrafts added in v0.89.0

func (e *Exporter) EnhanceBasesWithPobCrafts(bases []*Base) []*Base

func (*Exporter) Export added in v0.13.0

func (e *Exporter) Export(options ExportOptions) *Exporter

func (*Exporter) FilterToUsefulAmmo added in v0.61.2

func (e *Exporter) FilterToUsefulAmmo(cms []Ammo) []Ammo

func (*Exporter) FilterToUsefulCommodities added in v0.61.2

func (e *Exporter) FilterToUsefulCommodities(commodities []*Commodity) []*Commodity

func (*Exporter) FilterToUsefulCounterMeasures added in v0.61.2

func (e *Exporter) FilterToUsefulCounterMeasures(cms []CounterMeasure) []CounterMeasure

func (*Exporter) FilterToUsefulEngines added in v0.61.2

func (e *Exporter) FilterToUsefulEngines(engines []Engine) []Engine

func (*Exporter) FilterToUsefulGun added in v0.61.2

func (e *Exporter) FilterToUsefulGun(guns []Gun) []Gun

func (*Exporter) FilterToUsefulMines added in v0.61.2

func (e *Exporter) FilterToUsefulMines(mines []Mine) []Mine

func (*Exporter) FilterToUsefulShields added in v0.61.2

func (e *Exporter) FilterToUsefulShields(shields []Shield) []Shield

func (*Exporter) FilterToUsefulShips added in v0.61.2

func (e *Exporter) FilterToUsefulShips(ships []Ship) []Ship

func (*Exporter) FilterToUsefulThrusters added in v0.61.2

func (e *Exporter) FilterToUsefulThrusters(thrusters []Thruster) []Thruster

func (*Exporter) FilterToUsefulTractors added in v0.61.2

func (e *Exporter) FilterToUsefulTractors(tractors []Tractor) []Tractor

func (*Exporter) FilterToUserfulScanners added in v0.61.2

func (e *Exporter) FilterToUserfulScanners(items []Scanner) []Scanner

func (*Exporter) GetAmmo added in v0.49.0

func (e *Exporter) GetAmmo(ids []Tractor) []Ammo

func (*Exporter) GetAtBasesSold added in v0.21.0

func (e *Exporter) GetAtBasesSold(commodity GetCommodityAtBasesInput) map[cfgtype.BaseUniNick]*GoodAtBase

func (*Exporter) GetBaseInfo added in v0.50.0

func (e *Exporter) GetBaseInfo(base_nickname universe_mapped.BaseNickname) BaseInfo

func (*Exporter) GetBases added in v0.18.0

func (e *Exporter) GetBases() []*Base

func (*Exporter) GetBuyableShields added in v0.70.4

func (e *Exporter) GetBuyableShields(shields []Shield) map[string]bool

func (*Exporter) GetCommodities added in v0.19.0

func (e *Exporter) GetCommodities() []*Commodity

func (*Exporter) GetCounterMeasures added in v0.35.0

func (e *Exporter) GetCounterMeasures(ids []Tractor) []CounterMeasure

func (*Exporter) GetEngineSpeed added in v0.61.0

func (e *Exporter) GetEngineSpeed(engine_info *equip_mapped.Engine) int

func (*Exporter) GetEngines added in v0.29.0

func (e *Exporter) GetEngines(ids []Tractor) []Engine

func (*Exporter) GetFactionName added in v0.71.0

func (e *Exporter) GetFactionName(nickname cfgtype.FactionNick) string

func (*Exporter) GetFactions added in v0.13.0

func (e *Exporter) GetFactions(bases []*Base) []Faction

func (*Exporter) GetGuns added in v0.20.0

func (e *Exporter) GetGuns(ids []Tractor, buyable_ship_tech map[string]bool) []Gun

func (*Exporter) GetInfocardName added in v0.59.0

func (e *Exporter) GetInfocardName(ids_name int, nickname string) string

func (*Exporter) GetMines added in v0.23.0

func (e *Exporter) GetMines(ids []Tractor) []Mine

func (*Exporter) GetMissiles added in v0.22.0

func (e *Exporter) GetMissiles(ids []Tractor, buyable_ship_tech map[string]bool) []Gun

func (*Exporter) GetMissions added in v0.51.5

func (e *Exporter) GetMissions(bases []*Base, factions []Faction) []*Base

func (*Exporter) GetOres added in v0.69.0

func (e *Exporter) GetOres(Commodities []*Commodity) []*Base

func (*Exporter) GetPoBGoods added in v0.104.0

func (e *Exporter) GetPoBGoods(pobs []*PoB) []*PoBGood

func (*Exporter) GetPoBs added in v0.102.0

func (e *Exporter) GetPoBs() []*PoB

func (*Exporter) GetRegionName added in v0.67.0

func (e *Exporter) GetRegionName(system *universe_mapped.System) string

func (*Exporter) GetScanners added in v0.48.0

func (e *Exporter) GetScanners(ids []Tractor) []Scanner

func (*Exporter) GetShields added in v0.24.0

func (e *Exporter) GetShields(ids []Tractor) []Shield

func (*Exporter) GetShips added in v0.26.0

func (e *Exporter) GetShips(ids []Tractor, TractorsByID map[cfgtype.TractorID]Tractor, Thrusters []Thruster) []Ship

func (*Exporter) GetThrusters added in v0.25.0

func (e *Exporter) GetThrusters(ids []Tractor) []Thruster

func (*Exporter) GetTractors added in v0.28.0

func (e *Exporter) GetTractors() []Tractor

func (*Exporter) NewEnemyFaction added in v0.55.0

func (e *Exporter) NewEnemyFaction(faction Faction, npc_ranks []int) EnemyFaction

Calculates for enemy faction percentage of ships defined in faction_props/npcships.ini If they aren't defined, Freelancer will be showing corrupted no missions when they encounter.

func (*Exporter) ServerSideMarketGoodsOverrides added in v0.85.0

func (e *Exporter) ServerSideMarketGoodsOverrides(commodity GetCommodityAtBasesInput) map[cfgtype.BaseUniNick]*GoodAtBase

func (*Exporter) TradePaths added in v0.64.0

func (e *Exporter) TradePaths(
	bases []*Base,
	commodities []*Commodity,
) ([]*Base, []*Commodity)

type Faction added in v0.13.0

type Faction struct {
	Name         string
	ShortName    string
	Nickname     string
	NicknameHash flhash.HashCode

	ObjectDestruction float64
	MissionSuccess    float64
	MissionFailure    float64
	MissionAbort      float64

	InfonameID  int
	InfocardID  int
	Infocard    InfocardKey
	Reputations []Reputation
	Bribes      []Bribe
}

func FilterToUsefulBribes added in v0.95.5

func FilterToUsefulBribes(factions []Faction) []Faction

func FilterToUsefulFactions added in v0.33.0

func FilterToUsefulFactions(factions []Faction) []Faction

type GetCommodityAtBasesInput added in v0.85.0

type GetCommodityAtBasesInput struct {
	Nickname  string
	Price     int
	Volume    float64
	ShipClass cfgtype.ShipClass
}

type GoodAtBase added in v0.21.0

type GoodAtBase struct {
	BaseNickname      cfgtype.BaseUniNick
	BaseSells         bool
	PriceBaseBuysFor  int
	PriceBaseSellsFor int
	Volume            float64
	ShipClass         cfgtype.ShipClass
	LevelRequired     int
	RepRequired       float64

	NotBuyable           bool
	IsServerSideOverride bool

	IsTransportUnreachable bool

	BaseInfo
}

type GraphResults added in v0.65.0

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

func NewGraphResults added in v0.65.0

func NewGraphResults(
	e *Exporter,
	avgCruiserSpeed int,
	can_visit_freighter_only_jhs trades.WithFreighterPaths,
	mining_bases_by_system map[string][]trades.ExtraBase,
	graph_options trades.MappingOptions,
) *GraphResults

type Gun added in v0.20.0

type Gun struct {
	Nickname     string
	NicknameHash flhash.HashCode
	MunitionHash flhash.HashCode
	HpTypeHash   flhash.HashCode
	Name         string
	Type         string
	Price        int
	Class        string
	HpType       string
	IdsName      int
	IdsInfo      int
	Volume       float64

	HitPts       string
	PowerUsage   float64
	Refire       float64
	Range        float64
	Toughness    float64
	IsAutoTurret bool
	Lootable     bool

	RequiredAmmo bool
	// AmmoPrice     int
	// AmmoBases     []*GoodAtBase
	// AmmoName      string
	HullDamage      int
	EnergyDamage    int
	ShieldDamage    int
	AvgShieldDamage int
	DamageType      string
	LifeTime        float64
	Speed           float64
	GunTurnRate     float64
	DispersionAngle float64

	HullDamagePerSec       float64
	AvgShieldDamagePerSec  float64
	EnergyDamagePerSec     float64
	PowerUsagePerSec       float64
	AvgEfficiency          float64
	HullEfficiency         float64
	ShieldEfficiency       float64
	EnergyDamageEfficiency float64

	Bases         map[cfgtype.BaseUniNick]*GoodAtBase
	DamageBonuses []DamageBonus

	Missile
	*DiscoveryTechCompat
	GunDetailed

	NumBarrels *int
	BurstFire  *BurstFire
	AmmoLimit  AmmoLimit

	Mass float64

	DiscoGun *DiscoGun
}

func (Gun) GetNickname added in v0.92.0

func (g Gun) GetNickname() string

func (Gun) GetTechCompat added in v0.92.0

func (g Gun) GetTechCompat() *DiscoveryTechCompat

type GunDetailed added in v0.72.0

type GunDetailed struct {
	FlashParticleName string
	ConstEffect       string
	MunitionHitEffect string
}

type Infocard added in v0.6.1

type Infocard []InfocardLine

func (Infocard) StringsJoin added in v0.106.0

func (i Infocard) StringsJoin(delimiter string) string

type InfocardBuilder added in v0.106.0

type InfocardBuilder struct {
	Lines Infocard
}

func NewInfocardBuilder added in v0.106.0

func NewInfocardBuilder() InfocardBuilder

func (*InfocardBuilder) WriteLine added in v0.106.0

func (i *InfocardBuilder) WriteLine(phrases ...InfocardPhrase)

func (*InfocardBuilder) WriteLineStr added in v0.106.0

func (i *InfocardBuilder) WriteLineStr(phrase_strs ...string)

type InfocardKey added in v0.17.0

type InfocardKey string

type InfocardLine added in v0.106.0

type InfocardLine struct {
	Phrases []InfocardPhrase
}

func NewInfocardSimpleLine added in v0.106.0

func NewInfocardSimpleLine(line string) InfocardLine

func (InfocardLine) ToStr added in v0.106.0

func (i InfocardLine) ToStr() string

type InfocardPhrase added in v0.106.0

type InfocardPhrase struct {
	Phrase string
	Link   *string
	Bold   bool
}

type Infocards added in v0.58.3

type Infocards map[InfocardKey]Infocard

type MarketGood added in v0.8.0

type MarketGood struct {
	Name         string
	Nickname     string
	NicknameHash flhash.HashCode
	HpType       string
	Type         string

	LevelRequired int
	RepRequired   float64
	Infocard      InfocardKey

	BaseSells     bool
	PriceModifier float64
	PriceBase     int
	PriceToBuy    int
	PriceToSell   *int
	Volume        float64
	ShipClass     cfgtype.ShipClass

	IsServerSideOverride bool
}

type Mine added in v0.23.0

type Mine struct {
	Name                string
	Price               int
	AmmoPrice           int
	Nickname            string
	MineDropperHash     flhash.HashCode
	ProjectileArchetype string
	MineHash            flhash.HashCode
	IdsName             int
	IdsInfo             int

	HullDamage    int
	EnergyDamange int
	ShieldDamage  int
	PowerUsage    float64

	Value              float64
	Refire             float64
	DetonationDistance float64
	Radius             float64
	SeekDistance       int
	TopSpeed           int
	Acceleration       int
	LinearDrag         float64
	LifeTime           float64
	OwnerSafe          int
	Toughness          float64

	HitPts   int
	Lootable bool

	Bases map[cfgtype.BaseUniNick]*GoodAtBase

	*DiscoveryTechCompat

	AmmoLimit AmmoLimit
	Mass      float64
}

type MiningInfo added in v0.69.1

type MiningInfo struct {
	DynamicLootMin        int
	DynamicLootMax        int
	DynamicLootDifficulty int
	MinedGood             MarketGood
}

type Missile added in v0.22.0

type Missile struct {
	MaxAngularVelocity float64
}

type MissioNFaction added in v0.52.0

type MissioNFaction struct {
	FactionName     string
	FactionNickname string
	MinDifficulty   float64
	MaxDifficulty   float64
	Weight          int

	Infocard InfocardKey

	MinAward int
	MaxAward int
	NpcRanks []int
	Enemies  []EnemyFaction
	Err      error
}

type OptExport added in v0.13.0

type OptExport func(e *Exporter)

type PathWithNavmap added in v0.70.2

type PathWithNavmap struct {
	trades.DetailedPath
	SectorCoord string
	Pos         cfgtype.Vector
}

type PoB added in v0.102.0

type PoB struct {
	Nickname string
	Name     string

	Pos         *string
	Level       *int
	Money       *int
	Health      *int
	DefenseMode *DefenseMode

	SystemNick  *string
	SystemName  *string // SystemHash      *flhash.HashCode `json:"system"`      //: 2745655887,
	FactionNick *string
	FactionName *string // AffiliationHash *flhash.HashCode `json:"affiliation"` //: 2620,

	BasePos     *cfgtype.Vector
	SectorCoord *string
	Region      *string

	ShopItems []*ShopItem
}

also known as Player Base Station

type PoBGood added in v0.104.0

type PoBGood struct {
	Nickname              string
	Name                  string
	TotalBuyableFromBases int
	TotalSellableToBases  int

	BestPriceToBuy  *int
	BestPriceToSell *int

	Category string
	Bases    []*PoBGoodBase

	AnyBaseSells bool
	AnyBaseBuys  bool
}

func (PoBGood) BaseBuys added in v0.104.0

func (good PoBGood) BaseBuys() bool

func (PoBGood) BaseSells added in v0.104.0

func (good PoBGood) BaseSells() bool

type PoBGoodBase added in v0.104.0

type PoBGoodBase struct {
	ShopItem *ShopItem
	Base     *PoB
}

type PobShopItem added in v0.103.0

type PobShopItem struct {
	*ShopItem
	PoBName     string
	PobNickname string

	System      *universe_mapped.System
	SystemNick  string
	SystemName  string
	FactionNick string
	FactionName string
	BasePos     *cfgtype.Vector
}

type Rephack added in v0.18.0

type Rephack struct {
	FactionName string
	FactionNick cfgtype.FactionNick
	Reputation  float64
	RepType     playercntl_rephacks.RepType
}

type Reputation added in v0.13.0

type Reputation struct {
	Name     string
	Rep      float64
	Empathy  float64
	Nickname string
}

type Route added in v0.78.0

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

func NewRoute added in v0.78.0

func NewRoute(g *GraphResults, from_base_nickname string, to_base_nickname string) *Route

func (*Route) GetCanVisitFreighterOnlyJH added in v0.78.0

func (t *Route) GetCanVisitFreighterOnlyJH() bool

func (*Route) GetCruiseSpeed added in v0.78.0

func (t *Route) GetCruiseSpeed() int

func (*Route) GetDist added in v0.78.0

func (t *Route) GetDist() int

func (*Route) GetID added in v0.78.1

func (c *Route) GetID() string

func (*Route) GetNameByIdsName added in v0.78.0

func (t *Route) GetNameByIdsName(ids_name int) string

func (*Route) GetPaths added in v0.78.0

func (t *Route) GetPaths() []PathWithNavmap

func (*Route) GetTime added in v0.78.0

func (t *Route) GetTime() float64

type Scanner added in v0.48.0

type Scanner struct {
	Name  string
	Price int

	Range          int
	CargoScanRange int

	Lootable     bool
	Nickname     string
	NicknameHash flhash.HashCode
	NameID       int
	InfoID       int

	Bases map[cfgtype.BaseUniNick]*GoodAtBase

	*DiscoveryTechCompat
	Mass float64
}

type Shield added in v0.24.0

type Shield struct {
	Name string

	Class      string
	Type       string
	Technology string
	Price      int

	Capacity          int
	RegenerationRate  int
	ConstantPowerDraw int
	Value             float64
	RebuildPowerDraw  int
	OffRebuildTime    int

	Toughness float64
	HitPts    int
	Lootable  bool

	Nickname     string
	HpType       string
	NicknameHash flhash.HashCode
	HpTypeHash   flhash.HashCode
	IdsName      int
	IdsInfo      int

	Bases map[cfgtype.BaseUniNick]*GoodAtBase

	*DiscoveryTechCompat
	Mass float64
}

func (Shield) GetNickname added in v0.92.0

func (g Shield) GetNickname() string

func (Shield) GetTechCompat added in v0.92.0

func (g Shield) GetTechCompat() *DiscoveryTechCompat

type Ship added in v0.26.0

type Ship struct {
	Nickname     string
	NicknameHash flhash.HashCode

	Name      string
	Class     int
	Type      string
	Price     int
	Armor     int
	HoldSize  int
	Nanobots  int
	Batteries int
	Mass      float64

	PowerCapacity     int
	PowerRechargeRate int
	CruiseSpeed       int
	LinearDrag        float64
	EngineMaxForce    int
	ImpulseSpeed      float64
	ThrusterSpeed     []int
	ReverseFraction   float64
	ThrustCapacity    int
	ThrustRecharge    int

	MaxAngularSpeedDegS           float64
	AngularDistanceFrom0ToHalfSec float64
	TimeTo90MaxAngularSpeed       float64

	NudgeForce  float64
	StrafeForce float64
	NameID      int
	InfoID      int

	Bases            map[cfgtype.BaseUniNick]*GoodAtBase
	Slots            []EquipmentSlot
	BiggestHardpoint []string
	ShipPackages     []ShipPackage

	*DiscoveryTechCompat

	DiscoShip *DiscoShip
}

func (Ship) GetNickname added in v0.92.0

func (g Ship) GetNickname() string

func (Ship) GetTechCompat added in v0.92.0

func (g Ship) GetTechCompat() *DiscoveryTechCompat

type ShipPackage added in v0.93.0

type ShipPackage struct {
	Nickname string
	// contains filtered or unexported fields
}

type ShopItem added in v0.102.0

type ShopItem struct {
	pob_goods.ShopItem
	Nickname string
	Name     string
	Category string
}

type TechCompatOrderer added in v0.91.8

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

func NewOrderedTechCompat added in v0.91.8

func NewOrderedTechCompat(e *Exporter) *TechCompatOrderer

func (*TechCompatOrderer) GetOrederedTechCompat added in v0.91.8

func (orderer *TechCompatOrderer) GetOrederedTechCompat(DiscoveryTechCompat *DiscoveryTechCompat) []CompatibleIDsForTractor

type Thruster added in v0.25.0

type Thruster struct {
	Name         string
	Price        int
	MaxForce     int
	PowerUsage   int
	Efficiency   float64
	Value        float64
	Rating       float64
	HitPts       int
	Lootable     bool
	Nickname     string
	NicknameHash flhash.HashCode
	NameID       int
	InfoID       int

	Bases map[cfgtype.BaseUniNick]*GoodAtBase

	*DiscoveryTechCompat
	Mass float64
}

type Tractor added in v0.28.0

type Tractor struct {
	Name       string
	Price      int
	MaxLength  int
	ReachSpeed int

	Lootable      bool
	Nickname      cfgtype.TractorID
	NicknameHash  flhash.HashCode
	ShortNickname string
	NameID        int
	InfoID        int

	Bases map[cfgtype.BaseUniNick]*GoodAtBase
	DiscoveryIDRephacks
	Mass float64
}

type TradeRoute added in v0.64.0

type TradeRoute struct {
	Route       *Route
	Commodity   *Commodity
	BuyingGood  *GoodAtBase
	SellingGood *GoodAtBase
}

func NewTradeRoute added in v0.65.0

func NewTradeRoute(g *GraphResults, buying_good *GoodAtBase, selling_good *GoodAtBase, commodity *Commodity) *TradeRoute

func (*TradeRoute) GetProffitPerTime added in v0.65.0

func (t *TradeRoute) GetProffitPerTime() float64

func (*TradeRoute) GetProffitPerV added in v0.64.0

func (t *TradeRoute) GetProffitPerV() float64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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