diff --git a/Content.Client/DeltaV/Options/UI/Tabs/DeltaTab.xaml b/Content.Client/DeltaV/Options/UI/Tabs/DeltaTab.xaml
new file mode 100644
index 00000000000..f1dae68077d
--- /dev/null
+++ b/Content.Client/DeltaV/Options/UI/Tabs/DeltaTab.xaml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Content.Client/DeltaV/Options/UI/Tabs/DeltaTab.xaml.cs b/Content.Client/DeltaV/Options/UI/Tabs/DeltaTab.xaml.cs
new file mode 100644
index 00000000000..892ddfc15bf
--- /dev/null
+++ b/Content.Client/DeltaV/Options/UI/Tabs/DeltaTab.xaml.cs
@@ -0,0 +1,46 @@
+using Content.Shared.DeltaV.CCVars;
+using Robust.Client.AutoGenerated;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.Controls;
+using Robust.Client.UserInterface.XAML;
+using Robust.Shared.Configuration;
+
+namespace Content.Client.DeltaV.Options.UI.Tabs;
+
+[GenerateTypedNameReferences]
+public sealed partial class DeltaTab : Control
+{
+ [Dependency] private readonly IConfigurationManager _cfg = default!;
+
+ public DeltaTab()
+ {
+ RobustXamlLoader.Load(this);
+ IoCManager.InjectDependencies(this);
+
+ DisableFiltersCheckBox.OnToggled += OnCheckBoxToggled;
+ DisableFiltersCheckBox.Pressed = _cfg.GetCVar(DCCVars.NoVisionFilters);
+
+ ApplyButton.OnPressed += OnApplyButtonPressed;
+ UpdateApplyButton();
+ }
+
+ private void OnCheckBoxToggled(BaseButton.ButtonToggledEventArgs args)
+ {
+ UpdateApplyButton();
+ }
+
+ private void OnApplyButtonPressed(BaseButton.ButtonEventArgs args)
+ {
+ _cfg.SetCVar(DCCVars.NoVisionFilters, DisableFiltersCheckBox.Pressed);
+
+ _cfg.SaveToFile();
+ UpdateApplyButton();
+ }
+
+ private void UpdateApplyButton()
+ {
+ var isNoVisionFiltersSame = DisableFiltersCheckBox.Pressed == _cfg.GetCVar(DCCVars.NoVisionFilters);
+
+ ApplyButton.Disabled = isNoVisionFiltersSame;
+ }
+}
diff --git a/Content.Client/DeltaV/Overlays/UltraVisionSystem.cs b/Content.Client/DeltaV/Overlays/UltraVisionSystem.cs
index 00a0f362421..b89ffd15263 100644
--- a/Content.Client/DeltaV/Overlays/UltraVisionSystem.cs
+++ b/Content.Client/DeltaV/Overlays/UltraVisionSystem.cs
@@ -1,11 +1,14 @@
using Content.Shared.Abilities;
+using Content.Shared.DeltaV.CCVars;
using Robust.Client.Graphics;
+using Robust.Shared.Configuration;
namespace Content.Client.DeltaV.Overlays;
public sealed partial class UltraVisionSystem : EntitySystem
{
[Dependency] private readonly IOverlayManager _overlayMan = default!;
+ [Dependency] private readonly IConfigurationManager _cfg = default!;
private UltraVisionOverlay _overlay = default!;
@@ -16,16 +19,27 @@ public override void Initialize()
SubscribeLocalEvent(OnUltraVisionInit);
SubscribeLocalEvent(OnUltraVisionShutdown);
+ Subs.CVar(_cfg, DCCVars.NoVisionFilters, OnNoVisionFiltersChanged);
+
_overlay = new();
}
private void OnUltraVisionInit(EntityUid uid, UltraVisionComponent component, ComponentInit args)
{
- _overlayMan.AddOverlay(_overlay);
+ if (!_cfg.GetCVar(DCCVars.NoVisionFilters))
+ _overlayMan.AddOverlay(_overlay);
}
private void OnUltraVisionShutdown(EntityUid uid, UltraVisionComponent component, ComponentShutdown args)
{
_overlayMan.RemoveOverlay(_overlay);
}
+
+ private void OnNoVisionFiltersChanged(bool enabled)
+ {
+ if (enabled)
+ _overlayMan.RemoveOverlay(_overlay);
+ else
+ _overlayMan.AddOverlay(_overlay);
+ }
}
diff --git a/Content.Client/Nyanotrasen/Overlays/DogVisionSystem.cs b/Content.Client/Nyanotrasen/Overlays/DogVisionSystem.cs
index 38dfd79cf30..2da90e877ed 100644
--- a/Content.Client/Nyanotrasen/Overlays/DogVisionSystem.cs
+++ b/Content.Client/Nyanotrasen/Overlays/DogVisionSystem.cs
@@ -1,11 +1,14 @@
using Content.Shared.Abilities;
+using Content.Shared.DeltaV.CCVars;
using Robust.Client.Graphics;
+using Robust.Shared.Configuration;
namespace Content.Client.Nyanotrasen.Overlays;
public sealed partial class DogVisionSystem : EntitySystem
{
[Dependency] private readonly IOverlayManager _overlayMan = default!;
+ [Dependency] private readonly IConfigurationManager _cfg = default!;
private DogVisionOverlay _overlay = default!;
@@ -16,16 +19,27 @@ public override void Initialize()
SubscribeLocalEvent(OnDogVisionInit);
SubscribeLocalEvent(OnDogVisionShutdown);
+ Subs.CVar(_cfg, DCCVars.NoVisionFilters, OnNoVisionFiltersChanged);
+
_overlay = new();
}
private void OnDogVisionInit(EntityUid uid, DogVisionComponent component, ComponentInit args)
{
- _overlayMan.AddOverlay(_overlay);
+ if (!_cfg.GetCVar(DCCVars.NoVisionFilters))
+ _overlayMan.AddOverlay(_overlay);
}
private void OnDogVisionShutdown(EntityUid uid, DogVisionComponent component, ComponentShutdown args)
{
_overlayMan.RemoveOverlay(_overlay);
}
+
+ private void OnNoVisionFiltersChanged(bool enabled)
+ {
+ if (enabled)
+ _overlayMan.RemoveOverlay(_overlay);
+ else
+ _overlayMan.AddOverlay(_overlay);
+ }
}
diff --git a/Content.Client/Options/UI/OptionsMenu.xaml b/Content.Client/Options/UI/OptionsMenu.xaml
index ab3b88ca4e6..69daaa2cea7 100644
--- a/Content.Client/Options/UI/OptionsMenu.xaml
+++ b/Content.Client/Options/UI/OptionsMenu.xaml
@@ -1,5 +1,6 @@
@@ -8,5 +9,6 @@
+
diff --git a/Content.Client/Options/UI/OptionsMenu.xaml.cs b/Content.Client/Options/UI/OptionsMenu.xaml.cs
index c3a8e664705..bb2c1ce0ed9 100644
--- a/Content.Client/Options/UI/OptionsMenu.xaml.cs
+++ b/Content.Client/Options/UI/OptionsMenu.xaml.cs
@@ -20,6 +20,7 @@ public OptionsMenu()
Tabs.SetTabTitle(2, Loc.GetString("ui-options-tab-controls"));
Tabs.SetTabTitle(3, Loc.GetString("ui-options-tab-audio"));
Tabs.SetTabTitle(4, Loc.GetString("ui-options-tab-network"));
+ Tabs.SetTabTitle(5, Loc.GetString("ui-options-tab-deltav")); // DeltaV specific settings
UpdateTabs();
}
diff --git a/Content.Shared/DeltaV/Abilities/DefaultVisionComponent.cs b/Content.Shared/DeltaV/Abilities/DefaultVisionComponent.cs
deleted file mode 100644
index 0126450e5d4..00000000000
--- a/Content.Shared/DeltaV/Abilities/DefaultVisionComponent.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-using Robust.Shared.GameStates;
-namespace Content.Shared.DeltaV.Abilities;
-
-[RegisterComponent]
-[NetworkedComponent]
-
-public sealed partial class DefaultVisionComponent : Component
-{}
diff --git a/Content.Shared/DeltaV/Abilities/DefaultVisionSystem.cs b/Content.Shared/DeltaV/Abilities/DefaultVisionSystem.cs
deleted file mode 100644
index 7c8fc363540..00000000000
--- a/Content.Shared/DeltaV/Abilities/DefaultVisionSystem.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using Content.Shared.Abilities;
-using Content.Shared.DeltaV.Abilities;
-
-namespace Content.Client.DeltaV.Overlays;
-
-public sealed partial class DefaultVisionSystem : EntitySystem
-{
- public override void Initialize()
- {
- base.Initialize();
-
- SubscribeLocalEvent(OnDefaultVisionInit);
- }
-
- private void OnDefaultVisionInit(EntityUid uid, DefaultVisionComponent component, ComponentInit args)
- {
- RemComp(uid);
- RemComp(uid);
- }
-}
diff --git a/Content.Shared/DeltaV/CCVars/DCCVars.cs b/Content.Shared/DeltaV/CCVars/DCCVars.cs
index 89a14275bef..2028397ffe2 100644
--- a/Content.Shared/DeltaV/CCVars/DCCVars.cs
+++ b/Content.Shared/DeltaV/CCVars/DCCVars.cs
@@ -15,4 +15,10 @@ public sealed class DCCVars
///
public static readonly CVarDef RoundEndPacifist =
CVarDef.Create("game.round_end_pacifist", false, CVar.SERVERONLY);
+
+ ///
+ /// Disables all vision filters for species like Vulpkanin or Harpies. There are good reasons someone might want to disable these.
+ ///
+ public static readonly CVarDef NoVisionFilters =
+ CVarDef.Create("accessibility.no_vision_filters", false, CVar.CLIENTONLY | CVar.ARCHIVE);
}
diff --git a/Resources/Locale/en-US/deltav/escape-menu/options-menu.ftl b/Resources/Locale/en-US/deltav/escape-menu/options-menu.ftl
new file mode 100644
index 00000000000..50d55cb76d0
--- /dev/null
+++ b/Resources/Locale/en-US/deltav/escape-menu/options-menu.ftl
@@ -0,0 +1,4 @@
+ui-options-tab-deltav = DeltaV
+ui-options-general-forknotice = Note: These settings are fork-specific and might not apply on other servers.
+
+ui-options-no-filters = Disable species vision filters
diff --git a/Resources/Locale/en-US/deltav/traits/traits.ftl b/Resources/Locale/en-US/deltav/traits/traits.ftl
index 104c091d02e..e00cec47077 100644
--- a/Resources/Locale/en-US/deltav/traits/traits.ftl
+++ b/Resources/Locale/en-US/deltav/traits/traits.ftl
@@ -9,8 +9,5 @@ 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
trait-uncloneable-desc = Cannot be cloned
diff --git a/Resources/Prototypes/DeltaV/Traits/altvision.yml b/Resources/Prototypes/DeltaV/Traits/altvision.yml
index 7606cbf912b..c361d1b51d8 100644
--- a/Resources/Prototypes/DeltaV/Traits/altvision.yml
+++ b/Resources/Prototypes/DeltaV/Traits/altvision.yml
@@ -11,10 +11,3 @@
description: trait-deuteranopia-desc
components:
- type: DogVision
-
-- type: trait
- id: DefaultVision
- name: trait-defaultvision-name
- description: trait-defaultvision-desc
- components:
- - type: DefaultVision