1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 15:33:31 +08:00

UXAssist: v1.3.1

This commit is contained in:
2025-04-26 23:51:48 +08:00
parent 8550a354f1
commit 2124719de0
8 changed files with 103 additions and 78 deletions

View File

@@ -83,8 +83,23 @@ public static class FactoryFunctions
buildPreviewsToRemove.Insert(~index, connObjId);
}
}
var entityPool = factory.entityPool;
var stationPool = factory.transport.stationPool;
foreach (var objId in buildPreviewsToRemove)
{
int stationId = entityPool[objId].stationId;
if (stationId > 0)
{
StationComponent sc = stationPool[stationId];
if (sc.id != stationId) continue;
for (int i = 0; i < sc.storage.Length; i++)
{
int package = player.TryAddItemToPackage(sc.storage[i].itemId, sc.storage[i].count, 0, true, objId);
UIItemup.Up(sc.storage[i].itemId, package);
}
sc.storage = new StationStore[sc.storage.Length];
sc.needs = new int[sc.needs.Length];
}
build.DoDismantleObject(objId);
}
blueprintCopyTool.ClearSelection();