1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 02:53:29 +08:00

minor fixes

This commit is contained in:
2025-11-15 01:02:33 +08:00
parent cacbfd6d5f
commit 269cc3b801
2 changed files with 25 additions and 24 deletions

View File

@@ -130,6 +130,20 @@ public static class PlanetFunctions
planet.audio?.RemoveAudioData(ed.audioId);
}
for (var id = factory.prebuildCursor - 1; id > 0; id--)
{
ref var pb = ref factory.prebuildPool[id];
if (pb.id != id) continue;
if (pb.colliderId != 0)
{
planet.physics.RemoveLinkedColliderData(pb.colliderId);
}
if (pb.modelId != 0)
{
GameMain.gpuiManager.RemovePrebuildModel(pb.modelIndex, pb.modelId);
}
}
var hives = GameMain.spaceSector?.dfHives;
if (hives != null)
{
@@ -202,7 +216,7 @@ public static class PlanetFunctions
factory.PlanetReformRevert();
}
planet.UnloadFactory();
GameMain.data.LeavePlanet();
var index = factory.index;
var warningSystem = GameMain.data.warningSystem;
var warningPool = warningSystem.warningPool;
@@ -275,12 +289,7 @@ public static class PlanetFunctions
factory.digitalSystem = new DigitalSystem(planet);
//GameMain.data.statistics.production.CreateFactoryStat(index);
planet.LoadFactory();
while (!planet.factoryLoaded)
{
PlanetModelingManager.Update();
Thread.Sleep(0);
}
GameMain.data.ArrivePlanet(planet);
}
public static void BuildOrbitalCollectors()