(00eb16887) Workaround to missing location change texts: use texts that are meant for a different location type change but still fit (e.g. use "ruins.changeto.military" when an outpost becomes a military outpost, because the actual text is just "a military outpost has been established in x")

This commit is contained in:
Joonas Rikkonen
2019-05-03 13:53:05 +03:00
parent c01eddbebb
commit 9bd0706c43
4 changed files with 36 additions and 300 deletions
@@ -27,7 +27,9 @@ namespace Barotrauma
DisallowedAdjacentLocations = element.GetAttributeStringArray("disallowedadjacentlocations", new string[0]).ToList();
RequiredAdjacentLocations = element.GetAttributeStringArray("requiredadjacentlocations", new string[0]).ToList();
Messages = TextManager.GetAll("LocationChange." + currentType + ".ChangeTo." + ChangeToType);
string messageTag = element.GetAttributeString("messagetag", "LocationChange." + currentType + ".ChangeTo." + ChangeToType);
Messages = TextManager.GetAll(messageTag);
if (Messages == null)
{
DebugConsole.ThrowError("No messages defined for the location type change " + currentType + " -> " + ChangeToType);