* create devicenet frequencies * create borg transponder and give it to all nt borgs * add robotics console * actually implement battery charge display + some fix * tab * real explosion * little safer * disable destroy button clientside too when on cooldown * m * how do i do this when i review things... Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> * webedit ops Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> * ui updates * oracle java * do a thing * update ui when a borg times out * maybe fix test * add IsLocked to LockSystem * make destroying gib the chassis again, so emagging isnt sus * use locking * require using alt click to unlock so normal click is open ui * the * use LogType.Action * take this L * pocket lint? * sharer * pro ops * robor pushmarkup * m * update and make it not use prototype anymore * frame0 * update yaml * untroll * bad * h --------- Co-authored-by: deltanedas <@deltanedas:kde.org> Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
using Content.Shared.Robotics;
|
|
using Robust.Client.GameObjects;
|
|
|
|
namespace Content.Client.Robotics.UI;
|
|
|
|
public sealed class RoboticsConsoleBoundUserInterface : BoundUserInterface
|
|
{
|
|
[ViewVariables]
|
|
public RoboticsConsoleWindow _window = default!;
|
|
|
|
public RoboticsConsoleBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
|
{
|
|
}
|
|
|
|
protected override void Open()
|
|
{
|
|
base.Open();
|
|
|
|
_window = new RoboticsConsoleWindow(Owner);
|
|
_window.OnDisablePressed += address =>
|
|
{
|
|
SendMessage(new RoboticsConsoleDisableMessage(address));
|
|
};
|
|
_window.OnDestroyPressed += address =>
|
|
{
|
|
SendMessage(new RoboticsConsoleDestroyMessage(address));
|
|
};
|
|
_window.OnClose += Close;
|
|
|
|
_window.OpenCentered();
|
|
}
|
|
|
|
protected override void UpdateState(BoundUserInterfaceState state)
|
|
{
|
|
base.UpdateState(state);
|
|
|
|
if (state is not RoboticsConsoleState cast)
|
|
return;
|
|
|
|
_window?.UpdateState(cast);
|
|
}
|
|
|
|
protected override void Dispose(bool disposing)
|
|
{
|
|
base.Dispose(disposing);
|
|
|
|
if (disposing)
|
|
_window?.Dispose();
|
|
}
|
|
}
|