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 01/82] 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 e52f66d39b1..69f0ed415eb 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 02/82] 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 288eaa8dcbe..00000000000 --- 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 fc381c59985..00000000000 --- 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 49b0fb31aac..00000000000 --- 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 e2786f70f06..d220d55f1f5 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 03/82] 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 f863595f9ac..6dfb26e1ef2 100644 --- a/Content.MapRenderer/Painters/DecalPainter.cs +++ b/Content.MapRenderer/Painters/DecalPainter.cs @@ -86,7 +86,8 @@ private void Run(Image canvas, DecalData data) 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 @@ private void Run(Image canvas, DecalData data) // 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 808acf8fe4c..2c70481b8a4 100644 --- a/Content.MapRenderer/Painters/EntityPainter.cs +++ b/Content.MapRenderer/Painters/EntityPainter.cs @@ -123,19 +123,28 @@ public void Run(Image canvas, EntityData entity, SharedTransformSystem xformSyst 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 416ec051995..d8d6e15378c 100644 --- a/Content.MapRenderer/Painters/GridPainter.cs +++ b/Content.MapRenderer/Painters/GridPainter.cs @@ -138,8 +138,8 @@ private static (float x, float y) TransformLocalPosition(Vector2 position, MapGr 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 04/82] 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 69de6e7a900..5ee68bf97d8 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 05/82] 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 86060b1bbee..1ac622db86c 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 06/82] 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 5ee68bf97d8..851c9b57d6a 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 07/82] 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 f3aa2572f2f..d5c43e2a500 100644 --- a/Content.Client/Administration/UI/AdminMenuWindow.xaml.cs +++ b/Content.Client/Administration/UI/AdminMenuWindow.xaml.cs @@ -3,38 +3,57 @@ 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() + { + 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; + } + + private void OnTabChanged(int tabIndex) { - public event Action? OnDisposed; + var tabEnum = (TabIndex)tabIndex; + if (tabEnum == TabIndex.Objects) + ObjectsTabControl.RefreshObjectList(); + } - 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")); - } + 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 821389150d6..f4298bbc00f 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"> -