Merge showsubfloorforever into showsubfloor (#33682)
This commit is contained in:
parent
0ab1d41c3f
commit
116cc92dad
|
|
@ -36,29 +36,6 @@ internal sealed class ShowSubFloor : LocalizedCommands
|
|||
}
|
||||
}
|
||||
|
||||
internal sealed class ShowSubFloorForever : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
|
||||
|
||||
public const string CommandName = "showsubfloorforever";
|
||||
public override string Command => CommandName;
|
||||
|
||||
public override string Help => LocalizationManager.GetString($"cmd-{Command}-help", ("command", Command));
|
||||
|
||||
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
||||
{
|
||||
_entitySystemManager.GetEntitySystem<SubFloorHideSystem>().ShowAll = true;
|
||||
|
||||
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||
var components = entMan.EntityQuery<SubFloorHideComponent, SpriteComponent>(true);
|
||||
|
||||
foreach (var (_, sprite) in components)
|
||||
{
|
||||
sprite.DrawDepth = (int) DrawDepth.Overlays;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class NotifyCommand : LocalizedCommands
|
||||
{
|
||||
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ internal sealed class MappingClientSideSetupCommand : LocalizedCommands
|
|||
{
|
||||
_entitySystemManager.GetEntitySystem<MarkerSystem>().MarkersVisible = true;
|
||||
_lightManager.Enabled = false;
|
||||
shell.ExecuteCommand("showsubfloorforever");
|
||||
shell.ExecuteCommand("showsubfloor");
|
||||
_entitySystemManager.GetEntitySystem<ActionsSystem>().LoadActionAssignments("/mapping_actions.yml", false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,9 +64,15 @@ public sealed class SubFloorHideSystem : SharedSubFloorHideSystem
|
|||
|
||||
args.Sprite.Visible = hasVisibleLayer || revealed;
|
||||
|
||||
// allows a t-ray to show wires/pipes above carpets/puddles
|
||||
if (scannerRevealed)
|
||||
if (ShowAll)
|
||||
{
|
||||
// Allows sandbox mode to make wires visible over other stuff.
|
||||
component.OriginalDrawDepth ??= args.Sprite.DrawDepth;
|
||||
args.Sprite.DrawDepth = (int)Shared.DrawDepth.DrawDepth.Overdoors;
|
||||
}
|
||||
else if (scannerRevealed)
|
||||
{
|
||||
// Allows a t-ray to show wires/pipes above carpets/puddles.
|
||||
if (component.OriginalDrawDepth is not null)
|
||||
return;
|
||||
component.OriginalDrawDepth = args.Sprite.DrawDepth;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,5 @@ cmd-showmarkers-help = Usage: {$command}
|
|||
cmd-showsubfloor-desc = Makes entities below the floor always visible.
|
||||
cmd-showsubfloor-help = Usage: {$command}
|
||||
|
||||
cmd-showsubfloorforever-desc = Makes entities below the floor always visible until the client is restarted.
|
||||
cmd-showsubfloorforever-help = Usage: {$command}
|
||||
|
||||
cmd-notify-desc = Send a notify client side.
|
||||
cmd-notify-help = Usage: {$command} <message>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@
|
|||
- showemergencyshuttle
|
||||
- zoom
|
||||
- showsubfloor
|
||||
- showsubfloorforever
|
||||
- showmarkers
|
||||
- nodevis
|
||||
- nodevisfilter
|
||||
|
|
|
|||
Loading…
Reference in New Issue