mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-04 05:17:28 +00:00
* add IdChipSlot * add ui for ejecting id chips * add id chips, blacklisted from id console * give robo neuroticist a little more access * implement id chips slot for borgs * named chips are id chip not id card * add recipes for id chips * :trollface: * codersprite * :trollface: * :trollface: * :trollface: * n * bruh how * gamer learning to spell 2025 --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
57 lines
1.4 KiB
C#
57 lines
1.4 KiB
C#
using Content.Shared._DV.Silicons.Borgs; // DeltaV
|
|
using Content.Shared.Silicons.Borgs;
|
|
using JetBrains.Annotations;
|
|
using Robust.Client.GameObjects;
|
|
using Robust.Client.UserInterface;
|
|
|
|
namespace Content.Client.Silicons.Borgs;
|
|
|
|
[UsedImplicitly]
|
|
public sealed class BorgBoundUserInterface : BoundUserInterface
|
|
{
|
|
[ViewVariables]
|
|
private BorgMenu? _menu;
|
|
|
|
public BorgBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
|
{
|
|
}
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
|
|
_menu = this.CreateWindow<BorgMenu>();
|
|
_menu.SetEntity(Owner);
|
|
|
|
_menu.BrainButtonPressed += () =>
|
|
{
|
|
SendMessage(new BorgEjectBrainBuiMessage());
|
|
};
|
|
_menu.IdChipButtonPressed += () => SendMessage(new BorgEjectIdChipMessage()); // DeltaV
|
|
|
|
_menu.EjectBatteryButtonPressed += () =>
|
|
{
|
|
SendMessage(new BorgEjectBatteryBuiMessage());
|
|
};
|
|
|
|
_menu.NameChanged += name =>
|
|
{
|
|
SendMessage(new BorgSetNameBuiMessage(name));
|
|
};
|
|
|
|
_menu.RemoveModuleButtonPressed += module =>
|
|
{
|
|
SendMessage(new BorgRemoveModuleBuiMessage(EntMan.GetNetEntity(module)));
|
|
};
|
|
}
|
|
|
|
protected override void UpdateState(BoundUserInterfaceState state)
|
|
{
|
|
base.UpdateState(state);
|
|
|
|
if (state is not BorgBuiState msg)
|
|
return;
|
|
_menu?.UpdateState(msg);
|
|
}
|
|
}
|