Skip to content

Commit

Permalink
Trichromat Modification Trait (#505)
Browse files Browse the repository at this point in the history
# 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 <[email protected]>
  • Loading branch information
VMSolidus authored Jul 5, 2024
1 parent 529c5a4 commit 5d36483
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Content.Shared/Traits/Assorted/Components/NormalVisionComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Robust.Shared.GameStates;

namespace Content.Shared.Traits.Assorted.Components;

/// <summary>
/// This is used for removing species specific vision traits
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class NormalVisionComponent : Component
{
}

23 changes: 23 additions & 0 deletions Content.Shared/Traits/Assorted/Systems/NormalVisionSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Content.Shared.Abilities;
using Content.Shared.Traits.Assorted.Components;

namespace Content.Shared.Traits.Assorted.Systems;

/// <summary>
/// This handles removing species-specific vision traits.
/// </summary>
public sealed class NormalVisionSystem : EntitySystem
{
/// <inheritdoc/>
public override void Initialize()
{
SubscribeLocalEvent<NormalVisionComponent, ComponentInit>(OnStartup);
}


private void OnStartup(EntityUid uid, NormalVisionComponent component, ComponentInit args)
{
RemComp<DogVisionComponent>(uid);
RemComp<UltraVisionComponent>(uid);
}
}
6 changes: 6 additions & 0 deletions Resources/Locale/en-US/traits/traits.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
22 changes: 22 additions & 0 deletions Resources/Prototypes/DeltaV/Traits/altvision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,34 @@
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

- type: trait
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
20 changes: 20 additions & 0 deletions Resources/Prototypes/Traits/neutral.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5d36483

Please sign in to comment.