v0.19.8.0
This commit is contained in:
@@ -700,7 +700,7 @@ namespace Barotrauma
|
||||
#endif
|
||||
}
|
||||
|
||||
public MissionPrefab UnlockMissionByIdentifier(Identifier identifier)
|
||||
public Mission UnlockMissionByIdentifier(Identifier identifier)
|
||||
{
|
||||
if (AvailableMissions.Any(m => m.Prefab.Identifier == identifier)) { return null; }
|
||||
|
||||
@@ -721,17 +721,17 @@ namespace Barotrauma
|
||||
#if CLIENT
|
||||
GameMain.GameSession?.Campaign?.CampaignUI?.RefreshLocationInfo();
|
||||
#endif
|
||||
return missionPrefab;
|
||||
return mission;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public MissionPrefab UnlockMissionByTag(Identifier tag)
|
||||
public Mission UnlockMissionByTag(Identifier tag)
|
||||
{
|
||||
var matchingMissions = MissionPrefab.Prefabs.Where(mp => mp.Tags.Any(t => t == tag));
|
||||
if (!matchingMissions.Any())
|
||||
{
|
||||
DebugConsole.ThrowError($"Failed to unlock a mission with the tag \"{tag}\": no matching missions not found.");
|
||||
DebugConsole.ThrowError($"Failed to unlock a mission with the tag \"{tag}\": no matching missions found.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -754,7 +754,7 @@ namespace Barotrauma
|
||||
#if CLIENT
|
||||
GameMain.GameSession?.Campaign?.CampaignUI?.RefreshLocationInfo();
|
||||
#endif
|
||||
return missionPrefab;
|
||||
return mission;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -462,6 +462,13 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
//make sure the connections are in the same order on the locations and the Connections list
|
||||
//otherwise their order will change when loading the game (as they're added to the locations in the same order they're loaded)
|
||||
foreach (var location in Locations)
|
||||
{
|
||||
location.Connections.Sort((c1, c2) => Connections.IndexOf(c1).CompareTo(Connections.IndexOf(c2)));
|
||||
}
|
||||
|
||||
for (int i = Connections.Count - 1; i >= 0; i--)
|
||||
{
|
||||
i = Math.Min(i, Connections.Count - 1);
|
||||
|
||||
Reference in New Issue
Block a user