Release 1.9.7.0 - Summer Update 2025
This commit is contained in:
@@ -592,8 +592,7 @@ namespace Barotrauma
|
||||
public bool CharacterClicked(GUIComponent component, object selection)
|
||||
{
|
||||
if (!AllowCharacterSwitch) { return false; }
|
||||
if (selection is not Character character || character.IsDead || character.IsUnconscious) { return false; }
|
||||
if (!character.IsOnPlayerTeam) { return false; }
|
||||
if (selection is not Character character || !character.IsOnPlayerTeam) { return false; }
|
||||
|
||||
if (GameMain.IsMultiplayer)
|
||||
{
|
||||
@@ -605,6 +604,8 @@ namespace Barotrauma
|
||||
return true;
|
||||
}
|
||||
|
||||
if (character.IsDead || character.IsUnconscious) { return false; }
|
||||
|
||||
SelectCharacter(character);
|
||||
if (GUI.KeyboardDispatcher.Subscriber == crewList) { GUI.KeyboardDispatcher.Subscriber = null; }
|
||||
return true;
|
||||
@@ -3703,7 +3704,8 @@ namespace Barotrauma
|
||||
canIssueOrders =
|
||||
ChatMessage.CanUseRadio(Character.Controlled) &&
|
||||
Character.Controlled?.CurrentHull?.Submarine?.TeamID == Character.Controlled.TeamID &&
|
||||
!Character.Controlled.CurrentHull.Submarine.Info.IsWreck;
|
||||
!Character.Controlled.CurrentHull.Submarine.Info.IsWreck &&
|
||||
GameMain.Client is not { IsBlockedBySpamFilter: true };
|
||||
}
|
||||
|
||||
if (canIssueOrders)
|
||||
|
||||
+7
-43
@@ -133,56 +133,15 @@ namespace Barotrauma
|
||||
case "map":
|
||||
map = Map.Load(this, subElement);
|
||||
break;
|
||||
case "cargo":
|
||||
CargoManager.LoadPurchasedItems(subElement);
|
||||
break;
|
||||
case "pendingupgrades": //backwards compatibility
|
||||
case "upgrademanager":
|
||||
UpgradeManager = new UpgradeManager(this, subElement, isSingleplayer: true);
|
||||
break;
|
||||
case "pets":
|
||||
petsElement = subElement;
|
||||
break;
|
||||
case Wallet.LowerCaseSaveElementName:
|
||||
Bank = new Wallet(Option<Character>.None(), subElement);
|
||||
break;
|
||||
case "stats":
|
||||
LoadStats(subElement);
|
||||
break;
|
||||
case "eventmanager":
|
||||
GameMain.GameSession.EventManager.Load(subElement);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LoadSaveSharedSingleAndMultiplayer(element);
|
||||
|
||||
UpgradeManager ??= new UpgradeManager(this);
|
||||
|
||||
InitUI();
|
||||
|
||||
//backwards compatibility for saves made prior to the addition of personal wallets
|
||||
int oldMoney = element.GetAttributeInt("money", 0);
|
||||
if (oldMoney > 0)
|
||||
{
|
||||
Bank = new Wallet(Option<Character>.None())
|
||||
{
|
||||
Balance = oldMoney
|
||||
};
|
||||
}
|
||||
|
||||
PurchasedLostShuttlesInLatestSave = element.GetAttributeBool("purchasedlostshuttles", false);
|
||||
PurchasedHullRepairsInLatestSave = element.GetAttributeBool("purchasedhullrepairs", false);
|
||||
PurchasedItemRepairsInLatestSave = element.GetAttributeBool("purchaseditemrepairs", false);
|
||||
CheatsEnabled = element.GetAttributeBool("cheatsenabled", false);
|
||||
if (CheatsEnabled)
|
||||
{
|
||||
DebugConsole.CheatsEnabled = true;
|
||||
if (!AchievementManager.CheatsEnabled)
|
||||
{
|
||||
AchievementManager.CheatsEnabled = true;
|
||||
new GUIMessageBox("Cheats enabled", "Cheat commands have been enabled on the campaign. You will not receive Steam Achievements until you restart the game.");
|
||||
}
|
||||
}
|
||||
|
||||
if (map == null)
|
||||
{
|
||||
throw new System.Exception("Failed to load the campaign save file (saved with an older, incompatible version of Barotrauma).");
|
||||
@@ -687,6 +646,11 @@ namespace Barotrauma
|
||||
modeElement.Add(GameMain.GameSession?.EventManager.Save());
|
||||
}
|
||||
|
||||
foreach (Identifier unlockedRecipe in GameMain.GameSession.UnlockedRecipes)
|
||||
{
|
||||
modeElement.Add(new XElement("unlockedrecipe", new XAttribute("identifier", unlockedRecipe)));
|
||||
}
|
||||
|
||||
//save and remove all items that are in someone's inventory so they don't get included in the sub file as well
|
||||
foreach (Character c in Character.CharacterList)
|
||||
{
|
||||
|
||||
@@ -346,7 +346,6 @@ namespace Barotrauma
|
||||
/// </summary>
|
||||
public void RefreshAnyOpenPlayerInfo()
|
||||
{
|
||||
DebugConsole.NewMessage($"Refreshing any open player info");
|
||||
if (IsTabMenuOpen && TabMenu.SelectedTab == TabMenu.InfoFrameTab.Talents)
|
||||
{
|
||||
TabMenuInstance.SelectInfoFrameTab(TabMenu.InfoFrameTab.Talents);
|
||||
|
||||
@@ -907,7 +907,7 @@ namespace Barotrauma
|
||||
void SetReputationText(GUITextBlock textBlock)
|
||||
{
|
||||
LocalizedString reputationText = Reputation.GetFormattedReputationText(reputation.NormalizedValue, reputation.Value, addColorTags: true);
|
||||
int reputationChange = (int)Math.Round(reputation.Value - initialReputation);
|
||||
int reputationChange = (int)reputation.Value - (int)initialReputation;
|
||||
if (Math.Abs(reputationChange) > 0)
|
||||
{
|
||||
string changeText = $"{(reputationChange > 0 ? "+" : "") + reputationChange}";
|
||||
|
||||
Reference in New Issue
Block a user