Resolve 'EntitySystem.Get<T>()' is obsolete in content (#27936)
* PROJECT 0 WARNINGS: Resolve `'EntitySystem.Get<T>()' is obsolete` in content * pass entman * dog ass test * webeditor
This commit is contained in:
@@ -8,6 +8,8 @@ namespace Content.Server.Administration.Commands
|
||||
[AdminCommand(AdminFlags.Round)]
|
||||
public sealed class CallShuttleCommand : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _e = default!;
|
||||
|
||||
public string Command => "callshuttle";
|
||||
public string Description => Loc.GetString("call-shuttle-command-description");
|
||||
public string Help => Loc.GetString("call-shuttle-command-help-text", ("command",Command));
|
||||
@@ -19,7 +21,7 @@ namespace Content.Server.Administration.Commands
|
||||
// ReSharper disable once ConvertIfStatementToSwitchStatement
|
||||
if (args.Length == 1 && TimeSpan.TryParseExact(args[0], ContentLocalizationManager.TimeSpanMinutesFormats, loc.DefaultCulture, out var timeSpan))
|
||||
{
|
||||
EntitySystem.Get<RoundEndSystem>().RequestRoundEnd(timeSpan, shell.Player?.AttachedEntity, false);
|
||||
_e.System<RoundEndSystem>().RequestRoundEnd(timeSpan, shell.Player?.AttachedEntity, false);
|
||||
}
|
||||
else if (args.Length == 1)
|
||||
{
|
||||
@@ -27,7 +29,7 @@ namespace Content.Server.Administration.Commands
|
||||
}
|
||||
else
|
||||
{
|
||||
EntitySystem.Get<RoundEndSystem>().RequestRoundEnd(shell.Player?.AttachedEntity, false);
|
||||
_e.System<RoundEndSystem>().RequestRoundEnd(shell.Player?.AttachedEntity, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,13 +37,15 @@ namespace Content.Server.Administration.Commands
|
||||
[AdminCommand(AdminFlags.Round)]
|
||||
public sealed class RecallShuttleCommand : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _e = default!;
|
||||
|
||||
public string Command => "recallshuttle";
|
||||
public string Description => Loc.GetString("recall-shuttle-command-description");
|
||||
public string Help => Loc.GetString("recall-shuttle-command-help-text", ("command",Command));
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
EntitySystem.Get<RoundEndSystem>().CancelRoundEndCountdown(shell.Player?.AttachedEntity, false);
|
||||
_e.System<RoundEndSystem>().CancelRoundEndCountdown(shell.Player?.AttachedEntity, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user