Skip to content

Commit

Permalink
Fix for issue #152. Planets are now also checked if they already exis…
Browse files Browse the repository at this point in the history
…t as moons
  • Loading branch information
thorwin99 committed May 2, 2023
1 parent f8c44e2 commit 12c468e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions SEWorldGenPlugin/Generator/MyStarSystemGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,16 @@ public override void UpdateBeforeSimulation()
}
}
}
foreach (var obj in StarSystem.GetAllByType(MySystemObjectType.MOON))
{
if (obj is MySystemPlanetMoon)
{
if ((obj as MySystemPlanetMoon).EntityId == p.EntityId)
{
exists = true;
}
}
}
if (!exists && StarSystem.CenterObject != null)
{
MySystemPlanet vanillaPlanet = new MySystemPlanet();
Expand Down

0 comments on commit 12c468e

Please sign in to comment.