Skip to content

Commit

Permalink
Migrate Jupiter and its moons to json loader
Browse files Browse the repository at this point in the history
  • Loading branch information
behindcurtain3 committed Mar 30, 2024
1 parent 0fe8ac6 commit 7060cf9
Show file tree
Hide file tree
Showing 12 changed files with 305 additions and 21 deletions.
33 changes: 33 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/jupiter/01-io.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "Io",
"parent": "Jupiter",
"colonizeable": true,
"info": {
"type": "moon",
"albedo": 0.63,
"mass": 8.931938E22,
"radius": 1821.6
},
"orbit": {
"semiMajorAxis": 421700,
"eccentricity": 0.0041,
"eclipticInclination": 2.213,
"LoAN": 0,
"AoP": 0,
"meanAnomaly": 0
},
"atmosphere": {
"pressure": 1.9738E-08,
"hydrosphere": false,
"hyrdoExtent": 0,
"greenhouseFactor": 0,
"greenhousePressure": 0,
"surfaceTemperature": -108,
"gases": [
{ "symbol": "SO2", "percent": 0.9 }
]
},
"geoSurvey": {
"pointsRequired": 500
}
}
22 changes: 22 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/jupiter/02-europa.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Europa",
"parent": "Jupiter",
"colonizeable": true,
"info": {
"type": "moon",
"albedo": 0.67,
"mass": 4.799844E22,
"radius": 1560.8
},
"orbit": {
"semiMajorAxis": 670900,
"eccentricity": 0.009,
"eclipticInclination": 1.791,
"LoAN": 0,
"AoP": 0,
"meanAnomaly": 0
},
"geoSurvey": {
"pointsRequired": 500
}
}
33 changes: 33 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/jupiter/03-ganymede.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "Ganymede",
"parent": "Jupiter",
"colonizeable": true,
"info": {
"type": "moon",
"albedo": 0.43,
"mass": 1.4819E23,
"radius": 2634.1
},
"orbit": {
"semiMajorAxis": 1.0704E6,
"eccentricity": 0.0013,
"eclipticInclination": 0.2,
"LoAN": 0,
"AoP": 0,
"meanAnomaly": 0
},
"atmosphere": {
"pressure": 1.18E-11,
"hydrosphere": false,
"hyrdoExtent": 0,
"greenhouseFactor": 0,
"greenhousePressure": 0,
"surfaceTemperature": -163,
"gases": [
{ "symbol": "O2", "percent": 0.55 }
]
},
"geoSurvey": {
"pointsRequired": 500
}
}
34 changes: 34 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/jupiter/04-callisto.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "Callisto",
"parent": "Jupiter",
"colonizeable": true,
"info": {
"type": "moon",
"albedo": 0.22,
"mass": 1.075938E23,
"radius": 2410.3
},
"orbit": {
"semiMajorAxis": 1882700,
"eccentricity": 0.0074,
"eclipticInclination": 2.017,
"LoAN": 0,
"AoP": 0,
"meanAnomaly": 0
},
"atmosphere": {
"pressure": 7.4E-12,
"hydrosphere": false,
"hyrdoExtent": 0,
"greenhouseFactor": 0,
"greenhousePressure": 0,
"surfaceTemperature": -139.15,
"gases": [
{ "symbol": "CO2", "percent": 0.1 },
{ "symbol": "O2", "percent": 0.05 }
]
},
"geoSurvey": {
"pointsRequired": 500
}
}
22 changes: 22 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/jupiter/amalthea.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Amalthea",
"parent": "Jupiter",
"colonizeable": true,
"info": {
"type": "moon",
"albedo": 0.09,
"mass": 2.08E18,
"radius": 83.5
},
"orbit": {
"semiMajorAxis": 181365.84,
"eccentricity": 0.00319,
"eclipticInclination": 0,
"LoAN": 0,
"AoP": 0,
"meanAnomaly": 0
},
"geoSurvey": {
"pointsRequired": 500
}
}
22 changes: 22 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/jupiter/elara.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Elara",
"parent": "Jupiter",
"colonizeable": true,
"info": {
"type": "moon",
"albedo": 0.046,
"mass": 48.7E17,
"radius": 39.95
},
"orbit": {
"semiMajorAxis": 11741000,
"eccentricity": 0.217,
"eclipticInclination": 0,
"LoAN": 109.4,
"AoP": 143.6,
"meanAnomaly": 333
},
"geoSurvey": {
"pointsRequired": 500
}
}
22 changes: 22 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/jupiter/himalia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Himalia",
"parent": "Jupiter",
"colonizeable": true,
"info": {
"type": "moon",
"albedo": 0.057,
"mass": 4.2E18,
"radius": 85
},
"orbit": {
"semiMajorAxis": 11388690,
"eccentricity": 0.1537860,
"eclipticInclination": 29.90917,
"LoAN": 44.99935,
"AoP": 21.60643,
"meanAnomaly": 94.30785
},
"geoSurvey": {
"pointsRequired": 500
}
}
38 changes: 38 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/jupiter/jupiter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "Jupiter",
"colonizeable": false,
"info": {
"type": "gas-giant",
"albedo": 0.503,
"mass": 1.8982E27,
"radius": 71492
},
"orbit": {
"semiMajorAxis": 778.479E6,
"eccentricity": 0.0489,
"eclipticInclination": 1.303,
"LoAN": 100.464,
"AoP": 273.867,
"meanAnomaly": 20.02
},
"atmosphere": {
"pressure": 1.97384653,
"hydrosphere": false,
"hyrdoExtent": 0,
"greenhouseFactor": 0,
"greenhousePressure": 0,
"surfaceTemperature": -108,
"gases": [
{ "symbol": "H2", "percent": 0.89 },
{ "symbol": "He", "percent": 0.1 },
{ "symbol": "CH4", "percent": 0.003 },
{ "symbol": "NH3", "percent": 0.00026 },
{ "symbol": "HD", "percent": 0.000028 },
{ "symbol": "C2H6", "percent": 0.000006 },
{ "symbol": "H2O", "percent": 0.000004 }
]
},
"geoSurvey": {
"pointsRequired": 2500
}
}
22 changes: 22 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/jupiter/lysithea.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Lysithea",
"parent": "Jupiter",
"colonizeable": true,
"info": {
"type": "moon",
"albedo": 0.036,
"mass": 6.3E16,
"radius": 21.1
},
"orbit": {
"semiMajorAxis": 11717000,
"eccentricity": 0.112,
"eclipticInclination": 0,
"LoAN": 5.5,
"AoP": 49.5,
"meanAnomaly": 329.1
},
"geoSurvey": {
"pointsRequired": 500
}
}
22 changes: 22 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/jupiter/pasiphae.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Pasiphae",
"parent": "Jupiter",
"colonizeable": true,
"info": {
"type": "moon",
"albedo": 0.044,
"mass": 3E17,
"radius": 28.9
},
"orbit": {
"semiMajorAxis": 23624000,
"eccentricity": 0.409,
"eclipticInclination": 0,
"LoAN": 0,
"AoP": 0,
"meanAnomaly": 0
},
"geoSurvey": {
"pointsRequired": 500
}
}
22 changes: 22 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/jupiter/sinope.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Sinope",
"parent": "Jupiter",
"colonizeable": true,
"info": {
"type": "moon",
"albedo": 0.042,
"mass": 7.5E16,
"radius": 17.5
},
"orbit": {
"semiMajorAxis": 23939000,
"eccentricity": 0.25,
"eclipticInclination": 0,
"LoAN": 0,
"AoP": 0,
"meanAnomaly": 0
},
"geoSurvey": {
"pointsRequired": 500
}
}
34 changes: 13 additions & 21 deletions Pulsar4X/GameEngine/Engine/Factories/StarSystemFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,6 @@ public StarSystem CreateTestSystem(Game game, int x = 0, int y = 0)
return sol;
}



