(a2943d8b7) Merge branch 'dev' into human-ai
This commit is contained in:
@@ -25,6 +25,8 @@ namespace Barotrauma
|
||||
|
||||
private bool removed;
|
||||
|
||||
private bool removed;
|
||||
|
||||
#if CLIENT
|
||||
private List<Decal> burnDecals = new List<Decal>();
|
||||
#endif
|
||||
|
||||
@@ -90,6 +90,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
|
||||
@@ -817,17 +836,17 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
if (roomItems.Contains("reactor"))
|
||||
return TextManager.Get("ReactorRoom");
|
||||
return "RoomName.ReactorRoom";
|
||||
else if (roomItems.Contains("engine"))
|
||||
return TextManager.Get("EngineRoom");
|
||||
return "RoomName.EngineRoom";
|
||||
else if (roomItems.Contains("steering") && roomItems.Contains("sonar"))
|
||||
return TextManager.Get("CommandRoom");
|
||||
return "RoomName.CommandRoom";
|
||||
else if (roomItems.Contains("ballast"))
|
||||
return TextManager.Get("Ballast");
|
||||
return "RoomName.Ballast";
|
||||
|
||||
if (ConnectedGaps.Any(g => !g.IsRoomToRoom && g.ConnectedDoor != null))
|
||||
{
|
||||
return TextManager.Get("Airlock");
|
||||
return "RoomName.Airlock";
|
||||
}
|
||||
|
||||
Rectangle subRect = Submarine.CalculateDimensions();
|
||||
@@ -847,7 +866,7 @@ namespace Barotrauma
|
||||
else
|
||||
roomPos |= Alignment.Right;
|
||||
|
||||
return TextManager.Get("Sub" + roomPos.ToString());
|
||||
return "RoomName.Sub" + roomPos.ToString();
|
||||
}
|
||||
|
||||
public static Hull Load(XElement element, Submarine submarine)
|
||||
|
||||
@@ -314,8 +314,8 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
// Only add ai targets automatically to walls
|
||||
if (aiTarget == null && HasBody && Tags.Contains("wall"))
|
||||
// Only add ai targets automatically to submarine/outpost walls
|
||||
if (aiTarget == null && HasBody && Tags.Contains("wall") && submarine != null)
|
||||
{
|
||||
aiTarget = new AITarget(this);
|
||||
}
|
||||
@@ -1203,6 +1203,9 @@ namespace Barotrauma
|
||||
if (FlippedX) element.Add(new XAttribute("flippedx", true));
|
||||
if (FlippedY) element.Add(new XAttribute("flippedy", true));
|
||||
|
||||
if (FlippedX) element.Add(new XAttribute("flippedx", true));
|
||||
if (FlippedY) element.Add(new XAttribute("flippedy", true));
|
||||
|
||||
for (int i = 0; i < Sections.Length; i++)
|
||||
{
|
||||
if (Sections[i].damage == 0.0f) continue;
|
||||
|
||||
@@ -417,7 +417,10 @@ namespace Barotrauma
|
||||
if (me.Submarine != this) { continue; }
|
||||
if (me is Item item)
|
||||
{
|
||||
item.Indestructible = true;
|
||||
if (item.GetComponent<Repairable>() != null)
|
||||
{
|
||||
item.Indestructible = true;
|
||||
}
|
||||
foreach (ItemComponent ic in item.Components)
|
||||
{
|
||||
if (ic is ConnectionPanel connectionPanel)
|
||||
@@ -533,20 +536,6 @@ namespace Barotrauma
|
||||
{
|
||||
maxX = Math.Min(maxX, ruin.Area.X - 100.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
maxX = Math.Min(maxX, ruin.Area.X - 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
if (minX < 0.0f && maxX > Level.Loaded.Size.X)
|
||||
{
|
||||
//no walls found at either side, just use the initial spawnpos and hope for the best
|
||||
}
|
||||
else if (minX < 0)
|
||||
{
|
||||
//no wall found at the left side, spawn to the left from the right-side wall
|
||||
spawnPos.X = maxX - minWidth - 100.0f + subDockingPortOffset;
|
||||
}
|
||||
|
||||
if (minX < 0.0f && maxX > Level.Loaded.Size.X)
|
||||
|
||||
Reference in New Issue
Block a user