Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5bb5fb5
Beginning work on mono plates
FFValor Mar 15, 2026
2505b89
More work on mono plates
FFValor Mar 16, 2026
a3d91a2
Finalized porting of monolith plates.
FFValor Mar 21, 2026
3e8b026
small refactor to make plate carriers use container slots instead of …
NotLivyathan Mar 22, 2026
ded47da
Beginning port NVG/IR gog/functions for future use
FFValor Mar 24, 2026
81e0236
More work on IR/NVG system, porting sys from White
FFValor Mar 25, 2026
95d6573
Rename of ported IR/NV system to avoid SL conflict
FFValor Mar 25, 2026
5252854
Finalized porting IR/NV Huds, separate from SL's
FFValor Mar 25, 2026
bbb62cb
Beginning work on porting/added equipment.
FFValor Mar 28, 2026
446b5f5
More work w ported armor, need to fix PowerCell.cs
FFValor Mar 28, 2026
1ba0e94
Trimming ported hardsuit list.
FFValor Apr 5, 2026
d21db12
Readds cut sprites. Undo file changes for e-plates
FFValor Apr 5, 2026
94dbb55
Fixes battery breaking. To-do, fix e-plate examine
FFValor Apr 6, 2026
ac2e8c2
Adds % display of rechargeable e-plates.
FFValor Apr 6, 2026
914187d
tidying up extra RSI, adds merc medic hardsuit.
FFValor Apr 11, 2026
fe08829
Adds various exosuits, work on yml implementations
FFValor Apr 25, 2026
1687f3b
Work on wearable medibot
FFValor Apr 27, 2026
083d6ea
Fixing battery system
FFValor May 1, 2026
0176bda
More work on wearable medibot, pending assistance.
FFValor May 1, 2026
0603606
Adds ToggleableClothingSpeedModifierComponent, etc
FFValor May 3, 2026
a44c0a7
Work on suit abilities
FFValor May 4, 2026
0d645f9
To-do, start from scratch with wearable medibot.
FFValor May 4, 2026
b7fa988
Merge branch 'HardLightSector:master' into FFVEquipmentReworkV2
FFValor May 4, 2026
ac1d5a2
Reverting attempted medibot additions
FFValor May 6, 2026
3e6fa23
Merge branch 'FFVEquipmentReworkV2' of https://github.com/FFValor/FFV…
FFValor May 6, 2026
6f86847
adds more wip built in abilities. Needs .cs work
FFValor May 7, 2026
96b64b1
Work on abilities, pending.cs changes WIP
FFValor May 9, 2026
ac87322
Massive work on abilities, slight edit pending.
FFValor May 13, 2026
3af8af0
Port of SL vis-darkening, todo, finish its ability
FFValor May 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
59 changes: 59 additions & 0 deletions Content.Client/Eye/DarkenedVisionSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using Robust.Client.Graphics;
using Robust.Shared.Player;
using Robust.Client.Player;
using Content.Client.Overlays;
using Content.Shared.Eye;

namespace Content.Client.Eye;

public sealed class DarkenedVisionSystem : SharedDarkenedVisionSystem
{
[Dependency] private readonly IPlayerManager _player = default!;
[Dependency] private readonly IOverlayManager _overlayMan = default!;


private DarkenedVisionOverlay _overlay = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<DarkenedVisionComponent, ComponentStartup>(OnStartup);
SubscribeLocalEvent<DarkenedVisionComponent, ComponentShutdown>(OnShutdown);

SubscribeLocalEvent<DarkenedVisionComponent, LocalPlayerAttachedEvent>(OnAttached);
SubscribeLocalEvent<DarkenedVisionComponent, LocalPlayerDetachedEvent>(OnDetached);

_overlay = new();
}

private void OnAttached(Entity<DarkenedVisionComponent> ent, ref LocalPlayerAttachedEvent args)
{
_overlayMan.AddOverlay(_overlay);
_overlay.DarkenedVision = ent.Comp;
}