#region Create Sol

/// <summary>
/// Creates our own solar system.
/// This probibly needs to be Json! (since we're getting atmo stuff)
Expand Down Expand Up @@ -216,43 +212,42 @@ public StarSystem CreateSol(Game game)
var mars = SystemBodyFromJsonFactory.Create(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB(), "Data/basemod/bodies/mars.json");
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, mars);

Entity jupiter = SolEntities.Jupiter(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB());
var jupiter = SystemBodyFromJsonFactory.Create(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB(), "Data/basemod/bodies/jupiter/jupiter.json");
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, jupiter);
#region Jupiter Moons
Entity io = SolEntities.Io(game, sol, sun, jupiter, GalaxyGen.Settings.J2000, new SensorProfileDB());

var io = SystemBodyFromJsonFactory.Create(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB(), "Data/basemod/bodies/jupiter/01-io.json");
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, io);

Entity europa = SolEntities.Europa(game, sol, sun, jupiter, GalaxyGen.Settings.J2000, new SensorProfileDB());
var europa = SystemBodyFromJsonFactory.Create(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB(), "Data/basemod/bodies/jupiter/02-europa.json");
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, europa);

Entity ganymede = SolEntities.Ganymede(game, sol, sun, jupiter, GalaxyGen.Settings.J2000, new SensorProfileDB());
var ganymede = SystemBodyFromJsonFactory.Create(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB(), "Data/basemod/bodies/jupiter/03-ganymede.json");
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, ganymede);

