configs_export

package
v0.51.5 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: AGPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func Buyable added in v0.33.0

func Buyable(Bases []GoodAtBase) bool

func Empty added in v0.33.0

func Empty(phrase string) bool

func InitRegexExpression added in v0.24.0

func InitRegexExpression(expression string) *regexp.Regexp

func NameWithSpacesOnly added in v0.15.0

func NameWithSpacesOnly(word string) bool

Types

type Ammo added in v0.49.0

type Ammo struct {
	Name  string
	Price int

	HitPts    int
	AmmoLimit int
	Volume    int

	Nickname string
	NameID   int
	InfoID   int

	Bases []GoodAtBase

	*DiscoveryTechCompat
}

func FilterToUsefulAmmo added in v0.49.0

func FilterToUsefulAmmo(cms []Ammo) []Ammo

type Base

type Base struct {
	Name             string
	Nickname         string
	FactionName      string
	System           string
	SystemNickname   string
	StridName        int
	InfocardID       int
	Infocard         InfocardKey
	File             utils_types.FilePath
	BGCS_base_run_by string
	MarketGoods      []MarketGood
	Pos              conftypes.Vector
}

func FilterToUserfulBases added in v0.33.0

func FilterToUserfulBases(bases []Base) []Base

type BaseInfo added in v0.50.0

type BaseInfo struct {
	BaseName   string
	SystemName string
	Faction    string
}

type Commodity added in v0.19.0

type Commodity struct {
	Nickname            string
	Name                string
	Price               int
	PricePerVolume      float64
	Combinable          bool
	Volume              float64
	NameID              int
	InfocardID          int
	Infocard            InfocardKey
	Bases               []GoodAtBase
	BestBuyPricePerVol  float64
	BestSellPricePerVol float64
	ProffitMarginPerVol float64
}

func FilterToUsefulCommodities added in v0.34.0

func FilterToUsefulCommodities(commodities []Commodity) []Commodity

type CounterMeasure added in v0.35.0

type CounterMeasure struct {
	Name  string
	Price int

	HitPts        int
	AIRange       int
	AmmoLimit     int
	Lifetime      int
	Range         int
	DiversionPctg int

	Lootable bool
	Nickname string
	NameID   int
	InfoID   int

	Bases []GoodAtBase

	*DiscoveryTechCompat
}

func FilterToUsefulCounterMeasures added in v0.35.0

func FilterToUsefulCounterMeasures(cms []CounterMeasure) []CounterMeasure

type DamageBonus added in v0.21.0

type DamageBonus struct {
	Type     string
	Modifier float64
}

type DiscoveryTechCompat added in v0.44.0

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

func CalculateTechCompat added in v0.44.0

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

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
	FlameEffect string
	TrailEffect string

	Nickname string
	NameID   int
	InfoID   int

	Bases []GoodAtBase
	*DiscoveryTechCompat
}

func FilterToUsefulEngines added in v0.33.0

func FilterToUsefulEngines(engines []Engine) []Engine

type EquipmentSlot added in v0.27.0

type EquipmentSlot struct {
	SlotName     string
	AllowedEquip []string
}

type Exporter

type Exporter struct {
	Bases       []Base
	Factions    []Faction
	Infocards   map[InfocardKey]Infocard
	Commodities []Commodity
	Guns        []Gun
	Missiles    []Gun
	Mines       []Mine
	Shields     []Shield
	Thrusters   []Thruster
	Ships       []Ship
	Tractors    []Tractor
	Engines     []Engine
	CMs         []CounterMeasure
	Scanners    []Scanner
	Ammos       []Ammo
	// contains filtered or unexported fields
}

func Export added in v0.13.0

func Export(configs *configs_mapped.MappedConfigs) *Exporter

func NewExporter

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

func (*Exporter) Export added in v0.13.0

func (e *Exporter) Export() *Exporter

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 GetAtBasesInput) []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) 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) GetEngines added in v0.29.0

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

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) []Gun

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) []Gun

func (*Exporter) GetMissions added in v0.51.5

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

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) []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

type Faction added in v0.13.0

type Faction struct {
	Name      string
	ShortName string
	Nickname  string

	ObjectDestruction float64
	MissionSuccess    float64
	MissionFailure    float64
	MissionAbort      float64

	InfonameID  int
	InfocardID  int
	Infocard    InfocardKey
	Reputations []Reputation
	Rephacks    []Rephack
}

func FilterToUsefulFactions added in v0.33.0

func FilterToUsefulFactions(factions []Faction) []Faction

type GetAtBasesInput added in v0.21.0

type GetAtBasesInput struct {
	Nickname       string
	Price          int
	PricePerVolume float64
	Volume         float64
}