private void OnDetached(Entity<DarkenedVisionComponent> ent, ref LocalPlayerDetachedEvent args)
{
_overlayMan.RemoveOverlay(_overlay);
_overlay.DarkenedVision = null;
}

private void OnStartup(Entity<DarkenedVisionComponent> ent, ref ComponentStartup args)
{
if (_player.LocalEntity == ent.Owner)
{
_overlayMan.AddOverlay(_overlay);
_overlay.DarkenedVision = ent.Comp;
}
}

private void OnShutdown(Entity<DarkenedVisionComponent> ent, ref ComponentShutdown args)
{
if (_player.LocalEntity == ent.Owner)
{
_overlayMan.RemoveOverlay(_overlay);
_overlay.DarkenedVision = null;
}
}
}
11 changes: 11 additions & 0 deletions Content.Client/Movement/Systems/EyeCursorOffsetSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Client.Movement.Components;
using Content.Client.Viewport;
using Content.Shared.Camera;
using Content.Shared.Item.ItemToggle.Components;
using Robust.Client.Graphics;
using Robust.Client.Input;
using Robust.Shared.Map;
Expand All @@ -22,6 +23,7 @@ public override void Initialize()
base.Initialize();

SubscribeLocalEvent<EyeCursorOffsetComponent, GetEyeOffsetEvent>(OnGetEyeOffsetEvent);
// SubscribeLocalEvent<EyeCursorOffsetComponent, ItemToggledEvent>(OnToggled);
}

private void OnGetEyeOffsetEvent(EntityUid uid, EyeCursorOffsetComponent component, ref GetEyeOffsetEvent args)
Expand All @@ -33,6 +35,15 @@ private void OnGetEyeOffsetEvent(EntityUid uid, EyeCursorOffsetComponent compone
args.Offset += offset.Value;
}

// private void OnToggled(EntityUid uid, EyeCursorOffsetComponent component, ref ItemToggledEvent args)
// {
// var offset = OffsetAfterMouse(uid, component);
// if (offset == null)
// return;

// args.Offset += offset.Value;
// }

public Vector2? OffsetAfterMouse(EntityUid uid, EyeCursorOffsetComponent? component)
{
// We need the main viewport where the game content is displayed, as certain UI layouts (e.g. Separated HUD) can make it a different size to the game window.
Expand Down
72 changes: 72 additions & 0 deletions Content.Client/Overlays/DarkenedVisionOverlay.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
using Content.Client.Movement.Systems;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Enums;
using Robust.Shared.Prototypes;
using Content.Shared.Eye.Blinding;
using Content.Shared.Eye.Blinding.Components;
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Systems;
using Content.Shared.Eye;

namespace Content.Client.Overlays;

public sealed class DarkenedVisionOverlay : Overlay
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;

public override bool RequestScreenTexture => true;
public override OverlaySpace Space => OverlaySpace.WorldSpace;
private readonly ShaderInstance _circleMaskShader;

public DarkenedVisionComponent? DarkenedVision;


public DarkenedVisionOverlay()
{
IoCManager.InjectDependencies(this);
_circleMaskShader = _prototypeManager.Index<ShaderPrototype>("CircleMask").InstanceUnique();
}
protected override bool BeforeDraw(in OverlayDrawArgs args)
{
if (!_entityManager.TryGetComponent(_playerManager.LocalSession?.AttachedEntity, out EyeComponent? eyeComp))
return false;

if (args.Viewport.Eye != eyeComp.Eye)
return false;

var playerEntity = _playerManager.LocalSession?.AttachedEntity;

if (playerEntity == null)
return false;

return DarkenedVision != null && DarkenedVision.Strength < DarkenedVision.BlindTreshold && DarkenedVision.Strength > 0;
}

protected override void Draw(in OverlayDrawArgs args)
{
if (ScreenTexture == null)
return;

var playerEntity = _playerManager.LocalSession?.AttachedEntity;

if (playerEntity == null)
return;

if (_entityManager.TryGetComponent<EyeComponent>(playerEntity, out var content))
{
_circleMaskShader?.SetParameter("Zoom", content.Zoom.X);
}

_circleMaskShader?.SetParameter("CirclePow", 1f);
_circleMaskShader?.SetParameter("CircleRadius", (10 - DarkenedVision!.Strength) * 32f);

var worldHandle = args.WorldHandle;
var viewport = args.WorldBounds;
worldHandle.UseShader(_circleMaskShader);
worldHandle.DrawRect(viewport, Color.White);
worldHandle.UseShader(null);
}
}
13 changes: 8 additions & 5 deletions Content.Client/Overlays/EquipmentHudSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public override void Initialize()

