Option to choose mission type in mp

This commit is contained in:
Regalis
2016-05-10 18:42:50 +03:00
parent 1a3da8b29f
commit e7a06a6171
12 changed files with 129 additions and 32 deletions
@@ -14,8 +14,8 @@ namespace Barotrauma
}
}
public MissionMode(GameModePreset preset)
: base(preset)
public MissionMode(GameModePreset preset, object param)
: base(preset, param)
{
Location[] locations = new Location[2];
@@ -25,13 +25,16 @@ namespace Barotrauma
{
locations[i] = Location.CreateRandom(new Vector2((float)rand.NextDouble() * 10000.0f, (float)rand.NextDouble() * 10000.0f));
}
mission = Mission.LoadRandom(locations, rand);
mission = Mission.LoadRandom(locations, rand, param as string);
}
public override void Start()
{
base.Start();
if (mission == null) return;
new GUIMessageBox(mission.Name, mission.Description, 400, 400);
Networking.GameServer.Log("Mission: " + mission.Name, Color.Cyan);