-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into feature/blood-cult
# Conflicts: # Content.Client/RadialSelector/RadialSelectorMenuBUI.cs # Content.Client/ShortConstruction/UI/ShortConstructionMenuBUI.cs
- Loading branch information
Showing
283 changed files
with
6,482 additions
and
1,121 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
using Content.Shared.Chapel; | ||
|
||
namespace Content.Client.Chapel; | ||
|
||
public sealed class SacrificialAltarSystem : SharedSacrificialAltarSystem; |
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,63 @@ | ||
using Robust.Client.Graphics; | ||
using Robust.Client.Player; | ||
using Robust.Shared.Enums; | ||
using Robust.Shared.Prototypes; | ||
using Content.Shared.Shadowkin; | ||
|
||
namespace Content.Client.Overlays; | ||
|
||
/// <summary> | ||
/// A simple overlay that applies a colored tint to the screen. | ||
/// </summary> | ||
public sealed class ColorTintOverlay : Overlay | ||
{ | ||
[Dependency] private readonly IPrototypeManager _prototype = default!; | ||
[Dependency] private readonly IPlayerManager _player = default!; | ||
[Dependency] IEntityManager _entityManager = default!; | ||
|
||
public override bool RequestScreenTexture => true; | ||
public override OverlaySpace Space => OverlaySpace.WorldSpace; | ||
private readonly ShaderInstance _shader; | ||
|
||
/// <summary> | ||
/// The color to tint the screen to as RGB on a scale of 0-1. | ||
/// </summary> | ||
public Vector3? TintColor = null; | ||
/// <summary> | ||
/// The percent to tint the screen by on a scale of 0-1. | ||
/// </summary> | ||
public float? TintAmount = null; | ||
|
||
public ColorTintOverlay() | ||
{ | ||
IoCManager.InjectDependencies(this); | ||
_shader = _prototype.Index<ShaderPrototype>("ColorTint").InstanceUnique(); | ||
} | ||
|
||
protected override bool BeforeDraw(in OverlayDrawArgs args) | ||
{ | ||
if (_player.LocalEntity is not { Valid: true } player | ||
|| !_entityManager.HasComponent<ShadowkinComponent>(player)) | ||
return false; | ||
|
||
return base.BeforeDraw(in args); | ||
} | ||
protected override void Draw(in OverlayDrawArgs args) | ||
{ | ||
if (ScreenTexture is null) | ||
return; | ||
|
||
_shader.SetParameter("SCREEN_TEXTURE", ScreenTexture); | ||
if (TintColor != null) | ||
_shader.SetParameter("tint_color", (Vector3) TintColor); | ||
if (TintAmount != null) | ||
_shader.SetParameter("tint_amount", (float) TintAmount); | ||
|
||
var worldHandle = args.WorldHandle; | ||
var viewport = args.WorldBounds; | ||
worldHandle.SetTransform(Matrix3.Identity); | ||
worldHandle.UseShader(_shader); | ||
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,48 @@ | ||
using Robust.Client.Graphics; | ||
using Robust.Client.Player; | ||
using Robust.Shared.Enums; | ||
using Robust.Shared.Prototypes; | ||
using Content.Shared.Shadowkin; | ||
|
||
namespace Content.Client.Overlays; | ||
|
||
public sealed class EtherealOverlay : Overlay | ||
{ | ||
[Dependency] private readonly IPrototypeManager _prototype = default!; | ||
[Dependency] private readonly IPlayerManager _player = default!; | ||
[Dependency] IEntityManager _entityManager = default!; | ||
|
||
public override bool RequestScreenTexture => true; | ||
public override OverlaySpace Space => OverlaySpace.WorldSpaceBelowFOV; | ||
private readonly ShaderInstance _shader; | ||
|
||
public EtherealOverlay() | ||
{ | ||
IoCManager.InjectDependencies(this); | ||
_shader = _prototype.Index<ShaderPrototype>("Ethereal").InstanceUnique(); | ||
} | ||
|
||
protected override bool BeforeDraw(in OverlayDrawArgs args) | ||
{ | ||
if (_player.LocalEntity is not { Valid: true } player | ||
|| !_entityManager.HasComponent<EtherealComponent>(player)) | ||
return false; | ||
|
||
return base.BeforeDraw(in args); | ||
} | ||
|
||
protected override void Draw(in OverlayDrawArgs args) | ||
{ | ||
if (ScreenTexture is null) | ||
return; | ||
|
||
_shader.SetParameter("SCREEN_TEXTURE", ScreenTexture); | ||
|
||
var worldHandle = args.WorldHandle; | ||
var viewport = args.WorldBounds; | ||
worldHandle.SetTransform(Matrix3.Identity); | ||
worldHandle.UseShader(_shader); | ||
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
Oops, something went wrong.