(461eade89) Merge branch 'dev' of github.com:Regalis11/Barotrauma-development into dev
This commit is contained in:
@@ -388,6 +388,18 @@ namespace Barotrauma
|
|||||||
buttonPressCooldown = ButtonPressInterval;
|
buttonPressCooldown = ButtonPressInterval;
|
||||||
break;
|
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 (!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<Controller>();
|
|
||||||
if (!doorButtons.Any()) return null;
|
|
||||||
|
|
||||||
foreach (Controller button in doorButtons)
|
foreach (Controller button in doorButtons)
|
||||||
{
|
{
|
||||||
if (Math.Sign(button.Item.Position.X - nextNode.Waypoint.Position.X) !=
|
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; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ namespace Barotrauma.Items.Components
|
|||||||
get { return name; }
|
get { return name; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Editable, Serialize("", true)]
|
[Editable, Serialize("", true, translationTextTag: "ItemMsg")]
|
||||||
public string Msg
|
public string Msg
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
|
|||||||
@@ -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
|
public override Rectangle Rect
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ namespace Barotrauma
|
|||||||
text = text.Replace("&", "&");
|
text = text.Replace("&", "&");
|
||||||
text = text.Replace("<", "<");
|
text = text.Replace("<", "<");
|
||||||
text = text.Replace(">", ">");
|
text = text.Replace(">", ">");
|
||||||
|
text = text.Replace(""", "\"");
|
||||||
infoList.Add(text);
|
infoList.Add(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user