Files
Delta-v/Content.Client/Commands/MappingClientSideSetupCommand.cs
T
deltanedasandmetalgearsloth c4d6e1b781 revert mapping mode (#1907)
Add mapping load acts (#30722)

Smug doesn't seem to have time to fix mapping state and I don't want to dump more time into it so.

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-09-24 18:30:50 +02:00

34 lines
1.2 KiB
C#

using Content.Client.Actions;
using Content.Client.Mapping;
using Content.Client.Markers;
using JetBrains.Annotations;
using Robust.Client.Graphics;
using Robust.Client.State;
using Robust.Shared.Console;
namespace Content.Client.Commands;
[UsedImplicitly]
internal sealed class MappingClientSideSetupCommand : LocalizedCommands
{
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
[Dependency] private readonly ILightManager _lightManager = default!;
[Dependency] private readonly IStateManager _stateManager = default!;
public override string Command => "mappingclientsidesetup";
public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command));
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (!_lightManager.LockConsoleAccess)
{
_entitySystemManager.GetEntitySystem<MarkerSystem>().MarkersVisible = true;
_lightManager.Enabled = false;
shell.ExecuteCommand("showsubfloorforever");
_entitySystemManager.GetEntitySystem<ActionsSystem>().LoadActionAssignments("/mapping_actions.yml", false);
}
}
}