(0c86b4b28) Revert "Don't reset the los if there is no client (single player). Fixes los resetting between game sessions (less tedious debugging)."
This commit is contained in:
@@ -128,9 +128,7 @@ namespace Barotrauma
|
||||
var exePaths = contentPackage.GetFilesOfType(ContentType.ServerExecutable);
|
||||
if (exePaths.Count() > 0 && AppDomain.CurrentDomain.FriendlyName != exePaths.First())
|
||||
{
|
||||
DebugConsole.ShowQuestionPrompt(TextManager.Get("IncorrectExe")
|
||||
.Replace("[selectedpackage]", contentPackage.Name)
|
||||
.Replace("[exename]", exePaths.First()),
|
||||
DebugConsole.ShowQuestionPrompt(TextManager.GetWithVariables("IncorrectExe", new string[2] { "[selectedpackage]", "[exename]" }, new string[2] { contentPackage.Name, exePaths.First() }),
|
||||
(option) =>
|
||||
{
|
||||
if (option.ToLower() == "y" || option.ToLower() == "yes")
|
||||
@@ -298,7 +296,7 @@ namespace Barotrauma
|
||||
CloseServer();
|
||||
|
||||
SteamManager.ShutDown();
|
||||
if (GameSettings.SendUserStatistics) GameAnalytics.OnStop();
|
||||
if (GameSettings.SendUserStatistics) GameAnalytics.OnQuit();
|
||||
}
|
||||
|
||||
public static void ResetFrameTime()
|
||||
|
||||
@@ -16,10 +16,9 @@ namespace Barotrauma
|
||||
|
||||
public void Greet(GameServer server, string codeWords, string codeResponse)
|
||||
{
|
||||
string greetingMessage = TextManager.Get("TraitorStartMessage").Replace("[targetname]", TargetCharacter.Name);
|
||||
string moreAgentsMessage = TextManager.Get("TraitorMoreAgentsMessage")
|
||||
.Replace("[codewords]", codeWords)
|
||||
.Replace("[coderesponse]", codeResponse);
|
||||
string greetingMessage = TextManager.GetWithVariable("TraitorStartMessage", "[targetname]", TargetCharacter.Name);
|
||||
string moreAgentsMessage = TextManager.GetWithVariables("TraitorMoreAgentsMessage",
|
||||
new string[2] { "[codewords]", "[coderesponse]" }, new string[2] { codeWords, codeResponse });
|
||||
|
||||
var greetingChatMsg = ChatMessage.Create(null, greetingMessage, ChatMessageType.Server, null);
|
||||
var moreAgentsChatMsg = ChatMessage.Create(null, moreAgentsMessage, ChatMessageType.Server, null);
|
||||
@@ -38,7 +37,7 @@ namespace Barotrauma
|
||||
{
|
||||
var ownerMsg = ChatMessage.Create(
|
||||
null,//TextManager.Get("NewTraitor"),
|
||||
TextManager.Get("TraitorStartMessageServer").Replace("[targetname]", TargetCharacter.Name).Replace("[traitorname]", Character.Name),
|
||||
TextManager.GetWithVariables("TraitorStartMessageServer", new string[2] { "[targetname]", "[traitorname]" }, new string[2] { TargetCharacter.Name, Character.Name }),
|
||||
ChatMessageType.MessageBox,
|
||||
null
|
||||
);
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (GameMain.Server == null) return;
|
||||
|
||||
msg.Write(Prefab.Name);
|
||||
msg.Write(Prefab.OriginalName);
|
||||
msg.Write(Prefab.Identifier);
|
||||
msg.Write(Description != prefab.Description);
|
||||
if (Description != prefab.Description)
|
||||
|
||||
@@ -415,7 +415,7 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
if (endRoundTimer <= 0.0f)
|
||||
{
|
||||
SendChatMessage(TextManager.Get("CrewDeadNoRespawns").Replace("[time]", "60"), ChatMessageType.Server);
|
||||
SendChatMessage(TextManager.GetWithVariable("CrewDeadNoRespawns", "[time]", "60"), ChatMessageType.Server);
|
||||
}
|
||||
endRoundTimer += deltaTime;
|
||||
}
|
||||
@@ -728,7 +728,7 @@ namespace Barotrauma.Networking
|
||||
if (matchingSub == null)
|
||||
{
|
||||
SendDirectChatMessage(
|
||||
TextManager.Get("CampaignStartFailedSubNotFound").Replace("[subname]", subName),
|
||||
TextManager.GetWithVariable("CampaignStartFailedSubNotFound", "[subname]", subName),
|
||||
connectedClient, ChatMessageType.MessageBox);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace Barotrauma.Networking
|
||||
//add the ID card tags they should've gotten when spawning in the shuttle
|
||||
foreach (Item item in character.Inventory.Items)
|
||||
{
|
||||
if (item == null || item.Prefab.Name != "ID Card") continue;
|
||||
if (item == null || item.Prefab.Identifier != "idcard") continue;
|
||||
foreach (string s in shuttleSpawnPoints[i].IdCardTags)
|
||||
{
|
||||
item.AddTag(s);
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Barotrauma.Steam
|
||||
|
||||
public static bool RefreshServerDetails(Networking.GameServer server)
|
||||
{
|
||||
if (instance == null || !instance.isInitialized)
|
||||
if (instance?.server == null || !instance.isInitialized)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Barotrauma
|
||||
inputThread.Start();
|
||||
game.Run();
|
||||
inputThread.Abort(); inputThread.Join();
|
||||
if (GameSettings.SendUserStatistics) GameAnalytics.OnStop();
|
||||
if (GameSettings.SendUserStatistics) GameAnalytics.OnQuit();
|
||||
SteamManager.ShutDown();
|
||||
#if !DEBUG
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user