diff --git a/Barotrauma/BarotraumaShared/Source/Characters/AI/IndoorsSteeringManager.cs b/Barotrauma/BarotraumaShared/Source/Characters/AI/IndoorsSteeringManager.cs index b2ece3f38..e1109f83f 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/AI/IndoorsSteeringManager.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/AI/IndoorsSteeringManager.cs @@ -388,6 +388,18 @@ namespace Barotrauma buttonPressCooldown = ButtonPressInterval; break; } + else + { + if (!door.HasRequiredItems(character, false) && shouldBeOpen) + { + currentPath.Unreachable = true; + return; + } + + door.Item.TryInteract(character, false, true, true); + buttonPressCooldown = ButtonPressInterval; + break; + } } } } @@ -414,20 +426,12 @@ namespace Barotrauma if (!nextNode.Waypoint.ConnectedDoor.HasRequiredItems(character, false)) { return null; } } - if (!canBreakDoors) - { - //door closed and the character can't open doors -> node can't be traversed - if (!canOpenDoors || character.LockHands) return null; - - var doorButtons = nextNode.Waypoint.ConnectedDoor.Item.GetConnectedComponents(); - if (!doorButtons.Any()) return null; - foreach (Controller button in doorButtons) { if (Math.Sign(button.Item.Position.X - nextNode.Waypoint.Position.X) != - Math.Sign(node.Position.X - nextNode.Position.X)) continue; + Math.Sign(node.Position.X - nextNode.Position.X)) { continue; } - if (!button.HasRequiredItems(character, false)) return null; + if (!button.HasRequiredItems(character, false)) { return null; } } } } diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/ItemComponent.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/ItemComponent.cs index 7a0027a89..50d9d7ce1 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/ItemComponent.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/ItemComponent.cs @@ -190,7 +190,7 @@ namespace Barotrauma.Items.Components get { return name; } } - [Editable, Serialize("", true)] + [Editable, Serialize("", true, translationTextTag: "ItemMsg")] public string Msg { get; diff --git a/Barotrauma/BarotraumaShared/Source/Map/Hull.cs b/Barotrauma/BarotraumaShared/Source/Map/Hull.cs index 47e837c19..b08bbcffe 100644 --- a/Barotrauma/BarotraumaShared/Source/Map/Hull.cs +++ b/Barotrauma/BarotraumaShared/Source/Map/Hull.cs @@ -280,6 +280,25 @@ namespace Barotrauma } } + 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 override Rectangle Rect { get diff --git a/Barotrauma/BarotraumaShared/Source/TextPack.cs b/Barotrauma/BarotraumaShared/Source/TextPack.cs index e36bff60c..f1c2c3a76 100644 --- a/Barotrauma/BarotraumaShared/Source/TextPack.cs +++ b/Barotrauma/BarotraumaShared/Source/TextPack.cs @@ -37,6 +37,7 @@ namespace Barotrauma text = text.Replace("&", "&"); text = text.Replace("<", "<"); text = text.Replace(">", ">"); + text = text.Replace(""", "\""); infoList.Add(text); } }