Autocomplete more map commands (#5797)

* Autocomplete more map commands

Also added some extra helper features.

* Finish

* Fix bug, avoid IocResolves

* grid is grid

* file filename clash

* turn hint into option

* a

---------

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
This commit is contained in:
metalgearsloth
2025-09-18 12:38:17 +10:00
committed by GitHub
co-authored by ElectroJr
parent 10e4766809
commit 917878d05f
7 changed files with 78 additions and 17 deletions
@@ -1,3 +1,4 @@
using System.Diagnostics.Contracts;
using System.Linq;
using Robust.Server.GameStates;
using Robust.Shared;
@@ -18,13 +19,15 @@ namespace Robust.Server.GameObjects
private bool _deleteEmptyGrids;
protected override MapId GetNextMapId()
[Pure]
internal override MapId GetNextMapId()
{
var id = new MapId(++LastMapId);
var id = new MapId(LastMapId + 1);
while (MapExists(id) || UsedIds.Contains(id))
{
id = new MapId(++LastMapId);
id = new MapId(id.Value + 1);
}
return id;
}