Cleanup AdminVerbSystem (#36099)
* Fix 3 warnings in AdminVerbSystem.Tools * Fix 3 warnings in AdminVerbSystem.Smites * Use SetMapCoordinates directly
This commit is contained in:
@@ -136,7 +136,7 @@ public sealed partial class AdminVerbSystem
|
||||
Filter.PvsExcept(args.Target), true, PopupType.MediumCaution);
|
||||
var board = Spawn("ChessBoard", xform.Coordinates);
|
||||
var session = _tabletopSystem.EnsureSession(Comp<TabletopGameComponent>(board));
|
||||
xform.Coordinates = _transformSystem.ToCoordinates(session.Position);
|
||||
_transformSystem.SetMapCoordinates(args.Target, session.Position);
|
||||
_transformSystem.SetWorldRotationNoLerp((args.Target, xform), Angle.Zero);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
@@ -421,7 +421,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
var xform = Transform(args.Target);
|
||||
var fixtures = Comp<FixturesComponent>(args.Target);
|
||||
xform.Anchored = false; // Just in case.
|
||||
_transformSystem.Unanchor(args.Target); // Just in case.
|
||||
_physics.SetBodyType(args.Target, BodyType.Dynamic, manager: fixtures, body: physics);
|
||||
_physics.SetBodyStatus(args.Target, physics, BodyStatus.InAir);
|
||||
_physics.WakeBody(args.Target, manager: fixtures, body: physics);
|
||||
@@ -456,7 +456,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
var xform = Transform(args.Target);
|
||||
var fixtures = Comp<FixturesComponent>(args.Target);
|
||||
xform.Anchored = false; // Just in case.
|
||||
_transformSystem.Unanchor(args.Target); // Just in case.
|
||||
|
||||
_physics.SetBodyType(args.Target, BodyType.Dynamic, body: physics);
|
||||
_physics.SetBodyStatus(args.Target, physics, BodyStatus.InAir);
|
||||
|
||||
@@ -637,7 +637,7 @@ public sealed partial class AdminVerbSystem
|
||||
{
|
||||
if (_adminManager.HasAdminFlag(player, AdminFlags.Mapping))
|
||||
{
|
||||
if (_mapManager.IsMapPaused(map.MapId))
|
||||
if (_map.IsPaused(map.MapId))
|
||||
{
|
||||
Verb unpauseMap = new()
|
||||
{
|
||||
@@ -646,7 +646,7 @@ public sealed partial class AdminVerbSystem
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/AdminActions/play.png")),
|
||||
Act = () =>
|
||||
{
|
||||
_mapManager.SetMapPaused(map.MapId, false);
|
||||
_map.SetPaused(map.MapId, false);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = Loc.GetString("admin-trick-unpause-map-description"),
|
||||
@@ -663,7 +663,7 @@ public sealed partial class AdminVerbSystem
|
||||
Icon = new SpriteSpecifier.Texture(new("/Textures/Interface/AdminActions/pause.png")),
|
||||
Act = () =>
|
||||
{
|
||||
_mapManager.SetMapPaused(map.MapId, true);
|
||||
_map.SetPaused(map.MapId, true);
|
||||
},
|
||||
Impact = LogImpact.Extreme,
|
||||
Message = Loc.GetString("admin-trick-pause-map-description"),
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Content.Server.Administration.Systems
|
||||
[Dependency] private readonly IConsoleHost _console = default!;
|
||||
[Dependency] private readonly IAdminManager _adminManager = default!;
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly SharedMapSystem _map = default!;
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly AdminSystem _adminSystem = default!;
|
||||
[Dependency] private readonly DisposalTubeSystem _disposalTubes = default!;
|
||||
|
||||
Reference in New Issue
Block a user