Entity callisto = SolEntities.Callisto(game, sol, sun, jupiter, GalaxyGen.Settings.J2000, new SensorProfileDB());
var callisto = SystemBodyFromJsonFactory.Create(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB(), "Data/basemod/bodies/jupiter/04-callisto.json");
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, callisto);

Entity amalthea = SolEntities.Amalthea(game, sol, sun, jupiter, GalaxyGen.Settings.J2000, new SensorProfileDB());
var amalthea = SystemBodyFromJsonFactory.Create(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB(), "Data/basemod/bodies/jupiter/amalthea.json");
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, amalthea);

Entity himalia = SolEntities.Himalia(game, sol, sun, jupiter, GalaxyGen.Settings.J2000, new SensorProfileDB());
var himalia = SystemBodyFromJsonFactory.Create(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB(), "Data/basemod/bodies/jupiter/himalia.json");
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, himalia);

Entity elara = SolEntities.Elara(game, sol, sun, jupiter, GalaxyGen.Settings.J2000, new SensorProfileDB());
var elara = SystemBodyFromJsonFactory.Create(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB(), "Data/basemod/bodies/jupiter/elara.json");
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, elara);

Entity pasiphae = SolEntities.Pasiphae(game, sol, sun, jupiter, GalaxyGen.Settings.J2000, new SensorProfileDB());
var pasiphae = SystemBodyFromJsonFactory.Create(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB(), "Data/basemod/bodies/jupiter/pasiphae.json");
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, pasiphae);

Entity sinope = SolEntities.Sinope(game, sol, sun, jupiter, GalaxyGen.Settings.J2000, new SensorProfileDB());
var sinope = SystemBodyFromJsonFactory.Create(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB(), "Data/basemod/bodies/jupiter/sinope.json");
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, sinope);

Entity lysithea = SolEntities.Lysithea(game, sol, sun, jupiter, GalaxyGen.Settings.J2000, new SensorProfileDB());
var lysithea = SystemBodyFromJsonFactory.Create(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB(), "Data/basemod/bodies/jupiter/lysithea.json");
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, lysithea);
#endregion

Entity saturn = SolEntities.Saturn(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB());
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, saturn);
#region Saturn Moons

Entity mimas = SolEntities.Mimas(game, sol, sun, saturn, GalaxyGen.Settings.J2000, new SensorProfileDB());
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, mimas);

Expand All @@ -270,7 +265,6 @@ public StarSystem CreateSol(Game game)

Entity titan = SolEntities.Titan(game, sol, sun, saturn, GalaxyGen.Settings.J2000, new SensorProfileDB());
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, titan);
#endregion

Entity uranus = SolEntities.Uranus(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB());
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, uranus);
Expand Down Expand Up @@ -310,8 +304,6 @@ public StarSystem CreateSol(Game game)
return sol;
}

#endregion

#region TestSystems

/// <summary>
Expand Down

0 comments on commit 7060cf9

Please sign in to comment.