(e0d673b0d) Test: Don't calculate the distance to the buttons when seeking path. Instead, check the distance when checking the doors. Allows the bots to access the Remora ballast through the door where the button is a bit farther from the door than usually.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:42:51 +03:00
parent 828150e0ae
commit de2246fe57
85 changed files with 1955 additions and 1760 deletions
@@ -16,6 +16,14 @@ namespace Barotrauma
private static string[] serverMessageCharacters = new string[] { "~", "[", "]", "=" };
public static string Language;
public static bool NoWhiteSpace
{
get
{
if (!textPacks.ContainsKey(Language)) { return false; }
return textPacks[Language].Any(t => t.NoWhiteSpace);
}
}
private static HashSet<string> availableLanguages = new HashSet<string>();
public static IEnumerable<string> AvailableLanguages
@@ -79,7 +87,7 @@ namespace Barotrauma
}
}
public static string Get(string textTag, bool returnNull = false, string fallBackTag = null)
public static string Get(string textTag, bool returnNull = false)
{
if (!textPacks.ContainsKey(Language))
{
@@ -94,16 +102,7 @@ namespace Barotrauma
foreach (TextPack textPack in textPacks[Language])
{
string text = textPack.Get(textTag);
if (text != null) { return text; }
}
if (!string.IsNullOrEmpty(fallBackTag))
{
foreach (TextPack textPack in textPacks[Language])
{
string text = textPack.Get(fallBackTag);
if (text != null) { return text; }
}
if (text != null) return text;
}
//if text was not found and we're using a language other than English, see if we can find an English version