mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-03-22 08:43:24 +08:00
UXAssist: crash fix
This commit is contained in:
@@ -102,7 +102,7 @@ public static class FactoryFunctions
|
||||
if (stationId > 0)
|
||||
{
|
||||
StationComponent sc = stationPool[stationId];
|
||||
if (sc.id != stationId) continue;
|
||||
if (sc is null || 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, sc.storage[i].inc, true, objId);
|
||||
|
||||
@@ -23,6 +23,7 @@ public static class PlanetFunctions
|
||||
if (stationId > 0)
|
||||
{
|
||||
var sc = GameMain.localPlanet.factory.transport.stationPool[stationId];
|
||||
if (sc is null || sc.id != stationId) continue;
|
||||
if (toBag)
|
||||
{
|
||||
for (var i = sc.storage.Length - 1; i >= 0; i--)
|
||||
@@ -123,7 +124,7 @@ public static class PlanetFunctions
|
||||
for (var i = factory.transport.stationCursor - 1; i > 0; i--)
|
||||
{
|
||||
var sc = stationPool[i];
|
||||
if (sc.id != i) continue;
|
||||
if (sc is null || sc.id != i) continue;
|
||||
gameData.galacticTransport.RemoveStationComponent(sc.id);
|
||||
sc.Reset();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user