5202af9...3ea33fb

This commit is contained in:
Joonas Rikkonen
2019-03-18 21:46:09 +02:00
parent 044fd3344b
commit 97f31d0c94
61 changed files with 2585 additions and 558 deletions
@@ -54,7 +54,7 @@ namespace Barotrauma
private LocationType(XElement element)
{
Identifier = element.Name.ToString();
Identifier = element.GetAttributeString("identifier", element.Name.ToString());
Name = TextManager.Get("LocationName." + Identifier);
nameFormats = TextManager.GetAll("LocationNameFormat." + Identifier);
@@ -65,7 +65,7 @@ namespace Barotrauma
}
catch (Exception e)
{
DebugConsole.ThrowError("Failed to read name file for location type \""+Identifier+"\"!", e);
DebugConsole.ThrowError("Failed to read name file for location type \"" + Identifier + "\"!", e);
names = new List<string>() { "Name file not found" };
}
@@ -82,9 +82,7 @@ namespace Barotrauma
}
CommonnessPerZone[zoneIndex] = zoneCommonness;
}
string nameFile = element.GetAttributeString("namefile", "Content/Map/locationNames.txt");
try
catch (Exception e)
{
switch (subElement.Name.ToString().ToLowerInvariant())
{
@@ -430,6 +430,13 @@ namespace Barotrauma
}
CurrentLocation.SelectedMissionIndex = missionIndex;
//the destination must be the same as the destination of the mission
if (CurrentLocation.SelectedMission != null &&
CurrentLocation.SelectedMission.Locations[1] != SelectedLocation)
{
SelectLocation(CurrentLocation.SelectedMission.Locations[1]);
}
SelectedLocation = location;
SelectedConnection = connections.Find(c => c.Locations.Contains(CurrentLocation) && c.Locations.Contains(SelectedLocation));
OnLocationSelected?.Invoke(SelectedLocation, SelectedConnection);