* - tweak: Cult door not bump openable. * - tweak: Better summoning and Narsie * - tweak: Construct update. * - tweak: Eldrich blade fits in suit storage. * - tweak: More spell limit. * - fix: Fix pylon desc. * - tweak: Teleport works on cuffed targets. * - tweak: More popups if target is holy. * - fix: No rune drawing using fingers. * - tweak: Better pylon placement & less pylon healing range. * - tweak: More blood rites charge. * - fix: Fix max spell amount. * - tweak: Less cult door and wall health. * - fix: Constructs are dead IC. * - add: Revive rune now notifies player. * - add: Narsie summon rune eui. * - fix: Fix narsie summon sound not playing for reapers. * - tweak: Whatever. * - add: Conceal presence spell. * - tweak: Tweakz. * - add: Blood spear. * - add: Blood boil barrage. * - tweak: Artificer flies. * - tweak: Blood bolt color tweaks. * - tweak: Runic door is bump openable again. * - fix: Fix concealed door outline. * - add: Update concealable name and desc. * - tweak: Remove the unremoveable. * - tweak: Gift ignore. * - add: Organs regenerate on rejuvenate. * - tweak: Brainless cultist is fine. * - add: Added more fun. * - add: Add rune descriptions. * - fix: Fixes. * - tweak: Blood rites now uses verb. * - tweak: Bring it back.
68 lines
2.0 KiB
C#
68 lines
2.0 KiB
C#
using System.Linq;
|
|
using Content.Client.IconSmoothing;
|
|
using Content.Client.Interactable.Components;
|
|
using Content.Shared._White.Cult.Components;
|
|
using Robust.Client.GameObjects;
|
|
|
|
namespace Content.Client._White.Cult.Concealable;
|
|
|
|
public sealed class ConcealableVisualizer : VisualizerSystem<ConcealableComponent>
|
|
{
|
|
[Dependency] private readonly IconSmoothSystem _smooth = default!;
|
|
|
|
protected override void OnAppearanceChange(EntityUid uid, ConcealableComponent component, ref AppearanceChangeEvent args)
|
|
{
|
|
base.OnAppearanceChange(uid, component, ref args);
|
|
|
|
if (args.Sprite == null)
|
|
return;
|
|
|
|
if (!AppearanceSystem.TryGetData<bool>(uid, ConcealableAppearance.Concealed, out var concealed, args.Component))
|
|
return;
|
|
|
|
if (component.IconSmooth)
|
|
_smooth.SetEnabled(uid, concealed);
|
|
|
|
if (component.InteractionOutline)
|
|
{
|
|
if (concealed)
|
|
{
|
|
if (TryComp(uid, out InteractionOutlineComponent? outline))
|
|
{
|
|
outline.OnMouseLeave(uid);
|
|
RemComp<InteractionOutlineComponent>(uid);
|
|
}
|
|
}
|
|
else
|
|
EnsureComp<InteractionOutlineComponent>(uid);
|
|
}
|
|
|
|
if (concealed)
|
|
{
|
|
if (component.ConcealedSprite != null)
|
|
{
|
|
for (var i = 0; i < args.Sprite.AllLayers.Count(); i++)
|
|
{
|
|
args.Sprite.LayerSetRSI(i, component.ConcealedSprite.Value);
|
|
}
|
|
return;
|
|
}
|
|
|
|
args.Sprite.Color = args.Sprite.Color.WithAlpha(0f);
|
|
}
|
|
else
|
|
{
|
|
if (component.RevealedSprite != null)
|
|
{
|
|
for (var i = 0; i < args.Sprite.AllLayers.Count(); i++)
|
|
{
|
|
args.Sprite.LayerSetRSI(i, component.RevealedSprite.Value);
|
|
}
|
|
return;
|
|
}
|
|
|
|
args.Sprite.Color = args.Sprite.Color.WithAlpha(1f);
|
|
}
|
|
}
|
|
}
|