v0.19.0.0 (unstable)
This commit is contained in:
@@ -395,8 +395,8 @@ namespace Barotrauma.Steam
|
||||
if (rules.ContainsKey("allowspectating")) { serverInfo.AllowSpectating = rules["allowspectating"] == "True"; }
|
||||
if (rules.ContainsKey("allowrespawn")) { serverInfo.AllowRespawn = rules["allowrespawn"] == "True"; }
|
||||
if (rules.ContainsKey("voicechatenabled")) { serverInfo.VoipEnabled = rules["voicechatenabled"] == "True"; }
|
||||
if (rules.ContainsKey("friendlyfireenabled")) { serverInfo.AllowRespawn = rules["friendlyfireenabled"] == "True"; }
|
||||
if (rules.ContainsKey("karmaenabled")) { serverInfo.VoipEnabled = rules["karmaenabled"] == "True"; }
|
||||
if (rules.ContainsKey("friendlyfireenabled")) { serverInfo.FriendlyFireEnabled = rules["friendlyfireenabled"] == "True"; }
|
||||
if (rules.ContainsKey("karmaenabled")) { serverInfo.KarmaEnabled = rules["karmaenabled"] == "True"; }
|
||||
if (rules.ContainsKey("traitors"))
|
||||
{
|
||||
if (Enum.TryParse(rules["traitors"], out YesNoMaybe traitorsEnabled)) { serverInfo.TraitorsEnabled = traitorsEnabled; }
|
||||
|
||||
@@ -13,6 +13,8 @@ namespace Barotrauma.Steam
|
||||
{
|
||||
private CorePackage EnabledCorePackage => enabledCoreDropdown.SelectedData as CorePackage ?? throw new Exception("Valid core package not selected");
|
||||
|
||||
public bool ViewingItemDetails { get; private set; }
|
||||
|
||||
private readonly GUIDropDown enabledCoreDropdown;
|
||||
private readonly GUIListBox enabledRegularModsList;
|
||||
private readonly GUIListBox disabledRegularModsList;
|
||||
@@ -167,7 +169,7 @@ namespace Barotrauma.Steam
|
||||
swapSoundType = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void CreateInstalledModsTab(
|
||||
out GUIDropDown enabledCoreDropdown,
|
||||
out GUIListBox enabledRegularModsList,
|
||||
@@ -523,6 +525,7 @@ namespace Barotrauma.Steam
|
||||
|
||||
public void PopulateInstalledModLists(bool forceRefreshEnabled = false, bool refreshDisabled = true)
|
||||
{
|
||||
ViewingItemDetails = false;
|
||||
bulkUpdateButton.Enabled = false;
|
||||
bulkUpdateButton.ToolTip = "";
|
||||
ContentPackageManager.UpdateContentPackageList();
|
||||
|
||||
@@ -283,6 +283,7 @@ namespace Barotrauma.Steam
|
||||
{
|
||||
CanBeFocused = false
|
||||
};
|
||||
unpublishedLayout.Recalculate();
|
||||
}
|
||||
|
||||
if (publishedGuiComponents.Any())
|
||||
@@ -456,6 +457,7 @@ namespace Barotrauma.Steam
|
||||
{
|
||||
CreateSubscribeButton(workshopItem, new RectTransform(Vector2.One, itemLayout.RectTransform, scaleBasis: ScaleBasis.BothHeight), spriteScale: 0.4f);
|
||||
}
|
||||
itemLayout.Recalculate();
|
||||
}
|
||||
onFill?.Invoke(workshopItems);
|
||||
});
|
||||
@@ -550,6 +552,7 @@ namespace Barotrauma.Steam
|
||||
|
||||
private void PopulateFrameWithItemInfo(Steamworks.Ugc.Item workshopItem, GUIFrame parentFrame)
|
||||
{
|
||||
ViewingItemDetails = true;
|
||||
taskCancelSrc = taskCancelSrc.IsCancellationRequested ? new CancellationTokenSource() : taskCancelSrc;
|
||||
|
||||
var contentPackage
|
||||
|
||||
+3
-3
@@ -1,12 +1,9 @@
|
||||
#nullable enable
|
||||
using Barotrauma.Extensions;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using ItemOrPackage = Barotrauma.Either<Steamworks.Ugc.Item, Barotrauma.ContentPackage>;
|
||||
|
||||
namespace Barotrauma.Steam
|
||||
{
|
||||
@@ -28,6 +25,8 @@ namespace Barotrauma.Steam
|
||||
ShowOnlySubs,
|
||||
ShowOnlyItemAssemblies
|
||||
}
|
||||
|
||||
public Tab CurrentTab { get; private set; }
|
||||
|
||||
private readonly GUILayoutGroup tabber;
|
||||
private readonly Dictionary<Tab, (GUIButton Button, GUIFrame Content)> tabContents;
|
||||
@@ -78,6 +77,7 @@ namespace Barotrauma.Steam
|
||||
|
||||
public void SelectTab(Tab tab)
|
||||
{
|
||||
CurrentTab = tab;
|
||||
SwitchContent(tabContents[tab].Content);
|
||||
tabber.Children.ForEach(c =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user