configs_export

package
v1.58.3 Latest Latest
Warning

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

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

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

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

func DistanceForVecs

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

func Empty

func Empty(phrase string) bool

func EnhanceBasesWithServerOverrides

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

func GetMaxRadius

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

func GetPricePerVoume

func GetPricePerVoume(price int, volume float64) float64

func InitRegexExpression

func InitRegexExpression(expression string) *regexp.Regexp

func IsAnyVignetteWithinNPCSpawnRange

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

func NameWithSpacesOnly

func NameWithSpacesOnly(word string) bool

func StrPosToVectorPos

func StrPosToVectorPos(value string) *cfgtype.Vector

func VectorToSectorCoord

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

Types

type Ammo

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

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

type Base

type Base struct {
	Name               string              `json:"name"`       // Infocard Name
	Archetypes         []string            `json:"archetypes"` // Base Archetypes
	Nickname           cfgtype.BaseUniNick `json:"nickname"`
	NicknameHash       flhash.HashCode     `json:"nickname_hash" format:"int64"` // Flhash of nickname
	FactionName        string              `json:"faction_nickname"`
	System             string              `json:"system_name"`
	SystemNickname     string              `json:"system_nickname"`
	SystemNicknameHash flhash.HashCode     `json:"system_nickname_hash" format:"int64"`
	Region             string              `json:"region_name"`
	StridName          int                 `json:"strid_name"`
	InfocardID         int                 `json:"infocard_id"`
	Infocard           Infocard            `json:"infocard"`
	InfocardKey        InfocardKey
	File               utils_types.FilePath `json:"file"`
	BGCS_base_run_by   string
	MarketGoodsPerNick map[CommodityKey]MarketGood `json:"-"`
	Pos                cfgtype.Vector              `json:"pos"`
	SectorCoord        string                      `json:"sector_coord"`

	IsTransportUnreachable bool `json:"is_transport_unreachable"` // Check if base is NOT reachable from manhattan by Transport through Graph method (at Discovery base has to have Transport dockable spheres)

	Missions *BaseMissions `json:"-"`

	*MiningInfo `json:"mining_info,omitempty"`

	Reachable bool `json:"is_reachhable"` // is base IS Rechable by frighter from Manhattan
	// contains filtered or unexported fields
}

func FilterToUserfulBases

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

func FitlerToUsefulOres

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

type BaseInfo

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

type BaseMissions

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

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

func NewBaseRoute

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

type Bribe

type Bribe struct {
	BaseNickname string
	BaseInfo
	Chance float64
}

type BurstFire

type BurstFire struct {
	SustainedRefire float64
	Ammo            int
	ReloadTime      float64

	SustainedHullDamagePerSec      float64
	SustainedAvgShieldDamagePerSec float64
	SustainedEnergyDamagePerSec    float64
	SustainedPowerUsagePerSec      float64
}

type ComboRoute

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

type ComboTradeRoute

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

type Commodity

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

	Mass float64
	// contains filtered or unexported fields
}

type CommodityKey

type CommodityKey string

func GetCommodityKey

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

type CompatibleIDsForTractor

type CompatibleIDsForTractor struct {
	TechCompat float64
	Tractor    Tractor
}

type CounterMeasure

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

type DamageBonus struct {
	Type     string
	Modifier float64
}

type DefenseMode

type DefenseMode int

func (DefenseMode) ToStr

func (d DefenseMode) ToStr() string

type DiffToMoney

type DiffToMoney struct {
	MinLevel   float64
	MoneyAward int
}

type DiscoGun

type DiscoGun struct {
	ArmorPen float64
}

type DiscoShip

type DiscoShip struct {
	ArmorMult float64
}

type DiscoveryIDRephacks

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

func (DiscoveryIDRephacks) GetRephacksList

func (r DiscoveryIDRephacks) GetRephacksList() []Rephack

type DiscoveryTechCompat

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

func CalculateTechCompat

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

type EnemyFaction

type EnemyFaction struct {
	Faction
	NpcExist bool
}

