export_map

package
v1.111.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 IsPlanetByShape

func IsPlanetByShape(shape_name string) 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

	Exp *configs_export.Exporter
}

func NewExport

func NewExport(ctx context.Context) *Export

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)

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

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
)

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
	VisibleByDefault bool
	Kind             ObjKind

	Star              Star
	PlanetSolarRadius float64

	Rotation cfg.Vector
}

type ObjKind

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

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