diff --git a/Barotrauma/BarotraumaClient/Source/Characters/CharacterHUD.cs b/Barotrauma/BarotraumaClient/Source/Characters/CharacterHUD.cs index 75b6872dd..91ea2bcf8 100644 --- a/Barotrauma/BarotraumaClient/Source/Characters/CharacterHUD.cs +++ b/Barotrauma/BarotraumaClient/Source/Characters/CharacterHUD.cs @@ -216,7 +216,7 @@ namespace Barotrauma Color.LightGreen, Color.Black, 2, GUI.SmallFont); textPos.Y += offset.Y; } - if (character.FocusedCharacter.CharacterHealth.UseHealthWindow) + if (character.FocusedCharacter.CharacterHealth.UseHealthWindow && character.CanInteractWith(character.FocusedCharacter, 160f, false)) { GUI.DrawString(spriteBatch, textPos, GetCachedHudText("HealHint", GameMain.Config.KeyBind(InputType.Health).ToString()), Color.LightGreen, Color.Black, 2, GUI.SmallFont); diff --git a/Barotrauma/BarotraumaClient/Source/Networking/SteamManager.cs b/Barotrauma/BarotraumaClient/Source/Networking/SteamManager.cs index 224623330..a7e1a484b 100644 --- a/Barotrauma/BarotraumaClient/Source/Networking/SteamManager.cs +++ b/Barotrauma/BarotraumaClient/Source/Networking/SteamManager.cs @@ -590,7 +590,7 @@ namespace Barotrauma.Steam } else { - DebugConsole.NewMessage("Publishing workshop item " + item.Title + " failed. " + item.Error, Microsoft.Xna.Framework.Color.Red); + DebugConsole.ThrowError("Publishing workshop item " + item.Title + " failed. " + item.Error); } SaveUtil.ClearFolder(WorkshopItemStagingFolder); diff --git a/Barotrauma/BarotraumaClient/Source/Screens/SteamWorkshopScreen.cs b/Barotrauma/BarotraumaClient/Source/Screens/SteamWorkshopScreen.cs index 1a62ec6db..af3414813 100644 --- a/Barotrauma/BarotraumaClient/Source/Screens/SteamWorkshopScreen.cs +++ b/Barotrauma/BarotraumaClient/Source/Screens/SteamWorkshopScreen.cs @@ -748,7 +748,7 @@ namespace Barotrauma for (int i = 0; i < item.Tags.Length && i < 5; i++) { if (string.IsNullOrEmpty(item.Tags[i])) { continue; } - string tag = TextManager.Get("Workshop.ContentTag." + item.Tags[i].Replace(" ", ""), true); + string tag = TextManager.Get("Workshop.ContentTag." + item.Tags[i], true); if (string.IsNullOrEmpty(tag)) { tag = item.Tags[i].CapitaliseFirstInvariant(); } tags.Add(tag); } @@ -1386,20 +1386,9 @@ namespace Barotrauma } else { - string errorMsg = item.ErrorCode.HasValue ? - TextManager.Get("WorkshopPublishError." + item.ErrorCode.Value.ToString(), returnNull: true) : - null; - - if (errorMsg == null) - { - new GUIMessageBox( - TextManager.Get("Error"), - TextManager.GetWithVariable("WorkshopItemPublishFailed", "[itemname]", TextManager.EnsureUTF8(item.Title)) + item.Error); - } - else - { - new GUIMessageBox(TextManager.Get("Error"), errorMsg); - } + new GUIMessageBox( + TextManager.Get("Error"), + TextManager.GetWithVariable("WorkshopItemPublishFailed", "[itemname]", TextManager.EnsureUTF8(item.Title)) + item.Error); } createItemFrame.ClearChildren(); diff --git a/Barotrauma/BarotraumaShared/Source/Characters/Character.cs b/Barotrauma/BarotraumaShared/Source/Characters/Character.cs index 2d122b966..ef811f51e 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/Character.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/Character.cs @@ -2355,7 +2355,7 @@ namespace Barotrauma { SelectCharacter(focusedCharacter); } - else if (focusedCharacter != null && IsKeyHit(InputType.Health) && focusedCharacter.CharacterHealth.UseHealthWindow) + else if (focusedCharacter != null && IsKeyHit(InputType.Health) && focusedCharacter.CharacterHealth.UseHealthWindow && CanInteractWith(focusedCharacter, 160f, false)) { if (focusedCharacter == SelectedCharacter) { diff --git a/Barotrauma/BarotraumaShared/Source/Networking/SteamManager.cs b/Barotrauma/BarotraumaShared/Source/Networking/SteamManager.cs index 937048f9c..f72c8354b 100644 --- a/Barotrauma/BarotraumaShared/Source/Networking/SteamManager.cs +++ b/Barotrauma/BarotraumaShared/Source/Networking/SteamManager.cs @@ -21,11 +21,7 @@ namespace Barotrauma.Steam { "monster", 8 }, { "art", 8 }, { "mission", 8 }, - { "event set", 8 }, - { "total conversion", 5 }, - { "environment", 5 }, - { "item assembly", 5 }, - { "language", 5 } + { "environment", 5 } }; private List popularTags = new List(); diff --git a/Libraries/Facepunch.Steamworks/Interfaces/Workshop.Editor.cs b/Libraries/Facepunch.Steamworks/Interfaces/Workshop.Editor.cs index 771768dbd..36bcb330d 100644 --- a/Libraries/Facepunch.Steamworks/Interfaces/Workshop.Editor.cs +++ b/Libraries/Facepunch.Steamworks/Interfaces/Workshop.Editor.cs @@ -24,7 +24,6 @@ namespace Facepunch.Steamworks public bool Publishing { get; internal set; } public ItemType? Type { get; set; } public string Error { get; internal set; } = null; - public SteamNative.Result? ErrorCode { get; internal set; } = null; public string ChangeNote { get; set; } = ""; public uint WorkshopUploadAppId { get; set; } public string MetaData { get; set; } = null; @@ -100,7 +99,6 @@ namespace Facepunch.Steamworks Publishing = true; Error = null; - ErrorCode = null; if ( Id == 0 ) { @@ -131,14 +129,12 @@ namespace Facepunch.Steamworks if ( obj.Result == SteamNative.Result.OK && !Failed ) { Error = null; - ErrorCode = null; Id = obj.PublishedFileId; PublishChanges(); return; } Error = $"Error creating new file: {obj.Result} ({obj.PublishedFileId})"; - ErrorCode = obj.Result; Publishing = false; OnChangesSubmitted?.Invoke( (Result) obj.Result ); @@ -225,7 +221,6 @@ namespace Facepunch.Steamworks NeedToAgreeToWorkshopLegal = obj.UserNeedsToAcceptWorkshopLegalAgreement; Publishing = false; - ErrorCode = obj.Result; Error = obj.Result != SteamNative.Result.OK ? $"Error publishing changes: {obj.Result} ({NeedToAgreeToWorkshopLegal})" : null; diff --git a/Libraries/Facepunch.Steamworks/SteamNative/SteamNative.Enums.cs b/Libraries/Facepunch.Steamworks/SteamNative/SteamNative.Enums.cs index 5729eca44..f57eb4066 100644 --- a/Libraries/Facepunch.Steamworks/SteamNative/SteamNative.Enums.cs +++ b/Libraries/Facepunch.Steamworks/SteamNative/SteamNative.Enums.cs @@ -20,7 +20,7 @@ namespace SteamNative // // EResult // - public enum Result : int + internal enum Result : int { OK = 1, Fail = 2,