v1.2.6.0 (Winter Update)
This commit is contained in:
@@ -224,7 +224,8 @@ namespace Barotrauma
|
||||
var selectedTraitor = SelectRandomTraitor();
|
||||
if (selectedTraitor == null)
|
||||
{
|
||||
DebugConsole.ThrowError($"Could not find a suitable traitor for the event \"{selectedPrefab.Identifier}\".");
|
||||
DebugConsole.ThrowError($"Could not find a suitable traitor for the event \"{selectedPrefab.Identifier}\".",
|
||||
contentPackage: selectedPrefab.ContentPackage);
|
||||
return false;
|
||||
}
|
||||
CreateTraitorEvent(eventManager, selectedPrefab, selectedTraitor);
|
||||
@@ -262,8 +263,9 @@ namespace Barotrauma
|
||||
if (amountToChoose > viableTraitors.Count)
|
||||
{
|
||||
DebugConsole.ThrowError(
|
||||
$"Error in traitor event {traitorEvent.Prefab.Identifier}. Not enough players to choose {amountToChoose} secondary traitors."+
|
||||
$"Make sure the {nameof(traitorEvent.Prefab.MinPlayerCount)} of the event is high enough to support to desired amount of secondary traitors.");
|
||||
$"Error in traitor event {traitorEvent.Prefab.Identifier}. Not enough players to choose {amountToChoose} secondary traitors. " +
|
||||
$"Make sure the {nameof(traitorEvent.Prefab.MinPlayerCount)} of the event is high enough to support to desired amount of secondary traitors.",
|
||||
contentPackage: traitorEvent.Prefab.ContentPackage);
|
||||
amountToChoose = viableTraitors.Count;
|
||||
}
|
||||
|
||||
@@ -352,7 +354,8 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugConsole.ThrowError($"Failed to create an instance of the traitor event prefab \"{selectedPrefab.Identifier}\"!");
|
||||
DebugConsole.ThrowError($"Failed to create an instance of the traitor event prefab \"{selectedPrefab.Identifier}\"!",
|
||||
contentPackage: selectedPrefab.ContentPackage);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -365,7 +368,8 @@ namespace Barotrauma
|
||||
var traitor = SelectRandomTraitor();
|
||||
if (traitor == null)
|
||||
{
|
||||
DebugConsole.ThrowError($"Could not find a suitable traitor for the event \"{traitorEventPrefab.Identifier}\".");
|
||||
DebugConsole.ThrowError($"Could not find a suitable traitor for the event \"{traitorEventPrefab.Identifier}\".",
|
||||
contentPackage: traitorEventPrefab.ContentPackage);
|
||||
return;
|
||||
}
|
||||
CreateTraitorEvent(eventManager, traitorEventPrefab, traitor);
|
||||
@@ -451,6 +455,15 @@ namespace Barotrauma
|
||||
activeEvent.TraitorEvent.Prefab,
|
||||
activeEvent.TraitorEvent.CurrentState,
|
||||
activeEvent.Traitor));
|
||||
|
||||
if (activeEvent.TraitorEvent.CurrentState == TraitorEvent.State.Completed)
|
||||
{
|
||||
SteamAchievementManager.OnTraitorWin(activeEvent.TraitorEvent.Traitor?.Character);
|
||||
foreach (var secondaryTraitor in activeEvent.TraitorEvent.SecondaryTraitors)
|
||||
{
|
||||
SteamAchievementManager.OnTraitorWin(secondaryTraitor?.Character);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (previousTraitorEvents.Count > MaxPreviousEventHistory)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user