tab changing

This commit is contained in:
vulppine
2022-08-18 08:14:18 -07:00
parent 35ba20de17
commit 327314b82f
3 changed files with 15 additions and 1 deletions

View File

@@ -212,11 +212,18 @@ namespace Content.Server.Atmos.Monitor.Systems
SubscribeLocalEvent<AirAlarmComponent, AirAlarmUpdateAlarmModeMessage>(OnUpdateAlarmMode);
SubscribeLocalEvent<AirAlarmComponent, AirAlarmUpdateAlarmThresholdMessage>(OnUpdateThreshold);
SubscribeLocalEvent<AirAlarmComponent, AirAlarmUpdateDeviceDataMessage>(OnUpdateDeviceData);
SubscribeLocalEvent<AirAlarmComponent, AirAlarmTabSetMessage>(OnTabChange);
SubscribeLocalEvent<AirAlarmComponent, BoundUIClosedEvent>(OnClose);
SubscribeLocalEvent<AirAlarmComponent, ComponentShutdown>(OnShutdown);
SubscribeLocalEvent<AirAlarmComponent, InteractHandEvent>(OnInteract);
}
private void OnTabChange(EntityUid uid, AirAlarmComponent component, AirAlarmTabSetMessage msg)
{
component.CurrentTab = msg.Tab;
UpdateUI(uid, component);
}
private void OnPowerChanged(EntityUid uid, AirAlarmComponent component, PowerChangedEvent args)
{
if (!args.Powered)