Skip to content

Commit

Permalink
Migrate the rest of the Sol bodies to json loader
Browse files Browse the repository at this point in the history
  • Loading branch information
behindcurtain3 committed Mar 31, 2024
1 parent 91117e3 commit d3428e7
Show file tree
Hide file tree
Showing 8 changed files with 204 additions and 7 deletions.
22 changes: 22 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/ceres.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Ceres",
"colonizeable": true,
"info": {
"type": "dwarf-planet",
"albedo": 0.09,
"axialTilt": 4,
"mass": 9.3835E20,
"radius": 469.73
},
"orbit": {
"semiMajorAxis": 414E6,
"eccentricity": 0.0785,
"eclipticInclination": 10.6,
"LoAN": 80.3,
"AoP": 73.6,
"meanAnomaly": 291.4
},
"geoSurvey": {
"pointsRequired": 750
}
}
21 changes: 21 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/eris.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Eris",
"colonizeable": true,
"info": {
"type": "dwarf-planet",
"albedo": 0.96,
"mass": 1.66E22,
"radius": 1163
},
"orbit": {
"semiMajorAxis": 10.152E9,
"eccentricity": 0.43607,
"eclipticInclination": 44.04,
"LoAN": 35.951,
"AoP": 151.639,
"meanAnomaly": 205.989
},
"geoSurvey": {
"pointsRequired": 750
}
}
22 changes: 22 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/haumea.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Haumea",
"colonizeable": true,
"info": {
"type": "dwarf-planet",
"albedo": 0.33,
"axialTilt": 126,
"mass": 4.006E21,
"radius": 798
},
"orbit": {
"semiMajorAxis": 6.4501E9,
"eccentricity": 0.19642,
"eclipticInclination": 28.2137,
"LoAN": 122.167,
"AoP": 239.041,
"meanAnomaly": 218.205
},
"geoSurvey": {
"pointsRequired": 750
}
}
21 changes: 21 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/makemake.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Makemake",
"colonizeable": true,
"info": {
"type": "dwarf-planet",
"albedo": 0.74,
"mass": 3.1E21,
"radius": 739
},
"orbit": {
"semiMajorAxis": 6.7962E9,
"eccentricity": 0.16126,
"eclipticInclination": 28.9835,
"LoAN": 79.62,
"AoP": 294.834,
"meanAnomaly": 165.514
},
"geoSurvey": {
"pointsRequired": 750
}
}
38 changes: 38 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/neptune.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "Neptune",
"colonizeable": true,
"info": {
"gravity": 11.15,
"type": "ice-giant",
"albedo": 0.29,
"axialTilt": 28.32,
"mass": 1.02413E26,
"radius": 24764
},
"orbit": {
"semiMajorAxis": 4.5E9,
"eccentricity": 0.008678,
"eclipticInclination": 1.77,
"LoAN": 131.783,
"AoP": 273.187,
"meanAnomaly": 259.883
},
"atmosphere": {
"pressure": 986.923267,
"hydrosphere": false,
"hyrdoExtent": 0,
"greenhouseFactor": 0,
"greenhousePressure": 0,
"surfaceTemperature": -201,
"gases": [
{ "symbol": "H2", "percent": 0.8 },
{ "symbol": "He", "percent": 0.19 },
{ "symbol": "CH4", "percent": 0.015 },
{ "symbol": "HD", "percent": 0.00019 },
{ "symbol": "C2H6", "percent": 0.0000015 }
]
},
"geoSurvey": {
"pointsRequired": 2500
}
}
36 changes: 36 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/pluto.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "Pluto",
"colonizeable": true,
"info": {
"gravity": 0.62,
"type": "dwarf-planet",
"albedo": 0.49,
"axialTilt": 122.53,
"mass": 1.303E22,
"radius": 1188.3
},
"orbit": {
"semiMajorAxis": 5.90638E9,
"eccentricity": 0.2488,
"eclipticInclination": 17.16,
"LoAN": 110.299,
"AoP": 113.834,
"meanAnomaly": 14.53
},
"atmosphere": {
"pressure": 0.00000987,
"hydrosphere": false,
"hyrdoExtent": 0,
"greenhouseFactor": 0,
"greenhousePressure": 0,
"surfaceTemperature": -229,
"gases": [
{ "symbol": "N2", "percent": 0.99 },
{ "symbol": "CH4", "percent": 0.005 },
{ "symbol": "CO", "percent": 0.0025 }
]
},
"geoSurvey": {
"pointsRequired": 750
}
}
37 changes: 37 additions & 0 deletions Pulsar4X/GameEngine/Data/basemod/bodies/uranus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "Uranus",
"colonizeable": true,
"info": {
"gravity": 8.69,
"type": "ice-giant",
"albedo": 0.3,
"axialTilt": 82.23,
"mass": 8.6810E25,
"radius": 25559
},
"orbit": {
"semiMajorAxis": 2.870972E9,
"eccentricity": 0.04717,
"eclipticInclination": 0.773,
"LoAN": 74.006,
"AoP": 96.998857,
"meanAnomaly": 142.2386
},
"atmosphere": {
"pressure": 1.28300025,
"hydrosphere": false,
"hyrdoExtent": 0,
"greenhouseFactor": 0,
"greenhousePressure": 0,
"surfaceTemperature": -197.2,
"gases": [
{ "symbol": "H2", "percent": 0.83 },
{ "symbol": "He", "percent": 0.15 },
{ "symbol": "CH4", "percent": 0.023 },
{ "symbol": "HD", "percent": 0.00009 }
]
},
"geoSurvey": {
"pointsRequired": 2500
}
}
14 changes: 7 additions & 7 deletions Pulsar4X/GameEngine/Engine/Factories/StarSystemFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,25 +266,25 @@ public StarSystem CreateSol(Game game)
var titan = SystemBodyFromJsonFactory.Create(game, sol, sun, GalaxyGen.Settings.J2000, new SensorProfileDB(), "Data/basemod/bodies/saturn/titan.json");
_systemBodyFactory.MineralGeneration(game.StartingGameData.Minerals.Values.ToList(), sol, titan);

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

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

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

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

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

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

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

// Comets
Expand Down

0 comments on commit d3428e7

Please sign in to comment.