- option to select which location autopilot navigates towards
- generating "dummy locations" for the MP gamesessions (visible in sonar and mission descriptions) - EndGame network message tells the clients if the mission was successful (because the message may arrive before the sub has reached the exit or before some character has died at the client's end)
This commit is contained in:
@@ -43,7 +43,7 @@ namespace Barotrauma
|
||||
|
||||
return successMessage
|
||||
.Replace("[loser]", teamNames[1 - winner])
|
||||
.Replace("[winner]", teamNames[winner]);
|
||||
.Replace("[winner]", teamNames[winner]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,11 +57,11 @@ namespace Barotrauma
|
||||
ToolBox.GetAttributeString(element, "description2", "")
|
||||
};
|
||||
|
||||
for (int i = 0; i < descriptions.Length; i++ )
|
||||
for (int i = 0; i < descriptions.Length; i++)
|
||||
{
|
||||
for (int n = 0; n < 2;n++ )
|
||||
for (int n = 0; n < 2; n++)
|
||||
{
|
||||
descriptions[i] = descriptions[i].Replace("[location" + (n + 1) + "]", Locations[n]);
|
||||
descriptions[i] = descriptions[i].Replace("[location" + (n + 1) + "]", locations[n].Name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Barotrauma
|
||||
{
|
||||
ToolBox.GetAttributeString(element, "teamname1", "Team A"),
|
||||
ToolBox.GetAttributeString(element, "teamname2", "Team B")
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
public static string GetTeamName(int teamID)
|
||||
@@ -136,10 +136,7 @@ namespace Barotrauma
|
||||
DebugConsole.ThrowError("Combat missions cannot be played in the single player mode.");
|
||||
return;
|
||||
}
|
||||
|
||||
Items.Components.Radar.StartMarker = Locations[0];
|
||||
Items.Components.Radar.EndMarker = Locations[1];
|
||||
|
||||
|
||||
subs = new Submarine[] { Submarine.MainSubs[0], Submarine.MainSubs[1] };
|
||||
subs[1].SetPosition(Level.Loaded.EndPosition - new Vector2(0.0f, 2000.0f));
|
||||
subs[1].FlipX();
|
||||
|
||||
@@ -26,9 +26,7 @@ namespace Barotrauma
|
||||
protected List<string> messages;
|
||||
|
||||
private int reward;
|
||||
|
||||
protected string[] Locations = new string[2];
|
||||
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return name; }
|
||||
@@ -47,6 +45,7 @@ namespace Barotrauma
|
||||
public bool Completed
|
||||
{
|
||||
get { return completed; }
|
||||
set { completed = value; }
|
||||
}
|
||||
|
||||
public virtual string RadarLabel
|
||||
@@ -111,11 +110,9 @@ namespace Barotrauma
|
||||
headers.Add(ToolBox.GetAttributeString(subElement, "header", ""));
|
||||
messages.Add(ToolBox.GetAttributeString(subElement, "text", ""));
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (int n = 0; n < 2; n++)
|
||||
{
|
||||
Locations[n] = locations[n].Name;
|
||||
description = description.Replace("[location" + (n + 1) + "]", locations[n].Name);
|
||||
|
||||
successMessage = successMessage.Replace("[location" + (n + 1) + "]", locations[n].Name);
|
||||
@@ -227,7 +224,12 @@ namespace Barotrauma
|
||||
|
||||
public virtual void Update(float deltaTime) { }
|
||||
|
||||
public virtual bool AssignTeamIDs(List<Networking.Client> clients,out int hostTeam) { clients.ForEach(client => { client.TeamID = 1; }); hostTeam = 1; return false; }
|
||||
public virtual bool AssignTeamIDs(List<Networking.Client> clients, out int hostTeam)
|
||||
{
|
||||
clients.ForEach(c => c.TeamID = 1);
|
||||
hostTeam = 1;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void ShowMessage(int index)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user