Content update for NetEntities (#18935)
This commit is contained in:
@@ -8,6 +8,8 @@ namespace Content.Server.Administration.Commands
|
||||
[AdminCommand(AdminFlags.Fun)]
|
||||
public sealed class SetSolutionTemperature : IConsoleCommand
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entManager = default!;
|
||||
|
||||
public string Command => "setsolutiontemperature";
|
||||
public string Description => "Set the temperature of some solution.";
|
||||
public string Help => $"Usage: {Command} <target> <solution> <new temperature>";
|
||||
@@ -20,13 +22,13 @@ namespace Content.Server.Administration.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
if (!EntityUid.TryParse(args[0], out var uid))
|
||||
if (!NetEntity.TryParse(args[0], out var uidNet) || !_entManager.TryGetEntity(uidNet, out var uid))
|
||||
{
|
||||
shell.WriteLine($"Invalid entity id.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(uid, out SolutionContainerManagerComponent? man))
|
||||
if (!_entManager.TryGetComponent(uid, out SolutionContainerManagerComponent? man))
|
||||
{
|
||||
shell.WriteLine($"Entity does not have any solutions.");
|
||||
return;
|
||||
@@ -52,7 +54,7 @@ namespace Content.Server.Administration.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
EntitySystem.Get<SolutionContainerSystem>().SetTemperature(uid, solution, quantity);
|
||||
_entManager.System<SolutionContainerSystem>().SetTemperature(uid.Value, solution, quantity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user