Fix godmode mispredicts (#18524)

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
This commit is contained in:
metalgearsloth
2023-08-04 14:53:07 +10:00
committed by GitHub
parent a695b15e17
commit 94e2c7a4b0
8 changed files with 138 additions and 104 deletions

View File

@@ -50,6 +50,7 @@ using Robust.Shared.Random;
using Robust.Shared.Utility;
using Timer = Robust.Shared.Timing.Timer;
using Content.Shared.Cluwne;
using Content.Shared.Damage.Systems;
namespace Content.Server.Administration.Systems;
@@ -65,7 +66,7 @@ public sealed partial class AdminVerbSystem
[Dependency] private readonly FixtureSystem _fixtures = default!;
[Dependency] private readonly FlammableSystem _flammableSystem = default!;
[Dependency] private readonly GhostKickManager _ghostKickManager = default!;
[Dependency] private readonly GodmodeSystem _godmodeSystem = default!;
[Dependency] private readonly SharedGodmodeSystem _sharedGodmodeSystem = default!;
[Dependency] private readonly InventorySystem _inventorySystem = default!;
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeedModifierSystem = default!;
[Dependency] private readonly PolymorphSystem _polymorphSystem = default!;
@@ -119,7 +120,7 @@ public sealed partial class AdminVerbSystem
Icon = new SpriteSpecifier.Rsi(new ("/Textures/Objects/Fun/Tabletop/chessboard.rsi"), "chessboard"),
Act = () =>
{
_godmodeSystem.EnableGodmode(args.Target); // So they don't suffocate.
_sharedGodmodeSystem.EnableGodmode(args.Target); // So they don't suffocate.
EnsureComp<TabletopDraggableComponent>(args.Target);
RemComp<PhysicsComponent>(args.Target); // So they can be dragged around.
var xform = Transform(args.Target);