Remove Explicit GridId References (#8315)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Content.Server.Administration;
|
||||
using Content.Server.Administration;
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.Atmos;
|
||||
@@ -12,17 +12,15 @@ namespace Content.Server.Atmos.Commands
|
||||
{
|
||||
public string Command => "fillgas";
|
||||
public string Description => "Adds gas to all tiles in a grid.";
|
||||
public string Help => "fillgas <GridId> <Gas> <moles>";
|
||||
public string Help => "fillgas <GridEid> <Gas> <moles>";
|
||||
|
||||
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
if (args.Length < 3) return;
|
||||
if(!int.TryParse(args[0], out var id)
|
||||
if(!EntityUid.TryParse(args[0], out var gridId)
|
||||
|| !(AtmosCommandUtils.TryParseGasID(args[1], out var gasId))
|
||||
|| !float.TryParse(args[2], out var moles)) return;
|
||||
|
||||
var gridId = new GridId(id);
|
||||
|
||||
var mapMan = IoCManager.Resolve<IMapManager>();
|
||||
|
||||
if (!gridId.IsValid() || !mapMan.TryGetGrid(gridId, out _))
|
||||
|
||||
Reference in New Issue
Block a user