Versions in this module Expand all Collapse all v0 v0.0.3 Oct 17, 2022 Changes in this version + const BINARY + const CENTER + const Empty + const FAR_ORBIT + const LargeGasGiant + const LargeGasGiantString + const NEAR_ORBIT + const PlanetoidBelt + const PlanetoidBeltString + const Ring + const RockyPlanet + const RockyPlanetString + const SOLITARY + const Small + const SmallGasGiant + const SmallGasGiantString + const StarportA + const StarportB + const StarportC + const StarportD + const StarportE + const StarportF + const StarportG + const StarportH + const StarportNone + const StarportX + const StarportY + const StellarBody + const StellarBodyString + const TRINARY + type Body interface + GetType func() BodyType + type BodyType int + func (bt *BodyType) UnmarshalJSON(b []byte) error + func (bt BodyType) MarshalJSON() ([]byte, error) + type EmptyOrbit struct + PlanetaryOrbit int + StarSystemId int + StellarOrbit int + func (eo *EmptyOrbit) GetOrbit() (int, int) + func (eo *EmptyOrbit) GetType() BodyType + func (eo *EmptyOrbit) MarshalJSON() ([]byte, error) + func (eo *EmptyOrbit) ToMap() map[string]interface{} + type GasGiant struct + Moons map[int]Planet + Type BodyType + func CreateGasGiant(dg *util.DiceGenerator) *GasGiant + func (gg *GasGiant) FromMap(init map[string]interface{}) + func (gg *GasGiant) GetOrbit() (int, int) + func (gg *GasGiant) GetType() BodyType + func (gg *GasGiant) MarshalJSON() ([]byte, error) + func (gg *GasGiant) SetType(bt BodyType) error + func (gg *GasGiant) ToMap() map[string]interface{} + func (gg *GasGiant) UnmarshalJSON(b []byte) error + type MinorPlanet struct + Classifications TradeClassifications + MainWorldId int + Zone Zone + func (mp *MinorPlanet) GetType() BodyType + type Orbit interface + GetOrbit func() (int, int) + GetType func() BodyType + type Planet struct + Classifications TradeClassifications + Id int + Name string + NavalBase bool + Port Starport + Satellites map[int]*Planet + ScoutBase bool + func NewPlanet(initial map[string]interface{}, dg *DiceGenerator) *Planet + func (p *Planet) FromMap(init map[string]interface{}) + func (p *Planet) GetOrbit() (int, int) + func (p *Planet) GetType() BodyType + func (p *Planet) ToMap() map[string]interface{} + type Region struct + Height int + Id int + Name string + Width int + X int + Y int + type Star struct + Class StellarClass + Orbit int + Size StellarSize + SizeFraction int + func (s *Star) FromMap(init map[string]interface{}) + func (s *Star) GetNearestMajorClass() string + func (s *Star) GetOrbits(zones ...Zone) map[int]interface{} + func (s *Star) GetType() BodyType + func (s *Star) MarshalJSON() ([]byte, error) + func (s *Star) ToMap() map[string]interface{} + func (s *Star) UnmarshalJSON(b []byte) error + type StarPosition int + const PRIMARY + const SECONDARY + const TERTIARY + func (sp *StarPosition) UnmarshalJSON(b []byte) error + func (sp StarPosition) MarshalJSON() ([]byte, error) + type StarSystem struct + Orbits []Orbit + Sector string + Stars map[StarPosition]*Star + SubSector string + TravelZone TravelZone + X int + Y int + func NewStarSystem(initial map[string]interface{}, dg *util.DiceGenerator) *StarSystem + func (ss *StarSystem) Coordinate() string + func (ss *StarSystem) FromMap(init map[string]interface{}) + func (ss *StarSystem) GetBodies(bodyTypes ...BodyType) []Orbit + func (ss *StarSystem) MarshalJSON() ([]byte, error) + func (ss *StarSystem) ToMap() map[string]interface{} + func (ss *StarSystem) UnmarshalJSON(b []byte) error + type Starport int + func (sp Starport) MarshalJSON() ([]byte, error) + func (sp Starport) UnmarshalJSON(b []byte) error + type StellarClass int + const A + const B + const F + const G + const K + const M + func GetAllStellarClasses() []StellarClass + func (sc *StellarClass) ToString() string + func (sc *StellarClass) UnmarshalJSON(b []byte) error + func (sc StellarClass) MarshalJSON() ([]byte, error) + type StellarSize int + const D + const II + const III + const IV + const Ia + const Ib + const V + const VI + func GetAllStellarSizes() []StellarSize + func (ss *StellarSize) ToString() string + func (ss *StellarSize) UnmarshalJSON(b []byte) error + func (ss StellarSize) MarshalJSON() ([]byte, error) + type TradeClassification int + const Agricultural + const Colony + const Farming + const Industrial + const Military + const Mining + const NonAgricultural + const NonIndustrial + const Poor + const Research + const Rich + func (tc *TradeClassification) UnmarshalJSON(b []byte) error + func (tc TradeClassification) MarshalJSON() ([]byte, error) + type TradeClassifications map[TradeClassification]bool + func (tc TradeClassifications) MarshalJSON() ([]byte, error) + func (tc TradeClassifications) UnmarshalJSON(b []byte) error + type TravelZone int + const Green + const Red + const Yellow + func (tz *TravelZone) UnmarshalJSON(b []byte) error + func (tz TravelZone) MarshalJSON() ([]byte, error) + type UniversalPlanetProfile struct + Atmosphere int + Government int + Hydro int + LawLevel int + Population int + Size int + TechLevel int + func (upp *UniversalPlanetProfile) FromMap(init map[string]interface{}) + func (upp *UniversalPlanetProfile) ToMap() map[string]interface{} + type Zone int + const HABITABLE + const INNER + const OUTER + const UNAVAILABLE + func (sz Zone) MarshalJSON() ([]byte, error) + func (z *Zone) UnmarshalJSON(b []byte) error + func (z Zone) ToString() string