export_map

package
v1.145.8 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: AGPL-3.0 Imports: 30 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const HiddenID = -1

Variables

View Source
var ZoneFlagMap = map[int]string{
	0:      "zoneHidden",
	64:     "zoneRockAsteroids",
	65:     "zoneAlphaBigDust",
	66:     "zoneRock",
	74:     "zoneLeedsUraniumAsteroids",
	82:     "zoneDublinGoldField",
	128:    "zoneJerseyDebris",
	129:    "zoneDetroitDebrisNormal",
	130:    "zoneDetroitDebrisHigh",
	132:    "zoneDetroitDebrisLow",
	256:    "zoneIceAsteroidsSmall",
	257:    "zoneIceAsteroidsTau37",
	258:    "zoneIceAsteroids1",
	512:    "zoneLavaRocks",
	513:    "zoneVonRoheBeltLavaRocks",
	514:    "zoneDresdenLavaRocks",
	1024:   "zoneGreenAsteroids",
	1026:   "zoneZetaGreenAsteroids",
	2049:   "zoneIceAsteroids2",
	4096:   "zoneMinefield1",
	4128:   "zoneMinefield2",
	8192:   "zoneAsteroidField",
	8200:   "zoneAsteroids",
	16400:  "zoneIceNebula",
	32768:  "zoneDresdenFog",
	32776:  "zoneLeedsSmog",
	32833:  "zoneChugokuCloud",
	62768:  "zoneNebulaWithFogColour",
	65536:  "zoneExclusion1",
	131072: "zoneExclusion2",
	196608: "zoneExclusion3",
}

Functions

func GetConnKey

func GetConnKey(from_system string, to_system string) string

func GetImages

func GetImages(folder_name string) *utfextract.Shapes

func IsPlanet added in v1.119.3

func IsPlanet(solararch *solararch_mapped.Solar) bool

func PrintFormatedConns

func PrintFormatedConns(target_kinds map[JumpConnectionKind]bool) map[string]bool

Types

type ConnectionEdge

type ConnectionEdge struct {
	FirstSystem  *System
	SecondSystem *System

	FromFirstToSecondJumpable bool
	FromSecondToFirstJumpable bool

	// Const is made in values ordered by priority
	// if Alien gate is present, then it is most important
	// after that Jumpgate, then Jumphole, then Unstable, and then Unknown
	Kind JumpConnectionKind
}

func NewConnectionEdge

func NewConnectionEdge(first_system *System, second_system *System) *ConnectionEdge

func (ConnectionEdge) GetPosX

func (c ConnectionEdge) GetPosX() float64

func (ConnectionEdge) GetPosY

func (c ConnectionEdge) GetPosY() float64

func (ConnectionEdge) IsBireDirectional

func (c ConnectionEdge) IsBireDirectional() bool

func (*ConnectionEdge) SetJumpable

func (c *ConnectionEdge) SetJumpable(FromSystemNick string, ToSystemNick string)

func (*ConnectionEdge) SetKind

func (c *ConnectionEdge) SetKind(first map[JumpConnectionKind]bool, second map[JumpConnectionKind]bool)

type Coords2D

type Coords2D struct {
	X *float64
	Y *float64
}

type Export

type Export struct {
	Mapped  *configs_mapped.MappedConfigs
	Systems []*System
	Graph   SystemGraphs
	Shapes  *utfextract.Shapes

	PobsBySystemNick   map[string][]*configs_export.PoB
	MiningBySystemNick map[string][]*configs_export.Base
	MiningUsefulByNick map[string]bool
	SearchEntries      map[string]search_bar.Entry

	Exp *configs_export.Exporter
}

func NewExport

func NewExport(ctx context.Context, opts ...ExportOpt) *Export

func (*Export) BuildGraph added in v1.112.0

func (e *Export) BuildGraph(systems []*System, everything_dockable solararch_mapped.DockableOptions) (graph SystemGraphs)

func (*Export) EnrichSystemWithObjects

func (e *Export) EnrichSystemWithObjects(
	configs *configs_mapped.MappedConfigs,
	system_to_add *System,
	stats *MissingShapes,
)

func (*Export) Export

func (e *Export) Export(ctx context.Context)

func (*Export) ExportInfocard

func (e *Export) ExportInfocard(
	ids_info *semantic.Int,
	nickname string,
	name string,
	Pos cfg.Vector,
	ids_name *semantic.Int,
	faction_name string,
	obj *Obj,
	info_end func(info *infocarder.InfocardBuilder),
)

func (*Export) ExportInfocard2 added in v1.120.0

func (e *Export) ExportInfocard2(
	ids_info_num int,
	nickname string,
	name string,
	Pos cfg.Vector,
	ids_name_num int,
	faction_name string,
	obj *Obj,
	info_end func(info *infocarder.InfocardBuilder),
)

func (*Export) ExportSystems

func (e *Export) ExportSystems(configs *configs_mapped.MappedConfigs) []*System

