Recommended crew experience is saved using text tags instead of the actual text (-> experience texts can be translated without the translation showing up in sub files).

This commit is contained in:
Joonas Rikkonen
2018-08-15 12:06:22 +03:00
parent b1f8de887c
commit c2f9e1481f
3 changed files with 24 additions and 11 deletions
@@ -296,6 +296,15 @@ namespace Barotrauma
RecommendedCrewSizeMin = doc.Root.GetAttributeInt("recommendedcrewsizemin", 0);
RecommendedCrewSizeMax = doc.Root.GetAttributeInt("recommendedcrewsizemax", 0);
RecommendedCrewExperience = doc.Root.GetAttributeString("recommendedcrewexperience", "Unknown");
//backwards compatibility (use text tags instead of the actual text)
if (RecommendedCrewExperience == "Beginner")
RecommendedCrewExperience = "CrewExperienceLow";
else if (RecommendedCrewExperience == "Intermediate")
RecommendedCrewExperience = "CrewExperienceMid";
else if (RecommendedCrewExperience == "Experienced")
RecommendedCrewExperience = "CrewExperienceHigh";
string[] contentPackageNames = doc.Root.GetAttributeStringArray("compatiblecontentpackages", new string[0]);
foreach (string contentPackageName in contentPackageNames)
{