From 459861f15d0b838a59793f6e9704b5e58425aefd Mon Sep 17 00:00:00 2001 From: CrimeMoot Date: Mon, 6 Jan 2025 21:58:02 +0500 Subject: [PATCH 1/6] bluespace harvester --- .../BluespaceHarvesterBoundUserInterface.cs | 53 ++ .../BluespaceHarvesterCategory.xaml | 6 + .../BluespaceHarvesterCategory.xaml.cs | 20 + .../BluespaceHarvesterMenu.xaml | 44 ++ .../BluespaceHarvesterMenu.xaml.cs | 58 ++ .../BluespaceHarvesterBundleComponent.cs | 14 + .../BluespaceHarvesterBundleSystem.cs | 44 ++ .../BluespaceHarvesterComponent.cs | 174 +++++ .../BluespaceHarvesterRiftComponent.cs | 53 ++ .../BluespaceHarvesterRiftSystem.cs | 70 ++ .../BluespaceHarvesterSystem.cs | 399 ++++++++++ .../BluespaceHarvesterUi.cs | 107 +++ .../Locale/en-US/ADT/bluespace_harvester.ftl | 19 + .../Locale/ru-RU/ADT/bluespace_harvester.ftl | 19 + .../circuitboards/machine/production.ftl | 15 + .../Fills/Crates/bluespaceharvester.ftl | 142 ++++ .../station-goal/station-goal-component.ftl | 32 +- .../Fills/Creates/bluespace_harvester.yml | 336 +++++++++ .../Spawners/Random/bluespace_harvester.yml | 708 ++++++++++++++++++ .../Circuitboards/Machine/production.yml | 40 + .../ADT/Entities/Objects/Misc/parts.yml | 13 + .../Machines/bluespace_harvester.yml | 107 +++ .../Power/Generation/generators.yml | 29 + .../Entities/Structures/Power/substations.yml | 43 ++ .../Specific/bluespace_harvester_rift.yml | 102 +++ .../Structures/Storage/Crates/crates.yml | 64 ++ Resources/Prototypes/ADT/Objectives/goals.yml | 6 +- .../Construction/Graphs/machines/machine.yml | 107 +++ .../ADT/Recipes/Lathes/electronics.yml | 10 + .../Prototypes/ADT/Research/experimental.yml | 26 + .../Prototypes/ADT/Stacks/science_stacks.yml | 5 + Resources/Prototypes/ADT/Wires/layouts.yml | 9 + Resources/Prototypes/ADT/explosion.yml | 16 + Resources/Prototypes/ADT/tags.yml | 3 + .../Corvax/Entities/Stations/base.yml | 1 + .../Entities/Structures/Machines/lathe.yml | 5 +- Resources/Prototypes/Recipes/Lathes/Parts.yml | 8 + .../Crates/biological_secure.rsi/base.png | Bin 0 -> 344 bytes .../Crates/biological_secure.rsi/closed.png | Bin 0 -> 290 bytes .../Crates/biological_secure.rsi/icon.png | Bin 0 -> 439 bytes .../Crates/biological_secure.rsi/locked.png | Bin 0 -> 134 bytes .../Crates/biological_secure.rsi/meta.json | 45 ++ .../Crates/biological_secure.rsi/open.png | Bin 0 -> 211 bytes .../Crates/biological_secure.rsi/sparking.png | Bin 0 -> 206 bytes .../Crates/biological_secure.rsi/unlocked.png | Bin 0 -> 96 bytes .../Crates/biological_secure.rsi/welded.png | Bin 0 -> 117 bytes .../Crates/destruction_secure.rsi/base.png | Bin 0 -> 329 bytes .../Crates/destruction_secure.rsi/closed.png | Bin 0 -> 285 bytes .../Crates/destruction_secure.rsi/icon.png | Bin 0 -> 422 bytes .../Crates/destruction_secure.rsi/locked.png | Bin 0 -> 134 bytes .../Crates/destruction_secure.rsi/meta.json | 45 ++ .../Crates/destruction_secure.rsi/open.png | Bin 0 -> 211 bytes .../destruction_secure.rsi/sparking.png | Bin 0 -> 206 bytes .../destruction_secure.rsi/unlocked.png | Bin 0 -> 96 bytes .../Crates/destruction_secure.rsi/welded.png | Bin 0 -> 117 bytes .../Crates/industrial_secure.rsi/base.png | Bin 0 -> 352 bytes .../Crates/industrial_secure.rsi/closed.png | Bin 0 -> 299 bytes .../Crates/industrial_secure.rsi/icon.png | Bin 0 -> 450 bytes .../Crates/industrial_secure.rsi/locked.png | Bin 0 -> 134 bytes .../Crates/industrial_secure.rsi/meta.json | 45 ++ .../Crates/industrial_secure.rsi/open.png | Bin 0 -> 211 bytes .../Crates/industrial_secure.rsi/sparking.png | Bin 0 -> 206 bytes .../Crates/industrial_secure.rsi/unlocked.png | Bin 0 -> 96 bytes .../Crates/industrial_secure.rsi/welded.png | Bin 0 -> 117 bytes .../Crates/limited_secure.rsi/base.png | Bin 0 -> 353 bytes .../Crates/limited_secure.rsi/closed.png | Bin 0 -> 297 bytes .../Crates/limited_secure.rsi/icon.png | Bin 0 -> 438 bytes .../Crates/limited_secure.rsi/locked.png | Bin 0 -> 134 bytes .../Crates/limited_secure.rsi/meta.json | 45 ++ .../Crates/limited_secure.rsi/open.png | Bin 0 -> 211 bytes .../Crates/limited_secure.rsi/sparking.png | Bin 0 -> 206 bytes .../Crates/limited_secure.rsi/unlocked.png | Bin 0 -> 96 bytes .../Crates/limited_secure.rsi/welded.png | Bin 0 -> 117 bytes .../Crates/technological_secure.rsi/base.png | Bin 0 -> 355 bytes .../technological_secure.rsi/closed.png | Bin 0 -> 289 bytes .../Crates/technological_secure.rsi/icon.png | Bin 0 -> 445 bytes .../technological_secure.rsi/locked.png | Bin 0 -> 134 bytes .../Crates/technological_secure.rsi/meta.json | 45 ++ .../Crates/technological_secure.rsi/open.png | Bin 0 -> 211 bytes .../technological_secure.rsi/sparking.png | Bin 0 -> 206 bytes .../technological_secure.rsi/unlocked.png | Bin 0 -> 96 bytes .../technological_secure.rsi/welded.png | Bin 0 -> 117 bytes .../ADT/Bluespace/harvester.rsi/meta.json | 114 +++ .../harvester.rsi/redspace_effect.png | Bin 0 -> 1625 bytes .../Bluespace/harvester.rsi/south_effect.png | Bin 0 -> 1530 bytes .../ADT/Bluespace/harvester.rsi/tap_0.png | Bin 0 -> 4716 bytes .../ADT/Bluespace/harvester.rsi/tap_1.png | Bin 0 -> 4110 bytes .../ADT/Bluespace/harvester.rsi/tap_2.png | Bin 0 -> 4938 bytes .../ADT/Bluespace/harvester.rsi/tap_3.png | Bin 0 -> 4482 bytes .../ADT/Bluespace/harvester.rsi/tap_4.png | Bin 0 -> 5227 bytes .../ADT/Bluespace/harvester.rsi/tap_5.png | Bin 0 -> 4879 bytes .../Bluespace/harvester.rsi/tap_redspace.png | Bin 0 -> 4900 bytes .../ADT/Bluespace/module.rsi/bluespace.png | Bin 0 -> 872 bytes .../ADT/Bluespace/module.rsi/meta.json | 14 + .../Power/bluespace_transitor.rsi/beam.png | Bin 0 -> 1582 bytes .../Power/bluespace_transitor.rsi/display.png | Bin 0 -> 849 bytes .../Power/bluespace_transitor.rsi/idle.png | Bin 0 -> 1063 bytes .../Power/bluespace_transitor.rsi/meta.json | 40 + .../Power/bluespace_transitor.rsi/offline.png | Bin 0 -> 580 bytes 99 files changed, 3289 insertions(+), 11 deletions(-) create mode 100644 Content.Client/ADT/BluespaceHarvester/BluespaceHarvesterBoundUserInterface.cs create mode 100644 Content.Client/ADT/BluespaceHarvester/BluespaceHarvesterCategory.xaml create mode 100644 Content.Client/ADT/BluespaceHarvester/BluespaceHarvesterCategory.xaml.cs create mode 100644 Content.Client/ADT/BluespaceHarvester/BluespaceHarvesterMenu.xaml create mode 100644 Content.Client/ADT/BluespaceHarvester/BluespaceHarvesterMenu.xaml.cs create mode 100644 Content.Server/ADT/BluespaceHarvester/BluespaceHarvesterBundleComponent.cs create mode 100644 Content.Server/ADT/BluespaceHarvester/BluespaceHarvesterBundleSystem.cs create mode 100644 Content.Server/ADT/BluespaceHarvester/BluespaceHarvesterComponent.cs create mode 100644 Content.Server/ADT/BluespaceHarvester/BluespaceHarvesterRiftComponent.cs create mode 100644 Content.Server/ADT/BluespaceHarvester/BluespaceHarvesterRiftSystem.cs create mode 100644 Content.Server/ADT/BluespaceHarvester/BluespaceHarvesterSystem.cs create mode 100644 Content.Shared/ADT/BluespaceHarvester/BluespaceHarvesterUi.cs create mode 100644 Resources/Locale/en-US/ADT/bluespace_harvester.ftl create mode 100644 Resources/Locale/ru-RU/ADT/bluespace_harvester.ftl create mode 100644 Resources/Locale/ru-RU/ADT/entities/objects/devices/circuitboards/machine/production.ftl create mode 100644 Resources/Locale/ru-RU/ADT/prototypes/Catalog/Fills/Crates/bluespaceharvester.ftl create mode 100644 Resources/Prototypes/ADT/Catalog/Fills/Creates/bluespace_harvester.yml create mode 100644 Resources/Prototypes/ADT/Entities/Markers/Spawners/Random/bluespace_harvester.yml create mode 100644 Resources/Prototypes/ADT/Entities/Objects/Misc/parts.yml create mode 100644 Resources/Prototypes/ADT/Entities/Structures/Machines/bluespace_harvester.yml create mode 100644 Resources/Prototypes/ADT/Entities/Structures/Power/Generation/generators.yml create mode 100644 Resources/Prototypes/ADT/Entities/Structures/Power/substations.yml create mode 100644 Resources/Prototypes/ADT/Entities/Structures/Specific/bluespace_harvester_rift.yml create mode 100644 Resources/Prototypes/ADT/Entities/Structures/Storage/Crates/crates.yml create mode 100644 Resources/Prototypes/ADT/Recipes/Construction/Graphs/machines/machine.yml create mode 100644 Resources/Prototypes/ADT/Research/experimental.yml create mode 100644 Resources/Prototypes/ADT/Stacks/science_stacks.yml create mode 100644 Resources/Prototypes/ADT/explosion.yml create mode 100644 Resources/Textures/ADT/Bluespace/Crates/biological_secure.rsi/base.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/biological_secure.rsi/closed.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/biological_secure.rsi/icon.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/biological_secure.rsi/locked.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/biological_secure.rsi/meta.json create mode 100644 Resources/Textures/ADT/Bluespace/Crates/biological_secure.rsi/open.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/biological_secure.rsi/sparking.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/biological_secure.rsi/unlocked.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/biological_secure.rsi/welded.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/destruction_secure.rsi/base.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/destruction_secure.rsi/closed.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/destruction_secure.rsi/icon.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/destruction_secure.rsi/locked.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/destruction_secure.rsi/meta.json create mode 100644 Resources/Textures/ADT/Bluespace/Crates/destruction_secure.rsi/open.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/destruction_secure.rsi/sparking.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/destruction_secure.rsi/unlocked.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/destruction_secure.rsi/welded.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/industrial_secure.rsi/base.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/industrial_secure.rsi/closed.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/industrial_secure.rsi/icon.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/industrial_secure.rsi/locked.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/industrial_secure.rsi/meta.json create mode 100644 Resources/Textures/ADT/Bluespace/Crates/industrial_secure.rsi/open.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/industrial_secure.rsi/sparking.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/industrial_secure.rsi/unlocked.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/industrial_secure.rsi/welded.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/limited_secure.rsi/base.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/limited_secure.rsi/closed.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/limited_secure.rsi/icon.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/limited_secure.rsi/locked.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/limited_secure.rsi/meta.json create mode 100644 Resources/Textures/ADT/Bluespace/Crates/limited_secure.rsi/open.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/limited_secure.rsi/sparking.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/limited_secure.rsi/unlocked.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/limited_secure.rsi/welded.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/technological_secure.rsi/base.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/technological_secure.rsi/closed.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/technological_secure.rsi/icon.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/technological_secure.rsi/locked.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/technological_secure.rsi/meta.json create mode 100644 Resources/Textures/ADT/Bluespace/Crates/technological_secure.rsi/open.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/technological_secure.rsi/sparking.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/technological_secure.rsi/unlocked.png create mode 100644 Resources/Textures/ADT/Bluespace/Crates/technological_secure.rsi/welded.png create mode 100644 Resources/Textures/ADT/Bluespace/harvester.rsi/meta.json create mode 100644 Resources/Textures/ADT/Bluespace/harvester.rsi/redspace_effect.png create mode 100644 Resources/Textures/ADT/Bluespace/harvester.rsi/south_effect.png create mode 100644 Resources/Textures/ADT/Bluespace/harvester.rsi/tap_0.png create mode 100644 Resources/Textures/ADT/Bluespace/harvester.rsi/tap_1.png create mode 100644 Resources/Textures/ADT/Bluespace/harvester.rsi/tap_2.png create mode 100644 Resources/Textures/ADT/Bluespace/harvester.rsi/tap_3.png create mode 100644 Resources/Textures/ADT/Bluespace/harvester.rsi/tap_4.png create mode 100644 Resources/Textures/ADT/Bluespace/harvester.rsi/tap_5.png create mode 100644 Resources/Textures/ADT/Bluespace/harvester.rsi/tap_redspace.png create mode 100644 Resources/Textures/ADT/Bluespace/module.rsi/bluespace.png create mode 100644 Resources/Textures/ADT/Bluespace/module.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Structures/Power/bluespace_transitor.rsi/beam.png create mode 100644 Resources/Textures/ADT/Objects/Structures/Power/bluespace_transitor.rsi/display.png create mode 100644 Resources/Textures/ADT/Objects/Structures/Power/bluespace_transitor.rsi/idle.png create mode 100644 Resources/Textures/ADT/Objects/Structures/Power/bluespace_transitor.rsi/meta.json create mode 100644 Resources/Textures/ADT/Objects/Structures/Power/bluespace_transitor.rsi/offline.png diff --git a/Content.Client/ADT/BluespaceHarvester/BluespaceHarvesterBoundUserInterface.cs b/Content.Client/ADT/BluespaceHarvester/BluespaceHarvesterBoundUserInterface.cs new file mode 100644 index 00000000000..d2527642576 --- /dev/null +++ b/Content.Client/ADT/BluespaceHarvester/BluespaceHarvesterBoundUserInterface.cs @@ -0,0 +1,53 @@ +using Content.Shared.ADT.BluespaceHarvester; +using JetBrains.Annotations; + +namespace Content.Client.ADT.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.ADT.BluespaceHarvester.BluespaceHarvesterCategory category) + { + SendMessage(new BluespaceHarvesterBuyMessage(category)); + } +} diff --git a/Content.Client/ADT/BluespaceHarvester/BluespaceHarvesterCategory.xaml b/Content.Client/ADT/BluespaceHarvester/BluespaceHarvesterCategory.xaml new file mode 100644 index 00000000000..eef4ac89883 --- /dev/null +++ b/Content.Client/ADT/BluespaceHarvester/BluespaceHarvesterCategory.xaml @@ -0,0 +1,6 @@ + + + +