Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop

This commit is contained in:
EvilFactory
2024-03-28 14:26:18 -03:00
271 changed files with 13174 additions and 3021 deletions
@@ -32,7 +32,7 @@ namespace Barotrauma
continue;
}
Type? type = Type.GetType(valueType);
Type? type = ReflectionUtils.GetType(valueType);
if (type == null)
{
@@ -62,7 +62,7 @@ namespace Barotrauma
{
DebugConsole.Log($"Set the value \"{identifier}\" to {value}");
SteamAchievementManager.OnCampaignMetadataSet(identifier, value, unlockClients: true);
AchievementManager.OnCampaignMetadataSet(identifier, value, unlockClients: true);
if (!data.ContainsKey(identifier))
{
@@ -135,7 +135,7 @@ namespace Barotrauma
element.Add(new XElement("Data",
new XAttribute("key", key),
new XAttribute("value", valueStr),
new XAttribute("type", value.GetType())));
new XAttribute("type", value.GetType().FullName ?? "")));
}
#if DEBUG
DebugConsole.Log(element.ToString());
@@ -156,17 +156,15 @@ namespace Barotrauma
if (CheatsEnabled)
{
DebugConsole.CheatsEnabled = true;
#if USE_STEAM
if (!SteamAchievementManager.CheatsEnabled)
if (!AchievementManager.CheatsEnabled)
{
SteamAchievementManager.CheatsEnabled = true;
AchievementManager.CheatsEnabled = true;
#if CLIENT
new GUIMessageBox("Cheats enabled", "Cheat commands have been enabled on the server. You will not receive Steam Achievements until you restart the game.");
new GUIMessageBox("Cheats enabled", "Cheat commands have been enabled on the server. You will not receive achievements until you restart the game.");
#else
DebugConsole.NewMessage("Cheat commands have been enabled.", Color.Red);
#endif
}
#endif
}
foreach (var subElement in element.Elements())
@@ -551,7 +551,7 @@ namespace Barotrauma
}
#endif
#if CLIENT
if (campaignMode != null && levelData != null) { SteamAchievementManager.OnBiomeDiscovered(levelData.Biome); }
if (campaignMode != null && levelData != null) { AchievementManager.OnBiomeDiscovered(levelData.Biome); }
var existingRoundSummary = GUIMessageBox.MessageBoxes.Find(mb => mb.UserData is RoundSummary)?.UserData as RoundSummary;
if (existingRoundSummary?.ContinueButton != null)
@@ -655,7 +655,7 @@ namespace Barotrauma
ObjectiveManager.ResetObjectives();
#endif
EventManager?.StartRound(Level.Loaded);
SteamAchievementManager.OnStartRound();
AchievementManager.OnStartRound();
GameMode.ShowStartMessage();
@@ -946,7 +946,7 @@ namespace Barotrauma
ObjectiveManager.ResetUI();
CharacterHUD.ClearBossProgressBars();
#endif
SteamAchievementManager.OnRoundEnded(this);
AchievementManager.OnRoundEnded(this);
#if SERVER
GameMain.Server?.TraitorManager?.EndRound();