From d7b214e00493ab0101595688b8edda34539093df Mon Sep 17 00:00:00 2001 From: AwareFoxy Date: Wed, 13 Nov 2024 07:10:41 +0100 Subject: [PATCH 01/17] bsh --- .../BluespaceHarvesterBoundUserInterface.cs | 53 ++ .../BluespaceHarvesterCategory.xaml | 6 + .../BluespaceHarvesterCategory.xaml.cs | 20 + .../BluespaceHarvesterMenu.xaml | 46 ++ .../BluespaceHarvesterMenu.xaml.cs | 59 ++ .../BluespaceHarvesterBundleComponent.cs | 14 + .../BluespaceHarvesterBundleSystem.cs | 44 ++ .../BluespaceHarvesterComponent.cs | 162 ++++ .../BluespaceHarvesterRiftComponent.cs | 53 ++ .../BluespaceHarvesterRiftSystem.cs | 70 ++ .../BluespaceHarvesterSystem.cs | 405 ++++++++++ .../BluespaceHarvesterUi.cs | 109 +++ .../en-US/_corvaxnext/bluespace_harvester.ftl | 18 + .../ru-RU/_corvaxnext/bluespace_harvester.ftl | 18 + .../BluespaceHarvester/circuit_board.yml | 25 + .../_CorvaxNext/BluespaceHarvester/crates.yml | 64 ++ .../_CorvaxNext/BluespaceHarvester/loot.yml | 347 +++++++++ .../BluespaceHarvester/machine.yml | 83 ++ .../_CorvaxNext/BluespaceHarvester/recipe.yml | 9 + .../BluespaceHarvester/research.yml | 11 + .../_CorvaxNext/BluespaceHarvester/rifts.yml | 102 +++ .../BluespaceHarvester/spawners.yml | 710 ++++++++++++++++++ Resources/Prototypes/_CorvaxNext/debug.yml | 30 + 23 files changed, 2458 insertions(+) create mode 100644 Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterBoundUserInterface.cs create mode 100644 Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterCategory.xaml create mode 100644 Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterCategory.xaml.cs create mode 100644 Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml create mode 100644 Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterMenu.xaml.cs create mode 100644 Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterBundleComponent.cs create mode 100644 Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterBundleSystem.cs create mode 100644 Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterComponent.cs create mode 100644 Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterRiftComponent.cs create mode 100644 Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterRiftSystem.cs create mode 100644 Content.Server/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterSystem.cs create mode 100644 Content.Shared/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterUi.cs create mode 100644 Resources/Locale/en-US/_corvaxnext/bluespace_harvester.ftl create mode 100644 Resources/Locale/ru-RU/_corvaxnext/bluespace_harvester.ftl create mode 100644 Resources/Prototypes/_CorvaxNext/BluespaceHarvester/circuit_board.yml create mode 100644 Resources/Prototypes/_CorvaxNext/BluespaceHarvester/crates.yml create mode 100644 Resources/Prototypes/_CorvaxNext/BluespaceHarvester/loot.yml create mode 100644 Resources/Prototypes/_CorvaxNext/BluespaceHarvester/machine.yml create mode 100644 Resources/Prototypes/_CorvaxNext/BluespaceHarvester/recipe.yml create mode 100644 Resources/Prototypes/_CorvaxNext/BluespaceHarvester/research.yml create mode 100644 Resources/Prototypes/_CorvaxNext/BluespaceHarvester/rifts.yml create mode 100644 Resources/Prototypes/_CorvaxNext/BluespaceHarvester/spawners.yml create mode 100644 Resources/Prototypes/_CorvaxNext/debug.yml diff --git a/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterBoundUserInterface.cs b/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterBoundUserInterface.cs new file mode 100644 index 00000000000..e4c6665eeec --- /dev/null +++ b/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterBoundUserInterface.cs @@ -0,0 +1,53 @@ +using Content.Shared._CorvaxNext.BluespaceHarvester; +using JetBrains.Annotations; + +namespace Content.Client._CorvaxNext.BluespaceHarvester; + +[UsedImplicitly] +public sealed class BluespaceHarvesterBoundUserInterface : BoundUserInterface +{ + private BluespaceHarvesterMenu? _window; + + public BluespaceHarvesterBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) + { + } + + protected override void Open() + { + base.Open(); + + _window = new BluespaceHarvesterMenu(this); + _window.OnClose += Close; + _window?.OpenCentered(); + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + if (!disposing) + return; + + _window?.Dispose(); + _window = null; + } + + protected override void UpdateState(BoundUserInterfaceState state) + { + base.UpdateState(state); + + if (state is not BluespaceHarvesterBoundUserInterfaceState current) + return; + + _window?.UpdateState(current); + } + + public void SendTargetLevel(int level) + { + SendMessage(new BluespaceHarvesterTargetLevelMessage(level)); + } + + public void SendBuy(Shared.BluespaceHarvester.BluespaceHarvesterCategory category) + { + SendMessage(new BluespaceHarvesterBuyMessage(category)); + } +} diff --git a/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterCategory.xaml b/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterCategory.xaml new file mode 100644 index 00000000000..eef4ac89883 --- /dev/null +++ b/Content.Client/_CorvaxNext/BluespaceHarvester/BluespaceHarvesterCategory.xaml @@ -0,0 +1,6 @@ + + + +