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);

View File

@@ -21,6 +21,7 @@ using Content.Shared.Administration;
using Content.Shared.Atmos;
using Content.Shared.Construction.Components;
using Content.Shared.Damage;
using Content.Shared.Damage.Components;
using Content.Shared.Database;
using Content.Shared.Doors.Components;
using Content.Shared.Hands.Components;
@@ -135,7 +136,7 @@ public sealed partial class AdminVerbSystem
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/plus.svg.192dpi.png")),
Act = () =>
{
_godmodeSystem.EnableGodmode(args.Target);
_sharedGodmodeSystem.EnableGodmode(args.Target);
},
Impact = LogImpact.Extreme,
Message = Loc.GetString("admin-trick-make-indestructible-description"),
@@ -152,7 +153,7 @@ public sealed partial class AdminVerbSystem
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/VerbIcons/plus.svg.192dpi.png")),
Act = () =>
{
_godmodeSystem.DisableGodmode(args.Target);
_sharedGodmodeSystem.DisableGodmode(args.Target);
},
Impact = LogImpact.Extreme,
Message = Loc.GetString("admin-trick-make-vulnerable-description"),