diff --git a/Content.Client/_Goobstation/Heretic/EntitySystems/GhoulSystem.cs b/Content.Client/_Goobstation/Heretic/EntitySystems/GhoulSystem.cs new file mode 100644 index 0000000000000..8395d66a0f57e --- /dev/null +++ b/Content.Client/_Goobstation/Heretic/EntitySystems/GhoulSystem.cs @@ -0,0 +1,46 @@ +using Content.Shared.Examine; +using Content.Shared.Ghost.Roles.Components; +using Content.Shared.Heretic; +using Content.Shared.Humanoid; +using Content.Shared.Interaction.Events; +using Content.Shared.Mobs; +using Content.Shared.Mobs.Components; +using Content.Shared.Nutrition.AnimalHusbandry; +using Content.Shared.Nutrition.Components; +using Content.Shared.Zombies; +using Robust.Client.GameObjects; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Content.Client.Heretic.EntitySystems +{ + public sealed partial class GhoulSystem : Shared.Heretic.EntitySystems.SharedGhoulSystem + { + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnStartup); + + } + + + public void OnStartup(EntityUid uid, GhoulComponent component, ComponentStartup args) { + var ghoulcolor = Color.FromHex("#505050"); + + if (!HasComp(uid)) + { + if (!TryComp(uid, out var sprite)) + return; + + for (var i = 0; i < sprite.AllLayers.Count(); i++) + { + sprite.LayerSetColor(i, ghoulcolor); + } + } + } + } +} diff --git a/Content.Client/_Goobstation/Heretic/HereticCombatMarkSystem.cs b/Content.Client/_Goobstation/Heretic/HereticCombatMarkSystem.cs new file mode 100644 index 0000000000000..5848b9a2b4988 --- /dev/null +++ b/Content.Client/_Goobstation/Heretic/HereticCombatMarkSystem.cs @@ -0,0 +1,61 @@ +using Content.Shared.Heretic; +using Robust.Client.GameObjects; +using Robust.Shared.Utility; + +namespace Content.Client.Heretic; + +public sealed partial class HereticCombatMarkSystem : EntitySystem +{ + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnStartup); + SubscribeLocalEvent(OnShutdown); + } + public override void Update(float frameTime) + { + base.Update(frameTime); + + // i can't think of a better way to do this. everything else has failed + // god i hate client server i hate client server i hate client server i hate + foreach (var mark in EntityQuery()) + { + if (!TryComp(mark.Owner, out var sprite)) + continue; + + if (!sprite.LayerMapTryGet(0, out var layer)) + continue; + + sprite.LayerSetState(layer, mark.Path.ToLower()); + } + } + + private void OnStartup(Entity ent, ref ComponentStartup args) + { + if (!TryComp(ent, out var sprite)) + return; + + if (sprite.LayerMapTryGet(0, out var l)) + { + sprite.LayerSetState(l, ent.Comp.Path.ToLower()); + return; + } + + var rsi = new SpriteSpecifier.Rsi(new ResPath("_Goobstation/Heretic/combat_marks.rsi"), ent.Comp.Path.ToLower()); + var layer = sprite.AddLayer(rsi); + + sprite.LayerMapSet(0, layer); + sprite.LayerSetShader(layer, "unshaded"); + } + private void OnShutdown(Entity ent, ref ComponentShutdown args) + { + if (!TryComp(ent, out var sprite)) + return; + + if (!sprite.LayerMapTryGet(0, out var layer)) + return; + + sprite.RemoveLayer(layer); + } +} diff --git a/Content.Client/_Goobstation/Heretic/HereticRitualRuneBoundUserInterface.cs b/Content.Client/_Goobstation/Heretic/HereticRitualRuneBoundUserInterface.cs new file mode 100644 index 0000000000000..b1a44e1790ba3 --- /dev/null +++ b/Content.Client/_Goobstation/Heretic/HereticRitualRuneBoundUserInterface.cs @@ -0,0 +1,39 @@ +using Content.Client._Goobstation.Heretic.UI; +using Content.Shared._Goobstation.Heretic.Components; +using Content.Shared.Heretic.Prototypes; +using Robust.Client.Graphics; +using Robust.Client.Input; +using Robust.Client.UserInterface; +using Robust.Shared.Prototypes; + +namespace Content.Client._Goobstation.Heretic; + +public sealed class HereticRitualRuneBoundUserInterface : BoundUserInterface +{ + [Dependency] private readonly IClyde _displayManager = default!; + [Dependency] private readonly IInputManager _inputManager = default!; + + private HereticRitualRuneRadialMenu? _hereticRitualMenu; + + public HereticRitualRuneBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) + { + IoCManager.InjectDependencies(this); + } + + protected override void Open() + { + base.Open(); + + _hereticRitualMenu = this.CreateWindow(); + _hereticRitualMenu.SetEntity(Owner); + _hereticRitualMenu.SendHereticRitualRuneMessageAction += SendHereticRitualMessage; + + var vpSize = _displayManager.ScreenSize; + _hereticRitualMenu.OpenCenteredAt(_inputManager.MouseScreenPosition.Position / vpSize); + } + + private void SendHereticRitualMessage(ProtoId protoId) + { + SendMessage(new HereticRitualMessage(protoId)); + } +} diff --git a/Content.Client/_Goobstation/Heretic/Ritual.CustomBehaviors.cs b/Content.Client/_Goobstation/Heretic/Ritual.CustomBehaviors.cs new file mode 100644 index 0000000000000..9730a08affacf --- /dev/null +++ b/Content.Client/_Goobstation/Heretic/Ritual.CustomBehaviors.cs @@ -0,0 +1,67 @@ +using Content.Shared.Heretic.Prototypes; + +namespace Content.Client.Heretic; + +// these do nothing and are there just for yaml limter to shut the fuck up. +// make sure they stay up in sync with the server counterpart. +// regards. +// - john + +public sealed partial class RitualAshAscendBehavior : RitualSacrificeBehavior { } +public sealed partial class RitualMuteGhoulifyBehavior : RitualSacrificeBehavior { } + +[Virtual] public partial class RitualSacrificeBehavior : RitualCustomBehavior +{ + public override bool Execute(RitualData args, out string? outstr) + { + outstr = null; + return true; + } + + public override void Finalize(RitualData args) + { + // do nothing + } +} + +public sealed partial class RitualTemperatureBehavior : RitualCustomBehavior +{ + public override bool Execute(RitualData args, out string? outstr) + { + outstr = null; + return true; + } + + public override void Finalize(RitualData args) + { + // do nothing + } +} + +public sealed partial class RitualReagentPuddleBehavior : RitualCustomBehavior +{ + public override bool Execute(RitualData args, out string? outstr) + { + outstr = null; + return true; + } + + public override void Finalize(RitualData args) + { + // do nothing + } +} + +public sealed partial class RitualKnowledgeBehavior : RitualCustomBehavior +{ + public override bool Execute(RitualData args, out string? outstr) + { + outstr = null; + return true; + } + + public override void Finalize(RitualData args) + { + // do nothing + } +} diff --git a/Content.Client/_Goobstation/Heretic/UI/HellMemoryEui.cs b/Content.Client/_Goobstation/Heretic/UI/HellMemoryEui.cs new file mode 100644 index 0000000000000..bb9de08ac5123 --- /dev/null +++ b/Content.Client/_Goobstation/Heretic/UI/HellMemoryEui.cs @@ -0,0 +1,25 @@ +using Content.Client.Eui; + +namespace Content.Client._Goobstation.Heretic.UI; + +public sealed class HellMemoryEui : BaseEui +{ + private readonly HellMemoryMenu _menu; + + public HellMemoryEui() + { + _menu = new HellMemoryMenu(); + } + + public override void Opened() + { + _menu.OpenCentered(); + } + + public override void Closed() + { + base.Closed(); + + _menu.Close(); + } +} diff --git a/Content.Client/_Goobstation/Heretic/UI/HellMemoryMenu.xaml b/Content.Client/_Goobstation/Heretic/UI/HellMemoryMenu.xaml new file mode 100644 index 0000000000000..48742c08692a1 --- /dev/null +++ b/Content.Client/_Goobstation/Heretic/UI/HellMemoryMenu.xaml @@ -0,0 +1,10 @@ + + +