Skip to content

Commit

Permalink
Correctly load the system bodies listed in the SystemBlueprint
Browse files Browse the repository at this point in the history
  • Loading branch information
behindcurtain3 committed Dec 30, 2024
1 parent 811d308 commit da61bc6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Pulsar4X/GameEngine/Data/basemod/blueprints/luna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"Type": "SystemBody",
"Payload": {
"UniqueID": "luna",
"UniqueID": "moon-luna",
"Name": "Luna",
"Parent": "Earth",
"Colonizable": true,
Expand Down
12 changes: 11 additions & 1 deletion Pulsar4X/GameEngine/Data/basemod/blueprints/sol.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@
"sol"
],
"Bodies": [
"planet-earth"
"mercury",
"venus",
"planet-earth",
"moon-luna",
"mars",
"jupiter",
"moon-io",
"saturn",
"moon-titan",
"uranus",
"neptune"
],
"SurveyRings": [
{ "RingRadiusInAU": 2, "Count": 2 }
Expand Down
2 changes: 1 addition & 1 deletion Pulsar4X/GameEngine/Galaxy/StarSystemFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public static StarSystem LoadFromBlueprint(Game game, SystemBlueprint systemBlue
}

// Load bodies
foreach(var (id, body) in game.StartingGameData.SystemBodies)
foreach(var id in systemBlueprint.Bodies)
{
var bodyEntity = SystemBodyFactory.CreateFromBlueprint(game, system, rootStar, galaxyGen.Settings.J2000, new SensorProfileDB(), game.StartingGameData.SystemBodies[id]);
}
Expand Down

0 comments on commit da61bc6

Please sign in to comment.