(aebd2c4c0) tweaks part 666

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:32:06 +03:00
parent 80c563e7b0
commit 9da8a437eb
13 changed files with 314 additions and 655 deletions
@@ -15,6 +15,8 @@ namespace Barotrauma
public static List<Hull> hullList = new List<Hull>();
public static List<EntityGrid> EntityGrids { get; } = new List<EntityGrid>();
public static bool ShowHulls = true;
public static bool EditWater, EditFire;
public const float OxygenDistributionSpeed = 500.0f;
public const float OxygenDeteriorationSpeed = 0.3f;
@@ -206,6 +208,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
@@ -1364,7 +1364,7 @@ namespace Barotrauma
foreach (Hull hull in matchingHulls)
{
if (string.IsNullOrEmpty(hull.RoomName) || !hull.RoomName.ToLower().Contains("roomname."))
if (string.IsNullOrEmpty(hull.RoomName) || !hull.RoomName.Contains("RoomName."))
{
hull.RoomName = hull.CreateRoomName();
}