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:
@@ -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();
|
||||
|
||||
@@ -111,7 +111,12 @@ namespace Barotrauma
|
||||
public override void Start()
|
||||
{
|
||||
base.Start();
|
||||
|
||||
|
||||
if (GameMain.Server != null)
|
||||
{
|
||||
CargoManager.CreateItems();
|
||||
}
|
||||
|
||||
lastUpdateID++;
|
||||
}
|
||||
|
||||
|
||||
@@ -197,21 +197,16 @@ namespace Barotrauma
|
||||
submarine.SetPosition(submarine.FindSpawnPos(level.StartPosition - new Vector2(0.0f, 2000.0f)));
|
||||
}
|
||||
|
||||
if (GameMode.Mission != null)
|
||||
{
|
||||
currentMission = GameMode.Mission;
|
||||
}
|
||||
|
||||
if (GameMode!=null) GameMode.Start();
|
||||
Entity.Spawner = new EntitySpawner();
|
||||
|
||||
if (GameMode.Mission != null) currentMission = GameMode.Mission;
|
||||
if (GameMode != null) GameMode.Start();
|
||||
if (GameMode.Mission != null) Mission.Start(Level.Loaded);
|
||||
|
||||
|
||||
EventManager.StartRound(level);
|
||||
|
||||
if (GameMode != null) GameMode.MsgBox();
|
||||
|
||||
Entity.Spawner = new EntitySpawner();
|
||||
|
||||
#if CLIENT
|
||||
roundSummary = new RoundSummary(this);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user