mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-09 14:13:31 +08:00
fix
This commit is contained in:
@@ -8,8 +8,9 @@ public static class PlanetFunctions {
|
|||||||
var player = GameMain.mainPlayer;
|
var player = GameMain.mainPlayer;
|
||||||
if (player == null) return;
|
if (player == null) return;
|
||||||
var planet = GameMain.localPlanet;
|
var planet = GameMain.localPlanet;
|
||||||
if (planet == null || planet.factory == null) return;
|
var factory = planet?.factory;
|
||||||
foreach (var etd in GameMain.localPlanet.factory.entityPool)
|
if (factory == null) return;
|
||||||
|
foreach (var etd in factory.entityPool)
|
||||||
{
|
{
|
||||||
var stationId = etd.stationId;
|
var stationId = etd.stationId;
|
||||||
if (stationId > 0)
|
if (stationId > 0)
|
||||||
@@ -23,18 +24,16 @@ public static class PlanetFunctions {
|
|||||||
UIItemup.Up(sc.storage[i].itemId, package);
|
UIItemup.Up(sc.storage[i].itemId, package);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sc.storage = new StationStore[sc.storage.Length];
|
sc.storage = new StationStore[sc.storage.Length];
|
||||||
sc.needs = new int[sc.needs.Length];
|
sc.needs = new int[sc.needs.Length];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toBag)
|
if (toBag)
|
||||||
{
|
{
|
||||||
player.controller.actionBuild.DoDismantleObject(etd.id);
|
player.controller.actionBuild.DoDismantleObject(etd.id);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GameMain.localPlanet.factory.RemoveEntityWithComponents(etd.id);
|
factory.RemoveEntityWithComponents(etd.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -144,7 +143,6 @@ public static class PlanetFunctions {
|
|||||||
if (warningPool[i].id == i && warningPool[i].factoryId == index)
|
if (warningPool[i].id == i && warningPool[i].factoryId == index)
|
||||||
warningSystem.RemoveWarningData(warningPool[i].id);
|
warningSystem.RemoveWarningData(warningPool[i].id);
|
||||||
}
|
}
|
||||||
|
|
||||||
factory.entityCursor = 1;
|
factory.entityCursor = 1;
|
||||||
factory.entityRecycleCursor = 0;
|
factory.entityRecycleCursor = 0;
|
||||||
factory.SetEntityCapacity(1024);
|
factory.SetEntityCapacity(1024);
|
||||||
|
|||||||
Reference in New Issue
Block a user