func (*Export) GetFullInfocardIds

func (e *Export) GetFullInfocardIds(infocard_id int) []int

func (*Export) GetInfocardName

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

func (*Export) GetJumpConnectionKind

func (e *Export) GetJumpConnectionKind(jh *systems_mapped.Jumphole) JumpConnectionKind

func (*Export) GetSystemConnections

func (e *Export) GetSystemConnections(systems []*System) SystemGraphs

// we have to find only one between each system // and mark if it is // - Two Way Jump Gate (Blue Connection) // - Two way Jump hole (Yellow connection) // - One Way (Purple Connection) // - Two Way Unstable (Orange connection) // - Pink, unidentified

// How to find them? // per system go? and in hashmap... marking data about each system pair ergh?

// We need to mark if the system is reachable from manhattan by any means? to define if it should be filtered

func (*Export) MakeCopyCoordsButton added in v1.117.0

func (e *Export) MakeCopyCoordsButton(Pos cfg.Vector) string

func (*Export) TechnicalInfoWrite added in v1.117.0

func (e *Export) TechnicalInfoWrite(
	info infocarder.InfocardBuilder,
	nickname string,
	Pos cfg.Vector,
	ids_name_num int,
	ids_info_num int,
	faction_name string,
	info_end func(info *infocarder.InfocardBuilder),
) infocarder.InfocardBuilder

func (*Export) WriteIniConfig added in v1.123.0

func (e *Export) WriteIniConfig(
	info *infocarder.InfocardBuilder,
	model *semantic.Model,
)

type ExportOpt added in v1.118.1

type ExportOpt func(e *Export)

type Glow

type Glow struct {
	Scale      float64
	InnerColor cfg.Vector
	OuterColor cfg.Vector
}

type JumpConnection

type JumpConnection struct {
	Kind    map[JumpConnectionKind]bool
	*System `json:"-" swaggerignore:"true"`
}

type JumpConnectionKind

type JumpConnectionKind int8
const (
	JumpKindUnknown JumpConnectionKind = iota
	JumpKindUnstableCargoLimited
	JumpKindFighterOnly
	JumpKindJumphole
	JumpKindJumpgate
	JumpKindAlien
	JumpKindCampaignLocked
)

func (JumpConnectionKind) ToStr

func (j JumpConnectionKind) ToStr() string

type Jumphole

type Jumphole struct {
	Obj
	GotoSystem     string
	GotoSystemName string
	Kind           JumpConnectionKind
}

type MissingShapes

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

type Obj

type Obj struct {
	Nickname string
	Name     string
	Pos      cfg.Vector

	ShapeName   string
	SolarRadius float64

	VisibleByDefault bool
	Kind             ObjKind
	UseFallback      bool

	Star Star

	Rotation cfg.Vector

	HasInfocard                bool
	IsPoBWithKnownDockingPerms bool

	IsPoBWithHardcodedCords bool
}

type ObjKind

type ObjKind int8
const (
	ObjUnknown ObjKind = iota
	ObjJumphole
	ObjTradelane
	ObjStar
	ObjBase
	ObjPlayerBase
	ObjMining
	ObjPlanet
	ObjWreck
	ObjZone
	ObjOthers
	ObjOtherNoname
	ObjDiscoEncounter
)

func (ObjKind) ToNick

func (o ObjKind) ToNick() string

type Region

type Region struct {
	Name string `json:"name"`
}

type Star

type Star struct {
	AtmosphereRange int
	StarRadius      float64
	StarGlow        Glow
	StarCenter      Glow
}

type System

type System struct {
	Nickname    string   `json:"nickname"`
	Name        string   `json:"name"`
	Pos         Coords2D `json:"galaxy_pos"`
	NavMapScale float64

	Region Region `json:"region"`

	SystemGraphInfo

	Objs      []*Obj
	Jumpholes []*Jumphole
	Zones     []*Zone
	PoBs      []*Obj
}

func (System) GetSquareScale

func (s System) GetSquareScale() float64

type SystemGraphInfo

type SystemGraphInfo struct {
	VisibleByDefault bool                       // from manhattan as usual
	LeadsTo          map[string]*JumpConnection // edges to other systems
}

type SystemGraphs

type SystemGraphs struct {
	Systems         map[string]*System         // sparse graph of systems
	ConnectionEdges map[string]*ConnectionEdge // ready for printing. Only single one per each two systems.
}

func (*SystemGraphs) DFS

func (g *SystemGraphs) DFS(startVertex *System)

func (*SystemGraphs) DFSUtil

func (g *SystemGraphs) DFSUtil(vertex *System, visited map[string]bool)

type Zone

type Zone struct {
	Obj
	PropertyFlags           int
	ZoneShape               string
	Size                    cfg.Vector
	PropertyFogColor        cfg.Vector
	PropertyFogColorEnabled bool
}

Jump to

Keyboard shortcuts

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