Documentation
¶
Index ¶
- Variables
- func GetConnKey(from_system string, to_system string) string
- func GetImages(folder_name string) *utfextract.Shapes
- func IsPlanetByShape(shape_name string) bool
- func PrintFormatedConns(target_kinds map[JumpConnectionKind]bool) map[string]bool
- type ConnectionEdge
- func (c ConnectionEdge) GetPosX() float64
- func (c ConnectionEdge) GetPosY() float64
- func (c ConnectionEdge) IsBireDirectional() bool
- func (c *ConnectionEdge) SetJumpable(FromSystemNick string, ToSystemNick string)
- func (c *ConnectionEdge) SetKind(first map[JumpConnectionKind]bool, second map[JumpConnectionKind]bool)
- type Coords2D
- type Export
- func (e *Export) EnrichSystemWithObjects(configs *configs_mapped.MappedConfigs, system_to_add *System, ...)
- func (e *Export) Export(ctx context.Context)
- func (e *Export) ExportInfocard(ids_info *semantic.Int, nickname string, name string, Pos cfg.Vector, ...)
- func (e *Export) ExportSystems(configs *configs_mapped.MappedConfigs) []*System
- func (e *Export) GetFullInfocardIds(infocard_id int) []int
- func (e *Export) GetInfocardName(ids_name int, nickname string) string
- func (e *Export) GetJumpConnectionKind(jh *systems_mapped.Jumphole) JumpConnectionKind
- func (e *Export) GetSystemConnections(systems []*System) SystemGraphs
- type Glow
- type JumpConnection
- type JumpConnectionKind
- type Jumphole
- type MissingShapes
- type Obj
- type ObjKind
- type Region
- type Star
- type System
- type SystemGraphInfo
- type SystemGraphs
- type Zone
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 GetImages ¶
func GetImages(folder_name string) *utfextract.Shapes
func IsPlanetByShape ¶
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 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 (*Export) EnrichSystemWithObjects ¶
func (e *Export) EnrichSystemWithObjects( configs *configs_mapped.MappedConfigs, system_to_add *System, stats *MissingShapes, )
func (*Export) ExportInfocard ¶
func (*Export) ExportSystems ¶
func (e *Export) ExportSystems(configs *configs_mapped.MappedConfigs) []*System
func (*Export) GetFullInfocardIds ¶
func (*Export) GetInfocardName ¶
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 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 System ¶
type System struct {
Nickname string `json:"nickname"`
Name string `json:"name"`
Pos Coords2D `json:"galaxy_pos"`
Region Region `json:"region"`
SystemGraphInfo
Objs []*Obj
Jumpholes []*Jumphole
Zones []*Zone
PoBs []*Obj
}
func (System) GetSquareScale ¶
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)
Click to show internal directories.
Click to hide internal directories.