Added MP campaign setup to the dedicated server & some console commands for managing the campaign

This commit is contained in:
Joonas Rikkonen
2017-09-17 20:03:18 +03:00
parent 9114ae658f
commit e26600d088
11 changed files with 218 additions and 42 deletions
@@ -397,6 +397,19 @@ namespace Barotrauma
OnLocationSelected?.Invoke(selectedLocation, selectedConnection);
}
public void SelectLocation(Location location)
{
if (!locations.Contains(location))
{
DebugConsole.ThrowError("Failed to select a location. "+location.Name+" not found in the map.");
return;
}
selectedLocation = location;
selectedConnection = connections.Find(c => c.Locations.Contains(currentLocation) && c.Locations.Contains(selectedLocation));
OnLocationSelected?.Invoke(selectedLocation, selectedConnection);
}
public void Save(XElement element)
{
XElement mapElement = new XElement("map");