Unstable 0.1300.1.11
This commit is contained in:
@@ -407,7 +407,7 @@ namespace Barotrauma
|
||||
ToolTip = TextManager.Get(connection.LevelData.IsBeaconActive ? "BeaconStationActiveTooltip" : "BeaconStationInactiveTooltip")
|
||||
};
|
||||
new GUITextBlock(new RectTransform(Vector2.One, beaconStationContent.RectTransform),
|
||||
TextManager.Get("submarinetype.beaconstation"), font: GUI.SubHeadingFont, textAlignment: Alignment.CenterLeft)
|
||||
TextManager.Get("submarinetype.beaconstation", fallBackTag: "beaconstationsonarlabel"), font: GUI.SubHeadingFont, textAlignment: Alignment.CenterLeft)
|
||||
{
|
||||
Padding = Vector4.Zero,
|
||||
ToolTip = icon.ToolTip
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Barotrauma
|
||||
private readonly GUIFrame playerInfoContainer;
|
||||
|
||||
private GUILayoutGroup infoContainer;
|
||||
private GUITextBlock changesPendingText;
|
||||
private GUIComponent changesPendingText;
|
||||
public GUIButton PlayerFrame;
|
||||
|
||||
private readonly GUIComponent subPreviewContainer;
|
||||
@@ -417,7 +417,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (!(FileTransferFrame.UserData is FileReceiver.FileTransferIn transfer)) { return false; }
|
||||
GameMain.Client?.CancelFileTransfer(transfer);
|
||||
GameMain.Client.FileReceiver.StopTransfer(transfer);
|
||||
GameMain.Client?.FileReceiver.StopTransfer(transfer);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -1632,9 +1632,17 @@ namespace Barotrauma
|
||||
|
||||
private void CreateChangesPendingText()
|
||||
{
|
||||
if (changesPendingText != null || infoContainer == null) return;
|
||||
changesPendingText = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.065f), infoContainer.Parent.RectTransform, Anchor.BottomCenter, Pivot.TopCenter) { RelativeOffset = new Vector2(0f, -0.065f) },
|
||||
TextManager.Get("tabmenu.characterchangespending"), textColor: GUI.Style.Orange, textAlignment: Alignment.Center, style: null) { IgnoreLayoutGroups = true };
|
||||
if (changesPendingText != null || infoContainer == null) { return; }
|
||||
|
||||
changesPendingText = new GUIFrame(new RectTransform(new Vector2(1.0f, 0.065f), infoContainer.Parent.Parent.RectTransform, Anchor.BottomCenter, Pivot.TopCenter) { RelativeOffset = new Vector2(0f, -0.03f) },
|
||||
style: "OuterGlow")
|
||||
{
|
||||
Color = Color.Black,
|
||||
IgnoreLayoutGroups = true
|
||||
};
|
||||
var text = new GUITextBlock(new RectTransform(Vector2.One, changesPendingText.RectTransform, Anchor.Center),
|
||||
TextManager.Get("tabmenu.characterchangespending"), textColor: GUI.Style.Orange, textAlignment: Alignment.Center, style: null);
|
||||
changesPendingText.RectTransform.MinSize = new Point((int)(text.TextSize.X * 1.2f), (int)(text.TextSize.Y * 2.0f));
|
||||
}
|
||||
|
||||
private void CreateJobVariantTooltip(JobPrefab jobPrefab, int variant, GUIComponent parentSlot)
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace Barotrauma
|
||||
var particlePrefabs = GameMain.ParticleManager.GetPrefabList();
|
||||
foreach (ParticlePrefab particlePrefab in particlePrefabs)
|
||||
{
|
||||
var prefabText = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.05f), prefabList.Content.RectTransform) { MinSize = new Point(0, 20) },
|
||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.05f), prefabList.Content.RectTransform) { MinSize = new Point(0, 20) },
|
||||
particlePrefab.DisplayName)
|
||||
{
|
||||
Padding = Vector4.Zero,
|
||||
@@ -231,6 +231,7 @@ namespace Barotrauma
|
||||
|
||||
private void SerializeAll()
|
||||
{
|
||||
Barotrauma.IO.Validation.SkipValidationInDebugBuilds = true;
|
||||
foreach (ContentFile configFile in GameMain.Instance.GetFilesOfType(ContentType.Particles))
|
||||
{
|
||||
XDocument doc = XMLExtensions.TryLoadXml(configFile.Path);
|
||||
@@ -259,6 +260,7 @@ namespace Barotrauma
|
||||
writer.Flush();
|
||||
}
|
||||
}
|
||||
Barotrauma.IO.Validation.SkipValidationInDebugBuilds = false;
|
||||
}
|
||||
|
||||
private void SerializeToClipboard(ParticlePrefab prefab)
|
||||
|
||||
@@ -41,7 +41,9 @@ namespace Barotrauma
|
||||
private GUIFrame workshopDownloadsFrame = null;
|
||||
private Steamworks.Ugc.Item? currentlyDownloadingWorkshopItem = null;
|
||||
private Dictionary<ulong, Steamworks.Ugc.Item?> pendingWorkshopDownloads = null;
|
||||
private string autoConnectName; private string autoConnectEndpoint;
|
||||
private string autoConnectName;
|
||||
public string AutoConnectEndpoint { get; private set; }
|
||||
public string LastAutoConnectEndpoint;
|
||||
|
||||
private enum TernaryOption
|
||||
{
|
||||
@@ -1037,7 +1039,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
if (currentlyDownloadingWorkshopItem?.IsInstalled ?? true)
|
||||
if (currentlyDownloadingWorkshopItem == null)
|
||||
{
|
||||
if (pendingWorkshopDownloads?.Any() ?? false)
|
||||
{
|
||||
@@ -1046,15 +1048,19 @@ namespace Barotrauma
|
||||
{
|
||||
ulong itemId = item.Value.Id;
|
||||
currentlyDownloadingWorkshopItem = item;
|
||||
SteamManager.SubscribeToWorkshopItem(itemId, () =>
|
||||
SteamManager.ForceRedownload(item.Value.Id, () =>
|
||||
{
|
||||
if (!(item?.IsSubscribed ?? false))
|
||||
{
|
||||
TaskPool.Add("SubscribeToServerMod", item?.Subscribe(), (t) => { });
|
||||
}
|
||||
pendingWorkshopDownloads.Remove(itemId);
|
||||
currentlyDownloadingWorkshopItem = null;
|
||||
|
||||
if (SteamManager.CheckWorkshopItemInstalled(item))
|
||||
{
|
||||
SteamManager.UninstallWorkshopItem(item, false, out _);
|
||||
}
|
||||
|
||||
if (SteamManager.InstallWorkshopItem(item, out string errorMsg, enableContentPackage: false, suppressInstallNotif: true))
|
||||
{
|
||||
workshopDownloadsFrame?.FindChild((c) => c.UserData is ulong l && l == itemId, true)?.Flash(GUI.Style.Green);
|
||||
@@ -1067,10 +1073,11 @@ namespace Barotrauma
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(autoConnectEndpoint))
|
||||
else if (!string.IsNullOrEmpty(AutoConnectEndpoint))
|
||||
{
|
||||
JoinServer(autoConnectEndpoint, autoConnectName);
|
||||
autoConnectEndpoint = null;
|
||||
LastAutoConnectEndpoint = AutoConnectEndpoint;
|
||||
JoinServer(AutoConnectEndpoint, autoConnectName);
|
||||
AutoConnectEndpoint = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2132,9 +2139,10 @@ namespace Barotrauma
|
||||
if (workshopDownloadsFrame != null) { return; }
|
||||
int rowCount = ids.Count() + 2;
|
||||
|
||||
autoConnectName = serverName; autoConnectEndpoint = endPointString;
|
||||
autoConnectName = serverName; AutoConnectEndpoint = endPointString;
|
||||
|
||||
workshopDownloadsFrame = new GUIFrame(new RectTransform(Vector2.One, GUI.Canvas), null, Color.Black * 0.5f);
|
||||
currentlyDownloadingWorkshopItem = null;
|
||||
pendingWorkshopDownloads = new Dictionary<ulong, Steamworks.Ugc.Item?>();
|
||||
|
||||
var innerFrame = new GUIFrame(new RectTransform(new Vector2(0.5f, 0.1f + 0.03f * rowCount), workshopDownloadsFrame.RectTransform, Anchor.Center, Pivot.Center));
|
||||
@@ -2191,9 +2199,11 @@ namespace Barotrauma
|
||||
{
|
||||
OnClicked = (btn, obj) =>
|
||||
{
|
||||
autoConnectEndpoint = null;
|
||||
AutoConnectEndpoint = null;
|
||||
LastAutoConnectEndpoint = null;
|
||||
autoConnectName = null;
|
||||
pendingWorkshopDownloads.Clear();
|
||||
currentlyDownloadingWorkshopItem = null;
|
||||
workshopDownloadsFrame = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -682,12 +682,21 @@ namespace Barotrauma
|
||||
try
|
||||
{
|
||||
bool reselect = GameMain.Config.AllEnabledPackages.Any(cp => cp.SteamWorkshopId != 0 && cp.SteamWorkshopId == item?.Id);
|
||||
if (!SteamManager.UninstallWorkshopItem(item, false, out string errorMsg) ||
|
||||
!SteamManager.InstallWorkshopItem(item, out errorMsg, reselect, true))
|
||||
if (!SteamManager.UninstallWorkshopItem(item, false, out string errorMsg))
|
||||
{
|
||||
DebugConsole.ThrowError($"Failed to reinstall \"{item?.Title}\": {errorMsg}", null, true);
|
||||
elem.Flash(GUI.Style.Red);
|
||||
return true;
|
||||
}
|
||||
|
||||
SteamManager.ForceRedownload(item?.Id ?? 0, () =>
|
||||
{
|
||||
if (!SteamManager.InstallWorkshopItem(item, out string errorMsg, reselect, true))
|
||||
{
|
||||
DebugConsole.ThrowError($"Failed to reinstall \"{item?.Title}\": {errorMsg}", null, true);
|
||||
elem.Flash(GUI.Style.Red);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@@ -2815,13 +2815,17 @@ namespace Barotrauma
|
||||
foreach (GUIComponent child in categorizedEntityList.Content.Children)
|
||||
{
|
||||
child.Visible = !entityCategory.HasValue || (MapEntityCategory)child.UserData == entityCategory;
|
||||
if (child.Visible && dummyCharacter?.SelectedConstruction?.OwnInventory != null)
|
||||
var innerList = child.GetChild<GUIListBox>();
|
||||
foreach (GUIComponent grandChild in innerList.Content.Children)
|
||||
{
|
||||
child.Visible = child.UserData is MapEntityPrefab item && IsItemPrefab(item);
|
||||
grandChild.Visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(entityFilterBox.Text)) { FilterEntities(entityFilterBox.Text); }
|
||||
if (!string.IsNullOrEmpty(entityFilterBox.Text) || dummyCharacter?.SelectedConstruction?.OwnInventory != null)
|
||||
{
|
||||
FilterEntities(entityFilterBox.Text);
|
||||
}
|
||||
|
||||
categorizedEntityList.UpdateScrollBarSize();
|
||||
categorizedEntityList.BarScroll = 0.0f;
|
||||
@@ -2831,7 +2835,7 @@ namespace Barotrauma
|
||||
|
||||
private void FilterEntities(string filter)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(filter))
|
||||
if (string.IsNullOrWhiteSpace(filter) && dummyCharacter?.SelectedConstruction?.OwnInventory == null)
|
||||
{
|
||||
allEntityList.Visible = false;
|
||||
categorizedEntityList.Visible = true;
|
||||
@@ -2844,10 +2848,6 @@ namespace Barotrauma
|
||||
foreach (GUIComponent grandChild in innerList.Content.Children)
|
||||
{
|
||||
grandChild.Visible = ((MapEntityPrefab)grandChild.UserData).Name.ToLower().Contains(filter);
|
||||
if (grandChild.Visible && dummyCharacter?.SelectedConstruction?.OwnInventory != null)
|
||||
{
|
||||
grandChild.Visible = grandChild.UserData is MapEntityPrefab item && IsItemPrefab(item);
|
||||
}
|
||||
}
|
||||
};
|
||||
categorizedEntityList.UpdateScrollBarSize();
|
||||
|
||||
Reference in New Issue
Block a user