Replaced usages of "shift" with "round" for consistency
This commit is contained in:
@@ -275,7 +275,7 @@ namespace Barotrauma
|
|||||||
// return true;
|
// return true;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
public void StartShift()
|
public void StartRound()
|
||||||
{
|
{
|
||||||
listBox.ClearChildren();
|
listBox.ClearChildren();
|
||||||
characters.Clear();
|
characters.Clear();
|
||||||
@@ -310,7 +310,7 @@ namespace Barotrauma
|
|||||||
if (characters.Any()) listBox.Select(0);// SelectCharacter(null, characters[0]);
|
if (characters.Any()) listBox.Select(0);// SelectCharacter(null, characters[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EndShift()
|
public void EndRound()
|
||||||
{
|
{
|
||||||
foreach (Character c in characters)
|
foreach (Character c in characters)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace Barotrauma
|
|||||||
//public readonly CrewManager CrewManager;
|
//public readonly CrewManager CrewManager;
|
||||||
//public readonly HireManager hireManager;
|
//public readonly HireManager hireManager;
|
||||||
|
|
||||||
private GUIButton endShiftButton;
|
private GUIButton endRoundButton;
|
||||||
|
|
||||||
public readonly CargoManager CargoManager;
|
public readonly CargoManager CargoManager;
|
||||||
|
|
||||||
@@ -54,9 +54,9 @@ namespace Barotrauma
|
|||||||
|
|
||||||
CargoManager = new CargoManager();
|
CargoManager = new CargoManager();
|
||||||
|
|
||||||
endShiftButton = new GUIButton(new Rectangle(GameMain.GraphicsWidth - 220, 20, 200, 25), "End shift", null, Alignment.TopLeft, Alignment.Center, "");
|
endRoundButton = new GUIButton(new Rectangle(GameMain.GraphicsWidth - 220, 20, 200, 25), "End round", null, Alignment.TopLeft, Alignment.Center, "");
|
||||||
endShiftButton.Font = GUI.SmallFont;
|
endRoundButton.Font = GUI.SmallFont;
|
||||||
endShiftButton.OnClicked = TryEndShift;
|
endRoundButton.OnClicked = TryEndRound;
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++)
|
for (int i = 0; i < 3; i++)
|
||||||
{
|
{
|
||||||
@@ -129,7 +129,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
isRunning = true;
|
isRunning = true;
|
||||||
|
|
||||||
CrewManager.StartShift();
|
CrewManager.StartRound();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool TryHireCharacter(HireManager hireManager, CharacterInfo characterInfo)
|
public bool TryHireCharacter(HireManager hireManager, CharacterInfo characterInfo)
|
||||||
@@ -191,26 +191,26 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (leavingSub == null)
|
if (leavingSub == null)
|
||||||
{
|
{
|
||||||
endShiftButton.Visible = false;
|
endRoundButton.Visible = false;
|
||||||
}
|
}
|
||||||
else if (leavingSub.AtEndPosition)
|
else if (leavingSub.AtEndPosition)
|
||||||
{
|
{
|
||||||
endShiftButton.Text = ToolBox.LimitString("Enter " + Map.SelectedLocation.Name, endShiftButton.Font, endShiftButton.Rect.Width - 5);
|
endRoundButton.Text = ToolBox.LimitString("Enter " + Map.SelectedLocation.Name, endRoundButton.Font, endRoundButton.Rect.Width - 5);
|
||||||
endShiftButton.UserData = leavingSub;
|
endRoundButton.UserData = leavingSub;
|
||||||
endShiftButton.Visible = true;
|
endRoundButton.Visible = true;
|
||||||
}
|
}
|
||||||
else if (leavingSub.AtStartPosition)
|
else if (leavingSub.AtStartPosition)
|
||||||
{
|
{
|
||||||
endShiftButton.Text = ToolBox.LimitString("Enter " + Map.CurrentLocation.Name, endShiftButton.Font, endShiftButton.Rect.Width - 5);
|
endRoundButton.Text = ToolBox.LimitString("Enter " + Map.CurrentLocation.Name, endRoundButton.Font, endRoundButton.Rect.Width - 5);
|
||||||
endShiftButton.UserData = leavingSub;
|
endRoundButton.UserData = leavingSub;
|
||||||
endShiftButton.Visible = true;
|
endRoundButton.Visible = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
endShiftButton.Visible = false;
|
endRoundButton.Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
endShiftButton.Draw(spriteBatch);
|
endRoundButton.Draw(spriteBatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void AddToGUIUpdateList()
|
public override void AddToGUIUpdateList()
|
||||||
@@ -221,7 +221,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
CrewManager.AddToGUIUpdateList();
|
CrewManager.AddToGUIUpdateList();
|
||||||
|
|
||||||
endShiftButton.AddToGUIUpdateList();
|
endRoundButton.AddToGUIUpdateList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update(float deltaTime)
|
public override void Update(float deltaTime)
|
||||||
@@ -232,7 +232,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
CrewManager.Update(deltaTime);
|
CrewManager.Update(deltaTime);
|
||||||
|
|
||||||
endShiftButton.Update(deltaTime);
|
endRoundButton.Update(deltaTime);
|
||||||
|
|
||||||
if (!crewDead)
|
if (!crewDead)
|
||||||
{
|
{
|
||||||
@@ -242,7 +242,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
endTimer -= deltaTime;
|
endTimer -= deltaTime;
|
||||||
|
|
||||||
if (endTimer <= 0.0f) EndShift(null, null);
|
if (endTimer <= 0.0f) EndRound(null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,7 +264,7 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GameMain.GameSession.EndShift("");
|
GameMain.GameSession.EndRound("");
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
@@ -309,7 +309,7 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CrewManager.EndShift();
|
CrewManager.EndRound();
|
||||||
for (int i = Character.CharacterList.Count - 1; i >= 0; i--)
|
for (int i = Character.CharacterList.Count - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
Character.CharacterList[i].Remove();
|
Character.CharacterList[i].Remove();
|
||||||
@@ -318,7 +318,7 @@ namespace Barotrauma
|
|||||||
Submarine.Unload();
|
Submarine.Unload();
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool TryEndShift(GUIButton button, object obj)
|
private bool TryEndRound(GUIButton button, object obj)
|
||||||
{
|
{
|
||||||
leavingSub = obj as Submarine;
|
leavingSub = obj as Submarine;
|
||||||
if (leavingSub != null)
|
if (leavingSub != null)
|
||||||
@@ -341,7 +341,7 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
|
|
||||||
var msgBox = new GUIMessageBox("Warning", msg, new string[] {"Yes", "No"});
|
var msgBox = new GUIMessageBox("Warning", msg, new string[] {"Yes", "No"});
|
||||||
msgBox.Buttons[0].OnClicked += EndShift;
|
msgBox.Buttons[0].OnClicked += EndRound;
|
||||||
msgBox.Buttons[0].OnClicked += msgBox.Close;
|
msgBox.Buttons[0].OnClicked += msgBox.Close;
|
||||||
msgBox.Buttons[0].UserData = Submarine.Loaded.FindAll(s => !subsToLeaveBehind.Contains(s));
|
msgBox.Buttons[0].UserData = Submarine.Loaded.FindAll(s => !subsToLeaveBehind.Contains(s));
|
||||||
|
|
||||||
@@ -349,13 +349,13 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
EndShift(button, obj);
|
EndRound(button, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool EndShift(GUIButton button, object obj)
|
private bool EndRound(GUIButton button, object obj)
|
||||||
{
|
{
|
||||||
isRunning = false;
|
isRunning = false;
|
||||||
|
|
||||||
@@ -364,7 +364,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
var cinematic = new TransitionCinematic(leavingSubs, GameMain.GameScreen.Cam, 5.0f);
|
var cinematic = new TransitionCinematic(leavingSubs, GameMain.GameScreen.Cam, 5.0f);
|
||||||
|
|
||||||
SoundPlayer.OverrideMusicType = CrewManager.characters.Any(c => !c.IsDead) ? "endshift" : "crewdead";
|
SoundPlayer.OverrideMusicType = CrewManager.characters.Any(c => !c.IsDead) ? "endround" : "crewdead";
|
||||||
|
|
||||||
CoroutineManager.StartCoroutine(EndCinematic(cinematic),"EndCinematic");
|
CoroutineManager.StartCoroutine(EndCinematic(cinematic),"EndCinematic");
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace Barotrauma.Tutorials
|
|||||||
GameMain.GameSession = new GameSession(Submarine.MainSub, "", GameModePreset.list.Find(gm => gm.Name.ToLowerInvariant() == "tutorial"));
|
GameMain.GameSession = new GameSession(Submarine.MainSub, "", GameModePreset.list.Find(gm => gm.Name.ToLowerInvariant() == "tutorial"));
|
||||||
(GameMain.GameSession.gameMode as TutorialMode).tutorialType = this;
|
(GameMain.GameSession.gameMode as TutorialMode).tutorialType = this;
|
||||||
|
|
||||||
GameMain.GameSession.StartShift("tuto");
|
GameMain.GameSession.StartRound("tuto");
|
||||||
|
|
||||||
GameMain.GameSession.TaskManager.Events.Clear();
|
GameMain.GameSession.TaskManager.Events.Clear();
|
||||||
|
|
||||||
|
|||||||
@@ -20,11 +20,10 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private ShiftSummary shiftSummary;
|
private RoundSummary roundSummary;
|
||||||
|
public RoundSummary RoundSummary
|
||||||
public ShiftSummary ShiftSummary
|
|
||||||
{
|
{
|
||||||
get { return shiftSummary; }
|
get { return roundSummary; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool LoadPrevious(GUIButton button, object obj)
|
public bool LoadPrevious(GUIButton button, object obj)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using System.Linq;
|
|||||||
|
|
||||||
namespace Barotrauma
|
namespace Barotrauma
|
||||||
{
|
{
|
||||||
class ShiftSummary
|
class RoundSummary
|
||||||
{
|
{
|
||||||
private Location startLocation, endLocation;
|
private Location startLocation, endLocation;
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
private Mission selectedMission;
|
private Mission selectedMission;
|
||||||
|
|
||||||
public ShiftSummary(GameSession gameSession)
|
public RoundSummary(GameSession gameSession)
|
||||||
{
|
{
|
||||||
this.gameSession = gameSession;
|
this.gameSession = gameSession;
|
||||||
|
|
||||||
|
|||||||
@@ -704,7 +704,7 @@ namespace Barotrauma.Networking
|
|||||||
Rand.SetSyncedSeed(seed);
|
Rand.SetSyncedSeed(seed);
|
||||||
|
|
||||||
GameMain.GameSession = new GameSession(GameMain.NetLobbyScreen.SelectedSub, "", gameMode, Mission.MissionTypes[missionTypeIndex]);
|
GameMain.GameSession = new GameSession(GameMain.NetLobbyScreen.SelectedSub, "", gameMode, Mission.MissionTypes[missionTypeIndex]);
|
||||||
GameMain.GameSession.StartShift(levelSeed,loadSecondSub);
|
GameMain.GameSession.StartRound(levelSeed,loadSecondSub);
|
||||||
|
|
||||||
if (respawnAllowed) respawnManager = new RespawnManager(this, GameMain.NetLobbyScreen.SelectedShuttle);
|
if (respawnAllowed) respawnManager = new RespawnManager(this, GameMain.NetLobbyScreen.SelectedShuttle);
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
startButton = new GUIButton(new Rectangle(0, 0, 100, 30), "Start",
|
startButton = new GUIButton(new Rectangle(0, 0, 100, 30), "Start",
|
||||||
Alignment.BottomRight, "", bottomPanel[(int)PanelTab.Map]);
|
Alignment.BottomRight, "", bottomPanel[(int)PanelTab.Map]);
|
||||||
startButton.OnClicked = StartShift;
|
startButton.OnClicked = StartRound;
|
||||||
startButton.Enabled = false;
|
startButton.Enabled = false;
|
||||||
|
|
||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
@@ -520,18 +520,18 @@ namespace Barotrauma
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool StartShift(GUIButton button, object selection)
|
private bool StartRound(GUIButton button, object selection)
|
||||||
{
|
{
|
||||||
if (GameMain.GameSession.Map.SelectedConnection == null) return false;
|
if (GameMain.GameSession.Map.SelectedConnection == null) return false;
|
||||||
|
|
||||||
GameMain.Instance.ShowLoading(ShiftLoading());
|
GameMain.Instance.ShowLoading(LoadRound());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerable<object> ShiftLoading()
|
private IEnumerable<object> LoadRound()
|
||||||
{
|
{
|
||||||
GameMain.GameSession.StartShift(selectedLevel, true);
|
GameMain.GameSession.StartRound(selectedLevel, true);
|
||||||
GameMain.GameScreen.Select();
|
GameMain.GameScreen.Select();
|
||||||
|
|
||||||
yield return CoroutineStatus.Success;
|
yield return CoroutineStatus.Success;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
<music file="Content/Sounds/Music/Simplex.ogg" type="default"/>
|
<music file="Content/Sounds/Music/Simplex.ogg" type="default"/>
|
||||||
<music file="Content/Sounds/Music/Tenebrous Brothers Carnival - Prelude.ogg" type="default"/>
|
<music file="Content/Sounds/Music/Tenebrous Brothers Carnival - Prelude.ogg" type="default"/>
|
||||||
|
|
||||||
<music file="Content/Sounds/Music/The Descent.ogg" type="endshift"/>
|
<music file="Content/Sounds/Music/The Descent.ogg" type="endround"/>
|
||||||
<music file="Content/Sounds/Music/Road to Hell.ogg" type="crewdead"/>
|
<music file="Content/Sounds/Music/Road to Hell.ogg" type="crewdead"/>
|
||||||
|
|
||||||
<music file="Content/Sounds/Music/Enter the Maze.ogg" type="repair" priorityrange="30,60"/>
|
<music file="Content/Sounds/Music/Enter the Maze.ogg" type="repair" priorityrange="30,60"/>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace Barotrauma
|
namespace Barotrauma
|
||||||
{
|
{
|
||||||
@@ -19,7 +18,7 @@ namespace Barotrauma
|
|||||||
events = new List<ScriptedEvent>();
|
events = new List<ScriptedEvent>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StartShift(Level level)
|
public void StartRound(Level level)
|
||||||
{
|
{
|
||||||
CreateScriptedEvents(level);
|
CreateScriptedEvents(level);
|
||||||
foreach (ScriptedEvent ev in events)
|
foreach (ScriptedEvent ev in events)
|
||||||
@@ -28,7 +27,7 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EndShift()
|
public void EndRound()
|
||||||
{
|
{
|
||||||
events.Clear();
|
events.Clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (endMessage != "" || this.endMessage == null) this.endMessage = endMessage;
|
if (endMessage != "" || this.endMessage == null) this.endMessage = endMessage;
|
||||||
|
|
||||||
GameMain.GameSession.EndShift(endMessage);
|
GameMain.GameSession.EndRound(endMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -143,14 +143,14 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StartShift(string levelSeed, bool loadSecondSub = false)
|
public void StartRound(string levelSeed, bool loadSecondSub = false)
|
||||||
{
|
{
|
||||||
Level randomLevel = Level.CreateRandom(levelSeed);
|
Level randomLevel = Level.CreateRandom(levelSeed);
|
||||||
|
|
||||||
StartShift(randomLevel, true, loadSecondSub);
|
StartRound(randomLevel, true, loadSecondSub);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StartShift(Level level, bool reloadSub = true, bool loadSecondSub = false)
|
public void StartRound(Level level, bool reloadSub = true, bool loadSecondSub = false)
|
||||||
{
|
{
|
||||||
#if CLIENT
|
#if CLIENT
|
||||||
GameMain.LightManager.LosEnabled = GameMain.NetworkMember == null || GameMain.NetworkMember.CharacterInfo != null;
|
GameMain.LightManager.LosEnabled = GameMain.NetworkMember == null || GameMain.NetworkMember.CharacterInfo != null;
|
||||||
@@ -195,21 +195,21 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (gameMode.Mission != null) Mission.Start(Level.Loaded);
|
if (gameMode.Mission != null) Mission.Start(Level.Loaded);
|
||||||
|
|
||||||
TaskManager.StartShift(level);
|
TaskManager.StartRound(level);
|
||||||
|
|
||||||
if (gameMode != null) gameMode.MsgBox();
|
if (gameMode != null) gameMode.MsgBox();
|
||||||
|
|
||||||
Entity.Spawner = new EntitySpawner();
|
Entity.Spawner = new EntitySpawner();
|
||||||
|
|
||||||
#if CLIENT
|
#if CLIENT
|
||||||
shiftSummary = new ShiftSummary(this);
|
roundSummary = new RoundSummary(this);
|
||||||
|
|
||||||
GameMain.GameScreen.ColorFade(Color.Black, Color.TransparentBlack, 5.0f);
|
GameMain.GameScreen.ColorFade(Color.Black, Color.TransparentBlack, 5.0f);
|
||||||
SoundPlayer.SwitchMusic();
|
SoundPlayer.SwitchMusic();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EndShift(string endMessage)
|
public void EndRound(string endMessage)
|
||||||
{
|
{
|
||||||
if (Mission != null) Mission.End();
|
if (Mission != null) Mission.End();
|
||||||
|
|
||||||
@@ -225,16 +225,16 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if CLIENT
|
#if CLIENT
|
||||||
if (shiftSummary != null)
|
if (roundSummary != null)
|
||||||
{
|
{
|
||||||
GUIFrame summaryFrame = shiftSummary.CreateSummaryFrame(endMessage);
|
GUIFrame summaryFrame = roundSummary.CreateSummaryFrame(endMessage);
|
||||||
GUIMessageBox.MessageBoxes.Add(summaryFrame);
|
GUIMessageBox.MessageBoxes.Add(summaryFrame);
|
||||||
var okButton = new GUIButton(new Rectangle(0, 0, 100, 30), "Ok", Alignment.BottomRight, "", summaryFrame.children[0]);
|
var okButton = new GUIButton(new Rectangle(0, 0, 100, 30), "Ok", Alignment.BottomRight, "", summaryFrame.children[0]);
|
||||||
okButton.OnClicked = (GUIButton button, object obj) => { GUIMessageBox.MessageBoxes.Remove(summaryFrame); return true; };
|
okButton.OnClicked = (GUIButton button, object obj) => { GUIMessageBox.MessageBoxes.Remove(summaryFrame); return true; };
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TaskManager.EndShift();
|
TaskManager.EndRound();
|
||||||
|
|
||||||
currentMission = null;
|
currentMission = null;
|
||||||
|
|
||||||
|
|||||||
@@ -1141,7 +1141,7 @@ namespace Barotrauma.Networking
|
|||||||
connectedClients.ForEach(c => c.TeamID = hostTeam);
|
connectedClients.ForEach(c => c.TeamID = hostTeam);
|
||||||
}
|
}
|
||||||
|
|
||||||
GameMain.GameSession.StartShift(GameMain.NetLobbyScreen.LevelSeed, teamCount > 1);
|
GameMain.GameSession.StartRound(GameMain.NetLobbyScreen.LevelSeed, teamCount > 1);
|
||||||
|
|
||||||
GameServer.Log("Starting a new round...", ServerLog.MessageType.ServerMessage);
|
GameServer.Log("Starting a new round...", ServerLog.MessageType.ServerMessage);
|
||||||
GameServer.Log("Submarine: " + selectedSub.Name, ServerLog.MessageType.ServerMessage);
|
GameServer.Log("Submarine: " + selectedSub.Name, ServerLog.MessageType.ServerMessage);
|
||||||
|
|||||||
Reference in New Issue
Block a user