Unstable 1.1.14.0
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Barotrauma.Networking;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -114,7 +115,7 @@ namespace Barotrauma.Steam
|
||||
currentLobby?.SetData("allowrespawn", serverSettings.AllowRespawn.ToString());
|
||||
currentLobby?.SetData("karmaenabled", serverSettings.KarmaEnabled.ToString());
|
||||
currentLobby?.SetData("friendlyfireenabled", serverSettings.AllowFriendlyFire.ToString());
|
||||
currentLobby?.SetData("traitors", serverSettings.TraitorsEnabled.ToString());
|
||||
currentLobby?.SetData("traitors", serverSettings.TraitorProbability.ToString(CultureInfo.InvariantCulture));
|
||||
currentLobby?.SetData("gamestarted", GameMain.Client.GameStarted.ToString());
|
||||
currentLobby?.SetData("playstyle", serverSettings.PlayStyle.ToString());
|
||||
currentLobby?.SetData("gamemode", GameMain.NetLobbyScreen?.SelectedMode?.Identifier.Value ?? "");
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Barotrauma.Steam
|
||||
//Steamworks is completely insane so the following needs comments:
|
||||
|
||||
//This callback seems to take place when the item in question has not been downloaded recently
|
||||
Steamworks.SteamUGC.GlobalOnItemInstalled = id => Workshop.OnItemDownloadComplete(id);
|
||||
Steamworks.SteamUGC.OnItemInstalled += (appId, itemId) => Workshop.OnItemDownloadComplete(itemId);
|
||||
|
||||
//This callback seems to take place when the item has been downloaded recently and an update
|
||||
//or a redownload has taken place
|
||||
|
||||
@@ -379,7 +379,7 @@ namespace Barotrauma.Steam
|
||||
|
||||
private IEnumerable<CoroutineStatus> MessageBoxCoroutine(Func<GUITextBlock, GUIMessageBox, IEnumerable<CoroutineStatus>> subcoroutine)
|
||||
{
|
||||
var messageBox = new GUIMessageBox("", "...", buttons: new [] { TextManager.Get("Cancel") });
|
||||
var messageBox = new GUIMessageBox("", TextManager.Get("ellipsis"), buttons: new [] { TextManager.Get("Cancel") });
|
||||
messageBox.Buttons[0].OnClicked = (button, o) =>
|
||||
{
|
||||
messageBox.Close();
|
||||
@@ -528,10 +528,18 @@ namespace Barotrauma.Steam
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
}
|
||||
|
||||
if (!resultItem.IsInstalled)
|
||||
//there seems to sometimes be a brief delay between the download task and the item being installed, wait a bit before deeming the install as failed
|
||||
DateTime waitInstallUntil = DateTime.Now + new TimeSpan(0, 0, seconds: 30);
|
||||
while (!resultItem.IsInstalled || resultItem.IsDownloading)
|
||||
{
|
||||
throw new Exception($"Failed to install item: download task ended with status {downloadTask.Status}, " +
|
||||
$"exception was {downloadTask.Exception?.GetInnermost()?.ToString().CleanupStackTrace() ?? "[NULL]"}");
|
||||
if (DateTime.Now > waitInstallUntil)
|
||||
{
|
||||
throw new Exception($"Failed to install item: download task ended with status {downloadTask.Status}," +
|
||||
$" item installed: {resultItem.IsInstalled}, " +
|
||||
$" item downloading: {resultItem.IsDownloading}, " +
|
||||
$"exception was {downloadTask.Exception?.GetInnermost()?.ToString().CleanupStackTrace() ?? "[NULL]"}");
|
||||
}
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
}
|
||||
|
||||
ContentPackage? pkgToNuke
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace Barotrauma.Steam
|
||||
var searchBox = new GUITextBox(new RectTransform(Vector2.One, searchHolder.RectTransform), "", createClearButton: true);
|
||||
var searchTitle = new GUITextBlock(new RectTransform(Vector2.One, searchHolder.RectTransform) {Anchor = Anchor.TopLeft},
|
||||
textColor: Color.DarkGray * 0.6f,
|
||||
text: TextManager.Get("Search") + "...",
|
||||
text: TextManager.Get("Search") + TextManager.Get("ellipsis"),
|
||||
textAlignment: Alignment.CenterLeft)
|
||||
{
|
||||
CanBeFocused = false
|
||||
|
||||
Reference in New Issue
Block a user