Skip to content

Commit

Permalink
Merge branch 'master' into BorgBorgBorg
Browse files Browse the repository at this point in the history
  • Loading branch information
DangerRevolution authored Feb 17, 2024
2 parents e7edd6c + 77c4a5a commit a24d43e
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 24 deletions.
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!;
Expand All @@ -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
Expand Up @@ -15,5 +15,6 @@ public override void Initialize()
private void OnDefaultVisionInit(EntityUid uid, DefaultVisionComponent component, ComponentInit args)
{
RemComp<UltraVisionComponent>(uid);
RemComp<DogVisionComponent>(uid);
}
}
10 changes: 10 additions & 0 deletions Resources/Changelog/DeltaVChangelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1644,3 +1644,13 @@ Entries:
you!
id: 245
time: '2024-02-13T15:55:35.0000000+00:00'
- author: FluffiestFloof
changes:
- type: Add
message: Added Deuteranopia trait.
- type: Tweak
message: >-
Vulpkanin now start with Deuteranopia by default which can be removed
using the Normal Vision trait.
id: 246
time: '2024-02-15T17:27:24.0000000+00:00'
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-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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
Male: MaleVulpkanin
Female: FemaleVulpkanin
Unsexed: MaleVulpkanin
- type: DogVision

- type: entity
save: false
Expand Down
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-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
5 changes: 0 additions & 5 deletions Resources/Prototypes/Nyanotrasen/Traits/disabilities.yml

This file was deleted.

0 comments on commit a24d43e

Please sign in to comment.