type Engine

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

func (g Engine) GetNickname() string

func (Engine) GetTechCompat

func (g Engine) GetTechCompat() *DiscoveryTechCompat

type EquipmentSlot

type EquipmentSlot struct {
	SlotName     string
	AllowedEquip []string
}

type ExportOptions

type ExportOptions struct {
	trades.MappingOptions
}

type Exporter

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

	Bases            []*Base
	MiningOperations []*Base

	Transport *GraphResults
	Freighter *GraphResults
	Frigate   *GraphResults

	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

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

func NewExporter

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

func (*Exporter) AllRoutes

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

func (*Exporter) Buyable

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

func (*Exporter) EnhanceBasesWithIsTransportReachable

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

func (*Exporter) EnhanceBasesWithLoot

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

func (*Exporter) EnhanceBasesWithPobCrafts

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

func (*Exporter) Export

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

func (*Exporter) FilterToUsefulAmmo

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

func (*Exporter) FilterToUsefulCommodities

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

func (*Exporter) FilterToUsefulCounterMeasures

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

func (*Exporter) FilterToUsefulEngines

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

func (*Exporter) FilterToUsefulGun

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

func (*Exporter) FilterToUsefulMines

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

func (*Exporter) FilterToUsefulShields

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

func (*Exporter) FilterToUsefulShips

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

func (*Exporter) FilterToUsefulThrusters

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

func (*Exporter) FilterToUsefulTractors

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

func (*Exporter) FilterToUserfulScanners

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

func (*Exporter) GetAmmo

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

func (*Exporter) GetAtBasesSold

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

func (*Exporter) GetBaseInfo

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

func (*Exporter) GetBases

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

func (*Exporter) GetBuyableShields

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

func (*Exporter) GetCommodities

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

func (*Exporter) GetCounterMeasures

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

func (*Exporter) GetEngineSpeed

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

func (*Exporter) GetEngines

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

func (*Exporter) GetFactionName

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

func (*Exporter) GetFactions

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

func (*Exporter) GetGuns

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

func (*Exporter) GetInfocardName

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

func (*Exporter) GetMines

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

func (*Exporter) GetMissiles

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

func (*Exporter) GetMissions

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

func (*Exporter) GetOres

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

func (*Exporter) GetPoBGoods

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

func (*Exporter) GetPoBs

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

func (*Exporter) GetRegionName

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

func (*Exporter) GetScanners

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

func (*Exporter) GetShields

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

func (*Exporter) GetShips

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

func (*Exporter) GetThrusters

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

func (*Exporter) GetTractors

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

func (*Exporter) NewEnemyFaction

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

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

func (*Exporter) TradePaths

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

func (*Exporter) TraderExists added in v1.57.7

func (e *Exporter) TraderExists(base_nickname string) bool

type Faction

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

func FilterToUsefulBribes(factions []Faction) []Faction

func FilterToUsefulFactions

func FilterToUsefulFactions(factions []Faction) []Faction

type GetCommodityAtBasesInput

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

type GoodAtBase

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

type GraphResults struct {
	Graph   *trades.GameGraph
	Time    [][]int
	Parents [][]trades.Parent
	// contains filtered or unexported fields
}

func NewGraphResults

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

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

func (g Gun) GetNickname() string

func (Gun) GetTechCompat

func (g Gun) GetTechCompat() *DiscoveryTechCompat

type GunDetailed

type GunDetailed struct {
	FlashParticleName string
	ConstEffect       string
	MunitionHitEffect string
}

type Infocard

type Infocard []InfocardLine

func (Infocard) StringsJoin

func (i Infocard) StringsJoin(delimiter string) string

type InfocardBuilder

type InfocardBuilder struct {
	Lines Infocard
}

func NewInfocardBuilder

func NewInfocardBuilder() InfocardBuilder

func (*InfocardBuilder) WriteLine

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

func (*InfocardBuilder) WriteLineStr

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

type InfocardKey

type InfocardKey string

type InfocardLine