type GoodAtBase added in v0.21.0

type GoodAtBase struct {
	BaseNickname   string
	BaseName       string
	BaseSells      bool
	Price          int
	PricePerVolume float64
	LevelRequired  int
	RepRequired    float64
	SystemName     string
	Faction        string
}

type Gun added in v0.20.0

type Gun struct {
	Name     string
	Type     string
	Price    int
	Class    string
	Nickname string
	HpType   string
	IdsName  int
	IdsInfo  int

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

	RequiredAmmo bool
	// AmmoPrice     int
	// AmmoBases     []GoodAtBase
	// AmmoName      string
	HullDamage    int
	EnergyDamange int
	ShieldDamage  int
	DamageType    string
	LifeTime      float64
	Speed         float64

	HullDamagePerSec   float64
	ShieldDamagePerSec float64
	PowerUsagePerSec   float64
	AvgEfficiency      float64
	HullEfficiency     float64
	ShieldEfficiency   float64
	Value              float64
	Rating             float64

	Bases          []GoodAtBase
	DamangeBonuses []DamageBonus

	Missile
	*DiscoveryTechCompat
}

func FilterToUsefulGun added in v0.34.0

func FilterToUsefulGun(guns []Gun) []Gun

type Infocard added in v0.6.1

type Infocard []string

type InfocardKey added in v0.17.0

type InfocardKey string

type MarketGood added in v0.8.0

type MarketGood struct {
	Name     string
	Nickname string
	HpType   string
	Type     string

	LevelRequired int
	RepRequired   float64
	Infocard      InfocardKey

	IsBuyOnly     bool
	PriceModifier float64
	PriceBase     int
	Price         int
}

type Mine added in v0.23.0

type Mine struct {
	Name      string
	Price     int
	AmmoPrice int
	Nickname  string
	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 []GoodAtBase

	*DiscoveryTechCompat
}

func FilterToUsefulMines added in v0.34.0

func FilterToUsefulMines(mines []Mine) []Mine

type Missile added in v0.22.0

type Missile struct {
	MaxAngularVelocity float64
}

type OptExport added in v0.13.0

type OptExport func(e *Exporter)

func WithEmptyRecords added in v0.31.0

func WithEmptyRecords() OptExport

type Rephack added in v0.18.0

type Rephack struct {
	BaseName   string
	BaseOwner  string
	BaseSystem string

	BaseNickname string
	Chance       float64
}

type Reputation added in v0.13.0

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

type Scanner added in v0.48.0

type Scanner struct {
	Name  string
	Price int

	Range          int
	CargoScanRange int

	Lootable bool
	Nickname string
	NameID   int
	InfoID   int

	Bases []GoodAtBase

	*DiscoveryTechCompat
}

func FilterToUserfulScanners added in v0.48.0

func FilterToUserfulScanners(items []Scanner) []Scanner

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
	IdsName  int
	IdsInfo  int

	Bases []GoodAtBase

	*DiscoveryTechCompat
}

func FilterToUsefulShields added in v0.34.0

func FilterToUsefulShields(shields []Shield) []Shield

type Ship added in v0.26.0

type Ship struct {
	Name      string
	Class     int
	Type      string
	Price     int
	Armor     int
	HoldSize  int
	Nanobots  int
	Batteries int
	Mass      float64

	PowerCapacity     int
	PowerRechargeRate int
	CruiseSpeed       int
	ImpulseSpeed      float64
	ReverseFraction   float64
	ThrustCapacity    int
	ThrustRecharge    int

	MaxAngularSpeedDegS           float64
	AngularDistanceFrom0ToHalfSec float64
	TimeTo90MaxAngularSpeed       float64

	NudgeForce  float64
	StrafeForce float64
	Nickname    string
	NameID      int
	InfoID      int

	Bases            []GoodAtBase
	Slots            []EquipmentSlot
	BiggestHardpoint []string

	*DiscoveryTechCompat
}

func FilterToUsefulShips added in v0.34.0

func FilterToUsefulShips(ships []Ship) []Ship

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
	NameID     int
	InfoID     int

	Bases []GoodAtBase

	*DiscoveryTechCompat
}

func FilterToUsefulThrusters added in v0.34.0

func FilterToUsefulThrusters(thrusters []Thruster) []Thruster

type Tractor added in v0.28.0

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

	Lootable bool
	Nickname conftypes.TractorID
	NameID   int
	InfoID   int

	Bases []GoodAtBase
}

func FilterToUsefulTractors added in v0.33.0

func FilterToUsefulTractors(tractors []Tractor) []Tractor

Jump to

Keyboard shortcuts

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