-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into nlr-clarification
- Loading branch information
Showing
669 changed files
with
14,096 additions
and
6,935 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,6 @@ jobs: | |
- name: Check for Merge Conflicts | ||
uses: eps1lon/[email protected] | ||
with: | ||
dirtyLabel: "Status: Merge Conflict" | ||
dirtyLabel: "S: Merge Conflict" | ||
repoToken: "${{ secrets.GITHUB_TOKEN }}" | ||
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: "Labels: Size" | ||
on: pull_request_target | ||
jobs: | ||
size-label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: size-label | ||
uses: "pascalgn/[email protected]" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
with: | ||
# Custom size configuration | ||
# DeltaV: changed to powers of 4 | ||
sizes: > | ||
{ | ||
"0": "XS", | ||
"16": "S", | ||
"64": "M", | ||
"256": "L", | ||
"1024": "XL" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System.Numerics; | ||
using Content.Shared.DeltaV.Pain; | ||
using Robust.Client.Graphics; | ||
using Robust.Client.Player; | ||
using Robust.Shared.Enums; | ||
using Robust.Shared.Prototypes; | ||
|
||
namespace Content.Client.DeltaV.Overlays; | ||
|
||
public sealed partial class PainOverlay : Overlay | ||
{ | ||
[Dependency] private readonly IPrototypeManager _prototype = default!; | ||
[Dependency] private readonly IPlayerManager _player = default!; | ||
[Dependency] private readonly IEntityManager _entity = default!; | ||
|
||
public override bool RequestScreenTexture => true; | ||
public override OverlaySpace Space => OverlaySpace.WorldSpace; | ||
private readonly ShaderInstance _painShader; | ||
private readonly ProtoId<ShaderPrototype> _shaderProto = "ChromaticAberration"; | ||
|
||
public PainOverlay() | ||
{ | ||
IoCManager.InjectDependencies(this); | ||
_painShader = _prototype.Index(_shaderProto).Instance().Duplicate(); | ||
} | ||
|
||
protected override bool BeforeDraw(in OverlayDrawArgs args) | ||
{ | ||
if (_player.LocalEntity is not { Valid: true } player | ||
|| !_entity.HasComponent<PainComponent>(player)) | ||
{ | ||
return false; | ||
} | ||
|
||
return base.BeforeDraw(in args); | ||
} | ||
|
||
protected override void Draw(in OverlayDrawArgs args) | ||
{ | ||
if (ScreenTexture is null) | ||
return; | ||
|
||
_painShader.SetParameter("SCREEN_TEXTURE", ScreenTexture); | ||
|
||
var worldHandle = args.WorldHandle; | ||
var viewport = args.WorldBounds; | ||
worldHandle.SetTransform(Matrix3x2.Identity); | ||
worldHandle.UseShader(_painShader); | ||
worldHandle.DrawRect(viewport, Color.White); | ||
worldHandle.UseShader(null); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
using Content.Shared.DeltaV.Pain; | ||
using Robust.Client.Graphics; | ||
using Robust.Shared.Player; | ||
|
||
namespace Content.Client.DeltaV.Overlays; | ||
|
||
public sealed partial class PainSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly IOverlayManager _overlayMan = default!; | ||
[Dependency] private readonly ISharedPlayerManager _playerMan = default!; | ||
|
||
private PainOverlay _overlay = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<PainComponent, ComponentInit>(OnPainInit); | ||
SubscribeLocalEvent<PainComponent, ComponentShutdown>(OnPainShutdown); | ||
SubscribeLocalEvent<PainComponent, LocalPlayerAttachedEvent>(OnPlayerAttached); | ||
SubscribeLocalEvent<PainComponent, LocalPlayerDetachedEvent>(OnPlayerDetached); | ||
|
||
_overlay = new(); | ||
} | ||
|
||
private void OnPainInit(Entity<PainComponent> ent, ref ComponentInit args) | ||
{ | ||
if (ent.Owner == _playerMan.LocalEntity && !ent.Comp.Suppressed) | ||
_overlayMan.AddOverlay(_overlay); | ||
} | ||
|
||
private void OnPainShutdown(Entity<PainComponent> ent, ref ComponentShutdown args) | ||
{ | ||
if (ent.Owner == _playerMan.LocalEntity) | ||
_overlayMan.RemoveOverlay(_overlay); | ||
} | ||
|
||
private void OnPlayerAttached(Entity<PainComponent> ent, ref LocalPlayerAttachedEvent args) | ||
{ | ||
if (!ent.Comp.Suppressed) | ||
_overlayMan.AddOverlay(_overlay); | ||
} | ||
|
||
private void OnPlayerDetached(Entity<PainComponent> ent, ref LocalPlayerDetachedEvent args) | ||
{ | ||
_overlayMan.RemoveOverlay(_overlay); | ||
} | ||
|
||
public override void Update(float frameTime) | ||
{ | ||
base.Update(frameTime); | ||
|
||
// Handle showing/hiding overlay based on suppression status | ||
if (_playerMan.LocalEntity is not { } player) | ||
return; | ||
|
||
if (!TryComp<PainComponent>(player, out var comp)) | ||
return; | ||
|
||
if (comp.Suppressed && _overlayMan.HasOverlay<PainOverlay>()) | ||
_overlayMan.RemoveOverlay(_overlay); | ||
else if (!comp.Suppressed && !_overlayMan.HasOverlay<PainOverlay>()) | ||
_overlayMan.AddOverlay(_overlay); | ||
} | ||
} |
Oops, something went wrong.