From 357bedfbe63abcab0378c4c45f59b0be42412a59 Mon Sep 17 00:00:00 2001 From: iertis Date: Sat, 18 Jan 2025 22:28:03 +0300 Subject: [PATCH] init --- .../Abductor/AbductorCameraConsoleBui.cs | 129 ++++++++++++++ .../Abductor/AbductorCameraConsoleWindow.xaml | 19 ++ .../Antags/Abductor/AbductorConsoleBui.cs | 118 +++++++++++++ .../Abductor/AbductorConsoleWindow.xaml | 26 +++ .../Abductor/AbductorConsoleWindow.xaml.cs | 10 ++ .../Antags/Abductor/AbductorSystem.cs | 11 ++ .../_Starlight/TextToSpeech/TTSSystem.cs | 134 ++++++++++++++ .../Rules/AntagLoadProfileRuleSystem.cs | 4 +- .../AntagLoadProfileRuleCOmponent.cs | 3 + .../Antags/Abductor/AbductorSystem.Actions.cs | 143 +++++++++++++++ .../Antags/Abductor/AbductorSystem.Console.cs | 156 +++++++++++++++++ .../Antags/Abductor/AbductorSystem.Gizmo.cs | 79 +++++++++ .../Antags/Abductor/AbductorSystem.Organs.cs | 103 +++++++++++ .../Antags/Abductor/AbductorSystem.cs | 130 ++++++++++++++ .../_Starlight/OnHit/OnHitSystem.cs | 37 ++++ .../Medical/Surgery/SurgerySystem.Steps.cs | 64 ++++++- Content.Server/build.json | 8 + .../ActionBlocker/ActionBlockerSystem.cs | 11 +- .../Interaction/SharedInteractionSystem.cs | 5 +- .../Abductor/AbductorCameraConsoleUI.cs | 42 +++++ .../Antags/Abductor/AbductorEnums.cs | 30 ++++ .../Abductor/AbductorReturnDoAfterEvent.cs | 49 ++++++ .../Antags/Abductor/AbductorsComponents.cs | 124 +++++++++++++ .../Antags/Abductor/SharedAbductorSystem.cs | 70 ++++++++ .../_Starlight/OnHit/SharedOnHitSystem.cs | 98 +++++++++++ .../Restrict/SharedRestrictSystem.cs | 40 +++++ Resources/Audio/_Starlight/Misc/abductor.ogg | Bin 0 -> 44358 bytes .../Audio/_Starlight/Misc/alien_teleport.ogg | Bin 0 -> 24003 bytes .../Audio/_Starlight/Misc/attributions.yml | 4 + .../_Sunrise/Medical/Surgery/attributions.yml | 10 ++ .../_Sunrise/Medical/Surgery/bone_saw.ogg | Bin 0 -> 22582 bytes .../_Sunrise/Medical/Surgery/bone_setter.ogg | Bin 0 -> 16431 bytes .../en-US/_Starlight/abductor/abductor-ui.ftl | 30 ++++ .../en-US/_Starlight/abductor/abductor.ftl | 8 + .../Entities/Objects/Misc/eggspider.yml | 16 ++ .../Objects/Specific/Medical/surgery.yml | 16 +- Resources/Prototypes/GameRules/events.yml | 6 +- .../_StarLight/Actions/abductor.yml | 97 +++++++++++ .../_StarLight/Body/Organs/dubious.yml | 59 +++++++ .../Entities/Mobs/Player/abductor.yml | 73 ++++++++ .../Entities/Mobs/Species/abductor.yml | 54 ++++++ .../Objects/Weapons/Melee/wonderprod.yml | 130 ++++++++++++++ .../Entities/Specific/Abductor/gizmo.yml | 25 +++ .../Structures/Computers/computers.yml | 70 ++++++++ .../Entities/Structures/alien_pad.yml | 35 ++++ .../_StarLight/GameRules/events.yml | 45 +++++ .../_StarLight/Objectives/abductor.yml | 27 +++ .../_StarLight/Research/medical.yml | 74 ++++++++ .../Roles/Antags/MindRoles/mind_roles.yml | 9 + .../_StarLight/Roles/Antags/abductor.yml | 6 + .../_StarLight/Shuttles/shuttles.yml | 0 .../Structures/Reflector/reflector.yml | 6 +- .../Entities/Structures/Tables/tables.yml | 13 ++ .../Structures/abductor_experimentator.yml | 30 ++++ Resources/Prototypes/tags.yml | 6 + .../Mobs/Animals/spiderling.rsi/alive.png | Bin 0 -> 776 bytes .../Mobs/Animals/spiderling.rsi/dead.png | Bin 0 -> 317 bytes .../Mobs/Animals/spiderling.rsi/meta.json | 36 ++++ .../Cyberlimbs/dubious-organs.rsi/egg.png | Bin 0 -> 748 bytes .../Cyberlimbs/dubious-organs.rsi/emp.png | Bin 0 -> 664 bytes .../Cyberlimbs/dubious-organs.rsi/gland.png | Bin 0 -> 638 bytes .../Cyberlimbs/dubious-organs.rsi/health.png | Bin 0 -> 638 bytes .../Cyberlimbs/dubious-organs.rsi/meta.json | 41 +++++ .../dubious-organs.rsi/mindshock.png | Bin 0 -> 810 bytes .../Cyberlimbs/dubious-organs.rsi/slime.png | Bin 0 -> 652 bytes .../Cyberlimbs/dubious-organs.rsi/species.png | Bin 0 -> 752 bytes .../Cyberlimbs/dubious-organs.rsi/spider.png | Bin 0 -> 801 bytes .../Cyberlimbs/dubious-organs.rsi/vent.png | Bin 0 -> 725 bytes .../Cyberlimbs/dubious-organs.rsi/viral.png | Bin 0 -> 731 bytes .../Objects/Misc/gizmo.rsi/icon.png | Bin 0 -> 589 bytes .../Objects/Misc/gizmo.rsi/inhand-left.png | Bin 0 -> 380 bytes .../Objects/Misc/gizmo.rsi/inhand-right.png | Bin 0 -> 379 bytes .../Objects/Misc/gizmo.rsi/meta.json | 31 ++++ .../Tables/abductor_table.rsi/full.png | Bin 0 -> 667 bytes .../Tables/abductor_table.rsi/meta.json | 163 ++++++++++++++++++ .../Tables/abductor_table.rsi/state_0.png | Bin 0 -> 579 bytes .../Tables/abductor_table.rsi/state_1.png | Bin 0 -> 534 bytes .../Tables/abductor_table.rsi/state_2.png | Bin 0 -> 579 bytes .../Tables/abductor_table.rsi/state_3.png | Bin 0 -> 534 bytes .../Tables/abductor_table.rsi/state_4.png | Bin 0 -> 527 bytes .../Tables/abductor_table.rsi/state_5.png | Bin 0 -> 593 bytes .../Tables/abductor_table.rsi/state_6.png | Bin 0 -> 527 bytes .../Tables/abductor_table.rsi/state_7.png | Bin 0 -> 454 bytes .../experimentator_0.png | Bin 0 -> 730 bytes .../experimentator_1.png | Bin 0 -> 910 bytes .../abductor_experimentator.rsi/meta.json | 25 +++ 86 files changed, 2765 insertions(+), 23 deletions(-) create mode 100644 Content.Client/_Starlight/Antags/Abductor/AbductorCameraConsoleBui.cs create mode 100644 Content.Client/_Starlight/Antags/Abductor/AbductorCameraConsoleWindow.xaml create mode 100644 Content.Client/_Starlight/Antags/Abductor/AbductorConsoleBui.cs create mode 100644 Content.Client/_Starlight/Antags/Abductor/AbductorConsoleWindow.xaml create mode 100644 Content.Client/_Starlight/Antags/Abductor/AbductorConsoleWindow.xaml.cs create mode 100644 Content.Client/_Starlight/Antags/Abductor/AbductorSystem.cs create mode 100644 Content.Client/_Starlight/TextToSpeech/TTSSystem.cs create mode 100644 Content.Server/_Starlight/Antags/Abductor/AbductorSystem.Actions.cs create mode 100644 Content.Server/_Starlight/Antags/Abductor/AbductorSystem.Console.cs create mode 100644 Content.Server/_Starlight/Antags/Abductor/AbductorSystem.Gizmo.cs create mode 100644 Content.Server/_Starlight/Antags/Abductor/AbductorSystem.Organs.cs create mode 100644 Content.Server/_Starlight/Antags/Abductor/AbductorSystem.cs create mode 100644 Content.Server/_Starlight/OnHit/OnHitSystem.cs create mode 100644 Content.Server/build.json create mode 100644 Content.Shared/_Starlight/Antags/Abductor/AbductorCameraConsoleUI.cs create mode 100644 Content.Shared/_Starlight/Antags/Abductor/AbductorEnums.cs create mode 100644 Content.Shared/_Starlight/Antags/Abductor/AbductorReturnDoAfterEvent.cs create mode 100644 Content.Shared/_Starlight/Antags/Abductor/AbductorsComponents.cs create mode 100644 Content.Shared/_Starlight/Antags/Abductor/SharedAbductorSystem.cs create mode 100644 Content.Shared/_Starlight/OnHit/SharedOnHitSystem.cs create mode 100644 Content.Shared/_Starlight/Restrict/SharedRestrictSystem.cs create mode 100644 Resources/Audio/_Starlight/Misc/abductor.ogg create mode 100644 Resources/Audio/_Starlight/Misc/alien_teleport.ogg create mode 100644 Resources/Audio/_Starlight/Misc/attributions.yml create mode 100644 Resources/Audio/_Sunrise/Medical/Surgery/bone_saw.ogg create mode 100644 Resources/Audio/_Sunrise/Medical/Surgery/bone_setter.ogg create mode 100644 Resources/Locale/en-US/_Starlight/abductor/abductor-ui.ftl create mode 100644 Resources/Locale/en-US/_Starlight/abductor/abductor.ftl create mode 100644 Resources/Prototypes/_StarLight/Actions/abductor.yml create mode 100644 Resources/Prototypes/_StarLight/Body/Organs/dubious.yml create mode 100644 Resources/Prototypes/_StarLight/Entities/Mobs/Player/abductor.yml create mode 100644 Resources/Prototypes/_StarLight/Entities/Mobs/Species/abductor.yml create mode 100644 Resources/Prototypes/_StarLight/Entities/Objects/Weapons/Melee/wonderprod.yml create mode 100644 Resources/Prototypes/_StarLight/Entities/Specific/Abductor/gizmo.yml create mode 100644 Resources/Prototypes/_StarLight/Entities/Structures/Computers/computers.yml create mode 100644 Resources/Prototypes/_StarLight/Entities/Structures/alien_pad.yml create mode 100644 Resources/Prototypes/_StarLight/GameRules/events.yml create mode 100644 Resources/Prototypes/_StarLight/Objectives/abductor.yml create mode 100644 Resources/Prototypes/_StarLight/Research/medical.yml create mode 100644 Resources/Prototypes/_StarLight/Roles/Antags/MindRoles/mind_roles.yml create mode 100644 Resources/Prototypes/_StarLight/Roles/Antags/abductor.yml create mode 100644 Resources/Prototypes/_StarLight/Shuttles/shuttles.yml create mode 100644 Resources/Prototypes/_Sunrise/Entities/Structures/Tables/tables.yml create mode 100644 Resources/Prototypes/_Sunrise/Entities/Structures/abductor_experimentator.yml create mode 100644 Resources/Textures/_Starlight/Mobs/Animals/spiderling.rsi/alive.png create mode 100644 Resources/Textures/_Starlight/Mobs/Animals/spiderling.rsi/dead.png create mode 100644 Resources/Textures/_Starlight/Mobs/Animals/spiderling.rsi/meta.json create mode 100644 Resources/Textures/_Starlight/Mobs/Species/Cyberlimbs/dubious-organs.rsi/egg.png create mode 100644 Resources/Textures/_Starlight/Mobs/Species/Cyberlimbs/dubious-organs.rsi/emp.png create mode 100644 Resources/Textures/_Starlight/Mobs/Species/Cyberlimbs/dubious-organs.rsi/gland.png create mode 100644 Resources/Textures/_Starlight/Mobs/Species/Cyberlimbs/dubious-organs.rsi/health.png create mode 100644 Resources/Textures/_Starlight/Mobs/Species/Cyberlimbs/dubious-organs.rsi/meta.json create mode 100644 Resources/Textures/_Starlight/Mobs/Species/Cyberlimbs/dubious-organs.rsi/mindshock.png create mode 100644 Resources/Textures/_Starlight/Mobs/Species/Cyberlimbs/dubious-organs.rsi/slime.png create mode 100644 Resources/Textures/_Starlight/Mobs/Species/Cyberlimbs/dubious-organs.rsi/species.png create mode 100644 Resources/Textures/_Starlight/Mobs/Species/Cyberlimbs/dubious-organs.rsi/spider.png create mode 100644 Resources/Textures/_Starlight/Mobs/Species/Cyberlimbs/dubious-organs.rsi/vent.png create mode 100644 Resources/Textures/_Starlight/Mobs/Species/Cyberlimbs/dubious-organs.rsi/viral.png create mode 100644 Resources/Textures/_Starlight/Objects/Misc/gizmo.rsi/icon.png create mode 100644 Resources/Textures/_Starlight/Objects/Misc/gizmo.rsi/inhand-left.png create mode 100644 Resources/Textures/_Starlight/Objects/Misc/gizmo.rsi/inhand-right.png create mode 100644 Resources/Textures/_Starlight/Objects/Misc/gizmo.rsi/meta.json create mode 100644 Resources/Textures/_Starlight/Structures/Tables/abductor_table.rsi/full.png create mode 100644 Resources/Textures/_Starlight/Structures/Tables/abductor_table.rsi/meta.json create mode 100644 Resources/Textures/_Starlight/Structures/Tables/abductor_table.rsi/state_0.png create mode 100644 Resources/Textures/_Starlight/Structures/Tables/abductor_table.rsi/state_1.png create mode 100644 Resources/Textures/_Starlight/Structures/Tables/abductor_table.rsi/state_2.png create mode 100644 Resources/Textures/_Starlight/Structures/Tables/abductor_table.rsi/state_3.png create mode 100644 Resources/Textures/_Starlight/Structures/Tables/abductor_table.rsi/state_4.png create mode 100644 Resources/Textures/_Starlight/Structures/Tables/abductor_table.rsi/state_5.png create mode 100644 Resources/Textures/_Starlight/Structures/Tables/abductor_table.rsi/state_6.png create mode 100644 Resources/Textures/_Starlight/Structures/Tables/abductor_table.rsi/state_7.png create mode 100644 Resources/Textures/_Starlight/Structures/abductor_experimentator.rsi/experimentator_0.png create mode 100644 Resources/Textures/_Starlight/Structures/abductor_experimentator.rsi/experimentator_1.png create mode 100644 Resources/Textures/_Starlight/Structures/abductor_experimentator.rsi/meta.json diff --git a/Content.Client/_Starlight/Antags/Abductor/AbductorCameraConsoleBui.cs b/Content.Client/_Starlight/Antags/Abductor/AbductorCameraConsoleBui.cs new file mode 100644 index 00000000000..360d3647fae --- /dev/null +++ b/Content.Client/_Starlight/Antags/Abductor/AbductorCameraConsoleBui.cs @@ -0,0 +1,129 @@ +using Content.Shared.Starlight.Antags.Abductor; +using JetBrains.Annotations; +using static Content.Shared.Pinpointer.SharedNavMapSystem; + +namespace Content.Client._Starlight.Antags.Abductor; + +[UsedImplicitly] +public sealed class AbductorCameraConsoleBui : BoundUserInterface +{ + [ViewVariables] + private AbductorCameraConsoleWindow? _window; + private int? _station; + public AbductorCameraConsoleBui(EntityUid owner, Enum uiKey) : base(owner, uiKey) + { + } + protected override void Open() => UpdateState(State); + protected override void UpdateState(BoundUserInterfaceState? state) + { + if (state is AbductorCameraConsoleBuiState s) + Update(s); + } + + private void Update(AbductorCameraConsoleBuiState state) + { + TryInitWindow(); + + View(ViewType.Stations); + + RefreshUI(); + + if (!_window!.IsOpen) + _window.OpenCentered(); + } + + private void TryInitWindow() + { + if (_window != null) return; + _window = new AbductorCameraConsoleWindow(); + _window.OnClose += Close; + _window.Title = "Intercepted cameras."; + + _window.StationsButton.OnPressed += _ => + { + _station = null; + View(ViewType.Stations); + }; + } + + private void OnStationPressed(int station, List beacons) + { + if (_window == null) + return; + + _station = station; + + foreach (var beacon in beacons) + { + var beaconButton = new ChoiceControl(); + + beaconButton.Set(beacon.Text, null); + beaconButton.Button.Modulate = beacon.Color; + beaconButton.Button.OnPressed += _ => + { + SendMessage(new AbductorBeaconChosenBuiMsg() + { + Beacon = beacon, + }); + Close(); + }; + _window.Beacons.AddChild(beaconButton); + } + View(ViewType.Beacons); + } + + private void RefreshUI() + { + if (_window == null || State is not AbductorCameraConsoleBuiState state) + return; + + _window!.Stations.DisposeAllChildren(); + _window.Beacons.DisposeAllChildren(); + + foreach (var station in state.Stations) + { + var stationButton = new ChoiceControl(); + + stationButton.Set(station.Value.Name, null); + stationButton.Button.OnPressed += _ => OnStationPressed(station.Key, station.Value.Beacons); + + _window.Stations.AddChild(stationButton); + + if (station.Key == _station) OnStationPressed(station.Key, station.Value.Beacons); + } + } + + private void View(ViewType type) + { + if (_window == null) + return; + + _window.StationsButton.Parent!.Margin = new Thickness(0, 0, 0, 10); + + _window.Stations.Visible = type == ViewType.Stations; + _window.StationsButton.Visible = true; + + _window.Beacons.Visible = type == ViewType.Beacons; + _window.BeaconsButton.Disabled = type != ViewType.Beacons; + + _window.Title = State is not AbductorCameraConsoleBuiState state + || _station == null + || !state.Stations.TryGetValue(_station.Value, out var station) + ? "Stations" + : $"Station - {station.Name}"; + } + + private enum ViewType + { + Stations, + Beacons, + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + + if (disposing) + _window?.Dispose(); + } +} diff --git a/Content.Client/_Starlight/Antags/Abductor/AbductorCameraConsoleWindow.xaml b/Content.Client/_Starlight/Antags/Abductor/AbductorCameraConsoleWindow.xaml new file mode 100644 index 00000000000..4dbc793795a --- /dev/null +++ b/Content.Client/_Starlight/Antags/Abductor/AbductorCameraConsoleWindow.xaml @@ -0,0 +1,19 @@ + + + +