Skip to content

Commit

Permalink
Adding Trichromat Trait
Browse files Browse the repository at this point in the history
  • Loading branch information
VMSolidus committed Jul 2, 2024
1 parent 2e712c0 commit 34b3d58
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 1 deletion.
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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ character-species-requirement = You must {$inverted ->
character-trait-requirement = You must {$inverted ->
[true] not have
*[other] have
} the trait [color=lightblue]{$trait}[/color]
} the trait [color=lightblue]{$traits}[/color]
character-backpack-type-requirement = You must {$inverted ->
[true] not use
*[other] use
Expand Down
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 @@ -31,3 +31,9 @@ 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.
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 34b3d58

Please sign in to comment.