1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2026-03-31 09:17:43 +08:00

fix possible crash

This commit is contained in:
2026-03-27 16:51:33 +08:00
parent 69b028d706
commit be86aebf7c

View File

@@ -576,7 +576,7 @@ public static class PlanetFunctions
factory.PlanetReformRevert();
}
gameData.LeavePlanet();
planet.UnloadFactory();
var index = factory.index;
var warningSystem = gameData.warningSystem;
var warningPool = warningSystem.warningPool;
@@ -663,7 +663,12 @@ public static class PlanetFunctions
factory.digitalSystem = new DigitalSystem(planet);
//GameMain.data.statistics.production.CreateFactoryStat(index);
gameData.ArrivePlanet(planet);
planet.LoadFactory();
while (!planet.factoryLoaded)
{
PlanetModelingManager.Update();
System.Threading.Thread.Sleep(0);
}
foreach (var kvp in returnedItems)
{