(010c23458) Added a notification that tells the player where cargo spawns

This commit is contained in:
Joonas Rikkonen
2019-04-03 16:20:22 +03:00
parent 3eb11d9c5d
commit b75db42253
@@ -90,8 +90,9 @@ namespace Barotrauma
public static void CreateItems(List<PurchasedItem> 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<ItemContainer, int> availableContainers = new Dictionary<ItemContainer, int>();
ItemPrefab containerPrefab = null;
foreach (PurchasedItem pi in itemsToSpawn)