From 849a79061762dca05a4028268706630494845d62 Mon Sep 17 00:00:00 2001 From: Partmedia Date: Thu, 27 Jun 2024 00:05:27 -0800 Subject: [PATCH 01/17] Increase lockout threshold (#29504) --- .../Atmos/Piping/Unary/Components/GasVentPumpComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Atmos/Piping/Unary/Components/GasVentPumpComponent.cs b/Content.Server/Atmos/Piping/Unary/Components/GasVentPumpComponent.cs index 2ba4603a9b..74186ed36e 100644 --- a/Content.Server/Atmos/Piping/Unary/Components/GasVentPumpComponent.cs +++ b/Content.Server/Atmos/Piping/Unary/Components/GasVentPumpComponent.cs @@ -40,7 +40,7 @@ namespace Content.Server.Atmos.Piping.Unary.Components /// [ViewVariables(VVAccess.ReadWrite)] [DataField("underPressureLockoutThreshold")] - public float UnderPressureLockoutThreshold = 60; // this must be tuned in conjunction with atmos.mmos_spacing_speed + public float UnderPressureLockoutThreshold = 80; // this must be tuned in conjunction with atmos.mmos_spacing_speed /// /// Pressure locked vents still leak a little (leading to eventual pressurization of sealed sections) From 0896edf06c819080870e63e9744fd8f6e140b84c Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Thu, 27 Jun 2024 16:57:55 +0200 Subject: [PATCH 02/17] Remove placing items on tabletop boards. (#29513) This feature should never have been merged, it can be trivially abused to break the entire server. It's behind a CVar because honestly that's the easiest way to 1984 the feature. --- Content.Server/Tabletop/TabletopSystem.cs | 6 ++++++ Content.Shared/CCVar/CCVars.cs | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/Content.Server/Tabletop/TabletopSystem.cs b/Content.Server/Tabletop/TabletopSystem.cs index caa319a0b7..f152648e21 100644 --- a/Content.Server/Tabletop/TabletopSystem.cs +++ b/Content.Server/Tabletop/TabletopSystem.cs @@ -1,5 +1,6 @@ using Content.Server.Popups; using Content.Server.Tabletop.Components; +using Content.Shared.CCVar; using Content.Shared.Hands.Components; using Content.Shared.Interaction; using Content.Shared.Item; @@ -9,6 +10,7 @@ using Content.Shared.Tabletop.Events; using Content.Shared.Verbs; using JetBrains.Annotations; using Robust.Server.GameObjects; +using Robust.Shared.Configuration; using Robust.Shared.Enums; using Robust.Shared.Map; using Robust.Shared.Player; @@ -23,6 +25,7 @@ namespace Content.Server.Tabletop [Dependency] private readonly EyeSystem _eye = default!; [Dependency] private readonly ViewSubscriberSystem _viewSubscriberSystem = default!; [Dependency] private readonly PopupSystem _popupSystem = default!; + [Dependency] private readonly IConfigurationManager _cfg = default!; public override void Initialize() { @@ -73,6 +76,9 @@ namespace Content.Server.Tabletop private void OnInteractUsing(EntityUid uid, TabletopGameComponent component, InteractUsingEvent args) { + if (!_cfg.GetCVar(CCVars.GameTabletopPlace)) + return; + if (!EntityManager.TryGetComponent(args.User, out HandsComponent? hands)) return; diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs index ef3615f103..a0e9157e92 100644 --- a/Content.Shared/CCVar/CCVars.cs +++ b/Content.Shared/CCVar/CCVars.cs @@ -440,6 +440,16 @@ namespace Content.Shared.CCVar public static readonly CVarDef RoundEndPVSOverrides = CVarDef.Create("game.round_end_pvs_overrides", true, CVar.SERVERONLY); + /// + /// If true, players can place objects onto tabletop games like chess boards. + /// + /// + /// This feature is currently highly abusable and can easily be used to crash the server, + /// so it's off by default. + /// + public static readonly CVarDef GameTabletopPlace = + CVarDef.Create("game.tabletop_place", false, CVar.SERVERONLY); + /* * Discord */ From 45cc19f3152f1f340d56af3edeba1fb4724fc0fa Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Thu, 27 Jun 2024 16:58:42 +0200 Subject: [PATCH 03/17] Add InteractUsing admin logs. (#29514) Apparently we did not have these. --- Content.Shared.Database/LogType.cs | 5 +++++ .../Interaction/SharedInteractionSystem.cs | 20 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/Content.Shared.Database/LogType.cs b/Content.Shared.Database/LogType.cs index 33a5d30c6a..eb2b8e1f6f 100644 --- a/Content.Shared.Database/LogType.cs +++ b/Content.Shared.Database/LogType.cs @@ -105,4 +105,9 @@ public enum LogType /// This is a default value used by PlayerRateLimitManager, though users can use different log types. /// RateLimited = 91, + + /// + /// A player did an item-use interaction of an item they were holding onto another object. + /// + InteractUsing = 92, } diff --git a/Content.Shared/Interaction/SharedInteractionSystem.cs b/Content.Shared/Interaction/SharedInteractionSystem.cs index 1e4c49211f..48076ca360 100644 --- a/Content.Shared/Interaction/SharedInteractionSystem.cs +++ b/Content.Shared/Interaction/SharedInteractionSystem.cs @@ -486,6 +486,21 @@ namespace Content.Shared.Interaction public void InteractUsingRanged(EntityUid user, EntityUid used, EntityUid? target, EntityCoordinates clickLocation, bool inRangeUnobstructed) { + if (target != null) + { + _adminLogger.Add( + LogType.InteractUsing, + LogImpact.Low, + $"{ToPrettyString(user):user} interacted with {ToPrettyString(target):target} using {ToPrettyString(used):used}"); + } + else + { + _adminLogger.Add( + LogType.InteractUsing, + LogImpact.Low, + $"{ToPrettyString(user):user} interacted with *nothing* using {ToPrettyString(used):used}"); + } + if (RangedInteractDoBefore(user, used, target, clickLocation, inRangeUnobstructed)) return; @@ -926,6 +941,11 @@ namespace Content.Shared.Interaction if (checkCanUse && !_actionBlockerSystem.CanUseHeldEntity(user, used)) return; + _adminLogger.Add( + LogType.InteractUsing, + LogImpact.Low, + $"{ToPrettyString(user):user} interacted with {ToPrettyString(target):target} using {ToPrettyString(used):used}"); + if (RangedInteractDoBefore(user, used, target, clickLocation, true)) return; From ced15b793424027e61c6976a62d7e1466388e3c2 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Thu, 27 Jun 2024 16:58:51 +0200 Subject: [PATCH 04/17] Fix coords monitor in replays (#29512) The F3 coords manager is blocked if you're not an admin. This check happened even when playing a replay, where you actually aren't. There's now a check to make sure you are actually server-connected-to-game before running the logic. Also moved it to a manager because this *shouldn't be a bloody entity system in the first place*. --- ...gMonitorSystem.cs => DebugMonitorManager.cs} | 17 +++++++++++------ Content.Client/Entry/EntryPoint.cs | 11 +++++++++++ Content.Client/IoC/ClientContentIoC.cs | 2 ++ 3 files changed, 24 insertions(+), 6 deletions(-) rename Content.Client/DebugMon/{DebugMonitorSystem.cs => DebugMonitorManager.cs} (51%) diff --git a/Content.Client/DebugMon/DebugMonitorSystem.cs b/Content.Client/DebugMon/DebugMonitorManager.cs similarity index 51% rename from Content.Client/DebugMon/DebugMonitorSystem.cs rename to Content.Client/DebugMon/DebugMonitorManager.cs index fb5cd4f51a..7e1dca0d6f 100644 --- a/Content.Client/DebugMon/DebugMonitorSystem.cs +++ b/Content.Client/DebugMon/DebugMonitorManager.cs @@ -1,23 +1,28 @@ -using Content.Client.Administration.Managers; +using Content.Client.Administration.Managers; using Content.Shared.CCVar; +using Robust.Client; using Robust.Client.UserInterface; using Robust.Shared.Configuration; - namespace Content.Client.DebugMon; /// -/// This handles preventing certain debug monitors from appearing. +/// This handles preventing certain debug monitors from being usable by non-admins. /// -public sealed class DebugMonitorSystem : EntitySystem +internal sealed class DebugMonitorManager { [Dependency] private readonly IConfigurationManager _cfg = default!; [Dependency] private readonly IClientAdminManager _admin = default!; [Dependency] private readonly IUserInterfaceManager _userInterface = default!; + [Dependency] private readonly IBaseClient _baseClient = default!; - public override void FrameUpdate(float frameTime) + public void FrameUpdate() { - if (!_admin.IsActive() && _cfg.GetCVar(CCVars.DebugCoordinatesAdminOnly)) + if (_baseClient.RunLevel == ClientRunLevel.InGame + && !_admin.IsActive() + && _cfg.GetCVar(CCVars.DebugCoordinatesAdminOnly)) + { _userInterface.DebugMonitors.SetMonitor(DebugMonitor.Coords, false); + } } } diff --git a/Content.Client/Entry/EntryPoint.cs b/Content.Client/Entry/EntryPoint.cs index dd7e781f0b..6caefb9a7e 100644 --- a/Content.Client/Entry/EntryPoint.cs +++ b/Content.Client/Entry/EntryPoint.cs @@ -1,6 +1,7 @@ using Content.Client.Administration.Managers; using Content.Client.Changelog; using Content.Client.Chat.Managers; +using Content.Client.DebugMon; using Content.Client.Eui; using Content.Client.Fullscreen; using Content.Client.GhostKick; @@ -33,6 +34,7 @@ using Robust.Shared.Configuration; using Robust.Shared.ContentPack; using Robust.Shared.Prototypes; using Robust.Shared.Replays; +using Robust.Shared.Timing; namespace Content.Client.Entry { @@ -68,6 +70,7 @@ namespace Content.Client.Entry [Dependency] private readonly IReplayLoadManager _replayLoad = default!; [Dependency] private readonly ILogManager _logManager = default!; [Dependency] private readonly ContentReplayPlaybackManager _replayMan = default!; + [Dependency] private readonly DebugMonitorManager _debugMonitorManager = default!; public override void Init() { @@ -205,5 +208,13 @@ namespace Content.Client.Entry _stateManager.RequestStateChange(); } } + + public override void Update(ModUpdateLevel level, FrameEventArgs frameEventArgs) + { + if (level == ModUpdateLevel.FramePreEngine) + { + _debugMonitorManager.FrameUpdate(); + } + } } } diff --git a/Content.Client/IoC/ClientContentIoC.cs b/Content.Client/IoC/ClientContentIoC.cs index d1c595ae9b..328cf41d0d 100644 --- a/Content.Client/IoC/ClientContentIoC.cs +++ b/Content.Client/IoC/ClientContentIoC.cs @@ -2,6 +2,7 @@ using Content.Client.Administration.Managers; using Content.Client.Changelog; using Content.Client.Chat.Managers; using Content.Client.Clickable; +using Content.Client.DebugMon; using Content.Client.Eui; using Content.Client.GhostKick; using Content.Client.Launcher; @@ -48,6 +49,7 @@ namespace Content.Client.IoC collection.Register(); collection.Register(); collection.Register(); + collection.Register(); } } } From 331c0fe3260db682cba5ffbefc2772e584efa7e5 Mon Sep 17 00:00:00 2001 From: PJBot Date: Thu, 27 Jun 2024 14:59:02 +0000 Subject: [PATCH 05/17] Automatic changelog update --- Resources/Changelog/Changelog.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 8d6ce1e457..dbe5c849f1 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,12 +1,4 @@ Entries: -- author: Killerqu00 - changes: - - message: Quartermasters can now skip a single bounty in the list once every 15 - minutes. - type: Add - id: 6325 - time: '2024-04-09T22:18:07.0000000+00:00' - url: https://github.com/space-wizards/space-station-14/pull/26537 - author: SkaldetSkaeg changes: - message: The Flippo lighter is now quieter and has a delay on use. @@ -3831,3 +3823,11 @@ id: 6824 time: '2024-06-27T02:08:57.0000000+00:00' url: https://github.com/space-wizards/space-station-14/pull/29499 +- author: PJB3005 + changes: + - message: You can no longer place items onto tabletop games. The feature could + be easily abused to crash the server. + type: Remove + id: 6825 + time: '2024-06-27T14:57:55.0000000+00:00' + url: https://github.com/space-wizards/space-station-14/pull/29513 From 64192b35069ef0099ff3b42c2a56f3626c42b132 Mon Sep 17 00:00:00 2001 From: KonstantinAngelov <168754339+KonstantinAngelov@users.noreply.github.com> Date: Thu, 27 Jun 2024 18:11:33 +0300 Subject: [PATCH 06/17] CookBook name,id and description changed to not be "meta" (#29467) * CookBook name,id and description changed * Id isues with CookBook fixed * Maps not added --- Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml | 2 +- Resources/Prototypes/Catalog/Fills/Crates/service.yml | 2 +- Resources/Prototypes/Entities/Objects/Misc/books.yml | 6 +++--- Resources/migration.yml | 4 ++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml b/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml index b52e853008..09c7e165bf 100644 --- a/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml +++ b/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml @@ -15,7 +15,7 @@ orGroup: BookPool - id: BookBartendersManual orGroup: BookPool - - id: BookChefGaming + - id: BookHowToCookForFortySpaceman orGroup: BookPool - id: BookLeafLoversSecret orGroup: BookPool diff --git a/Resources/Prototypes/Catalog/Fills/Crates/service.yml b/Resources/Prototypes/Catalog/Fills/Crates/service.yml index 1876de6a53..f4c47cfe9e 100644 --- a/Resources/Prototypes/Catalog/Fills/Crates/service.yml +++ b/Resources/Prototypes/Catalog/Fills/Crates/service.yml @@ -173,7 +173,7 @@ - id: BookSpaceEncyclopedia - id: BookTheBookOfControl - id: BookBartendersManual - - id: BookChefGaming + - id: BookHowToCookForFortySpaceman - id: BookLeafLoversSecret - id: BookEngineersHandbook - id: BookScientistsGuidebook diff --git a/Resources/Prototypes/Entities/Objects/Misc/books.yml b/Resources/Prototypes/Entities/Objects/Misc/books.yml index 3fc90048dd..fd4cac781b 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/books.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/books.yml @@ -110,10 +110,10 @@ - Bartender - type: entity - id: BookChefGaming + id: BookHowToCookForFortySpaceman parent: BaseItem - name: chef gaming - description: A book about cooking written by a gamer chef. + name: How To Cook For Forty Spacemen + description: A book about cooking written by a space chef. components: - type: Sprite sprite: Objects/Misc/books.rsi diff --git a/Resources/migration.yml b/Resources/migration.yml index 6602fc1791..ef0a5f46b7 100644 --- a/Resources/migration.yml +++ b/Resources/migration.yml @@ -354,3 +354,7 @@ ClothingOuterCoatInspector: ClothingOuterCoatDetectiveLoadout # 2024-06-23 FloorTileItemReinforced: PartRodMetal1 + + +#2024-06-25 +BookChefGaming: BookHowToCookForFortySpaceman From 2ed32be51455f0dcf189d105ec7992fd252f2ae5 Mon Sep 17 00:00:00 2001 From: PJBot Date: Thu, 27 Jun 2024 15:12:39 +0000 Subject: [PATCH 07/17] Automatic changelog update --- Resources/Changelog/Changelog.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index dbe5c849f1..69de6e7a90 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,11 +1,4 @@ Entries: -- author: SkaldetSkaeg - changes: - - message: The Flippo lighter is now quieter and has a delay on use. - type: Tweak - id: 6326 - time: '2024-04-09T22:20:57.0000000+00:00' - url: https://github.com/space-wizards/space-station-14/pull/26846 - author: notquitehadouken changes: - message: Gave botanists droppers for easier chemical moving. @@ -3831,3 +3824,10 @@ id: 6825 time: '2024-06-27T14:57:55.0000000+00:00' url: https://github.com/space-wizards/space-station-14/pull/29513 +- author: KonstantinAngelov + changes: + - message: Chef's Cookbook has a more IC name. + type: Tweak + id: 6826 + time: '2024-06-27T15:11:33.0000000+00:00' + url: https://github.com/space-wizards/space-station-14/pull/29467 From d5b5dafb3aefd343304ca26cfc4caec72bc86010 Mon Sep 17 00:00:00 2001 From: ArkiveDev <95712736+ArkiveDev@users.noreply.github.com> Date: Thu, 27 Jun 2024 18:07:12 -0400 Subject: [PATCH 08/17] Still immovable rods are now actually still (#29518) Set the still rod's max velocity to 0 so it gets a 0 mangintude impulse on init --- Resources/Prototypes/Entities/Objects/Fun/immovable_rod.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/Resources/Prototypes/Entities/Objects/Fun/immovable_rod.yml b/Resources/Prototypes/Entities/Objects/Fun/immovable_rod.yml index e52f66d39b..69f0ed415e 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/immovable_rod.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/immovable_rod.yml @@ -93,6 +93,7 @@ components: - type: ImmovableRod randomizeVelocity: false + maxSpeed: 0 - type: entity parent: ImmovableRodKeepTilesStill From bc1703323e1ba8da8eefc1e9510a734e9559fd8f Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 28 Jun 2024 10:08:09 +1000 Subject: [PATCH 09/17] Revert "Make wearing an Ushanka also apply accent to your name" (#29524) Revert "Make wearing an Ushanka also apply accent to your name (#29111)" This reverts commit e5a85e2a1359968ab71c4bcd79bfc834a8b3cb5a. --- .../AccentWearerNameClothingComponent.cs | 10 ----- .../AccentWearerNameClothingSystem.cs | 39 ------------------- .../speech/accent-wearer-name-clothing.ftl | 1 - .../Entities/Clothing/Head/hats.yml | 2 - 4 files changed, 52 deletions(-) delete mode 100644 Content.Server/Speech/Components/AccentWearerNameClothingComponent.cs delete mode 100644 Content.Server/Speech/EntitySystems/AccentWearerNameClothingSystem.cs delete mode 100644 Resources/Locale/en-US/speech/accent-wearer-name-clothing.ftl diff --git a/Content.Server/Speech/Components/AccentWearerNameClothingComponent.cs b/Content.Server/Speech/Components/AccentWearerNameClothingComponent.cs deleted file mode 100644 index 288eaa8dcb..0000000000 --- a/Content.Server/Speech/Components/AccentWearerNameClothingComponent.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Content.Server.Speech.EntitySystems; - -namespace Content.Server.Speech.Components; - -/// -/// Applies any accent components on this item to the name of the wearer while worn. -/// -[RegisterComponent] -[Access(typeof(AccentWearerNameClothingSystem))] -public sealed partial class AccentWearerNameClothingComponent : Component; diff --git a/Content.Server/Speech/EntitySystems/AccentWearerNameClothingSystem.cs b/Content.Server/Speech/EntitySystems/AccentWearerNameClothingSystem.cs deleted file mode 100644 index fc381c5998..0000000000 --- a/Content.Server/Speech/EntitySystems/AccentWearerNameClothingSystem.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Content.Server.Speech.Components; -using Content.Shared.Clothing; -using Content.Shared.Inventory; -using Content.Shared.NameModifier.EntitySystems; - -namespace Content.Server.Speech.EntitySystems; - -/// -public sealed class AccentWearerNameClothingSystem : EntitySystem -{ - [Dependency] private readonly NameModifierSystem _nameMod = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnGotEquipped); - SubscribeLocalEvent(OnGotUnequipped); - SubscribeLocalEvent>(OnRefreshNameModifiers); - } - - private void OnGotEquipped(Entity ent, ref ClothingGotEquippedEvent args) - { - _nameMod.RefreshNameModifiers(args.Wearer); - } - - private void OnGotUnequipped(Entity ent, ref ClothingGotUnequippedEvent args) - { - _nameMod.RefreshNameModifiers(args.Wearer); - } - - private void OnRefreshNameModifiers(Entity ent, ref InventoryRelayedEvent args) - { - var ev = new AccentGetEvent(ent, args.Args.BaseName); - RaiseLocalEvent(ent, ev); - // Use a negative priority since we're going to bulldoze any earlier changes - args.Args.AddModifier("comp-accent-wearer-name-clothing-format", -1, ("accentedName", ev.Message)); - } -} diff --git a/Resources/Locale/en-US/speech/accent-wearer-name-clothing.ftl b/Resources/Locale/en-US/speech/accent-wearer-name-clothing.ftl deleted file mode 100644 index 49b0fb31aa..0000000000 --- a/Resources/Locale/en-US/speech/accent-wearer-name-clothing.ftl +++ /dev/null @@ -1 +0,0 @@ -comp-accent-wearer-name-clothing-format = {$accentedName} diff --git a/Resources/Prototypes/Entities/Clothing/Head/hats.yml b/Resources/Prototypes/Entities/Clothing/Head/hats.yml index e2786f70f0..d220d55f1f 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/hats.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/hats.yml @@ -495,8 +495,6 @@ - type: Appearance - type: AddAccentClothing accent: RussianAccent - - type: RussianAccent - - type: AccentWearerNameClothing - type: Foldable canFoldInsideContainer: true - type: FoldableClothing From c7fcbe8c1609560fe70e17cd214ca2438bc3f026 Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Thu, 27 Jun 2024 20:09:05 -0400 Subject: [PATCH 10/17] map renderer fixes (#29523) * map renderer fixes * remove useless casts --- Content.MapRenderer/Painters/DecalPainter.cs | 5 +++-- Content.MapRenderer/Painters/EntityPainter.cs | 15 ++++++++++++--- Content.MapRenderer/Painters/GridPainter.cs | 4 ++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Content.MapRenderer/Painters/DecalPainter.cs b/Content.MapRenderer/Painters/DecalPainter.cs index f863595f9a..6dfb26e1ef 100644 --- a/Content.MapRenderer/Painters/DecalPainter.cs +++ b/Content.MapRenderer/Painters/DecalPainter.cs @@ -86,7 +86,8 @@ public sealed class DecalPainter image.Mutate(o => o.Rotate((float) -decal.Angle.Degrees)); var coloredImage = new Image(image.Width, image.Height); - Color color = decal.Color?.ConvertImgSharp() ?? Color.White; + Color color = decal.Color?.WithAlpha(byte.MaxValue).ConvertImgSharp() ?? Color.White; // remove the encoded color alpha here + var alpha = decal.Color?.A ?? 1; // get the alpha separately so we can use it in DrawImage coloredImage.Mutate(o => o.BackgroundColor(color)); image.Mutate(o => o @@ -95,6 +96,6 @@ public sealed class DecalPainter // Very unsure why the - 1 is needed in the first place but all decals are off by exactly one pixel otherwise // Woohoo! - canvas.Mutate(o => o.DrawImage(image, new Point((int) data.X, (int) data.Y - 1), 1.0f)); + canvas.Mutate(o => o.DrawImage(image, new Point((int) data.X, (int) data.Y - 1), alpha)); } } diff --git a/Content.MapRenderer/Painters/EntityPainter.cs b/Content.MapRenderer/Painters/EntityPainter.cs index 808acf8fe4..2c70481b8a 100644 --- a/Content.MapRenderer/Painters/EntityPainter.cs +++ b/Content.MapRenderer/Painters/EntityPainter.cs @@ -123,19 +123,28 @@ public sealed class EntityPainter image.Mutate(o => o.Crop(rect)); + var spriteRotation = 0f; + if (!entity.Sprite.NoRotation && !entity.Sprite.SnapCardinals && entity.Sprite.GetLayerDirectionCount(layer) == 1) + { + spriteRotation = (float) worldRotation.Degrees; + } + var colorMix = entity.Sprite.Color * layer.Color; var imageColor = Color.FromRgba(colorMix.RByte, colorMix.GByte, colorMix.BByte, colorMix.AByte); var coloredImage = new Image(image.Width, image.Height); coloredImage.Mutate(o => o.BackgroundColor(imageColor)); var (imgX, imgY) = rsi?.Size ?? (EyeManager.PixelsPerMeter, EyeManager.PixelsPerMeter); + var offsetX = (int) (entity.Sprite.Offset.X * EyeManager.PixelsPerMeter); + var offsetY = (int) (entity.Sprite.Offset.Y * EyeManager.PixelsPerMeter); image.Mutate(o => o .DrawImage(coloredImage, PixelColorBlendingMode.Multiply, PixelAlphaCompositionMode.SrcAtop, 1) .Resize(imgX, imgY) - .Flip(FlipMode.Vertical)); + .Flip(FlipMode.Vertical) + .Rotate(spriteRotation)); - var pointX = (int) entity.X - imgX / 2 + EyeManager.PixelsPerMeter / 2; - var pointY = (int) entity.Y - imgY / 2 + EyeManager.PixelsPerMeter / 2; + var pointX = (int) entity.X + offsetX - imgX / 2; + var pointY = (int) entity.Y + offsetY - imgY / 2; canvas.Mutate(o => o.DrawImage(image, new Point(pointX, pointY), 1)); } } diff --git a/Content.MapRenderer/Painters/GridPainter.cs b/Content.MapRenderer/Painters/GridPainter.cs index 416ec05199..d8d6e15378 100644 --- a/Content.MapRenderer/Painters/GridPainter.cs +++ b/Content.MapRenderer/Painters/GridPainter.cs @@ -138,8 +138,8 @@ namespace Content.MapRenderer.Painters var yOffset = (int) -grid.LocalAABB.Bottom; var tileSize = grid.TileSize; - var x = ((float) Math.Floor(position.X) + xOffset) * tileSize * TilePainter.TileImageSize; - var y = ((float) Math.Floor(position.Y) + yOffset) * tileSize * TilePainter.TileImageSize; + var x = (position.X + xOffset) * tileSize * TilePainter.TileImageSize; + var y = (position.Y + yOffset) * tileSize * TilePainter.TileImageSize; return (x, y); } From 7fa081e884320ca8d03ee8354cdb457e0840f61e Mon Sep 17 00:00:00 2001 From: PJBot Date: Fri, 28 Jun 2024 00:09:15 +0000 Subject: [PATCH 11/17] Automatic changelog update --- Resources/Changelog/Changelog.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 69de6e7a90..5ee68bf97d 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,11 +1,4 @@ Entries: -- author: notquitehadouken - changes: - - message: Gave botanists droppers for easier chemical moving. - type: Add - id: 6327 - time: '2024-04-10T17:28:03.0000000+00:00' - url: https://github.com/space-wizards/space-station-14/pull/26839 - author: botanySupremist changes: - message: Clipping harvestable plants now yields undamaged seeds. @@ -3831,3 +3824,10 @@ id: 6826 time: '2024-06-27T15:11:33.0000000+00:00' url: https://github.com/space-wizards/space-station-14/pull/29467 +- author: metalgearsloth + changes: + - message: Ushanka no longer applies an accent to your name. + type: Tweak + id: 6827 + time: '2024-06-28T00:08:09.0000000+00:00' + url: https://github.com/space-wizards/space-station-14/pull/29524 From bb50087dd0ddc5120929eb71496bb577deb8597e Mon Sep 17 00:00:00 2001 From: JIPDawg <51352440+JIPDawg@users.noreply.github.com> Date: Thu, 27 Jun 2024 19:23:17 -0500 Subject: [PATCH 12/17] Fixed the sound of pulling back a foam crossbow from a flash sound to a bow pull sound. (#29508) Fixed foam Crossbow making a flash sound to just a bow pull sound Co-authored-by: JIP --- Resources/Prototypes/Entities/Objects/Fun/toys.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/Entities/Objects/Fun/toys.yml b/Resources/Prototypes/Entities/Objects/Fun/toys.yml index 86060b1bbe..1ac622db86 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/toys.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/toys.yml @@ -896,7 +896,7 @@ - BulletFoam capacity: 1 soundInsert: - path: /Audio/Weapons/drawbow2.ogg + path: /Audio/Items/bow_pull.ogg - type: ContainerContainer containers: ballistic-ammo: !type:Container From 496860e254fe81a3b1f7e649bb95121406c64f4b Mon Sep 17 00:00:00 2001 From: PJBot Date: Fri, 28 Jun 2024 00:24:23 +0000 Subject: [PATCH 13/17] Automatic changelog update --- Resources/Changelog/Changelog.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 5ee68bf97d..851c9b57d6 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,11 +1,4 @@ Entries: -- author: botanySupremist - changes: - - message: Clipping harvestable plants now yields undamaged seeds. - type: Add - id: 6328 - time: '2024-04-10T17:51:25.0000000+00:00' - url: https://github.com/space-wizards/space-station-14/pull/25541 - author: deltanedas changes: - message: Fixed some doors having no access when they should. @@ -3831,3 +3824,11 @@ id: 6827 time: '2024-06-28T00:08:09.0000000+00:00' url: https://github.com/space-wizards/space-station-14/pull/29524 +- author: JIPDawg + changes: + - message: Changed the sound of pulling back the foam crossbow from the sound of + a Flash to just pulling back a bow. + type: Tweak + id: 6828 + time: '2024-06-28T00:23:17.0000000+00:00' + url: https://github.com/space-wizards/space-station-14/pull/29508 From 4a728fa3c68ba7b6b41ed86950b004dc6ea1c74b Mon Sep 17 00:00:00 2001 From: Repo <47093363+Titian3@users.noreply.github.com> Date: Fri, 28 Jun 2024 15:32:57 +1200 Subject: [PATCH 14/17] Fix Admin Object tab sorting and search - Part 2 (#28681) * admin Object tab sorting and searchable * Fix for showing disconnected players on player admin tab * Fix namespace and search bar location. * Change linq to loop. * No more Linq to sort * Fix item click vv menu * Added refresh button and refresh on opening tab. * Clear spaces. * Move tab magic numbers to enums * Get rid of old unused xaml * Fix code style issues and button event type. * Merge in baby jail * More style cleanup and move cast around. * Make the localization a little more easy to read, same loc var names. * Missed Loc for label * Fix class field order * Over zelous delete. * Small updates. * Min syntax issues fix --- .../Administration/UI/AdminMenuWindow.xaml.cs | 77 ++++++++++++------- .../UI/Tabs/ObjectsTab/ObjectsTab.xaml | 19 +++-- .../UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs | 75 +++++++++--------- .../Systems/Admin/AdminUIController.cs | 2 +- .../administration/ui/tabs/object-tab.ftl | 1 + 5 files changed, 97 insertions(+), 77 deletions(-) diff --git a/Content.Client/Administration/UI/AdminMenuWindow.xaml.cs b/Content.Client/Administration/UI/AdminMenuWindow.xaml.cs index f3aa2572f2..d5c43e2a50 100644 --- a/Content.Client/Administration/UI/AdminMenuWindow.xaml.cs +++ b/Content.Client/Administration/UI/AdminMenuWindow.xaml.cs @@ -3,38 +3,57 @@ using Robust.Client.AutoGenerated; using Robust.Client.UserInterface.CustomControls; using Robust.Client.UserInterface.XAML; -namespace Content.Client.Administration.UI +namespace Content.Client.Administration.UI; + +[GenerateTypedNameReferences] +public sealed partial class AdminMenuWindow : DefaultWindow { - [GenerateTypedNameReferences] - public sealed partial class AdminMenuWindow : DefaultWindow + public event Action? OnDisposed; + + public AdminMenuWindow() { - public event Action? OnDisposed; + MinSize = new Vector2(650, 250); + Title = Loc.GetString("admin-menu-title"); + RobustXamlLoader.Load(this); + MasterTabContainer.SetTabTitle((int) TabIndex.Admin, Loc.GetString("admin-menu-admin-tab")); + MasterTabContainer.SetTabTitle((int) TabIndex.Adminbus, Loc.GetString("admin-menu-adminbus-tab")); + MasterTabContainer.SetTabTitle((int) TabIndex.Atmos, Loc.GetString("admin-menu-atmos-tab")); + MasterTabContainer.SetTabTitle((int) TabIndex.Round, Loc.GetString("admin-menu-round-tab")); + MasterTabContainer.SetTabTitle((int) TabIndex.Server, Loc.GetString("admin-menu-server-tab")); + MasterTabContainer.SetTabTitle((int) TabIndex.PanicBunker, Loc.GetString("admin-menu-panic-bunker-tab")); + /* + * TODO: Remove baby jail code once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future. + */ + MasterTabContainer.SetTabTitle((int) TabIndex.BabyJail, Loc.GetString("admin-menu-baby-jail-tab")); + MasterTabContainer.SetTabTitle((int) TabIndex.Players, Loc.GetString("admin-menu-players-tab")); + MasterTabContainer.SetTabTitle((int) TabIndex.Objects, Loc.GetString("admin-menu-objects-tab")); + MasterTabContainer.OnTabChanged += OnTabChanged; + } - public AdminMenuWindow() - { - MinSize = new Vector2(650, 250); - Title = Loc.GetString("admin-menu-title"); - RobustXamlLoader.Load(this); - MasterTabContainer.SetTabTitle(0, Loc.GetString("admin-menu-admin-tab")); - MasterTabContainer.SetTabTitle(1, Loc.GetString("admin-menu-adminbus-tab")); - MasterTabContainer.SetTabTitle(2, Loc.GetString("admin-menu-atmos-tab")); - MasterTabContainer.SetTabTitle(3, Loc.GetString("admin-menu-round-tab")); - MasterTabContainer.SetTabTitle(4, Loc.GetString("admin-menu-server-tab")); - MasterTabContainer.SetTabTitle(5, Loc.GetString("admin-menu-panic-bunker-tab")); - /* - * TODO: Remove baby jail code once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future. - */ - MasterTabContainer.SetTabTitle(6, Loc.GetString("admin-menu-baby-jail-tab")); - MasterTabContainer.SetTabTitle(7, Loc.GetString("admin-menu-players-tab")); - MasterTabContainer.SetTabTitle(8, Loc.GetString("admin-menu-objects-tab")); - } + private void OnTabChanged(int tabIndex) + { + var tabEnum = (TabIndex)tabIndex; + if (tabEnum == TabIndex.Objects) + ObjectsTabControl.RefreshObjectList(); + } - protected override void Dispose(bool disposing) - { - OnDisposed?.Invoke(); - base.Dispose(disposing); - OnDisposed = null; - } + protected override void Dispose(bool disposing) + { + OnDisposed?.Invoke(); + base.Dispose(disposing); + OnDisposed = null; + } + + private enum TabIndex + { + Admin = 0, + Adminbus, + Atmos, + Round, + Server, + PanicBunker, + BabyJail, + Players, + Objects, } } - diff --git a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml index 821389150d..f4298bbc00 100644 --- a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml +++ b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml @@ -4,18 +4,17 @@ xmlns:co="clr-namespace:Content.Client.UserInterface.Controls"> -