MP campaign additions/fixes:

- Store tab & cargo spawning
- Sub & shuttle lists and level seed box are disabled when a campaign is active.
- Campaign UI is recreated if a new campaign is started while another one is active.
This commit is contained in:
Joonas Rikkonen
2017-09-14 19:39:03 +03:00
parent 348d81a66f
commit b292a301cf
8 changed files with 98 additions and 48 deletions
@@ -21,7 +21,7 @@ namespace Barotrauma
{
WayPoint wp = WayPoint.GetRandom(SpawnType.Cargo, null, Submarine.MainSub);
if (wp==null)
if (wp == null)
{
DebugConsole.ThrowError("The submarine must have a waypoint marked as Cargo for bought items to be placed correctly!");
return;
@@ -41,7 +41,15 @@ namespace Barotrauma
Rand.Range(cargoRoom.Rect.X + 20, cargoRoom.Rect.Right - 20),
cargoRoom.Rect.Y - cargoRoom.Rect.Height + prefab.Size.Y/2);
new Item(prefab, position, wp.Submarine);
if (GameMain.Server != null)
{
Entity.Spawner.AddToSpawnQueue(prefab, position, wp.Submarine);
}
else
{
new Item(prefab, position, wp.Submarine);
}
}
purchasedItems.Clear();