Documentation
¶
Index ¶
- Variables
- func Buyable(Bases []*GoodAtBase) bool
- func DistanceForVecs(Pos1 *semantic.Vect, Pos2 *semantic.Vect) (float64, error)
- func Empty(phrase string) bool
- func GetMaxRadius(Size *semantic.Vect) (float64, error)
- func GetPricePerVoume(price int, volume float64) float64
- func InitRegexExpression(expression string) *regexp.Regexp
- func IsAnyVignetteWithinNPCSpawnRange(system *systems_mapped.System, ...) bool
- func NameWithSpacesOnly(word string) bool
- func VectorToSectorCoord(system *universe_mapped.System, pos cfgtype.Vector) string
- type Ammo
- type AmmoLimit
- type Base
- type BaseAllRoutes
- type BaseAllTradeRoutes
- type BaseInfo
- type BaseMissions
- type BaseRoute
- type Bribe
- type BurstFire
- type ComboRoute
- type ComboTradeRoute
- type Commodity
- type CompatibleIDsForTractor
- type CounterMeasure
- type DamageBonus
- type DiffToMoney
- type DiscoGun
- type DiscoShip
- type DiscoveryIDRephacks
- type DiscoveryTechCompat
- type EnemyFaction
- type Engine
- type EquipmentSlot
- type Exporter
- func (e *Exporter) AllRoutes(bases []*Base) []*Base
- func (e *Exporter) Buyable(Bases []*GoodAtBase) bool
- func (e *Exporter) Export() *Exporter
- func (e *Exporter) FilterToUsefulAmmo(cms []Ammo) []Ammo
- func (e *Exporter) FilterToUsefulCommodities(commodities []*Commodity) []*Commodity
- func (e *Exporter) FilterToUsefulCounterMeasures(cms []CounterMeasure) []CounterMeasure
- func (e *Exporter) FilterToUsefulEngines(engines []Engine) []Engine
- func (e *Exporter) FilterToUsefulGun(guns []Gun) []Gun
- func (e *Exporter) FilterToUsefulMines(mines []Mine) []Mine
- func (e *Exporter) FilterToUsefulShields(shields []Shield) []Shield
- func (e *Exporter) FilterToUsefulShips(ships []Ship) []Ship
- func (e *Exporter) FilterToUsefulThrusters(thrusters []Thruster) []Thruster
- func (e *Exporter) FilterToUsefulTractors(tractors []Tractor) []Tractor
- func (e *Exporter) FilterToUserfulScanners(items []Scanner) []Scanner
- func (e *Exporter) GetAmmo(ids []Tractor) []Ammo
- func (e *Exporter) GetAtBasesSold(commodity GetAtBasesInput) []*GoodAtBase
- func (e *Exporter) GetBaseInfo(base_nickname universe_mapped.BaseNickname) BaseInfo
- func (e *Exporter) GetBases() []*Base
- func (e *Exporter) GetBuyableShields(shields []Shield) map[string]bool
- func (e *Exporter) GetCommodities() []*Commodity
- func (e *Exporter) GetCounterMeasures(ids []Tractor) []CounterMeasure
- func (e *Exporter) GetEngineSpeed(engine_info *equip_mapped.Engine) int
- func (e *Exporter) GetEngines(ids []Tractor) []Engine
- func (e *Exporter) GetFactionName(nickname cfgtype.FactionNick) string
- func (e *Exporter) GetFactions(bases []*Base) []Faction
- func (e *Exporter) GetGuns(ids []Tractor, buyable_ship_tech map[string]bool) []Gun
- func (e *Exporter) GetInfocardName(ids_name int, nickname string) string
- func (e *Exporter) GetMines(ids []Tractor) []Mine
- func (e *Exporter) GetMissiles(ids []Tractor, buyable_ship_tech map[string]bool) []Gun
- func (e *Exporter) GetMissions(bases []*Base, factions []Faction) []*Base
- func (e *Exporter) GetOres(Commodities []*Commodity) []*Base
- func (e *Exporter) GetRegionName(system *universe_mapped.System) string
- func (e *Exporter) GetScanners(ids []Tractor) []Scanner
- func (e *Exporter) GetShields(ids []Tractor) []Shield
- func (e *Exporter) GetShips(ids []Tractor, TractorsByID map[cfgtype.TractorID]Tractor) []Ship
- func (e *Exporter) GetThrusters(ids []Tractor) []Thruster
- func (e *Exporter) GetTractors() []Tractor
- func (e *Exporter) NewEnemyFaction(faction Faction, npc_ranks []int) EnemyFaction
- func (e *Exporter) TradePaths(bases []*Base, commodities []*Commodity) ([]*Base, []*Commodity)
- type Faction
- type GetAtBasesInput
- type GoodAtBase
- type GraphResults
- type Gun
- type GunDetailed
- type Infocard
- type InfocardKey
- type Infocards
- type MarketGood
- type Mine
- type MiningInfo
- type Missile
- type MissioNFaction
- type OptExport
- type PathWithNavmap
- type Rephack
- type Reputation
- type Route
- type Scanner
- type Shield
- type Ship
- type Thruster
- type Tractor
- type TradeRoute
Constants ¶
This section is empty.
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 []*GoodAtBase) bool
func DistanceForVecs ¶ added in v0.54.0
func GetPricePerVoume ¶ added in v0.57.0
func InitRegexExpression ¶ added in v0.24.0
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 VectorToSectorCoord ¶ added in v0.70.0
func VectorToSectorCoord(system *universe_mapped.System, pos cfgtype.Vector) string
Types ¶
type Base ¶
type Base struct {
Name string
Archetypes []string
Nickname string
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
MarketGoods []MarketGood
Pos cfgtype.Vector
SectorCoord string
Missions BaseMissions
BaseAllTradeRoutes
BaseAllRoutes
MiningInfo
Reachable bool
}
func FilterToUserfulBases ¶ added in v0.33.0
func FitlerToUsefulOres ¶ added in v0.69.0
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 BaseMissions ¶ added in v0.52.0
type BaseRoute ¶ added in v0.78.0
func NewBaseRoute ¶ added in v0.78.0
func NewBaseRoute(g *GraphResults, FromBase *Base, ToBase *Base) *BaseRoute
type ComboRoute ¶ added in v0.78.0
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
NameID int
InfocardID int
Infocard InfocardKey
Bases []*GoodAtBase
PriceBestBaseBuysFor int
PriceBestBaseSellsFor int
ProffitMargin int
BaseAllTradeRoutes
}
type CompatibleIDsForTractor ¶ added in v0.58.0
func GetOrederedTechCompat ¶ added in v0.74.0
func GetOrederedTechCompat(TractorsByID map[cfgtype.TractorID]Tractor, DiscoveryTechCompat *DiscoveryTechCompat) []CompatibleIDsForTractor
type CounterMeasure ¶ added in v0.35.0
type DamageBonus ¶ added in v0.21.0
type DiffToMoney ¶ added in v0.52.0
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
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 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 []*GoodAtBase
*DiscoveryTechCompat
}
type EquipmentSlot ¶ added in v0.27.0
type Exporter ¶
type Exporter struct {
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
// 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) Buyable ¶ added in v0.61.2
func (e *Exporter) Buyable(Bases []*GoodAtBase) bool
func (*Exporter) FilterToUsefulAmmo ¶ added in v0.61.2
func (*Exporter) FilterToUsefulCommodities ¶ added in v0.61.2
func (*Exporter) FilterToUsefulCounterMeasures ¶ added in v0.61.2
func (e *Exporter) FilterToUsefulCounterMeasures(cms []CounterMeasure) []CounterMeasure
func (*Exporter) FilterToUsefulEngines ¶ added in v0.61.2
func (*Exporter) FilterToUsefulGun ¶ added in v0.61.2
func (*Exporter) FilterToUsefulMines ¶ added in v0.61.2
func (*Exporter) FilterToUsefulShields ¶ added in v0.61.2
func (*Exporter) FilterToUsefulShips ¶ added in v0.61.2
func (*Exporter) FilterToUsefulThrusters ¶ added in v0.61.2
func (*Exporter) FilterToUsefulTractors ¶ added in v0.61.2
func (*Exporter) FilterToUserfulScanners ¶ added in v0.61.2
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) GetBuyableShields ¶ added in v0.70.4
func (*Exporter) GetCommodities ¶ added in v0.19.0
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 (*Exporter) GetFactionName ¶ added in v0.71.0
func (e *Exporter) GetFactionName(nickname cfgtype.FactionNick) string
func (*Exporter) GetFactions ¶ added in v0.13.0
func (*Exporter) GetInfocardName ¶ added in v0.59.0
func (*Exporter) GetMissiles ¶ added in v0.22.0
func (*Exporter) GetMissions ¶ added in v0.51.5
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 (*Exporter) GetShields ¶ added in v0.24.0
func (*Exporter) GetThrusters ¶ added in v0.25.0
func (*Exporter) GetTractors ¶ added in v0.28.0
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.
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
Bribes []Bribe
}
func FilterToUsefulFactions ¶ added in v0.33.0
type GetAtBasesInput ¶ added in v0.21.0
type GoodAtBase ¶ added in v0.21.0
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, ) *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 []*GoodAtBase
DamageBonuses []DamageBonus
Missile
*DiscoveryTechCompat
GunDetailed
NumBarrels *int
BurstFire *BurstFire
AmmoLimit AmmoLimit
DiscoGun *DiscoGun
}
type GunDetailed ¶ added in v0.72.0
type InfocardKey ¶ added in v0.17.0
type InfocardKey string
type Infocards ¶ added in v0.58.3
type Infocards map[InfocardKey]Infocard
type MarketGood ¶ added in v0.8.0
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 []*GoodAtBase
*DiscoveryTechCompat
AmmoLimit AmmoLimit
}
type MiningInfo ¶ added in v0.69.1
type MiningInfo struct {
DynamicLootMin int
DynamicLootMax int
DynamicLootDifficulty int
MinedGood MarketGood
}
type MissioNFaction ¶ added in v0.52.0
type PathWithNavmap ¶ added in v0.70.2
type PathWithNavmap struct {
}
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 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 (*Route) GetCruiseSpeed ¶ added in v0.78.0
func (*Route) GetNameByIdsName ¶ added in v0.78.0
func (*Route) GetPaths ¶ added in v0.78.0
func (t *Route) GetPaths() []PathWithNavmap
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 []*GoodAtBase
*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
ImpulseSpeed float64
ReverseFraction float64
ThrustCapacity int
ThrustRecharge int
MaxAngularSpeedDegS float64
AngularDistanceFrom0ToHalfSec float64
TimeTo90MaxAngularSpeed float64
NudgeForce float64
StrafeForce float64
NameID int
InfoID int
Bases []*GoodAtBase
Slots []EquipmentSlot
BiggestHardpoint []string
*DiscoveryTechCompat
DiscoShip *DiscoShip
}
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.