From 5d3648305a621c393375521469a2ae86688cff2f Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Fri, 5 Jul 2024 19:49:31 -0400 Subject: [PATCH] Trichromat Modification Trait (#505) # Description This PR brings back a previous briefly existing feature, that of the NormalVisionComponent, which now exists as a single point positive trait that can be taken only by Harpies and Vulpkanin(A list to later be expanded if we ever get new species that have modified vision types). This trait is called "Trichromat Modification", and it simply removes any species based vision modifications an entity may have, such as Ultraviolet Vision. :cl: - add: Trichromat Modification has been added as a new positive trait. It can be taken by Harpies and Vulpkanin to buy off their unique vision negative traits. Signed-off-by: VMSolidus --- .../Components/NormalVisionComponent.cs | 12 ++++++++++ .../Assorted/Systems/NormalVisionSystem.cs | 23 +++++++++++++++++++ Resources/Locale/en-US/traits/traits.ftl | 6 +++++ .../Prototypes/DeltaV/Traits/altvision.yml | 22 ++++++++++++++++++ Resources/Prototypes/Traits/neutral.yml | 20 ++++++++++++++++ 5 files changed, 83 insertions(+) create mode 100644 Content.Shared/Traits/Assorted/Components/NormalVisionComponent.cs create mode 100644 Content.Shared/Traits/Assorted/Systems/NormalVisionSystem.cs diff --git a/Content.Shared/Traits/Assorted/Components/NormalVisionComponent.cs b/Content.Shared/Traits/Assorted/Components/NormalVisionComponent.cs new file mode 100644 index 00000000000..442bb6f0084 --- /dev/null +++ b/Content.Shared/Traits/Assorted/Components/NormalVisionComponent.cs @@ -0,0 +1,12 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Traits.Assorted.Components; + +/// +/// This is used for removing species specific vision traits +/// +[RegisterComponent, NetworkedComponent] +public sealed partial class NormalVisionComponent : Component +{ +} + diff --git a/Content.Shared/Traits/Assorted/Systems/NormalVisionSystem.cs b/Content.Shared/Traits/Assorted/Systems/NormalVisionSystem.cs new file mode 100644 index 00000000000..ee25bf364b9 --- /dev/null +++ b/Content.Shared/Traits/Assorted/Systems/NormalVisionSystem.cs @@ -0,0 +1,23 @@ +using Content.Shared.Abilities; +using Content.Shared.Traits.Assorted.Components; + +namespace Content.Shared.Traits.Assorted.Systems; + +/// +/// This handles removing species-specific vision traits. +/// +public sealed class NormalVisionSystem : EntitySystem +{ + /// + public override void Initialize() + { + SubscribeLocalEvent(OnStartup); + } + + + private void OnStartup(EntityUid uid, NormalVisionComponent component, ComponentInit args) + { + RemComp(uid); + RemComp(uid); + } +} diff --git a/Resources/Locale/en-US/traits/traits.ftl b/Resources/Locale/en-US/traits/traits.ftl index 80680ac0db2..2f59d322282 100644 --- a/Resources/Locale/en-US/traits/traits.ftl +++ b/Resources/Locale/en-US/traits/traits.ftl @@ -32,6 +32,12 @@ trait-description-SocialAnxiety = You are anxious when you speak and stutter. trait-name-Snoring = Snoring trait-description-Snoring = You will snore while sleeping. +trait-name-NormalVisionHarpy = Trichromat Modification +trait-description-NormalVisionHarpy = Your eyes have been modified by means of advanced medicine to see in the standard colors of Red, Green, and Blue. + +trait-name-NormalVisionVulpkanin = Trichromat Modification +trait-description-NormalVisionVulpkanin = Your eyes have been modified by means of advanced medicine to see in the standard colors of Red, Green, and Blue. + trait-name-Thieving = Thieving trait-description-Thieving = You are deft with your hands, and talented at convincing people of their belongings. diff --git a/Resources/Prototypes/DeltaV/Traits/altvision.yml b/Resources/Prototypes/DeltaV/Traits/altvision.yml index d1980bc23ad..1257c1eeb09 100644 --- a/Resources/Prototypes/DeltaV/Traits/altvision.yml +++ b/Resources/Prototypes/DeltaV/Traits/altvision.yml @@ -2,6 +2,17 @@ id: UltraVision category: Visual points: -1 + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Vulpkanin + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy + - !type:CharacterTraitRequirement + inverted: true + traits: + - DogVision components: - type: UltraVision @@ -9,5 +20,16 @@ id: DogVision category: Visual points: -1 + requirements: + - !type:CharacterSpeciesRequirement + inverted: true + species: Vulpkanin + - !type:CharacterSpeciesRequirement + inverted: true + species: Harpy + - !type:CharacterTraitRequirement + inverted: true + traits: + - UltraVision components: - type: DogVision diff --git a/Resources/Prototypes/Traits/neutral.yml b/Resources/Prototypes/Traits/neutral.yml index 3a3dc943cd7..86e12d20b34 100644 --- a/Resources/Prototypes/Traits/neutral.yml +++ b/Resources/Prototypes/Traits/neutral.yml @@ -21,3 +21,23 @@ - type: MothAccent - type: ReplacementAccent accent: dwarf + +- type: trait + id: NormalVisionHarpy + category: Visual + points: -1 + requirements: + - !type:CharacterSpeciesRequirement + species: Harpy + components: + - type: NormalVision + +- type: trait + id: NormalVisionVulpkanin + category: Visual + points: -1 + requirements: + - !type:CharacterSpeciesRequirement + species: Vulpkanin + components: + - type: NormalVision