From ee2638c13201ce03190fd0d8f205d03235b46d1c Mon Sep 17 00:00:00 2001 From: Trest <144359854+trest100@users.noreply.github.com> Date: Sat, 21 Dec 2024 19:15:00 +0300 Subject: [PATCH] Revert "Port TapeRecorder (#129)" This reverts commit d7cc749a400a9b230abea4ead2aef321e0f4023c. --- .../TapeRecorder/TapeRecorderSystem.cs | 24 - .../Ui/TapeRecorderBoundUserInterface.cs | 64 --- .../TapeRecorder/Ui/TapeRecorderWindow.xaml | 23 - .../Ui/TapeRecorderWindow.xaml.cs | 133 ------ .../TapeRecorder/TapeRecorderSystem.cs | 132 ------ .../Components/ActiveTapeRecorderComponent.cs | 9 - .../Components/TapeCassetteComponent.cs | 72 --- .../Components/TapeRecorderComponent.cs | 124 ----- .../TapeRecorder/Events/TapeRecorderEvents.cs | 50 --- .../TapeRecorder/SharedTapeRecorderSystem.cs | 422 ------------------ .../TapeCassetteRecordedMessage.cs | 51 --- .../Audio/Items/Taperecorder/attributions.yml | 17 - .../Items/Taperecorder/taperecorder_play.ogg | Bin 11670 -> 0 bytes .../Taperecorder/taperecorder_rewind.ogg | Bin 13159 -> 0 bytes .../Items/Taperecorder/taperecorder_stop.ogg | Bin 7395 -> 0 bytes .../en-US/taperecorder/taperecorder.ftl | 26 -- .../catalog/fills/boxes/security.ftl | 2 - .../objects/devices/tape_recorder.ftl | 4 - .../entities/objects/misc/paper.ftl | 1 - .../ru-RU/taperecorder/taperecorder.ftl | 26 -- .../Catalog/Fills/Boxes/security.yml | 23 - .../Catalog/Fills/Lockers/security.yml | 1 - .../Objects/Devices/tape_recorder.yml | 88 ---- .../Entities/Objects/Misc/paper.yml | 6 - .../Entities/Structures/Machines/lathe.yml | 3 - Resources/Prototypes/Recipes/Lathes/misc.yml | 18 - .../Roles/Jobs/Wildcards/reporter.yml | 8 +- .../Devices/cassette_tapes.rsi/meta.json | 17 - .../cassette_tapes.rsi/tape_greyscale.png | Bin 423 -> 0 bytes .../cassette_tapes.rsi/tape_ribbonoverlay.png | Bin 449 -> 0 bytes .../Devices/tape_recorder.rsi/inhand-left.png | Bin 491 -> 0 bytes .../tape_recorder.rsi/inhand-right.png | Bin 487 -> 0 bytes .../Devices/tape_recorder.rsi/meta.json | 58 --- .../tape_recorder.rsi/taperecorder_empty.png | Bin 581 -> 0 bytes .../tape_recorder.rsi/taperecorder_idle.png | Bin 597 -> 0 bytes .../taperecorder_playing.png | Bin 955 -> 0 bytes .../taperecorder_recording.png | Bin 934 -> 0 bytes .../taperecorder_rewinding.png | Bin 887 -> 0 bytes .../Objects/Storage/boxes.rsi/meta.json | 3 - .../Objects/Storage/boxes.rsi/recorder.png | Bin 189 -> 0 bytes 40 files changed, 3 insertions(+), 1402 deletions(-) delete mode 100644 Content.Client/TapeRecorder/TapeRecorderSystem.cs delete mode 100644 Content.Client/TapeRecorder/Ui/TapeRecorderBoundUserInterface.cs delete mode 100644 Content.Client/TapeRecorder/Ui/TapeRecorderWindow.xaml delete mode 100644 Content.Client/TapeRecorder/Ui/TapeRecorderWindow.xaml.cs delete mode 100644 Content.Server/TapeRecorder/TapeRecorderSystem.cs delete mode 100644 Content.Shared/TapeRecorder/Components/ActiveTapeRecorderComponent.cs delete mode 100644 Content.Shared/TapeRecorder/Components/TapeCassetteComponent.cs delete mode 100644 Content.Shared/TapeRecorder/Components/TapeRecorderComponent.cs delete mode 100644 Content.Shared/TapeRecorder/Events/TapeRecorderEvents.cs delete mode 100644 Content.Shared/TapeRecorder/SharedTapeRecorderSystem.cs delete mode 100644 Content.Shared/TapeRecorder/TapeCassetteRecordedMessage.cs delete mode 100644 Resources/Audio/Items/Taperecorder/attributions.yml delete mode 100644 Resources/Audio/Items/Taperecorder/taperecorder_play.ogg delete mode 100644 Resources/Audio/Items/Taperecorder/taperecorder_rewind.ogg delete mode 100644 Resources/Audio/Items/Taperecorder/taperecorder_stop.ogg delete mode 100644 Resources/Locale/en-US/taperecorder/taperecorder.ftl delete mode 100644 Resources/Locale/ru-RU/ss14-ru/prototypes/entities/objects/devices/tape_recorder.ftl delete mode 100644 Resources/Locale/ru-RU/taperecorder/taperecorder.ftl delete mode 100644 Resources/Prototypes/Entities/Objects/Devices/tape_recorder.yml delete mode 100644 Resources/Textures/Objects/Devices/cassette_tapes.rsi/meta.json delete mode 100644 Resources/Textures/Objects/Devices/cassette_tapes.rsi/tape_greyscale.png delete mode 100644 Resources/Textures/Objects/Devices/cassette_tapes.rsi/tape_ribbonoverlay.png delete mode 100644 Resources/Textures/Objects/Devices/tape_recorder.rsi/inhand-left.png delete mode 100644 Resources/Textures/Objects/Devices/tape_recorder.rsi/inhand-right.png delete mode 100644 Resources/Textures/Objects/Devices/tape_recorder.rsi/meta.json delete mode 100644 Resources/Textures/Objects/Devices/tape_recorder.rsi/taperecorder_empty.png delete mode 100644 Resources/Textures/Objects/Devices/tape_recorder.rsi/taperecorder_idle.png delete mode 100644 Resources/Textures/Objects/Devices/tape_recorder.rsi/taperecorder_playing.png delete mode 100644 Resources/Textures/Objects/Devices/tape_recorder.rsi/taperecorder_recording.png delete mode 100644 Resources/Textures/Objects/Devices/tape_recorder.rsi/taperecorder_rewinding.png delete mode 100644 Resources/Textures/Objects/Storage/boxes.rsi/recorder.png diff --git a/Content.Client/TapeRecorder/TapeRecorderSystem.cs b/Content.Client/TapeRecorder/TapeRecorderSystem.cs deleted file mode 100644 index c228ea356c2..00000000000 --- a/Content.Client/TapeRecorder/TapeRecorderSystem.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Content.Shared.TapeRecorder; - -namespace Content.Client.TapeRecorder; - -/// -/// Required for client side prediction stuff -/// -public sealed class TapeRecorderSystem : SharedTapeRecorderSystem -{ - private TimeSpan _lastTickTime = TimeSpan.Zero; - - public override void Update(float frameTime) - { - if (!Timing.IsFirstTimePredicted) - return; - - //We need to know the exact time period that has passed since the last update to ensure the tape position is sync'd with the server - //Since the client can skip frames when lagging, we cannot use frameTime - var realTime = (float) (Timing.CurTime - _lastTickTime).TotalSeconds; - _lastTickTime = Timing.CurTime; - - base.Update(realTime); - } -} \ No newline at end of file diff --git a/Content.Client/TapeRecorder/Ui/TapeRecorderBoundUserInterface.cs b/Content.Client/TapeRecorder/Ui/TapeRecorderBoundUserInterface.cs deleted file mode 100644 index 33df6267480..00000000000 --- a/Content.Client/TapeRecorder/Ui/TapeRecorderBoundUserInterface.cs +++ /dev/null @@ -1,64 +0,0 @@ -using Content.Shared.TapeRecorder.Components; -using Content.Shared.TapeRecorder.Events; -using Robust.Shared.Prototypes; -using Robust.Shared.Timing; - -namespace Content.Client.TapeRecorder.Ui; - -public sealed class TapeRecorderBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey) -{ - [Dependency] private readonly IEntityManager _entMan = default!; - - [ViewVariables] - private TapeRecorderWindow? _window; - - [ViewVariables] - private TimeSpan _printCooldown; - - protected override void Open() - { - base.Open(); - - _window = new(_entMan, Owner); - _window.OnClose += Close; - _window.OnModeChanged += ChangeMode; - _window.OnPrintTranscript += PrintTranscript; - _window.OpenCentered(); - } - - private void ChangeMode(TapeRecorderMode mode) - { - SendMessage(new ChangeModeTapeRecorderMessage(mode)); - } - - private void PrintTranscript() - { - SendMessage(new PrintTapeRecorderMessage()); - - _window?.UpdatePrint(true); - - Timer.Spawn(_printCooldown, () => - { - _window?.UpdatePrint(false); - }); - } - - protected override void UpdateState(BoundUserInterfaceState state) - { - base.UpdateState(state); - - if (state is not TapeRecorderState cast) - return; - - _printCooldown = cast.PrintCooldown; - - _window?.UpdateState(cast); - } - - protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - if (disposing) - _window?.Dispose(); - } -} diff --git a/Content.Client/TapeRecorder/Ui/TapeRecorderWindow.xaml b/Content.Client/TapeRecorder/Ui/TapeRecorderWindow.xaml deleted file mode 100644 index 0e22a7815fe..00000000000 --- a/Content.Client/TapeRecorder/Ui/TapeRecorderWindow.xaml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - -