mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Add map name to lsmap (#4576)
This commit is contained in:
@@ -131,6 +131,7 @@ internal sealed class RunMapInitCommand : LocalizedCommands
|
||||
|
||||
internal sealed class ListMapsCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entManager = default!;
|
||||
[Dependency] private readonly IMapManager _map = default!;
|
||||
|
||||
public override string Command => "lsmap";
|
||||
@@ -144,10 +145,13 @@ internal sealed class ListMapsCommand : LocalizedCommands
|
||||
|
||||
foreach (var mapId in _map.GetAllMapIds().OrderBy(id => id.Value))
|
||||
{
|
||||
msg.AppendFormat("{0}: init: {1}, paused: {2}, ent: {3}, grids: {4}\n",
|
||||
mapId, _map.IsMapInitialized(mapId),
|
||||
var mapUid = _map.GetMapEntityId(mapId);
|
||||
|
||||
msg.AppendFormat("{0}: {1}, init: {2}, paused: {3}, nent: {4}, grids: {5}\n",
|
||||
mapId, _entManager.GetComponent<MetaDataComponent>(mapUid).EntityName,
|
||||
_map.IsMapInitialized(mapId),
|
||||
_map.IsMapPaused(mapId),
|
||||
_map.GetMapEntityId(mapId),
|
||||
_entManager.GetNetEntity(_map.GetMapEntityId(mapId)),
|
||||
string.Join(",", _map.GetAllGrids(mapId).Select(grid => grid.Owner)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user