SubscribeLocalEvent<T, RefreshEquipmentHudEvent<T>>(OnRefreshComponentHud);
SubscribeLocalEvent<T, InventoryRelayedEvent<RefreshEquipmentHudEvent<T>>>(OnRefreshEquipmentHud);
/*
SubscribeLocalEvent<RoundRestartCleanupEvent>(OnRoundRestart); */

SubscribeLocalEvent<RoundRestartCleanupEvent>(OnRoundRestart);
}

private void Update(RefreshEquipmentHudEvent<T> ev)
Expand Down Expand Up @@ -87,14 +87,17 @@ private void OnCompUnequip(Entity<T> ent, ref GotUnequippedEvent args)
RefreshOverlay();
}

/* private void OnRoundRestart(RoundRestartCleanupEvent args)
private void OnRoundRestart(RoundRestartCleanupEvent args)
{
Deactivate();
} */
}

protected virtual void OnRefreshEquipmentHud(Entity<T> ent, ref InventoryRelayedEvent<RefreshEquipmentHudEvent<T>> args)
{
OnRefreshComponentHud(ent, ref args.Args);
// Goob edit start
args.Args.Active = true;
args.Args.Components.Add(ent);
// Goob edit end
}

protected virtual void OnRefreshComponentHud(Entity<T> ent, ref RefreshEquipmentHudEvent<T> args)
Expand Down
48 changes: 48 additions & 0 deletions Content.Client/_White/Overlays/BaseSwitchableOverlay.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using System.Numerics;
using Content.Shared._White.Overlays;
using Robust.Client.Graphics;
using Robust.Shared.Enums;
using Robust.Shared.Prototypes;

namespace Content.Client._White.Overlays;

public sealed class BaseSwitchableOverlay<TComp> : Overlay where TComp : SwitchableVisionOverlayComponent
{
[Dependency] private readonly IPrototypeManager _prototype = default!;

public override bool RequestScreenTexture => true;
public override OverlaySpace Space => OverlaySpace.WorldSpace;

private readonly ShaderInstance _shader;

public TComp? Comp = null;

public bool IsActive = true;

public BaseSwitchableOverlay()
{
IoCManager.InjectDependencies(this);
_shader = _prototype.Index<ShaderPrototype>("NVHud").InstanceUnique();
}

protected override void Draw(in OverlayDrawArgs args)
{
if (ScreenTexture is null || Comp is null || !IsActive)
return;

_shader.SetParameter("SCREEN_TEXTURE", ScreenTexture);
_shader.SetParameter("tint", Comp.Tint);
_shader.SetParameter("luminance_threshold", Comp.Strength);
_shader.SetParameter("noise_amount", Comp.Noise);

var worldHandle = args.WorldHandle;

var accumulator = Math.Clamp(Comp.PulseAccumulator, 0f, Comp.PulseTime);
var alpha = Comp.PulseTime <= 0f ? 1f : float.Lerp(1f, 0f, accumulator / Comp.PulseTime);

worldHandle.SetTransform(Matrix3x2.Identity);
worldHandle.UseShader(_shader);
worldHandle.DrawRect(args.WorldBounds, Comp.Color.WithAlpha(alpha));
worldHandle.UseShader(null);
}
}
Loading
Loading