Adding intellicard functionality. (#32347)
* init * im so confused * clean * sprite update * :| * further attempts * be blessed for it works * Very prestigious pAI * cleaning up * Intellicard in RD locker * PAIn't * .Clear()n't * .Clear()n't for real this time * Cleaning up * Whoopsie Daisy
This commit is contained in:
@@ -10,6 +10,7 @@ public sealed class IntrinsicUISystem : EntitySystem
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<IntrinsicUIComponent, MapInitEvent>(InitActions);
|
||||
SubscribeLocalEvent<IntrinsicUIComponent, ComponentShutdown>(OnShutdown);
|
||||
SubscribeLocalEvent<IntrinsicUIComponent, ToggleIntrinsicUIEvent>(OnActionToggle);
|
||||
}
|
||||
|
||||
@@ -21,6 +22,15 @@ public sealed class IntrinsicUISystem : EntitySystem
|
||||
args.Handled = InteractUI(uid, args.Key, component);
|
||||
}
|
||||
|
||||
private void OnShutdown(EntityUid uid, IntrinsicUIComponent component, ref ComponentShutdown args)
|
||||
{
|
||||
foreach (var actionEntry in component.UIs.Values)
|
||||
{
|
||||
var actionId = actionEntry.ToggleActionEntity;
|
||||
_actionsSystem.RemoveAction(uid, actionId);
|
||||
}
|
||||
}
|
||||
|
||||
private void InitActions(EntityUid uid, IntrinsicUIComponent component, MapInitEvent args)
|
||||
{
|
||||
foreach (var entry in component.UIs.Values)
|
||||
|
||||
Reference in New Issue
Block a user