Remove disposal tubes component references and ECS some of it (#15188)

This commit is contained in:
DrSmugleaf
2023-04-06 20:20:50 -07:00
committed by GitHub
parent 9ee1c61ca2
commit 97a8b64c1d
16 changed files with 261 additions and 233 deletions

View File

@@ -4,7 +4,7 @@ using Content.Server.Administration.Managers;
using Content.Server.Administration.UI;
using Content.Server.Chemistry.Components.SolutionManager;
using Content.Server.Chemistry.EntitySystems;
using Content.Server.Configurable;
using Content.Server.Disposal.Tube;
using Content.Server.Disposal.Tube.Components;
using Content.Server.EUI;
using Content.Server.Ghost.Roles;
@@ -45,6 +45,7 @@ namespace Content.Server.Administration.Systems
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly DisposalTubeSystem _disposalTubes = default!;
[Dependency] private readonly EuiManager _euiManager = default!;
[Dependency] private readonly GhostRoleSystem _ghostRoleSystem = default!;
[Dependency] private readonly ArtifactSystem _artifactSystem = default!;
@@ -312,14 +313,14 @@ namespace Content.Server.Administration.Systems
// Get Disposal tube direction verb
if (_groupController.CanCommand(player, "tubeconnections") &&
EntityManager.TryGetComponent<IDisposalTubeComponent?>(args.Target, out var tube))
EntityManager.TryGetComponent<DisposalTubeComponent?>(args.Target, out var tube))
{
Verb verb = new()
{
Text = Loc.GetString("tube-direction-verb-get-data-text"),
Category = VerbCategory.Debug,
Icon = new SpriteSpecifier.Texture(new ResourcePath("/Textures/Interface/VerbIcons/information.svg.192dpi.png")),
Act = () => tube.PopupDirections(args.User)
Act = () => _disposalTubes.PopupDirections(args.Target, tube, args.User)
};
args.Verbs.Add(verb);
}