Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulpkanin's Deuteranopia #837

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Everyone loves dog vision
Updated to match the the harpy code
FluffiestFloof committed Feb 15, 2024
commit 12c363776bc385c80ff9aa12f20bd76435fe6766
19 changes: 2 additions & 17 deletions Content.Client/Nyanotrasen/Overlays/DogVisionSystem.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
using Content.Shared.Abilities;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Player;

namespace Content.Client.Nyanotrasen.Overlays;

public sealed partial class DogVisionSystem : EntitySystem
{
[Dependency] private readonly IPlayerManager _player = default!;
[Dependency] private readonly IOverlayManager _overlayMan = default!;

private DogVisionOverlay _overlay = default!;
@@ -19,28 +16,16 @@ public override void Initialize()
SubscribeLocalEvent<DogVisionComponent, ComponentInit>(OnDogVisionInit);
SubscribeLocalEvent<DogVisionComponent, ComponentShutdown>(OnDogVisionShutdown);

_player.LocalPlayerAttached += OnAttachedChanged;
_player.LocalPlayerDetached += OnAttachedChanged;

_overlay = new();
}

private void OnAttachedChanged(EntityUid uid)
{
_overlayMan.AddOverlay(_overlay);
}

private void OnDogVisionInit(EntityUid uid, DogVisionComponent component, ComponentInit args)
{
if (_player.LocalPlayer?.ControlledEntity == uid)
_overlayMan.AddOverlay(_overlay);
_overlayMan.AddOverlay(_overlay);
}

private void OnDogVisionShutdown(EntityUid uid, DogVisionComponent component, ComponentShutdown args)
{
if (_player.LocalPlayer?.ControlledEntity == uid)
{
_overlayMan.RemoveOverlay(_overlay);
}
_overlayMan.RemoveOverlay(_overlay);
}
}
1 change: 1 addition & 0 deletions Content.Shared/DeltaV/Abilities/DefaultVisionSystem.cs
Original file line number Diff line number Diff line change
@@ -15,5 +15,6 @@ public override void Initialize()
private void OnDefaultVisionInit(EntityUid uid, DefaultVisionComponent component, ComponentInit args)
{
RemComp<UltraVisionComponent>(uid);
RemComp<DogVisionComponent>(uid);
}
}
7 changes: 7 additions & 0 deletions Resources/Locale/en-US/deltav/traits/traits.ftl
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
trait-scottish-accent-name = Scottish Accent
trait-scottish-accent-desc = Fer tha folk who come frae Hielan clan.

trait-ultravision-name = Ultraviolet Vision
trait-ultravision-desc = Whether through custom bionic eyes, random mutation,
or being a Harpy, you perceive the world with ultraviolet light.

trait-dogvision-name = Deuteranopia
trait-dogvision-desc = Whether through custom bionic eyes, random mutation,
or being a Vulpkanin, you have red–green colour blindness.

trait-defaultvision-name = Normal Vision
trait-defaultvision-desc = You lack any vision variation from the norm for a non-human species.

trait-uncloneable-name = Uncloneable
Original file line number Diff line number Diff line change
@@ -96,6 +96,7 @@
Male: MaleVulpkanin
Female: FemaleVulpkanin
Unsexed: MaleVulpkanin
- type: DogVision

- type: entity
save: false
11 changes: 9 additions & 2 deletions Resources/Prototypes/DeltaV/Traits/altvision.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
- type: trait
id: UltraVision
name: Ultraviolet Vision
name: trait-ultravision-name
description: trait-ultravision-desc
components:
- type: UltraVision

- type: trait
id: DogVision
name: trait-dogvision-name
description: trait-dogvision-desc
components:
- type: DogVision

- type: trait
id: DefaultVision
name: Normal Vision
name: trait-defaultvision-name
description: trait-defaultvision-desc
components:
- type: DefaultVision
5 changes: 0 additions & 5 deletions Resources/Prototypes/Nyanotrasen/Traits/disabilities.yml

This file was deleted.