Mission refactoring (mission prefabs) and option to select which types of missions can be selected when mission type is set to random (TODO: a way to set the allowed types from the UI).
This commit is contained in:
@@ -47,20 +47,20 @@ namespace Barotrauma
|
||||
{
|
||||
if (winner == -1) return "";
|
||||
|
||||
return successMessage
|
||||
return SuccessMessage
|
||||
.Replace("[loser]", teamNames[1 - winner])
|
||||
.Replace("[winner]", teamNames[winner]);
|
||||
}
|
||||
}
|
||||
|
||||
public CombatMission(XElement element, Location[] locations)
|
||||
: base(element, locations)
|
||||
public CombatMission(MissionPrefab prefab, Location[] locations)
|
||||
: base(prefab, locations)
|
||||
{
|
||||
descriptions = new string[]
|
||||
{
|
||||
element.GetAttributeString("descriptionneutral", ""),
|
||||
element.GetAttributeString("description1", ""),
|
||||
element.GetAttributeString("description2", "")
|
||||
prefab.ConfigElement.GetAttributeString("descriptionneutral", ""),
|
||||
prefab.ConfigElement.GetAttributeString("description1", ""),
|
||||
prefab.ConfigElement.GetAttributeString("description2", "")
|
||||
};
|
||||
|
||||
for (int i = 0; i < descriptions.Length; i++)
|
||||
@@ -73,8 +73,8 @@ namespace Barotrauma
|
||||
|
||||
teamNames = new string[]
|
||||
{
|
||||
element.GetAttributeString("teamname1", "Team A"),
|
||||
element.GetAttributeString("teamname2", "Team B")
|
||||
prefab.ConfigElement.GetAttributeString("teamname1", "Team A"),
|
||||
prefab.ConfigElement.GetAttributeString("teamname2", "Team B")
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user