diff --git a/Barotrauma/BarotraumaShared/Source/GameSession/CargoManager.cs b/Barotrauma/BarotraumaShared/Source/GameSession/CargoManager.cs index b5f51ee3f..aa0aa8fda 100644 --- a/Barotrauma/BarotraumaShared/Source/GameSession/CargoManager.cs +++ b/Barotrauma/BarotraumaShared/Source/GameSession/CargoManager.cs @@ -90,8 +90,9 @@ namespace Barotrauma public static void CreateItems(List itemsToSpawn) { - WayPoint wp = WayPoint.GetRandom(SpawnType.Cargo, null, Submarine.MainSub); + if (itemsToSpawn.Count == 0) { return; } + WayPoint wp = WayPoint.GetRandom(SpawnType.Cargo, null, Submarine.MainSub); if (wp == null) { DebugConsole.ThrowError("The submarine must have a waypoint marked as Cargo for bought items to be placed correctly!"); @@ -106,6 +107,10 @@ namespace Barotrauma return; } +#if CLIENT + new GUIMessageBox("", TextManager.Get("CargoSpawnNotification").Replace("[roomname]", cargoRoom.RoomName)); +#endif + Dictionary availableContainers = new Dictionary(); ItemPrefab containerPrefab = null; foreach (PurchasedItem pi in itemsToSpawn)