From fc247ecc7106a06970d65d0bdad670dd0b766bd1 Mon Sep 17 00:00:00 2001 From: sp00ktober Date: Thu, 4 Nov 2021 12:17:57 +0100 Subject: [PATCH] adjust check so that workShipCount can no longer fall below 0 --- NebulaWorld/Logistics/ILSShipManager.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NebulaWorld/Logistics/ILSShipManager.cs b/NebulaWorld/Logistics/ILSShipManager.cs index c17870e5d..836569c93 100644 --- a/NebulaWorld/Logistics/ILSShipManager.cs +++ b/NebulaWorld/Logistics/ILSShipManager.cs @@ -129,13 +129,13 @@ public void WorkShipBackToIdle(ILSShipData packet) Array.Copy(stationComponent.workShipDatas, packet.origShipIndex + 1, stationComponent.workShipDatas, packet.origShipIndex, stationComponent.workShipDatas.Length - packet.origShipIndex - 1); stationComponent.workShipCount--; stationComponent.idleShipCount++; - if (stationComponent.idleShipCount < 0) + if (stationComponent.idleShipCount > packet.planetAStationMaxShipCount) { - stationComponent.idleShipCount = 0; + stationComponent.idleShipCount = packet.planetAStationMaxShipCount; } - if (stationComponent.workShipCount > packet.planetAStationMaxShipCount) + if (stationComponent.workShipCount < 0) { - stationComponent.workShipCount = packet.planetAStationMaxShipCount; + stationComponent.workShipCount = 0; } stationComponent.WorkShipBackToIdle(packet.origShipIndex); }