* Adds three new smites, headstand, locker stuff, and reptilian species swap. * Localize all the smites. * save work * More smites... * Final tweaks. * oops * !PLEH * Adds disarm prone and improved hand removal options. * fix chances. * take out the trash. * Add some admin TRICKS instead of more smites. * oop * Implements the admin test arena and associated trick. * Tricks for granting/revoking access. * e * mfw * Implement quick dialogs, for when you don't want to spend 20 minutes writing a simple dialog prompt. * Forgot the rejuv icon. * E * docs * augh * Add rename/redescribe buttons. * Adds objects menu, implements a couple tricks for stations. * 1984 * Adds a trick for effectively infinite power. * fixes some icon uggo. * a * HALT! * Pause/unpause buttons. * Forgor the textures. * they broke every bone in their body. * i added more * more battery actions, touch up battery icon. * Address reviews.
34 lines
1.3 KiB
C#
34 lines
1.3 KiB
C#
using System.Linq;
|
|
using Robust.Server.Maps;
|
|
using Robust.Server.Player;
|
|
using Robust.Shared.Map;
|
|
using Robust.Shared.Network;
|
|
|
|
namespace Content.Server.Administration.Systems;
|
|
|
|
/// <summary>
|
|
/// This handles the administrative test arena maps, and loading them.
|
|
/// </summary>
|
|
public sealed class AdminTestArenaSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly IMapLoader _mapLoader = default!;
|
|
[Dependency] private readonly IMapManager _mapManager = default!;
|
|
|
|
public const string ArenaMapPath = "/Maps/Test/admin_test_arena.yml";
|
|
|
|
public Dictionary<NetUserId, EntityUid> ArenaMap { get; private set; } = new();
|
|
public Dictionary<NetUserId, EntityUid> ArenaGrid { get; private set; } = new();
|
|
|
|
public (EntityUid, EntityUid) AssertArenaLoaded(IPlayerSession admin)
|
|
{
|
|
if (ArenaMap.TryGetValue(admin.UserId, out var arenaMap) && !Deleted(arenaMap) && !Terminating(arenaMap))
|
|
return (arenaMap, ArenaGrid[admin.UserId]);
|
|
|
|
ArenaMap[admin.UserId] = _mapManager.GetMapEntityId(_mapManager.CreateMap());
|
|
var (grids, _) = _mapLoader.LoadMap(Comp<MapComponent>(ArenaMap[admin.UserId]).WorldMap, ArenaMapPath);
|
|
ArenaGrid[admin.UserId] = grids.First();
|
|
|
|
return (ArenaMap[admin.UserId], ArenaGrid[admin.UserId]);
|
|
}
|
|
}
|