Rename WorldMap to MapId (#14857)
This commit is contained in:
@@ -35,7 +35,7 @@ public sealed class AdminTestArenaSystem : EntitySystem
|
|||||||
}
|
}
|
||||||
|
|
||||||
ArenaMap[admin.UserId] = _mapManager.GetMapEntityId(_mapManager.CreateMap());
|
ArenaMap[admin.UserId] = _mapManager.GetMapEntityId(_mapManager.CreateMap());
|
||||||
var grids = _map.LoadMap(Comp<MapComponent>(ArenaMap[admin.UserId]).WorldMap, ArenaMapPath);
|
var grids = _map.LoadMap(Comp<MapComponent>(ArenaMap[admin.UserId]).MapId, ArenaMapPath);
|
||||||
ArenaGrid[admin.UserId] = grids.Count == 0 ? null : grids[0];
|
ArenaGrid[admin.UserId] = grids.Count == 0 ? null : grids[0];
|
||||||
|
|
||||||
return (ArenaMap[admin.UserId], ArenaGrid[admin.UserId]);
|
return (ArenaMap[admin.UserId], ArenaGrid[admin.UserId]);
|
||||||
|
|||||||
@@ -696,7 +696,7 @@ public sealed partial class AdminVerbSystem
|
|||||||
{
|
{
|
||||||
if (_adminManager.HasAdminFlag(player, AdminFlags.Mapping))
|
if (_adminManager.HasAdminFlag(player, AdminFlags.Mapping))
|
||||||
{
|
{
|
||||||
if (_mapManager.IsMapPaused(map.WorldMap))
|
if (_mapManager.IsMapPaused(map.MapId))
|
||||||
{
|
{
|
||||||
Verb unpauseMap = new()
|
Verb unpauseMap = new()
|
||||||
{
|
{
|
||||||
@@ -705,7 +705,7 @@ public sealed partial class AdminVerbSystem
|
|||||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/play.png")),
|
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/play.png")),
|
||||||
Act = () =>
|
Act = () =>
|
||||||
{
|
{
|
||||||
_mapManager.SetMapPaused(map.WorldMap, false);
|
_mapManager.SetMapPaused(map.MapId, false);
|
||||||
},
|
},
|
||||||
Impact = LogImpact.Extreme,
|
Impact = LogImpact.Extreme,
|
||||||
Message = Loc.GetString("admin-trick-unpause-map-description"),
|
Message = Loc.GetString("admin-trick-unpause-map-description"),
|
||||||
@@ -722,7 +722,7 @@ public sealed partial class AdminVerbSystem
|
|||||||
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/pause.png")),
|
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/AdminActions/pause.png")),
|
||||||
Act = () =>
|
Act = () =>
|
||||||
{
|
{
|
||||||
_mapManager.SetMapPaused(map.WorldMap, true);
|
_mapManager.SetMapPaused(map.MapId, true);
|
||||||
},
|
},
|
||||||
Impact = LogImpact.Extreme,
|
Impact = LogImpact.Extreme,
|
||||||
Message = Loc.GetString("admin-trick-pause-map-description"),
|
Message = Loc.GetString("admin-trick-pause-map-description"),
|
||||||
|
|||||||
@@ -101,12 +101,7 @@ public sealed class PlanetCommand : IConsoleCommand
|
|||||||
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
||||||
{
|
{
|
||||||
if (args.Length == 1)
|
if (args.Length == 1)
|
||||||
{
|
return CompletionResult.FromHintOptions(CompletionHelper.MapIds(_entManager), "Map Id");
|
||||||
var options = _entManager.EntityQuery<MapComponent>(true)
|
|
||||||
.Select(o => new CompletionOption(o.WorldMap.ToString(), "MapId"));
|
|
||||||
|
|
||||||
return CompletionResult.FromOptions(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.Length == 2)
|
if (args.Length == 2)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -89,13 +89,8 @@ public sealed class WeatherSystem : SharedWeatherSystem
|
|||||||
|
|
||||||
private CompletionResult WeatherCompletion(IConsoleShell shell, string[] args)
|
private CompletionResult WeatherCompletion(IConsoleShell shell, string[] args)
|
||||||
{
|
{
|
||||||
var options = new List<CompletionOption>();
|
|
||||||
|
|
||||||
if (args.Length == 1)
|
if (args.Length == 1)
|
||||||
{
|
return CompletionResult.FromHintOptions(CompletionHelper.MapIds(EntityManager), "Map Id");
|
||||||
options.AddRange(EntityQuery<MapComponent>(true).Select(o => new CompletionOption(o.WorldMap.ToString())));
|
|
||||||
return CompletionResult.FromHintOptions(options, "Map Id");
|
|
||||||
}
|
|
||||||
|
|
||||||
var a = CompletionHelper.PrototypeIDs<WeatherPrototype>(true, ProtoMan);
|
var a = CompletionHelper.PrototypeIDs<WeatherPrototype>(true, ProtoMan);
|
||||||
return CompletionResult.FromHintOptions(a, Loc.GetString("cmd-weather-hint"));
|
return CompletionResult.FromHintOptions(a, Loc.GetString("cmd-weather-hint"));
|
||||||
|
|||||||
Reference in New Issue
Block a user