diff --git a/Barotrauma/BarotraumaClient/Source/Characters/Limb.cs b/Barotrauma/BarotraumaClient/Source/Characters/Limb.cs index 5e2696495..63beecb56 100644 --- a/Barotrauma/BarotraumaClient/Source/Characters/Limb.cs +++ b/Barotrauma/BarotraumaClient/Source/Characters/Limb.cs @@ -292,7 +292,6 @@ namespace Barotrauma if (!string.IsNullOrWhiteSpace(damageModifier.DamageSound)) { damageSoundType = damageModifier.DamageSound; - SoundPlayer.PlayDamageSound(damageSoundType, Math.Max(damage, bleedingDamage), WorldPosition); break; } } diff --git a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs index 6044f8563..cf7bebf10 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSession/CrewManager.cs @@ -4,7 +4,6 @@ using Barotrauma.Networking; using FarseerPhysics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using Microsoft.Xna.Framework.Input; using System; using System.Collections.Generic; using System.Linq; @@ -607,20 +606,7 @@ namespace Barotrauma characterListBox.BarScroll = roundedPos; } - #region Dialog - /// - /// Adds the message to the single player chatbox. - /// - public void AddSinglePlayerChatMessage(string senderName, string text, ChatMessageType messageType, Character sender) - { - if (!isSinglePlayer) - { - DebugConsole.ThrowError("Cannot add messages to single player chat box in multiplayer mode!\n" + Environment.StackTrace); - return; - } - if (string.IsNullOrEmpty(text)) { return; } - - ChatBox.AddMessage(ChatMessage.Create(senderName, text, messageType, sender)); + return false; } private IEnumerable KillCharacterAnim(GUIComponent component) @@ -633,12 +619,6 @@ namespace Barotrauma { comp.Color = Color.DarkRed; } - List availableSpeakers = Character.CharacterList.FindAll(c => - c.AIController is HumanAIController && - !c.IsDead && - c.SpeechImpediment <= 100.0f); - pendingConversationLines.AddRange(NPCConversation.CreateRandom(availableSpeakers)); - } yield return new WaitForSeconds(1.0f); diff --git a/Barotrauma/BarotraumaClient/Source/Items/CharacterInventory.cs b/Barotrauma/BarotraumaClient/Source/Items/CharacterInventory.cs index aaa4cf5b2..f32dcb58b 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/CharacterInventory.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/CharacterInventory.cs @@ -438,7 +438,6 @@ namespace Barotrauma QuickUseItem(Items[i], true, false, true); } } - } //force personal slots open if an item is running out of battery/fuel/oxygen/etc if (hidePersonalSlots) @@ -463,16 +462,6 @@ namespace Barotrauma { UpdateSubInventory(deltaTime, highlightedSubInventorySlot.SlotIndex, cam); } - } - - List hideSubInventories = new List(); - foreach (var highlightedSubInventorySlot in highlightedSubInventorySlots) - { - if (highlightedSubInventorySlot.ParentInventory == this) - { - UpdateSubInventory(deltaTime, highlightedSubInventorySlot.SlotIndex, cam); - } - } Rectangle hoverArea = GetSubInventoryHoverArea(highlightedSubInventorySlot); if (highlightedSubInventorySlot.Inventory?.slots == null || (!hoverArea.Contains(PlayerInput.MousePosition))) diff --git a/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs b/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs index 0dad0848e..f4212dc18 100644 --- a/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs +++ b/Barotrauma/BarotraumaClient/Source/Screens/ServerListScreen.cs @@ -80,20 +80,6 @@ namespace Barotrauma sender.UserData = null; } }; - clientNameBox.OnTextChanged += RefreshJoinButtonState; - - var filterHolder = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.5f), leftColumn.RectTransform)) { RelativeSpacing = 0.05f }; - - new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), filterHolder.RectTransform), TextManager.Get("FilterServers")); - searchBox = new GUITextBox(new RectTransform(new Vector2(1.0f, 0.13f), filterHolder.RectTransform), ""); - - var tickBoxHolder = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.5f), filterHolder.RectTransform)); - - searchBox.OnTextChanged += (txtBox, txt) => { FilterServers(); return true; }; - filterPassword = new GUITickBox(new RectTransform(new Vector2(1.0f, 0.27f), tickBoxHolder.RectTransform), TextManager.Get("FilterPassword")); - filterPassword.OnSelected += (tickBox) => { FilterServers(); return true; }; - filterIncompatible = new GUITickBox(new RectTransform(new Vector2(1.0f, 0.27f), tickBoxHolder.RectTransform), TextManager.Get("FilterIncompatibleServers")); - filterIncompatible.OnSelected += (tickBox) => { FilterServers(); return true; }; var filterHolder = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.5f), leftColumn.RectTransform)) { RelativeSpacing = 0.05f }; @@ -207,12 +193,6 @@ namespace Barotrauma UserData = "noresults" }; } - else - { - joinButton.Enabled = false; - } - - return true; } private bool RefreshJoinButtonState(GUIComponent component, object obj) diff --git a/Barotrauma/BarotraumaServer/Source/Characters/CharacterNetworking.cs b/Barotrauma/BarotraumaServer/Source/Characters/CharacterNetworking.cs index 5f0639ff0..d00a8d7eb 100644 --- a/Barotrauma/BarotraumaServer/Source/Characters/CharacterNetworking.cs +++ b/Barotrauma/BarotraumaServer/Source/Characters/CharacterNetworking.cs @@ -21,9 +21,9 @@ namespace Barotrauma { if (!Enabled) { return 1000.0f; } - if (recipient.Character == null) + if (recipient.Character == null || recipient.Character.IsDead) { - return 0.1f; + return 0.2f; } else { diff --git a/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveFindSafety.cs b/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveFindSafety.cs index 6b735f0f5..77e9c5901 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveFindSafety.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/AI/Objectives/AIObjectiveFindSafety.cs @@ -84,7 +84,7 @@ namespace Barotrauma { searchHullTimer -= deltaTime; } - else if (currenthullSafety < HumanAIController.HULL_SAFETY_THRESHOLD) + else { var bestHull = FindBestHull(); if (bestHull != null && bestHull != currentHull) diff --git a/Barotrauma/BarotraumaShared/Source/Items/ItemPrefab.cs b/Barotrauma/BarotraumaShared/Source/Items/ItemPrefab.cs index a0434b600..f4c676d93 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/ItemPrefab.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/ItemPrefab.cs @@ -449,18 +449,6 @@ namespace Barotrauma DeconstructItems = new List(); FabricationRecipes = new List(); DeconstructTime = 1.0f; - - Tags = element.GetAttributeStringArray("tags", new string[0], convertToLowerInvariant: true).ToHashSet(); - if (Tags.None()) - { - Tags = element.GetAttributeStringArray("Tags", new string[0], convertToLowerInvariant: true).ToHashSet(); - } - - Tags = new HashSet(element.GetAttributeStringArray("tags", new string[0], convertToLowerInvariant: true)); - if (Tags.None()) - { - Tags = new HashSet(element.GetAttributeStringArray("Tags", new string[0], convertToLowerInvariant: true)); - } Tags = new HashSet(element.GetAttributeStringArray("tags", new string[0], convertToLowerInvariant: true)); if (Tags.None()) diff --git a/Barotrauma/BarotraumaShared/Source/Map/Hull.cs b/Barotrauma/BarotraumaShared/Source/Map/Hull.cs index 98beb5dc0..4c3b594d6 100644 --- a/Barotrauma/BarotraumaShared/Source/Map/Hull.cs +++ b/Barotrauma/BarotraumaShared/Source/Map/Hull.cs @@ -63,127 +63,6 @@ namespace Barotrauma return "Hull"; } } - - [Editable, Serialize("", true)] - public string RoomName - { - get; - set; - } - - public string DisplayName - { - get; - private set; - } - - private string roomName; - [Editable, Serialize("", true, translationTextTag: "RoomName.")] - public string RoomName - { - get { return roomName; } - set - { - if (roomName == value) { return; } - roomName = value; - DisplayName = TextManager.Get(roomName, returnNull: true) ?? roomName; - } - } - - public string DisplayName - { - get; - private set; - } - - private string roomName; - [Editable, Serialize("", true, translationTextTag: "RoomName.")] - public string RoomName - { - get { return roomName; } - set - { - if (roomName == value) { return; } - roomName = value; - DisplayName = TextManager.Get(roomName, returnNull: true) ?? roomName; - } - } - - public string DisplayName - { - get; - private set; - } - - private string roomName; - [Editable, Serialize("", true, translationTextTag: "RoomName.")] - public string RoomName - { - get { return roomName; } - set - { - if (roomName == value) { return; } - roomName = value; - DisplayName = TextManager.Get(roomName, returnNull: true) ?? roomName; - } - } - - public string DisplayName - { - get; - private set; - } - - private string roomName; - [Editable, Serialize("", true, translationTextTag: "RoomName.")] - public string RoomName - { - get { return roomName; } - set - { - if (roomName == value) { return; } - roomName = value; - DisplayName = TextManager.Get(roomName, returnNull: true) ?? roomName; - } - } - - public string DisplayName - { - get; - private set; - } - - private string roomName; - [Editable, Serialize("", true, translationTextTag: "RoomName.")] - public string RoomName - { - get { return roomName; } - set - { - if (roomName == value) { return; } - roomName = value; - DisplayName = TextManager.Get(roomName, returnNull: true) ?? roomName; - } - } - - public string DisplayName - { - get; - private set; - } - - private string roomName; - [Editable, Serialize("", true, translationTextTag: "RoomName.")] - public string RoomName - { - get { return roomName; } - set - { - if (roomName == value) { return; } - roomName = value; - DisplayName = TextManager.Get(roomName, returnNull: true) ?? roomName; - } - } public string DisplayName {