Files
RobustToolbox/Robust.Client/GameObjects/EntitySystems/MapSystem.cs
metalgearsloth 917878d05f 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>
2025-09-18 12:38:17 +10:00

25 lines
647 B
C#

using System.Diagnostics.Contracts;
using Robust.Client.Graphics;
using Robust.Client.Map;
using Robust.Client.ResourceManagement;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;
namespace Robust.Client.GameObjects;
public sealed class MapSystem : SharedMapSystem
{
[Pure]
internal override MapId GetNextMapId()
{
// Client-side map entities use negative map Ids to avoid conflict with server-side maps.
var id = new MapId(LastMapId - 1);
while (MapExists(id) || UsedIds.Contains(id))
{
id = new MapId(id.Value - 1);
}
return id;
}
}