CatStation/Content.Shared/Implants/SharedChameleonControllerSystem.cs
Pieter-Jan Briers 5168b5f3d4
IoC source gen compatibility (#43863)
* IoC source gen compatibility

Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter.

* Missed a spot
2026-05-09 03:29:58 +00:00

28 lines
765 B
C#

using Robust.Shared.Prototypes;
namespace Content.Shared.Implants;
public abstract partial class SharedChameleonControllerSystem : EntitySystem
{
[Dependency] private SharedUserInterfaceSystem _uiSystem = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<ChameleonControllerOpenMenuEvent>(OpenUI);
}
private void OpenUI(ChameleonControllerOpenMenuEvent ev)
{
var implant = ev.Action.Comp.Container;
if (!HasComp<ChameleonControllerImplantComponent>(implant))
return;
if (!_uiSystem.HasUi(implant.Value, ChameleonControllerKey.Key))
return;
_uiSystem.OpenUi(implant.Value, ChameleonControllerKey.Key, ev.Performer);
}
}