type InfocardLine struct {
	Phrases []InfocardPhrase `json:"phrases"`
}

func NewInfocardSimpleLine

func NewInfocardSimpleLine(line string) InfocardLine

func (InfocardLine) ToStr

func (i InfocardLine) ToStr() string

type InfocardPhrase

type InfocardPhrase struct {
	Phrase string  `json:"phrase"`
	Link   *string `json:"link"`
	Bold   bool    `json:"bold"`
}

type Infocards

type Infocards map[InfocardKey]Infocard

type MarketGood

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

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

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

type Missile

type Missile struct {
	MaxAngularVelocity float64
}

type MissioNFaction

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

type OptExport func(e *Exporter)

type PathWithNavmap

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

type PoB

type PoB struct {
	Nickname string `json:"nickname"`
	Name     string `json:"name"`

	Pos         *string      `json:"pos"`
	Level       *int         `json:"level"`
	Money       *int         `json:"money"`
	Health      *float64     `json:"health"`
	DefenseMode *DefenseMode `json:"defense_mode"`

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

	ForumThreadUrl *string `json:"forum_thread_url"`

	BasePos     *cfgtype.Vector `json:"base_pos"`
	SectorCoord *string         `json:"sector_coord"`
	Region      *string         `json:"region_name"`

	ShopItems []*ShopItem `json:"shop_items"`
	Infocard  Infocard    `json:"infocard"`
}

also known as Player Base Station

type PoBGood

type PoBGood struct {
	Nickname              string `json:"nickname"`
	Name                  string `json:"name"`
	TotalBuyableFromBases int    `json:"total_buyable_from_bases"`
	TotalSellableToBases  int    `json:"total_sellable_to_bases"`

	BestPriceToBuy  *int `json:"best_price_to_buy"`
	BestPriceToSell *int `json:"best_price_to_sell"`

	Category string         `json:"category"`
	Bases    []*PoBGoodBase `json:"bases"`

	AnyBaseSells bool `json:"any_base_sells"`
	AnyBaseBuys  bool `json:"any_base_buys"`
}

func (PoBGood) BaseBuys

func (good PoBGood) BaseBuys() bool

func (PoBGood) BaseSells

func (good PoBGood) BaseSells() bool

type PoBGoodBase

type PoBGoodBase struct {
	ShopItem *ShopItem `json:"shop_item"`
	Base     *PoB      `json:"base"`
}

type PobShopItem

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

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

type Reputation

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

type Route

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

func NewRoute

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

func (*Route) GetCanVisitFreighterOnlyJH

func (t *Route) GetCanVisitFreighterOnlyJH() bool

func (*Route) GetCruiseSpeed

func (t *Route) GetCruiseSpeed() int

func (*Route) GetID

func (c *Route) GetID() string

func (*Route) GetNameByIdsName

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

func (*Route) GetPaths

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

func (*Route) GetTimeMs

func (t *Route) GetTimeMs() cfgtype.MillisecondsI

func (*Route) GetTimeS

func (t *Route) GetTimeS() cfgtype.Seconds

type Scanner

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

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

func (g Shield) GetNickname() string

func (Shield) GetTechCompat

func (g Shield) GetTechCompat() *DiscoveryTechCompat

type Ship

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

func (g Ship) GetNickname() string

func (Ship) GetTechCompat

func (g Ship) GetTechCompat() *DiscoveryTechCompat

type ShipPackage

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

type ShopItem

type ShopItem struct {
	pob_goods.ShopItem
	Nickname string `json:"nickname"`
	Name     string `json:"name"`
	Category string `json:"category"`
}

type TechCompatOrderer

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

func NewOrderedTechCompat

func NewOrderedTechCompat(e *Exporter) *TechCompatOrderer

func (*TechCompatOrderer) GetOrederedTechCompat

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

type Thruster

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

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

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

func NewTradeRoute

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

func (*TradeRoute) GetProffitPerTime

func (t *TradeRoute) GetProffitPerTime() float64

func (*TradeRoute) GetProffitPerV

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