From 669eb8fadd6e501c9a83e9cd0fea4e352062143c Mon Sep 17 00:00:00 2001 From: 20kdc Date: Mon, 22 Nov 2021 19:31:12 +0000 Subject: [PATCH 1/3] Do not allow starting pulling while cuffed (#5457) --- .../Pulling/Systems/SharedPullingSystem.Actions.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs b/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs index cffcc4c633..9a8faf4a8e 100644 --- a/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs +++ b/Content.Shared/Pulling/Systems/SharedPullingSystem.Actions.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using Content.Shared.ActionBlocker; using Content.Shared.Alert; using Content.Shared.Buckle.Components; using Content.Shared.GameTicking; @@ -14,6 +15,7 @@ using Robust.Shared.Containers; using Robust.Shared.GameObjects; using Robust.Shared.Input.Binding; using Robust.Shared.Map; +using Robust.Shared.IoC; using Robust.Shared.Maths; using Robust.Shared.Physics; using Robust.Shared.Players; @@ -23,6 +25,8 @@ namespace Content.Shared.Pulling { public abstract partial class SharedPullingSystem : EntitySystem { + [Dependency] private readonly ActionBlockerSystem _blocker = default!; + public bool CanPull(IEntity puller, IEntity pulled) { if (!puller.HasComponent()) @@ -30,6 +34,11 @@ namespace Content.Shared.Pulling return false; } + if (!_blocker.CanInteract(puller.Uid)) + { + return false; + } + if (!pulled.TryGetComponent(out var _physics)) { return false; From 2a9b3a013c0bce829d94550e47b17da2bb7755cf Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Tue, 23 Nov 2021 06:31:21 +1100 Subject: [PATCH 2/3] Don't run aghost if already aghost for mapping (#5452) --- Content.Server/GameTicking/Commands/MappingCommand.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Content.Server/GameTicking/Commands/MappingCommand.cs b/Content.Server/GameTicking/Commands/MappingCommand.cs index 59fbd7f597..f47dba563b 100644 --- a/Content.Server/GameTicking/Commands/MappingCommand.cs +++ b/Content.Server/GameTicking/Commands/MappingCommand.cs @@ -42,7 +42,7 @@ namespace Content.Server.GameTicking.Commands case 1: if (player.AttachedEntity == null) { - shell.WriteLine("The map name argument cannot be omitted if you have no entity."); + shell.WriteError("The map name argument cannot be omitted if you have no entity."); return; } @@ -52,7 +52,7 @@ namespace Content.Server.GameTicking.Commands case 2: if (!int.TryParse(args[0], out var id)) { - shell.WriteLine($"{args[0]} is not a valid integer."); + shell.WriteError($"{args[0]} is not a valid integer."); return; } @@ -66,7 +66,10 @@ namespace Content.Server.GameTicking.Commands shell.ExecuteCommand($"addmap {mapId} false"); shell.ExecuteCommand($"loadbp {mapId} \"{CommandParsing.Escape(mapName)}\" true"); - shell.ExecuteCommand("aghost"); + + if (player.AttachedEntity?.Prototype?.ID != "AdminObserver") + shell.ExecuteCommand("aghost"); + shell.ExecuteCommand($"tp 0 0 {mapId}"); var newGrid = mapManager.GetAllGrids().OrderByDescending(g => (int) g.Index).First(); From c46feaefb9053bb13d1ff6faa916c67e25be5e0b Mon Sep 17 00:00:00 2001 From: PJBot Date: Mon, 22 Nov 2021 14:32:15 -0500 Subject: [PATCH 3/3] Automatic changelog update --- Resources/Changelog/Changelog.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 570c53f6b8..1532bbb559 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,9 +1,4 @@ Entries: -- author: metalgearsloth - changes: - - {message: Fix item actions rotating on your bar, type: Fix} - id: 131 - time: '2021-03-31T10:10:56.0000000+00:00' - author: SweptWasTaken changes: - {message: Uplink now has correct mags for clarissa, type: Fix} @@ -2847,3 +2842,8 @@ Entries: - {message: Admin logs., type: Add} id: 632 time: '2021-11-22T17:49:26.0000000+00:00' +- author: 20kdc + changes: + - {message: It is no longer possible to start pulling people while in cuffs., type: Fix} + id: 633 + time: '2021-11-22T19:31:12.0000000+00:00'