public static void UpdateRemoteOrder(ILSRemoteOrderData packet) { if (!SimulatedWorld.Initialized || LocalPlayer.IsMasterClient) { return; } foreach (StationComponent stationComponent in GameMain.data.galacticTransport.stationPool) { if (stationComponent != null && stationComponent.gid == packet.stationGID) { PlanetData pData = GameMain.galaxy.PlanetById(stationComponent.planetId); if (pData?.factory?.transport != null) { foreach (StationComponent stationComponentPlanet in pData.factory.transport.stationPool) { if (stationComponentPlanet != null && stationComponentPlanet.gid == stationComponent.gid) { stationComponentPlanet.storage[packet.storageIndex].remoteOrder = packet.remoteOrder; break; } } } break; } } }
/* * Update the items that are currently in transfer by ships */ public static void UpdateRemoteOrder(ILSRemoteOrderData packet) { if (!SimulatedWorld.Initialized || LocalPlayer.IsMasterClient) { return; } foreach (StationComponent stationComponent in GameMain.data.galacticTransport.stationPool) { if (stationComponent != null && stationComponent.gid == packet.stationGID) { if (stationComponent.storage == null) { return; } stationComponent.storage[packet.storageIndex].remoteOrder = packet.remoteOrder; RefreshValuesUI(stationComponent, packet.storageIndex); break; } } }