-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
Showing
5 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
Content.Shared/Traits/Assorted/Components/NormalVisionComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
23
Content.Shared/Traits/Assorted/Systems/NormalVisionSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters