mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 13:37:47 +03:00
Vulpkanin's Deuteranopia (#837)
* Everyone loves dog vision Updated to match the the harpy code * change locale name
This commit is contained in:
committed by
GitHub
parent
de0917200f
commit
a98b4ebaaa
@@ -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 sealed partial class DogVisionSystem : EntitySystem
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,5 +15,6 @@ public sealed partial class DefaultVisionSystem : EntitySystem
|
||||
private void OnDefaultVisionInit(EntityUid uid, DefaultVisionComponent component, ComponentInit args)
|
||||
{
|
||||
RemComp<UltraVisionComponent>(uid);
|
||||
RemComp<DogVisionComponent>(uid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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-deuteranopia-name = Deuteranopia
|
||||
trait-deuteranopia-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
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
Male: MaleVulpkanin
|
||||
Female: FemaleVulpkanin
|
||||
Unsexed: MaleVulpkanin
|
||||
- type: DogVision
|
||||
|
||||
- type: entity
|
||||
save: false
|
||||
|
||||
@@ -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-deuteranopia-name
|
||||
description: trait-deuteranopia-desc
|
||||
components:
|
||||
- type: DogVision
|
||||
|
||||
- type: trait
|
||||
id: DefaultVision
|
||||
name: Normal Vision
|
||||
name: trait-defaultvision-name
|
||||
description: trait-defaultvision-desc
|
||||
components:
|
||||
- type: DefaultVision
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
- type: trait
|
||||
id: Colorblindness
|
||||
name: Colorblindness
|
||||
components:
|
||||
- type: DogVision
|
||||
Reference in New Issue
Block a user