From 8a281bf90f0f86c26876467d4cb64c9d160ae071 Mon Sep 17 00:00:00 2001 From: stellar-novas Date: Wed, 8 May 2024 17:43:23 -0400 Subject: [PATCH 01/29] Fix logo license and add source files (#397) # Description The EE logo was still attributed to me, and the source files weren't included here. --- # Changelog none --- Resources/Textures/Logo/icon-license.txt | 8 +- Resources/Textures/Logo/icon.svg | 434 ------------------ Resources/Textures/Logo/logo.svg | 434 ------------------ Resources/Textures/Logo/source/EE_bannger.svg | 222 +++++++++ .../Textures/Logo/source/EE_logo-dark.svg | 57 +++ .../Textures/Logo/source/EE_logo-light.svg | 50 ++ 6 files changed, 333 insertions(+), 872 deletions(-) delete mode 100644 Resources/Textures/Logo/icon.svg delete mode 100644 Resources/Textures/Logo/logo.svg create mode 100644 Resources/Textures/Logo/source/EE_bannger.svg create mode 100644 Resources/Textures/Logo/source/EE_logo-dark.svg create mode 100644 Resources/Textures/Logo/source/EE_logo-light.svg diff --git a/Resources/Textures/Logo/icon-license.txt b/Resources/Textures/Logo/icon-license.txt index 585694e728e..4541be178f7 100644 --- a/Resources/Textures/Logo/icon-license.txt +++ b/Resources/Textures/Logo/icon-license.txt @@ -1,8 +1,6 @@ -The files below are licensed under CC-BY-SA 4.0 by the author, Nova, https://github.com/stellar-novas / @stellar_novas on Discord. -Monaspace Krypton was used for text in the following files under the SIL Open Font License, Version 1.1. https://github.com/githubnext/monaspace. +The files below are licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International by the author, Jennifer Castillo, @ItJustAni or @justani. icon.ico -icon.svg icon/icon-16x16.png icon/icon-24x24.png icon/icon-32x32.png @@ -10,6 +8,8 @@ icon/icon-48x48.png icon/icon-64x64.png icon/icon-128x128.png icon/icon-256x256.png -logo.svg logo.png slashlogo.png +source/EE_banner.svg +source/EE_logo-dark.svg +source/EE_logo-light.svg diff --git a/Resources/Textures/Logo/icon.svg b/Resources/Textures/Logo/icon.svg deleted file mode 100644 index 99315583c6f..00000000000 --- a/Resources/Textures/Logo/icon.svg +++ /dev/null @@ -1,434 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Resources/Textures/Logo/logo.svg b/Resources/Textures/Logo/logo.svg deleted file mode 100644 index 6885a736a6d..00000000000 --- a/Resources/Textures/Logo/logo.svg +++ /dev/null @@ -1,434 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Engines - Einstein - - - diff --git a/Resources/Textures/Logo/source/EE_bannger.svg b/Resources/Textures/Logo/source/EE_bannger.svg new file mode 100644 index 00000000000..91fef68b73d --- /dev/null +++ b/Resources/Textures/Logo/source/EE_bannger.svg @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Resources/Textures/Logo/source/EE_logo-dark.svg b/Resources/Textures/Logo/source/EE_logo-dark.svg new file mode 100644 index 00000000000..b22cf86cb98 --- /dev/null +++ b/Resources/Textures/Logo/source/EE_logo-dark.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Resources/Textures/Logo/source/EE_logo-light.svg b/Resources/Textures/Logo/source/EE_logo-light.svg new file mode 100644 index 00000000000..236919fe2f5 --- /dev/null +++ b/Resources/Textures/Logo/source/EE_logo-light.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 78e1541662aef63ead433f150f18bead99374f0f Mon Sep 17 00:00:00 2001 From: SimpleStation14 <130339894+SimpleStation14@users.noreply.github.com> Date: Wed, 8 May 2024 20:25:48 -0700 Subject: [PATCH 02/29] Mirror: Contraband Storage Crate (#181) ## Mirror of PR #25974: [Contraband Storage Crate](https://github.com/space-wizards/space-station-14/pull/25974) from space-wizards [space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14) ###### `49c819373919d6ad2c7e1d802025782ecdce370b` PR opened by PursuitInAshes at 2024-03-10 18:12:13 UTC --- PR changed 1 files with 12 additions and 0 deletions. The PR had the following labels: - No C# ---

Original Body

> ## About the PR > Adds a Contraband Storage Crate for the armory. This can be used by mappers to provide better and more suitable storage then an empty rack. > > ## Why / Balance > Dumping items that were confiscated from the syndicate on the ground or in exposed racks felt wrong and unfitting for more stations. This provides an armory locked crate to fill that purpose. > > ## Media > ![Content Client_JYZIEQmEgm](https://github.com/space-wizards/space-station-14/assets/91865152/e458cda6-791c-4145-92c3-ae052482813a) > > **Changelog** > > No CL, not really player facing. >
Co-authored-by: SimpleStation14 --- .../Entities/Structures/Storage/Crates/crates.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml b/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml index b854fb2fc65..4ebe8d04eb6 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml @@ -283,6 +283,18 @@ - type: AccessReader access: [["Armory"]] +- type: entity + parent: CrateBaseSecure + suffix: Armory, Secure + id: CrateContrabandStorageSecure + name: contraband storage crate + description: An armory access locked crate for storing contraband confiscated from suspects or prisoners. + components: + - type: Sprite + sprite: Structures/Storage/Crates/sec_gear.rsi + - type: AccessReader + access: [["Armory"]] + - type: entity parent: CrateBaseSecure id: CrateCommandSecure From 883ded11546a1d9499e2565a5cba86126b11aabc Mon Sep 17 00:00:00 2001 From: SimpleStation14 <130339894+SimpleStation14@users.noreply.github.com> Date: Wed, 8 May 2024 20:26:31 -0700 Subject: [PATCH 03/29] Mirror: Nuke Music start adjusted for duration (#163) ## Mirror of PR #25946: [Nuke Music start adjusted for duration](https://github.com/space-wizards/space-station-14/pull/25946) from space-wizards [space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14) ###### `680cf5fec13b92f09355acec9892f2db51f3e80e` PR opened by Errant-4 at 2024-03-09 18:24:36 UTC PR merged by web-flow at 2024-03-12 18:50:34 UTC --- PR changed 2 files with 16 additions and 5 deletions. The PR had the following labels: ---

Original Body

> ## About the PR > > Nuke Music now begins playing at the appropriate time to end just-on-target regardless of the duration of the music (as long as it's less than 290 seconds) > > fixes #25775 > > ## Media > - [X] I have added screenshots/videos to this PR showcasing its changes ingame, **or** this PR does not require an ingame showcase > >
Co-authored-by: Errant <35878406+Errant-4@users.noreply.github.com> --- Content.Server/Audio/ServerGlobalSoundSystem.cs | 10 ++++++++-- Content.Server/Nuke/NukeSystem.cs | 11 ++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Content.Server/Audio/ServerGlobalSoundSystem.cs b/Content.Server/Audio/ServerGlobalSoundSystem.cs index df8771df8d8..3d30be8eeae 100644 --- a/Content.Server/Audio/ServerGlobalSoundSystem.cs +++ b/Content.Server/Audio/ServerGlobalSoundSystem.cs @@ -1,6 +1,7 @@ using Content.Server.Station.Systems; using Content.Shared.Audio; using Robust.Shared.Audio; +using Robust.Shared.Audio.Systems; using Robust.Shared.Console; using Robust.Shared.Player; @@ -10,6 +11,7 @@ public sealed class ServerGlobalSoundSystem : SharedGlobalSoundSystem { [Dependency] private readonly IConsoleHost _conHost = default!; [Dependency] private readonly StationSystem _stationSystem = default!; + [Dependency] private readonly SharedAudioSystem _audio = default!; public override void Shutdown() { @@ -49,10 +51,14 @@ public void StopStationEventMusic(EntityUid source, StationEventMusicType type) } public void DispatchStationEventMusic(EntityUid source, SoundSpecifier sound, StationEventMusicType type) + { + DispatchStationEventMusic(source, _audio.GetSound(sound), type); + } + + public void DispatchStationEventMusic(EntityUid source, string sound, StationEventMusicType type) { var audio = AudioParams.Default.WithVolume(-8); - var soundFile = sound.GetSound(); - var msg = new StationEventMusicEvent(soundFile, type, audio); + var msg = new StationEventMusicEvent(sound, type, audio); var filter = GetStationAndPvs(source); RaiseNetworkEvent(msg, filter); diff --git a/Content.Server/Nuke/NukeSystem.cs b/Content.Server/Nuke/NukeSystem.cs index 652852ece28..d6767cd2de8 100644 --- a/Content.Server/Nuke/NukeSystem.cs +++ b/Content.Server/Nuke/NukeSystem.cs @@ -46,7 +46,8 @@ public sealed class NukeSystem : EntitySystem /// /// Used to calculate when the nuke song should start playing for maximum kino with the nuke sfx /// - private const float NukeSongLength = 60f + 51.6f; + private float _nukeSongLength; + private string _selectedNukeSong = String.Empty; /// /// Time to leave between the nuke song and the nuke alarm playing. @@ -292,9 +293,9 @@ private void TickTimer(EntityUid uid, float frameTime, NukeComponent? nuke = nul // Start playing the nuke event song so that it ends a couple seconds before the alert sound // should play - if (nuke.RemainingTime <= NukeSongLength + nuke.AlertSoundTime + NukeSongBuffer && !nuke.PlayedNukeSong) + if (nuke.RemainingTime <= _nukeSongLength + nuke.AlertSoundTime + NukeSongBuffer && !nuke.PlayedNukeSong && !string.IsNullOrEmpty(_selectedNukeSong)) { - _sound.DispatchStationEventMusic(uid, nuke.ArmMusic, StationEventMusicType.Nuke); + _sound.DispatchStationEventMusic(uid, _selectedNukeSong, StationEventMusicType.Nuke); nuke.PlayedNukeSong = true; } @@ -457,6 +458,9 @@ public void ArmBomb(EntityUid uid, NukeComponent? component = null) var y = (int) pos.Y; var posText = $"({x}, {y})"; + // We are collapsing the randomness here, otherwise we would get separate random song picks for checking duration and when actually playing the song afterwards + _selectedNukeSong = _audio.GetSound(component.ArmMusic); + // warn a crew var announcement = Loc.GetString("nuke-component-announcement-armed", ("time", (int) component.RemainingTime), ("position", posText)); @@ -464,6 +468,7 @@ public void ArmBomb(EntityUid uid, NukeComponent? component = null) _chatSystem.DispatchStationAnnouncement(stationUid ?? uid, announcement, sender, false, null, Color.Red); _sound.PlayGlobalOnStation(uid, _audio.GetSound(component.ArmSound)); + _nukeSongLength = (float) _audio.GetAudioLength(_selectedNukeSong).TotalSeconds; // turn on the spinny light _pointLight.SetEnabled(uid, true); From 07692c4e9d859652ac23c7c0f4fd077381556835 Mon Sep 17 00:00:00 2001 From: SimpleStation14 <130339894+SimpleStation14@users.noreply.github.com> Date: Wed, 8 May 2024 20:27:02 -0700 Subject: [PATCH 04/29] Mirror: Remove random Cyrillic characters from locale files (#159) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Mirror of PR #26043: [Remove random Cyrillic characters from locale files](https://github.com/space-wizards/space-station-14/pull/26043) from space-wizards [space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14) ###### `ffd52b24ff9bbe33eab30aec1b19d4c1fbb05245` PR opened by arimah at 2024-03-12 15:52:06 UTC PR merged by web-flow at 2024-03-12 15:58:04 UTC --- PR changed 2 files with 2 additions and 2 deletions. The PR had the following labels: - No C# ---

Original Body

> ## About the PR > While playing around with the game's data, I discovered 'cocoa powder' got sorted after all the other reagents. I poked around for a minute, and what do you know, that first letter isn't a c, it's actually the [Cyrillic lowercase letter с](https://en.wikipedia.org/wiki/Es_(Cyrillic))! I searched all .yml and .ftl files for more Cyrillic, and found exactly one other occurrence. This PR fixes both. > > ## Why / Balance > Correctness. For one, you currently can't find cocoa powder or anything that uses it in the guidebook by searching "cocoa powder". :D > > ## Technical details > .ftl > > ## Media > - [X] I have added screenshots/videos to this PR showcasing its changes ingame, **or** this PR does not require an ingame showcase > > ## Breaking changes > god I hope not
Co-authored-by: Alice "Arimah" Heurlin <30327355+arimah@users.noreply.github.com> --- .../Locale/en-US/game-ticking/game-presets/preset-thief.ftl | 2 +- Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl b/Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl index db1404e09b1..ab2b8f88d76 100644 --- a/Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl +++ b/Resources/Locale/en-US/game-ticking/game-presets/preset-thief.ftl @@ -6,7 +6,7 @@ thief-role-greeting-human = but that can't stop you from getting your fix by any means necessary. thief-role-greeting-animal = - You are a kleptomaniaс animal. + You are a kleptomaniac animal. Steal things that you like. thief-role-greeting-equipment = diff --git a/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl b/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl index 85d46ff6c8c..5f89fea5759 100644 --- a/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl +++ b/Resources/Locale/en-US/reagents/meta/consumable/food/food.ftl @@ -10,7 +10,7 @@ reagent-desc-vitamin = Found in healthy, complete meals. reagent-name-protein = protein reagent-desc-protein = Found in certain meals, good for bodily health. -reagent-name-cocoapowder = сocoa powder +reagent-name-cocoapowder = cocoa powder reagent-desc-cocoapowder = From the best varieties of cocoa beans reagent-name-butter = butter From cfd943c04b331044aa84dba7bdfc56cd21f7f4dc Mon Sep 17 00:00:00 2001 From: SimpleStation14 <130339894+SimpleStation14@users.noreply.github.com> Date: Wed, 8 May 2024 20:27:26 -0700 Subject: [PATCH 05/29] Mirror: Fix rounds restarting in the next round (#164) ## Mirror of PR #25856: [Fix rounds restarting in the next round](https://github.com/space-wizards/space-station-14/pull/25856) from space-wizards [space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14) ###### `02cc9c05ddf853b613361690b88ba893ce57bab3` PR opened by metalgearsloth at 2024-03-05 07:13:06 UTC PR merged by web-flow at 2024-03-12 18:54:28 UTC --- PR changed 2 files with 10 additions and 2 deletions. The PR had the following labels: ---

Original Body

> Doesn't fix them restarting in lobby I think but should fix most of it.
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> --- .../Shuttles/Systems/EmergencyShuttleSystem.Console.cs | 3 ++- .../Shuttles/Systems/EmergencyShuttleSystem.cs | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs index 6d2c28edcfc..aeb2ebdbba1 100644 --- a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs +++ b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs @@ -308,8 +308,9 @@ private void OnEmergencyAuthorize(EntityUid uid, EmergencyShuttleConsoleComponen private void CleanupEmergencyConsole() { + // Realistically most of this shit needs moving to a station component so each station has their own emergency shuttle + // and timer and all that jazz so I don't really care about debugging if it works on cleanup vs start. _announced = false; - _roundEndCancelToken = null; ShuttlesLeft = false; _launchedShuttles = false; _consoleAccumulator = float.MinValue; diff --git a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs index a7df41d8877..47aad6a6036 100644 --- a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs +++ b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs @@ -19,6 +19,7 @@ using Content.Shared.CCVar; using Content.Shared.Database; using Content.Shared.DeviceNetwork; +using Content.Shared.GameTicking; using Content.Shared.Shuttles.Components; using Content.Shared.Shuttles.Events; using Content.Shared.Tag; @@ -80,6 +81,7 @@ public override void Initialize() Subs.CVar(_configManager, CCVars.EmergencyShuttleEnabled, SetEmergencyShuttleEnabled); SubscribeLocalEvent(OnRoundStart); + SubscribeLocalEvent(OnRoundCleanup); SubscribeLocalEvent(OnStationStartup); SubscribeLocalEvent(OnCentcommShutdown); SubscribeLocalEvent(OnCentcommInit); @@ -93,10 +95,15 @@ public override void Initialize() private void OnRoundStart(RoundStartingEvent ev) { CleanupEmergencyConsole(); - _roundEndCancelToken?.Cancel(); _roundEndCancelToken = new CancellationTokenSource(); } + private void OnRoundCleanup(RoundRestartCleanupEvent ev) + { + _roundEndCancelToken?.Cancel(); + _roundEndCancelToken = null; + } + private void OnCentcommShutdown(EntityUid uid, StationCentcommComponent component, ComponentShutdown args) { ClearCentcomm(component); From dd3fd52a1f92ce74a1dda953f8f05fe24a165b10 Mon Sep 17 00:00:00 2001 From: SimpleStation14 <130339894+SimpleStation14@users.noreply.github.com> Date: Wed, 8 May 2024 20:46:24 -0700 Subject: [PATCH 06/29] Remove warp point comp from map beacons (#79) ## Mirror of PR #968: [Remove warp point comp from map beacons](https://github.com/DeltaV-Station/Delta-v/pull/968) from DeltaV-Station [DeltaV-Station](https://github.com/DeltaV-Station)/[Delta-v](https://github.com/DeltaV-Station/Delta-v) `40eeef24e7685a2bb2b2b35396fb546a38e96216` --- PR changed 0 files with 0 additions and 0 deletions. The PR had the following labels: - Changes: YML - Status: Needs Review ---

Original Body

> ## About the PR > Title > > ## Why / Balance > Makes things much cleaner. Currently we have Warp Point markers, Bombing Targets, and Map Beacons all with an overlapping function. (Also Warp points+Beacons markers but I'm ignoring those for this.) > > **Why it's messy** > Standard warp points and bombing targets can be used interchangeably. You can use a WP where you don't want a target, use a BT where you do. Beacons, on the other hand, don't have BT but double up as a WP. So, you either end up having to choose between a BT/WP or a beacon, or double up a location on the Ghost Warp menu. Additionally, just using beacons bloats the Warp Menu. > > Beacons can be moved by players. So, attaching either WP or BT to those is bad. Beacons are really nice, both for mappers and players but as long as they have WP, it causes conflict for mappers and/or bloat in the Ghost Warp menu. > > **Solution** > For Delta V we will use WP and BT to fill the Ghost Warp menu and Beacons for the Navmap. Problem solved/potential griefing, issues, etc. avoided, and no more Warp Menu bloat. > > ## Technical details > - Some maps will likely need to be adjusted for this change. > - Attempted to upstream this was denied. Solution proposed causes more work and less clear instructions for mappers.
Co-authored-by: Velcroboy <107660393+IamVelcroboy@users.noreply.github.com> Co-authored-by: VMSolidus --- .../DeltaV/Entities/Objects/Devices/station_beacon.yml | 8 ++++---- .../Entities/Objects/Devices/station_beacon.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Resources/Prototypes/DeltaV/Entities/Objects/Devices/station_beacon.yml b/Resources/Prototypes/DeltaV/Entities/Objects/Devices/station_beacon.yml index 74993ae94a1..d1e26bf27fb 100644 --- a/Resources/Prototypes/DeltaV/Entities/Objects/Devices/station_beacon.yml +++ b/Resources/Prototypes/DeltaV/Entities/Objects/Devices/station_beacon.yml @@ -27,7 +27,7 @@ - type: entity parent: DefaultStationBeaconMedical id: DefaultStationBeaconExam - suffix: Exam Room + suffix: Exam components: - type: NavMapBeacon text: station-beacon-exam @@ -43,7 +43,7 @@ - type: entity parent: DefaultStationBeaconMedical id: DefaultStationBeaconPsychologist - suffix: Psychologist + suffix: Psych components: - type: NavMapBeacon text: station-beacon-psych @@ -52,7 +52,7 @@ - type: entity parent: DefaultStationBeaconScience id: DefaultStationBeaconProber - suffix: Glimmer Prober + suffix: Prober components: - type: NavMapBeacon text: station-beacon-glimmer-prober @@ -60,7 +60,7 @@ - type: entity parent: DefaultStationBeaconScience id: DefaultStationBeaconMantis - suffix: Forensic Mantis + suffix: Mantis components: - type: NavMapBeacon text: station-beacon-forensic-mantis diff --git a/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml b/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml index b68257083c8..e5a1d0412a0 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/station_beacon.yml @@ -24,7 +24,7 @@ - type: NavMapBeacon text: station-beacon-general color: "#D4D4D496" - - type: WarpPoint + #- type: WarpPoint # Delta V - Removes in favor of Warp Point Markers - type: ActivatableUI key: enum.NavMapBeaconUiKey.Key singleUser: true From e4b8f701e3d12e06a857029b15a323475312d562 Mon Sep 17 00:00:00 2001 From: SimpleStation14 <130339894+SimpleStation14@users.noreply.github.com> Date: Wed, 8 May 2024 20:47:48 -0700 Subject: [PATCH 07/29] Mirror: Add a toggle for colorblind friendly progress bar colors (#130) ## Mirror of PR #25318: [Add a toggle for colorblind friendly progress bar colors](https://github.com/space-wizards/space-station-14/pull/25318) from space-wizards [space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14) ###### `f3f4616c49317898aeeff304160b0b50df9ee851` PR opened by EmoGarbage404 at 2024-02-16 17:40:39 UTC PR merged by web-flow at 2024-03-09 11:43:20 UTC --- PR changed 8 files with 169 additions and 84 deletions. The PR had the following labels: - Changes: UI - Status: Needs Review ---

Original Body

> > > > ## About the PR > > Adds a toggle in the accessibility menu that lets 'progress bars' (doafters, medhud) toggle between a standard rainbow palette and the colorblind-friendly Viridis palette. > > also makes the medhud bar unshaded to match the icon and to improve readability. > > ## Why / Balance > > Medical huds used a (frankly) bastardized version of Viridis without proper smoothing. Doafters used the standard rainbow palette but with actual smoothing. I personally don't really like the medhud colors, but i figured if i wanted to get rid of them it was best to unify and make it an option broadly so that people who needed it could get more use out of it. > > ## Technical details > > Makes a new static method in ProgressColorSystem that handles the CVAR. also adds a new checkbox to MiscTab.xaml > > ## Media > > > https://github.com/space-wizards/space-station-14/assets/98561806/743c2c31-6504-4693-ab6b-7f54e0d65e06 > > - [x] I have added screenshots/videos to this PR showcasing its changes ingame, **or** this PR does not require an ingame showcase > > **Changelog** > > > :cl: > - add: Added a new "colorblind friendly" toggle in the accessibility menu. This allows you to toggle between a standard and colorblind-friendly palette for things like progress bars and the medical HUD. > - tweak: The medical HUD is now bright, even in low light levels. >
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> --- Content.Client/DoAfter/DoAfterOverlay.cs | 16 ++- Content.Client/Options/UI/Tabs/MiscTab.xaml | 102 +++++++++--------- .../Options/UI/Tabs/MiscTab.xaml.cs | 5 + .../Overlays/EntityHealthBarOverlay.cs | 39 +++---- .../Controls/ProgressTextureRect.cs | 6 +- .../Systems/ProgressColorSystem.cs | 77 +++++++++++++ Content.Shared/CCVar/CCVars.cs | 7 ++ .../en-US/escape-menu/ui/options-menu.ftl | 1 + 8 files changed, 169 insertions(+), 84 deletions(-) create mode 100644 Content.Client/UserInterface/Systems/ProgressColorSystem.cs diff --git a/Content.Client/DoAfter/DoAfterOverlay.cs b/Content.Client/DoAfter/DoAfterOverlay.cs index 2957dafdb7a..2e23dd44cac 100644 --- a/Content.Client/DoAfter/DoAfterOverlay.cs +++ b/Content.Client/DoAfter/DoAfterOverlay.cs @@ -1,9 +1,9 @@ using System.Numerics; using Content.Shared.DoAfter; +using Content.Client.UserInterface.Systems; using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Shared.Enums; -using Robust.Shared.Graphics; using Robust.Client.Player; using Robust.Shared.Prototypes; using Robust.Shared.Timing; @@ -18,6 +18,7 @@ public sealed class DoAfterOverlay : Overlay private readonly IPlayerManager _player; private readonly SharedTransformSystem _transform; private readonly MetaDataSystem _meta; + private readonly ProgressColorSystem _progressColor; private readonly Texture _barTexture; private readonly ShaderInstance _shader; @@ -40,6 +41,7 @@ public DoAfterOverlay(IEntityManager entManager, IPrototypeManager protoManager, _player = player; _transform = _entManager.EntitySysManager.GetEntitySystem(); _meta = _entManager.EntitySysManager.GetEntitySystem(); + _progressColor = _entManager.System(); var sprite = new SpriteSpecifier.Rsi(new("/Textures/Interface/Misc/progress_bar.rsi"), "icon"); _barTexture = _entManager.EntitySysManager.GetEntitySystem().Frame0(sprite); @@ -125,7 +127,7 @@ protected override void Draw(in OverlayDrawArgs args) elapsedRatio = (float) Math.Min(1, elapsed.TotalSeconds / doAfter.Args.Delay.TotalSeconds); var cancelElapsed = (time - doAfter.CancelledTime.Value).TotalSeconds; var flash = Math.Floor(cancelElapsed / FlashTime) % 2 == 0; - color = new Color(1f, 0f, 0f, flash ? alpha : 0f); + color = GetProgressColor(0, flash ? alpha : 0); } else { @@ -146,14 +148,8 @@ protected override void Draw(in OverlayDrawArgs args) handle.SetTransform(Matrix3.Identity); } - public static Color GetProgressColor(float progress, float alpha = 1f) + public Color GetProgressColor(float progress, float alpha = 1f) { - if (progress >= 1.0f) - { - return new Color(0f, 1f, 0f, alpha); - } - // lerp - var hue = (5f / 18f) * progress; - return Color.FromHsv((hue, 1f, 0.75f, alpha)); + return _progressColor.GetProgressColor(progress).WithAlpha(alpha); } } diff --git a/Content.Client/Options/UI/Tabs/MiscTab.xaml b/Content.Client/Options/UI/Tabs/MiscTab.xaml index fc94ab7b0a6..2ee59910f70 100644 --- a/Content.Client/Options/UI/Tabs/MiscTab.xaml +++ b/Content.Client/Options/UI/Tabs/MiscTab.xaml @@ -4,57 +4,59 @@ xmlns:xNamespace="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:Content.Client.Stylesheets"> - -