BarotraumaServer compiles
Cleanup + fixes coming up next
This commit is contained in:
@@ -196,7 +196,9 @@ namespace Barotrauma
|
||||
|
||||
winner = i;
|
||||
|
||||
#if CLIENT
|
||||
ShowMessage(i);
|
||||
#endif
|
||||
state = 1;
|
||||
break;
|
||||
}
|
||||
@@ -208,14 +210,18 @@ namespace Barotrauma
|
||||
(winner == 0 && subs[winner].AtStartPosition) || (winner == 1 && subs[winner].AtEndPosition) &&
|
||||
crews[winner].Any(c => !c.IsDead && c.Submarine == subs[winner]))
|
||||
{
|
||||
#if CLIENT
|
||||
GameMain.GameSession.CrewManager.WinningTeam = winner+1;
|
||||
#endif
|
||||
if (GameMain.Server != null) GameMain.Server.EndGame();
|
||||
}
|
||||
}
|
||||
|
||||
if (teamDead[0] && teamDead[1])
|
||||
{
|
||||
#if CLIENT
|
||||
GameMain.GameSession.CrewManager.WinningTeam = 0;
|
||||
#endif
|
||||
winner = -1;
|
||||
if (GameMain.Server != null) GameMain.Server.EndGame();
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Xml.Linq;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
class Mission
|
||||
partial class Mission
|
||||
{
|
||||
public static List<string> MissionTypes = new List<string>() { "Random" };
|
||||
|
||||
@@ -237,18 +237,6 @@ namespace Barotrauma
|
||||
return false;
|
||||
}
|
||||
|
||||
public void ShowMessage(int index)
|
||||
{
|
||||
if (index >= headers.Count && index >= messages.Count) return;
|
||||
|
||||
string header = index < headers.Count ? headers[index] : "";
|
||||
string message = index < messages.Count ? messages[index] : "";
|
||||
|
||||
GameServer.Log("Mission info: " + header + " - " + message, ServerLog.MessageType.ServerMessage);
|
||||
|
||||
new GUIMessageBox(header, message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// End the mission and give a reward if it was completed successfully
|
||||
/// </summary>
|
||||
@@ -261,10 +249,12 @@ namespace Barotrauma
|
||||
|
||||
public void GiveReward()
|
||||
{
|
||||
#if CLIENT
|
||||
var mode = GameMain.GameSession.gameMode as SinglePlayerMode;
|
||||
if (mode == null) return;
|
||||
|
||||
mode.Money += reward;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,9 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
if (!monster.IsDead) return;
|
||||
#if CLIENT
|
||||
ShowMessage(state);
|
||||
#endif
|
||||
state = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -82,13 +82,17 @@ namespace Barotrauma
|
||||
//item.body.LinearVelocity = Vector2.Zero;
|
||||
if (item.ParentInventory!=null) item.body.FarseerBody.IsKinematic = false;
|
||||
if (item.CurrentHull == null) return;
|
||||
|
||||
|
||||
#if CLIENT
|
||||
ShowMessage(state);
|
||||
#endif
|
||||
state = 1;
|
||||
break;
|
||||
case 1:
|
||||
if (!Submarine.MainSub.AtEndPosition && !Submarine.MainSub.AtStartPosition) return;
|
||||
#if CLIENT
|
||||
ShowMessage(state);
|
||||
#endif
|
||||
state = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user