Unstable 0.1500.1.0 (BaroDev edition)
This commit is contained in:
@@ -531,6 +531,7 @@ namespace Barotrauma
|
||||
if (Level.Loaded.EndOutpost == null)
|
||||
{
|
||||
Submarine closestSub = Submarine.FindClosest(Level.Loaded.EndExitPosition, ignoreOutposts: true, ignoreRespawnShuttle: true, teamType: leavingPlayers.FirstOrDefault()?.TeamID);
|
||||
if (closestSub == null) { return null; }
|
||||
return closestSub.DockedTo.Contains(Submarine.MainSub) ? Submarine.MainSub : closestSub;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -173,6 +173,12 @@ namespace Barotrauma
|
||||
if (matchingSub != null) { availableSubs.Add(matchingSub); }
|
||||
}
|
||||
break;
|
||||
case "savedexperiencepoints":
|
||||
foreach (XElement savedExp in subElement.Elements())
|
||||
{
|
||||
savedExperiencePoints.Add(new SavedExperiencePoints(savedExp));
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -661,7 +661,7 @@ namespace Barotrauma
|
||||
#if SERVER
|
||||
return GameMain.Server.ConnectedClients.Select(c => c.Character).Where(c => c.Info != null);
|
||||
#else
|
||||
return GameMain.GameSession.CrewManager.CharacterInfos.Select(i => i.Character).Where(c => c != null);
|
||||
return GameMain.GameSession.CrewManager.GetCharacters().Where(c => c.Info != null);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -671,28 +671,33 @@ namespace Barotrauma
|
||||
|
||||
try
|
||||
{
|
||||
IEnumerable<Character> crewCharacters = GameSession.GetSessionCrewCharacters();
|
||||
IEnumerable<Character> crewCharacters = GetSessionCrewCharacters();
|
||||
|
||||
foreach (Mission mission in missions)
|
||||
{
|
||||
mission.End();
|
||||
}
|
||||
|
||||
foreach (Character character in crewCharacters)
|
||||
{
|
||||
character.CheckTalents(AbilityEffectType.OnRoundEnd);
|
||||
}
|
||||
|
||||
if (missions.Any())
|
||||
{
|
||||
if (missions.Any(m => m.Completed))
|
||||
{
|
||||
foreach (CharacterInfo characterInfo in GameMain.GameSession.CrewManager.CharacterInfos)
|
||||
foreach (Character character in crewCharacters)
|
||||
{
|
||||
characterInfo.Character?.CheckTalents(AbilityEffectType.OnAnyMissionCompleted);
|
||||
character.CheckTalents(AbilityEffectType.OnAnyMissionCompleted);
|
||||
}
|
||||
}
|
||||
|
||||
if (missions.All(m => m.Completed))
|
||||
{
|
||||
foreach (CharacterInfo characterInfo in GameMain.GameSession.CrewManager.CharacterInfos)
|
||||
foreach (Character character in crewCharacters)
|
||||
{
|
||||
characterInfo.Character?.CheckTalents(AbilityEffectType.OnAllMissionsCompleted);
|
||||
character.CheckTalents(AbilityEffectType.OnAllMissionsCompleted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user