From b75db422538808b570b8399c544477ea1af9ced5 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Wed, 3 Apr 2019 16:20:22 +0300 Subject: [PATCH] (010c23458) Added a notification that tells the player where cargo spawns --- .../BarotraumaShared/Source/GameSession/CargoManager.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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)