Update content to mapsystem (#12387)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Linq;
|
||||
using Robust.Server.Maps;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Network;
|
||||
@@ -11,8 +10,8 @@ namespace Content.Server.Administration.Systems;
|
||||
/// </summary>
|
||||
public sealed class AdminTestArenaSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IMapLoader _mapLoader = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly MapLoaderSystem _map = default!;
|
||||
|
||||
public const string ArenaMapPath = "/Maps/Test/admin_test_arena.yml";
|
||||
|
||||
@@ -35,7 +34,7 @@ public sealed class AdminTestArenaSystem : EntitySystem
|
||||
}
|
||||
|
||||
ArenaMap[admin.UserId] = _mapManager.GetMapEntityId(_mapManager.CreateMap());
|
||||
var (_, grids) = _mapLoader.LoadMap(Comp<MapComponent>(ArenaMap[admin.UserId]).WorldMap, ArenaMapPath);
|
||||
var grids = _map.LoadMap(Comp<MapComponent>(ArenaMap[admin.UserId]).WorldMap, ArenaMapPath);
|
||||
ArenaGrid[admin.UserId] = grids.Count == 0 ? null : grids[0];
|
||||
|
||||
return (ArenaMap[admin.UserId], ArenaGrid[admin.UserId]);
|
||||
|
||||
Reference in New Issue
Block a user