(052ab6307) Use MonoKickstart on Linux so installing Mono is not required, fixed division by zero if the width of the server console window is 0
This commit is contained in:
@@ -63,6 +63,13 @@ namespace Barotrauma
|
||||
return "Hull";
|
||||
}
|
||||
}
|
||||
|
||||
[Editable, Serialize("", true)]
|
||||
public string RoomName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string DisplayName
|
||||
{
|
||||
@@ -810,17 +817,17 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
if (roomItems.Contains("reactor"))
|
||||
return "RoomName.ReactorRoom";
|
||||
return TextManager.Get("ReactorRoom");
|
||||
else if (roomItems.Contains("engine"))
|
||||
return "RoomName.EngineRoom";
|
||||
return TextManager.Get("EngineRoom");
|
||||
else if (roomItems.Contains("steering") && roomItems.Contains("sonar"))
|
||||
return "RoomName.CommandRoom";
|
||||
return TextManager.Get("CommandRoom");
|
||||
else if (roomItems.Contains("ballast"))
|
||||
return "RoomName.Ballast";
|
||||
return TextManager.Get("Ballast");
|
||||
|
||||
if (ConnectedGaps.Any(g => !g.IsRoomToRoom && g.ConnectedDoor != null))
|
||||
{
|
||||
return "RoomName.Airlock";
|
||||
return TextManager.Get("Airlock");
|
||||
}
|
||||
|
||||
Rectangle subRect = Submarine.CalculateDimensions();
|
||||
@@ -840,7 +847,7 @@ namespace Barotrauma
|
||||
else
|
||||
roomPos |= Alignment.Right;
|
||||
|
||||
return "RoomName.Sub" + roomPos.ToString();
|
||||
return TextManager.Get("Sub" + roomPos.ToString());
|
||||
}
|
||||
|
||||
public static Hull Load(XElement element, Submarine submarine)
|
||||
|
||||
@@ -144,20 +144,6 @@ namespace Barotrauma
|
||||
get { return spriteColor; }
|
||||
set { spriteColor = value; }
|
||||
}
|
||||
|
||||
[Editable, Serialize(false, true)]
|
||||
public bool UseDropShadow
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
[Serialize("0,0", true), Editable(ToolTip = "The position of the drop shadow relative to the structure. If set to zero, the shadow is positioned automatically so that it points towards the sub's center of mass.")]
|
||||
public Vector2 DropShadowOffset
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public override Rectangle Rect
|
||||
{
|
||||
@@ -313,8 +299,8 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
// Only add ai targets automatically to submarine/outpost walls
|
||||
if (aiTarget == null && HasBody && Tags.Contains("wall") && submarine != null)
|
||||
// Only add ai targets automatically to walls
|
||||
if (aiTarget == null && HasBody && Tags.Contains("wall"))
|
||||
{
|
||||
aiTarget = new AITarget(this);
|
||||
}
|
||||
@@ -1153,13 +1139,6 @@ namespace Barotrauma
|
||||
if (element.GetAttributeBool("flippedx", false)) s.FlipX(false);
|
||||
if (element.GetAttributeBool("flippedy", false)) s.FlipY(false);
|
||||
SerializableProperty.DeserializeProperties(s, element);
|
||||
|
||||
//structures with a body drop a shadow by default
|
||||
if (element.Attribute("usedropshadow") == null)
|
||||
{
|
||||
s.UseDropShadow = prefab.Body;
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@@ -194,14 +194,7 @@ namespace Barotrauma
|
||||
break;
|
||||
case "backgroundsprite":
|
||||
sp.BackgroundSprite = new Sprite(subElement, lazyLoad: true);
|
||||
if (subElement.Attribute("sourcerect") == null && sp.sprite != null)
|
||||
{
|
||||
sp.BackgroundSprite.SourceRect = sp.sprite.SourceRect;
|
||||
sp.BackgroundSprite.size = sp.sprite.size;
|
||||
sp.BackgroundSprite.size.X *= sp.sprite.SourceRect.Width;
|
||||
sp.BackgroundSprite.size.Y *= sp.sprite.SourceRect.Height;
|
||||
sp.BackgroundSprite.RelativeOrigin = subElement.GetAttributeVector2("origin", new Vector2(0.5f, 0.5f));
|
||||
}
|
||||
|
||||
if (subElement.GetAttributeBool("fliphorizontal", false))
|
||||
sp.BackgroundSprite.effects = SpriteEffects.FlipHorizontally;
|
||||
if (subElement.GetAttributeBool("flipvertical", false))
|
||||
|
||||
@@ -417,10 +417,7 @@ namespace Barotrauma
|
||||
if (me.Submarine != this) { continue; }
|
||||
if (me is Item item)
|
||||
{
|
||||
if (item.GetComponent<Repairable>() != null)
|
||||
{
|
||||
item.Indestructible = true;
|
||||
}
|
||||
item.Indestructible = true;
|
||||
foreach (ItemComponent ic in item.Components)
|
||||
{
|
||||
if (ic is ConnectionPanel connectionPanel)
|
||||
|
||||
Reference in New Issue
Block a user