Fix addgas bug where you couldn't input the gas name instead of the Id

This commit is contained in:
Víctor Aguilera Puerto 2020-08-06 15:37:39 +02:00
parent b7c595ef36
commit d2d103fdd0
1 changed files with 5 additions and 0 deletions

View File

@ -81,6 +81,11 @@ namespace Content.Server.Atmos
|| !(int.TryParse(args[3], out gasId) || Enum.TryParse(args[3], out gas))
|| !float.TryParse(args[4], out var moles)) return;
if (gas != (Gas) (-1))
{
gasId = (int)gas;
}
var gridId = new GridId(id);
var mapMan = IoCManager.Resolve<IMapManager>();