Fixed number of completed missions in a level not increasing if the connection is not selected after completing a mission. Closes #594
This commit is contained in:
@@ -446,6 +446,7 @@ namespace Barotrauma
|
||||
for (int i = 0; i < connections.Count; i++)
|
||||
{
|
||||
if (!connections[i].Passed) continue;
|
||||
connections[i].CheckMissionCompleted();
|
||||
|
||||
var connectionElement = new XElement("connection", new XAttribute("i", i));
|
||||
if (connections[i].MissionsCompleted > 0) connectionElement.Add(new XAttribute("m", connections[i].MissionsCompleted));
|
||||
@@ -525,6 +526,15 @@ namespace Barotrauma
|
||||
MissionsCompleted = 0;
|
||||
}
|
||||
|
||||
public void CheckMissionCompleted()
|
||||
{
|
||||
if (mission != null && mission.Completed)
|
||||
{
|
||||
MissionsCompleted++;
|
||||
mission = null;
|
||||
}
|
||||
}
|
||||
|
||||
public Location OtherLocation(Location location)
|
||||
{
|
||||
if (locations[0] == location)
|
||||
|
||||
Reference in New Issue
Block a user