(5b2ce3831) Restart the credits sequence when re-selecting the credits tab, some changes to the credit texts

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:48:53 +03:00
parent 3bb405bc9b
commit 97b6888274
13 changed files with 377 additions and 71 deletions
+22 -3
View File
@@ -685,6 +685,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
@@ -1220,7 +1239,8 @@ namespace Barotrauma
{
if (g.linkedTo[i] is Hull hull && !connectedHulls.Contains(hull))
{
hull.GetAdjacentHulls(connectedHulls, steps++, searchDepth);
float dist = hull.GetApproximateHullDistance(g.Position, endPos, connectedHulls, target, distance + Vector2.Distance(startPos, g.Position), maxDistance);
if (dist < float.MaxValue) return dist;
}
}
}
@@ -1266,8 +1286,7 @@ namespace Barotrauma
{
if (g.linkedTo[i] is Hull hull && !connectedHulls.Contains(hull))
{
float dist = hull.GetApproximateHullDistance(g.Position, endPos, connectedHulls, target, distance + Vector2.Distance(startPos, g.Position), maxDistance);
if (dist < float.MaxValue) return dist;
hull.GetAdjacentHulls(connectedHulls, steps++, searchDepth);
}
}
}