From b33730db22cd6d505a79e0b7fa39c34425d9639e Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Thu, 9 May 2024 06:36:07 +0000 Subject: [PATCH] malf killer 9000 (robotics console) (#24855) * 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> --- .../Robotics/Systems/RoboticsConsoleSystem.cs | 7 + .../UI/RoboticsConsoleBoundUserInterface.cs | 50 ++++++ .../Robotics/UI/RoboticsConsoleWindow.xaml | 40 +++++ .../Robotics/UI/RoboticsConsoleWindow.xaml.cs | 148 ++++++++++++++++++ .../Robotics/Systems/RoboticsConsoleSystem.cs | 146 +++++++++++++++++ .../Silicons/Borgs/BorgSystem.Transponder.cs | 107 +++++++++++++ Content.Server/Silicons/Borgs/BorgSystem.cs | 7 + Content.Shared/Lock/LockComponent.cs | 8 +- Content.Shared/Lock/LockSystem.cs | 16 +- .../Components/RoboticsConsoleComponent.cs | 53 +++++++ Content.Shared/Robotics/RoboticsConsoleUi.cs | 126 +++++++++++++++ .../Systems/SharedRoboticsConsoleSystem.cs | 8 + .../Components/BorgTransponderComponent.cs | 43 +++++ Resources/Locale/en-US/borg/borg.ftl | 5 + .../Locale/en-US/devices/device-network.ftl | 2 + .../research/components/robotics-console.ftl | 19 +++ .../Device/devicenet_frequencies.yml | 11 ++ .../Mobs/Cyborgs/base_borg_chassis.yml | 19 ++- .../Entities/Mobs/Cyborgs/borg_chassis.yml | 30 ++++ .../Devices/Circuitboards/computer.yml | 11 ++ .../Machines/Computers/computers.yml | 39 +++++ 21 files changed, 891 insertions(+), 4 deletions(-) create mode 100644 Content.Client/Robotics/Systems/RoboticsConsoleSystem.cs create mode 100644 Content.Client/Robotics/UI/RoboticsConsoleBoundUserInterface.cs create mode 100644 Content.Client/Robotics/UI/RoboticsConsoleWindow.xaml create mode 100644 Content.Client/Robotics/UI/RoboticsConsoleWindow.xaml.cs create mode 100644 Content.Server/Robotics/Systems/RoboticsConsoleSystem.cs create mode 100644 Content.Server/Silicons/Borgs/BorgSystem.Transponder.cs create mode 100644 Content.Shared/Robotics/Components/RoboticsConsoleComponent.cs create mode 100644 Content.Shared/Robotics/RoboticsConsoleUi.cs create mode 100644 Content.Shared/Robotics/Systems/SharedRoboticsConsoleSystem.cs create mode 100644 Content.Shared/Silicons/Borgs/Components/BorgTransponderComponent.cs create mode 100644 Resources/Locale/en-US/research/components/robotics-console.ftl diff --git a/Content.Client/Robotics/Systems/RoboticsConsoleSystem.cs b/Content.Client/Robotics/Systems/RoboticsConsoleSystem.cs new file mode 100644 index 0000000000..0219c965cd --- /dev/null +++ b/Content.Client/Robotics/Systems/RoboticsConsoleSystem.cs @@ -0,0 +1,7 @@ +using Content.Shared.Robotics.Systems; + +namespace Content.Client.Robotics.Systems; + +public sealed class RoboticsConsoleSystem : SharedRoboticsConsoleSystem +{ +} diff --git a/Content.Client/Robotics/UI/RoboticsConsoleBoundUserInterface.cs b/Content.Client/Robotics/UI/RoboticsConsoleBoundUserInterface.cs new file mode 100644 index 0000000000..6185979eee --- /dev/null +++ b/Content.Client/Robotics/UI/RoboticsConsoleBoundUserInterface.cs @@ -0,0 +1,50 @@ +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(); + } +} diff --git a/Content.Client/Robotics/UI/RoboticsConsoleWindow.xaml b/Content.Client/Robotics/UI/RoboticsConsoleWindow.xaml new file mode 100644 index 0000000000..a3b3978790 --- /dev/null +++ b/Content.Client/Robotics/UI/RoboticsConsoleWindow.xaml @@ -0,0 +1,40 @@ + + + + + + + + + +