using Content.Client.Chemistry.Components; using Content.Client.Chemistry.UI; using Content.Client.Items; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.EntitySystems; using Robust.Shared.GameStates; namespace Content.Client.Chemistry.EntitySystems; public sealed class InjectorSystem : SharedInjectorSystem { public override void Initialize() { base.Initialize(); Subs.ItemStatus(ent => new InjectorStatusControl(ent, SolutionContainers)); SubscribeLocalEvent(OnHandleHyposprayState); Subs.ItemStatus(ent => new HyposprayStatusControl(ent)); } private void OnHandleHyposprayState(EntityUid uid, HyposprayComponent component, ref ComponentHandleState args) { if (args.Current is not HyposprayComponentState cState) return; component.CurrentVolume = cState.CurVolume; component.TotalVolume = cState.MaxVolume; component.UiUpdateNeeded = true; } }