Musician PDA quick fix (#7018)

This commit is contained in:
Alex Evgrashin
2022-03-07 14:41:50 +03:00
committed by GitHub
parent c4ecb1678a
commit 5f632e20ad
8 changed files with 49 additions and 12 deletions

View File

@@ -5,6 +5,7 @@ using Content.Server.UserInterface;
using Content.Shared.Instruments;
using Content.Shared.Popups;
using JetBrains.Annotations;
using Robust.Server.Player;
using Robust.Shared.Configuration;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
@@ -181,4 +182,13 @@ public sealed partial class InstrumentSystem : SharedInstrumentSystem
instrument.BatchesDropped = 0;
}
}
public void ToggleInstrumentUi(EntityUid uid, IPlayerSession session, InstrumentComponent? component = null)
{
if (!Resolve(uid, ref component))
return;
var ui = uid.GetUIOrNull(InstrumentUiKey.Key);
ui?.Toggle(session);
}
}