From bebe4359d2a7c6995f6580b91c1d59a1e0c2d3a2 Mon Sep 17 00:00:00 2001 From: FoxxoTrystan <45297731+FoxxoTrystan@users.noreply.github.com> Date: Tue, 13 Aug 2024 19:23:55 +0200 Subject: [PATCH 01/11] Revert "Early-Merge Psionic Refactor Changes" --- Content.Server/Cloning/CloningSystem.cs | 13 ----- .../StationEvents/Events/MassMindSwapRule.cs | 10 ++-- .../StationEvents/Events/NoosphericFryRule.cs | 2 +- .../Psionics/Abilities/DispelPowerSystem.cs | 32 ++++++------- .../Abilities/MetapsionicPowerSystem.cs | 36 +++++++------- .../Psionics/Abilities/MindSwapPowerSystem.cs | 32 ++++++------- .../Abilities/NoosphericZapPowerSystem.cs | 28 +++++------ .../Abilities/PsionicAbilitiesSystem.cs | 6 +-- .../PsionicRegenerationPowerSystem.cs | 24 +++++----- .../Abilities/PyrokinesisPowerSystem.cs | 30 +++++++----- .../RegenerativeStasisPowerSystem.cs | 20 ++++---- .../Abilities/TelegnosisPowerSystem.cs | 19 ++++---- .../Psionics/Glimmer/GlimmerReactiveSystem.cs | 8 ++-- .../Structures/GlimmerSourceComponent.cs | 28 ++--------- .../Structures/GlimmerStructuresSystem.cs | 47 ++----------------- .../PsionicInvisibilityPowerSystem.cs | 27 +++++------ .../Psionics/PsionicInsulationComponent.cs | 3 -- .../Psionics/SharedPsionicAbilitiesSystem.cs | 30 ------------ .../nyanotrasen/psionics/psychic-feedback.ftl | 3 -- Resources/Locale/en-US/traits/traits.ftl | 8 ++-- .../Entities/Mobs/NPCs/glimmer_creatures.yml | 1 - .../Entities/Mobs/NPCs/regalrat.yml | 1 + .../Prototypes/Entities/Mobs/NPCs/xeno.yml | 2 + .../Entities/Mobs/Player/skeleton.yml | 1 + .../Entities/Mobs/Species/human.yml | 1 + .../Entities/Clothing/Head/hats.yml | 2 - .../Structures/Research/glimmer_prober.yml | 1 - Resources/Prototypes/Traits/psionics.yml | 1 - 28 files changed, 152 insertions(+), 264 deletions(-) diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index 00ffd27703e..92e658591a0 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -24,7 +24,6 @@ using Content.Shared.Mind.Components; using Content.Shared.Mobs.Systems; using Content.Shared.Roles.Jobs; -using Content.Shared.Psionics.Abilities; using Robust.Server.Containers; using Robust.Server.GameObjects; using Robust.Server.Player; @@ -202,18 +201,6 @@ public bool TryCloning(EntityUid uid, EntityUid bodyToClone, Entity(bodyToClone, out var insul)) - { - if (clonePod.ConnectedConsole != null) - { - _chatSystem.TrySendInGameICMessage(clonePod.ConnectedConsole.Value, - Loc.GetString("cloning-console-insulation-error"), - InGameICChatType.Speak, false); - } - - return false; - } - // Check if they have the uncloneable trait if (TryComp(bodyToClone, out _)) { diff --git a/Content.Server/Nyanotrasen/StationEvents/Events/MassMindSwapRule.cs b/Content.Server/Nyanotrasen/StationEvents/Events/MassMindSwapRule.cs index 3be2eed6387..89f3bc97501 100644 --- a/Content.Server/Nyanotrasen/StationEvents/Events/MassMindSwapRule.cs +++ b/Content.Server/Nyanotrasen/StationEvents/Events/MassMindSwapRule.cs @@ -66,11 +66,11 @@ protected override void Started(EntityUid uid, MassMindSwapRuleComponent compone // Do the swap. _mindSwap.Swap(actor, other); - //if (!component.IsTemporary) - //{ - // _mindSwap.GetTrapped(actor); - // _mindSwap.GetTrapped(other); - //} + if (!component.IsTemporary) + { + _mindSwap.GetTrapped(actor); + _mindSwap.GetTrapped(other); + } } while (true); } } diff --git a/Content.Server/Nyanotrasen/StationEvents/Events/NoosphericFryRule.cs b/Content.Server/Nyanotrasen/StationEvents/Events/NoosphericFryRule.cs index d7880af9032..cf7b8e6cc9c 100644 --- a/Content.Server/Nyanotrasen/StationEvents/Events/NoosphericFryRule.cs +++ b/Content.Server/Nyanotrasen/StationEvents/Events/NoosphericFryRule.cs @@ -103,7 +103,7 @@ protected override void Started(EntityUid uid, NoosphericFryRuleComponent compon while (queryReactive.MoveNext(out var reactive, out _, out var xform, out var physics)) { // shoot out three bolts of lighting... - //_glimmerReactiveSystem.BeamRandomNearProber(reactive, 3, 12); + _glimmerReactiveSystem.BeamRandomNearProber(reactive, 3, 12); // try to anchor if we can if (!xform.Anchored) diff --git a/Content.Server/Psionics/Abilities/DispelPowerSystem.cs b/Content.Server/Psionics/Abilities/DispelPowerSystem.cs index 3d7d5c20c7c..73c6f5d339c 100644 --- a/Content.Server/Psionics/Abilities/DispelPowerSystem.cs +++ b/Content.Server/Psionics/Abilities/DispelPowerSystem.cs @@ -32,7 +32,7 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(OnInit); SubscribeLocalEvent(OnShutdown); - SubscribeLocalEvent(OnPowerUsed); + SubscribeLocalEvent(OnPowerUsed); SubscribeLocalEvent(OnDispelled); SubscribeLocalEvent(OnDmgDispelled); @@ -44,17 +44,18 @@ public override void Initialize() private void OnInit(EntityUid uid, DispelPowerComponent component, ComponentInit args) { - EnsureComp(uid, out var psionic); - _actions.AddAction(uid, ref component.DispelActionEntity, component.DispelActionId); - _actions.TryGetActionData(component.DispelActionEntity, out var actionData); + _actions.AddAction(uid, ref component.DispelActionEntity, component.DispelActionId ); + _actions.TryGetActionData( component.DispelActionEntity, out var actionData ); if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.DispelActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); - - psionic.ActivePowers.Add(component); - psionic.PsychicFeedback.Add(component.DispelFeedback); - //It's fully intended that Dispel doesn't increase Amplification, and instead heavily spikes Dampening - //Antimage archetype. - psionic.Dampening += 1f; + _actions.StartUseDelay(component.DispelActionEntity); + if (TryComp(uid, out var psionic)) + { + psionic.ActivePowers.Add(component); + psionic.PsychicFeedback.Add(component.DispelFeedback); + //It's fully intended that Dispel doesn't increase Amplification, and instead heavily spikes Dampening + //Antimage archetype. + psionic.Dampening += 1f; + } } private void OnShutdown(EntityUid uid, DispelPowerComponent component, ComponentShutdown args) @@ -69,9 +70,11 @@ private void OnShutdown(EntityUid uid, DispelPowerComponent component, Component } } - private void OnPowerUsed(EntityUid uid, DispelPowerComponent component, DispelPowerActionEvent args) + private void OnPowerUsed(DispelPowerActionEvent args) { - if (!_psionics.CheckCanTargetCast(uid, args.Target, out var psionic)) + if (HasComp(args.Target) || HasComp(args.Performer)) + return; + if (!TryComp(args.Performer, out var psionic) || !HasComp(args.Target)) return; var ev = new DispelledEvent(); @@ -79,9 +82,6 @@ private void OnPowerUsed(EntityUid uid, DispelPowerComponent component, DispelPo if (ev.Handled) { - _actions.TryGetActionData(component.DispelActionEntity, out var actionData); - if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.DispelActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); args.Handled = true; _psionics.LogPowerUsed(args.Performer, "dispel", psionic, 1, 1, true); diff --git a/Content.Server/Psionics/Abilities/MetapsionicPowerSystem.cs b/Content.Server/Psionics/Abilities/MetapsionicPowerSystem.cs index a1b40b92320..8c72a02737b 100644 --- a/Content.Server/Psionics/Abilities/MetapsionicPowerSystem.cs +++ b/Content.Server/Psionics/Abilities/MetapsionicPowerSystem.cs @@ -33,30 +33,32 @@ public override void Initialize() private void OnInit(EntityUid uid, MetapsionicPowerComponent component, ComponentInit args) { - EnsureComp(uid, out var psionic); if (!TryComp(uid, out ActionsComponent? comp)) return; _actions.AddAction(uid, ref component.ActionWideMetapsionicEntity, component.ActionWideMetapsionic, component: comp); _actions.AddAction(uid, ref component.ActionFocusedMetapsionicEntity, component.ActionFocusedMetapsionic, component: comp); - UpdateActions(uid, component, psionic); + _actions.TryGetActionData(component.ActionWideMetapsionicEntity, out var actionData); + if (actionData is { UseDelay: not null }) + { + _actions.StartUseDelay(component.ActionWideMetapsionicEntity); + _actions.StartUseDelay(component.ActionFocusedMetapsionicEntity); + } + if (TryComp(uid, out var psionic)) + { + psionic.ActivePowers.Add(component); + psionic.PsychicFeedback.Add(component.MetapsionicFeedback); + psionic.Amplification += 0.1f; + psionic.Dampening += 0.5f; + } - psionic.ActivePowers.Add(component); - psionic.PsychicFeedback.Add(component.MetapsionicFeedback); - psionic.Amplification += 0.1f; - psionic.Dampening += 0.5f; } - private void UpdateActions(EntityUid uid, MetapsionicPowerComponent? component = null, PsionicComponent? psionic = null) + private void UpdateActions(EntityUid uid, MetapsionicPowerComponent? component = null) { - if (!Resolve(uid, ref component) || !Resolve(uid, ref psionic) - || !_actions.TryGetActionData(component.ActionWideMetapsionicEntity, out var actionData)) + if (!Resolve(uid, ref component)) return; - - if (actionData is { UseDelay: not null }) - { - _actions.SetCooldown(component.ActionWideMetapsionicEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); - _actions.SetCooldown(component.ActionFocusedMetapsionicEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); - } + _actions.StartUseDelay(component.ActionWideMetapsionicEntity); + _actions.StartUseDelay(component.ActionFocusedMetapsionicEntity); } private void OnShutdown(EntityUid uid, MetapsionicPowerComponent component, ComponentShutdown args) @@ -93,7 +95,7 @@ private void OnWidePowerUsed(EntityUid uid, MetapsionicPowerComponent component, } _popups.PopupEntity(Loc.GetString("metapsionic-pulse-failure"), uid, uid, PopupType.Large); _psionics.LogPowerUsed(uid, "metapsionic pulse", psionic, 2, 4); - UpdateActions(uid, component, psionic); + UpdateActions(uid, component); args.Handled = true; } @@ -126,7 +128,7 @@ private void OnFocusedPowerUsed(FocusedMetapsionicPowerActionEvent args) _psionics.LogPowerUsed(args.Performer, "focused metapsionic pulse", psionic, 3, 6); args.Handled = true; - UpdateActions(args.Performer, component, psionic); + UpdateActions(args.Performer, component); } private void OnDoAfter(EntityUid uid, MetapsionicPowerComponent component, FocusedMetapsionicDoAfterEvent args) diff --git a/Content.Server/Psionics/Abilities/MindSwapPowerSystem.cs b/Content.Server/Psionics/Abilities/MindSwapPowerSystem.cs index b4129581ec1..25f0434c797 100644 --- a/Content.Server/Psionics/Abilities/MindSwapPowerSystem.cs +++ b/Content.Server/Psionics/Abilities/MindSwapPowerSystem.cs @@ -29,7 +29,7 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(OnInit); SubscribeLocalEvent(OnShutdown); - SubscribeLocalEvent(OnPowerUsed); + SubscribeLocalEvent(OnPowerUsed); SubscribeLocalEvent(OnPowerReturned); SubscribeLocalEvent(OnDispelled); SubscribeLocalEvent(OnMobStateChanged); @@ -41,15 +41,16 @@ public override void Initialize() private void OnInit(EntityUid uid, MindSwapPowerComponent component, ComponentInit args) { - EnsureComp(uid, out var psionic); _actions.AddAction(uid, ref component.MindSwapActionEntity, component.MindSwapActionId); - _actions.TryGetActionData(component.MindSwapActionEntity, out var actionData); + _actions.TryGetActionData( component.MindSwapActionEntity, out var actionData); if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.MindSwapActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); - - psionic.ActivePowers.Add(component); - psionic.PsychicFeedback.Add(component.MindSwapFeedback); - psionic.Amplification += 1f; + _actions.StartUseDelay(component.MindSwapActionEntity); + if (TryComp(uid, out var psionic)) + { + psionic.ActivePowers.Add(component); + psionic.PsychicFeedback.Add(component.MindSwapFeedback); + psionic.Amplification += 1f; + } } private void OnShutdown(EntityUid uid, MindSwapPowerComponent component, ComponentShutdown args) @@ -63,16 +64,17 @@ private void OnShutdown(EntityUid uid, MindSwapPowerComponent component, Compone } } - private void OnPowerUsed(EntityUid uid, MindSwapPowerComponent component, MindSwapPowerActionEvent args) + private void OnPowerUsed(MindSwapPowerActionEvent args) { - if (!(TryComp(args.Target, out var damageable) && damageable.DamageContainerID == "Biological") - || !_psionics.CheckCanTargetCast(uid, args.Target, out var psionic)) + if (!(TryComp(args.Target, out var damageable) && damageable.DamageContainerID == "Biological")) return; - _actions.TryGetActionData(component.MindSwapActionEntity, out var actionData); - if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.MindSwapActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); + if (HasComp(args.Target)) + return; + + if (!TryComp(args.Performer, out var psionic)) + return; Swap(args.Performer, args.Target); @@ -157,8 +159,6 @@ private void OnSwapInit(EntityUid uid, MindSwappedComponent component, Component { psionic.ActivePowers.Add(component); psionic.PsychicFeedback.Add(component.MindSwappedFeedback); - if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.MindSwapReturnActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); } } diff --git a/Content.Server/Psionics/Abilities/NoosphericZapPowerSystem.cs b/Content.Server/Psionics/Abilities/NoosphericZapPowerSystem.cs index a1776acbd3c..ffadc61c199 100644 --- a/Content.Server/Psionics/Abilities/NoosphericZapPowerSystem.cs +++ b/Content.Server/Psionics/Abilities/NoosphericZapPowerSystem.cs @@ -23,20 +23,21 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(OnInit); SubscribeLocalEvent(OnShutdown); - SubscribeLocalEvent(OnPowerUsed); + SubscribeLocalEvent(OnPowerUsed); } private void OnInit(EntityUid uid, NoosphericZapPowerComponent component, ComponentInit args) { - EnsureComp(uid, out var psionic); _actions.AddAction(uid, ref component.NoosphericZapActionEntity, component.NoosphericZapActionId ); - _actions.TryGetActionData(component.NoosphericZapActionEntity, out var actionData); + _actions.TryGetActionData( component.NoosphericZapActionEntity, out var actionData ); if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.NoosphericZapActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); - - psionic.ActivePowers.Add(component); - psionic.PsychicFeedback.Add(component.NoosphericZapFeedback); - psionic.Amplification += 1f; + _actions.StartUseDelay(component.NoosphericZapActionEntity); + if (TryComp(uid, out var psionic)) + { + psionic.ActivePowers.Add(component); + psionic.PsychicFeedback.Add(component.NoosphericZapFeedback); + psionic.Amplification += 1f; + } } private void OnShutdown(EntityUid uid, NoosphericZapPowerComponent component, ComponentShutdown args) @@ -50,14 +51,13 @@ private void OnShutdown(EntityUid uid, NoosphericZapPowerComponent component, Co } } - private void OnPowerUsed(EntityUid uid, NoosphericZapPowerComponent component, NoosphericZapPowerActionEvent args) + private void OnPowerUsed(NoosphericZapPowerActionEvent args) { - if (_psionics.CheckCanTargetCast(uid, args.Target, out var psionic)) - { + if (!TryComp(args.Performer, out var psionic)) + return; - _actions.TryGetActionData(component.NoosphericZapActionEntity, out var actionData); - if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.NoosphericZapActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); + if (!HasComp(args.Performer)) + { _beam.TryCreateBeam(args.Performer, args.Target, "LightningNoospheric"); _stunSystem.TryParalyze(args.Target, TimeSpan.FromSeconds(1 * psionic.Amplification), false); diff --git a/Content.Server/Psionics/Abilities/PsionicAbilitiesSystem.cs b/Content.Server/Psionics/Abilities/PsionicAbilitiesSystem.cs index d65186309d3..24e6bbb8d3b 100644 --- a/Content.Server/Psionics/Abilities/PsionicAbilitiesSystem.cs +++ b/Content.Server/Psionics/Abilities/PsionicAbilitiesSystem.cs @@ -7,7 +7,6 @@ using Robust.Shared.Random; using Robust.Shared.Prototypes; using Content.Shared.Popups; -using Robust.Shared.Serialization.Manager; namespace Content.Server.Psionics.Abilities { @@ -20,7 +19,6 @@ public sealed class PsionicAbilitiesSystem : EntitySystem [Dependency] private readonly GlimmerSystem _glimmerSystem = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly SharedPopupSystem _popups = default!; - [Dependency] private readonly ISerializationManager _serialization = default!; public override void Initialize() { @@ -52,7 +50,7 @@ public void AddRandomPsionicPower(EntityUid uid) return; } - var newPool = _serialization.CreateCopy(pool, null, false, true); + var newPool = pool; foreach (var component in pool.Weights.Keys) { var checkedComponent = _componentFactory.GetComponent(component); @@ -75,8 +73,6 @@ public void RemovePsionics(EntityUid uid) if (RemComp(uid)) { _popups.PopupEntity(Loc.GetString("mindbreaking-feedback", ("entity", uid)), uid, PopupType.Medium); - EnsureComp(uid, out var insul); - insul.MindBroken = true; } if (!TryComp(uid, out var psionic)) diff --git a/Content.Server/Psionics/Abilities/PsionicRegenerationPowerSystem.cs b/Content.Server/Psionics/Abilities/PsionicRegenerationPowerSystem.cs index f675cc6ed89..15fc092ebcf 100644 --- a/Content.Server/Psionics/Abilities/PsionicRegenerationPowerSystem.cs +++ b/Content.Server/Psionics/Abilities/PsionicRegenerationPowerSystem.cs @@ -39,16 +39,17 @@ public override void Initialize() private void OnInit(EntityUid uid, PsionicRegenerationPowerComponent component, ComponentInit args) { - EnsureComp(uid, out var psionic); - _actions.AddAction(uid, ref component.PsionicRegenerationActionEntity, component.PsionicRegenerationActionId); - _actions.TryGetActionData(component.PsionicRegenerationActionEntity, out var actionData); + _actions.AddAction(uid, ref component.PsionicRegenerationActionEntity, component.PsionicRegenerationActionId ); + _actions.TryGetActionData( component.PsionicRegenerationActionEntity, out var actionData ); if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.PsionicRegenerationActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); - - psionic.ActivePowers.Add(component); - psionic.PsychicFeedback.Add(component.RegenerationFeedback); - psionic.Amplification += 0.5f; - psionic.Dampening += 0.5f; + _actions.StartUseDelay(component.PsionicRegenerationActionEntity); + if (TryComp(uid, out var psionic)) + { + psionic.ActivePowers.Add(component); + psionic.PsychicFeedback.Add(component.RegenerationFeedback); + psionic.Amplification += 0.5f; + psionic.Dampening += 0.5f; + } } private void OnPowerUsed(EntityUid uid, PsionicRegenerationPowerComponent component, PsionicRegenerationPowerActionEvent args) @@ -65,9 +66,6 @@ private void OnPowerUsed(EntityUid uid, PsionicRegenerationPowerComponent compon if (actionData != null && actionData.Cooldown.HasValue && actionData.Cooldown.Value.End > curTime) return; - if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.PsionicRegenerationActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); - _doAfterSystem.TryStartDoAfter(doAfterArgs, out var doAfterId); component.DoAfter = doAfterId; @@ -118,7 +116,7 @@ private void OnMobStateChangedEvent(EntityUid uid, PsionicRegenerationPowerCompo _psionics.LogPowerUsed(uid, "psionic regeneration", psionic, 10, 20); - _actions.SetCooldown(component.PsionicRegenerationActionEntity, 2 * (actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification))); + _actions.StartUseDelay(component.PsionicRegenerationActionEntity); } } } diff --git a/Content.Server/Psionics/Abilities/PyrokinesisPowerSystem.cs b/Content.Server/Psionics/Abilities/PyrokinesisPowerSystem.cs index 62e0c3ce56c..f3e2cc69fd5 100644 --- a/Content.Server/Psionics/Abilities/PyrokinesisPowerSystem.cs +++ b/Content.Server/Psionics/Abilities/PyrokinesisPowerSystem.cs @@ -4,9 +4,10 @@ using Content.Shared.Psionics.Glimmer; using Content.Server.Atmos.Components; using Content.Server.Weapons.Ranged.Systems; +using Robust.Server.GameObjects; using Content.Shared.Actions.Events; using Content.Server.Explosion.Components; -using Robust.Shared.Audio.Systems; +using Robust.Server.Audio; using Robust.Shared.Timing; using Content.Shared.Popups; using Content.Shared.Psionics.Events; @@ -16,13 +17,13 @@ namespace Content.Server.Psionics.Abilities { public sealed class PyrokinesisPowerSystem : EntitySystem { - [Dependency] private readonly SharedTransformSystem _xform = default!; + [Dependency] private readonly TransformSystem _xform = default!; [Dependency] private readonly SharedActionsSystem _actions = default!; [Dependency] private readonly SharedPsionicAbilitiesSystem _psionics = default!; [Dependency] private readonly GunSystem _gunSystem = default!; [Dependency] private readonly GlimmerSystem _glimmerSystem = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; - [Dependency] private readonly SharedAudioSystem _audioSystem = default!; + [Dependency] private readonly AudioSystem _audioSystem = default!; [Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; public override void Initialize() @@ -37,26 +38,28 @@ public override void Initialize() private void OnInit(EntityUid uid, PyrokinesisPowerComponent component, ComponentInit args) { - EnsureComp(uid, out var psionic); _actions.AddAction(uid, ref component.PyrokinesisPrechargeActionEntity, component.PyrokinesisPrechargeActionId); _actions.TryGetActionData(component.PyrokinesisPrechargeActionEntity, out var actionData); if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.PyrokinesisPrechargeActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); - - psionic.ActivePowers.Add(component); - psionic.PsychicFeedback.Add(component.PyrokinesisFeedback); - psionic.Amplification += 1f; + _actions.StartUseDelay(component.PyrokinesisPrechargeActionEntity); + if (TryComp(uid, out var psionic)) + { + psionic.ActivePowers.Add(component); + psionic.PsychicFeedback.Add(component.PyrokinesisFeedback); + psionic.Amplification += 1f; + } } private void OnPrecharge(PyrokinesisPrechargeActionEvent args) { - if (_psionics.CheckCanSelfCast(args.Performer, out var psionic) + if (!HasComp(args.Performer) + && TryComp(args.Performer, out var psionic) && TryComp(args.Performer, out var pyroComp)) { _actions.AddAction(args.Performer, ref pyroComp.PyrokinesisActionEntity, pyroComp.PyrokinesisActionId); _actions.TryGetActionData(pyroComp.PyrokinesisActionEntity, out var actionData); if (actionData is { UseDelay: not null }) - _actions.SetCooldown(pyroComp.PyrokinesisActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); + _actions.StartUseDelay(pyroComp.PyrokinesisActionEntity); _actions.TryGetActionData(pyroComp.PyrokinesisPrechargeActionEntity, out var prechargeData); if (prechargeData is { UseDelay: not null }) _actions.StartUseDelay(pyroComp.PyrokinesisPrechargeActionEntity); @@ -97,14 +100,15 @@ private void OnShutdown(EntityUid uid, PyrokinesisPowerComponent component, Comp private void OnPowerUsed(PyrokinesisPowerActionEvent args) { - if (_psionics.CheckCanSelfCast(args.Performer, out var psionic) + if (!HasComp(args.Performer) + && TryComp(args.Performer, out var psionic) && TryComp(args.Performer, out var pyroComp)) { var spawnCoords = Transform(args.Performer).Coordinates; var ent = Spawn("ProjectileAnomalyFireball", spawnCoords); - if (_glimmerSystem.GlimmerOutput <= 25 * psionic.Dampening) + if (_glimmerSystem.GlimmerOutput >= 25 * psionic.Dampening) EnsureComp(ent); if (TryComp(ent, out var fireball)) diff --git a/Content.Server/Psionics/Abilities/RegenerativeStasisPowerSystem.cs b/Content.Server/Psionics/Abilities/RegenerativeStasisPowerSystem.cs index 87ec5adbce8..cc67badbe72 100644 --- a/Content.Server/Psionics/Abilities/RegenerativeStasisPowerSystem.cs +++ b/Content.Server/Psionics/Abilities/RegenerativeStasisPowerSystem.cs @@ -26,16 +26,17 @@ public override void Initialize() private void OnInit(EntityUid uid, RegenerativeStasisPowerComponent component, ComponentInit args) { - EnsureComp(uid, out var psionic); _actions.AddAction(uid, ref component.RegenerativeStasisActionEntity, component.RegenerativeStasisActionId); _actions.TryGetActionData(component.RegenerativeStasisActionEntity, out var actionData); if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.RegenerativeStasisActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); - - psionic.ActivePowers.Add(component); - psionic.PsychicFeedback.Add(component.RegenerativeStasisFeedback); - psionic.Amplification += 0.5f; - psionic.Dampening += 0.5f; + _actions.StartUseDelay(component.RegenerativeStasisActionEntity); + if (TryComp(uid, out var psionic)) + { + psionic.ActivePowers.Add(component); + psionic.PsychicFeedback.Add(component.RegenerativeStasisFeedback); + psionic.Amplification += 0.5f; + psionic.Dampening += 0.5f; + } } private void OnShutdown(EntityUid uid, RegenerativeStasisPowerComponent component, ComponentShutdown args) @@ -62,11 +63,8 @@ private void OnPowerUsed(EntityUid uid, RegenerativeStasisPowerComponent compone solution.AddReagent("Epinephrine", FixedPoint2.New(MathF.Min(2.5f * psionic.Dampening + psionic.Amplification, 15f))); solution.AddReagent("Nocturine", 10f + (1 * psionic.Amplification + psionic.Dampening)); _bloodstreamSystem.TryAddToChemicals(args.Target, solution, stream); - _popupSystem.PopupEntity(Loc.GetString("regenerative-stasis-begin", ("entity", args.Target)), args.Target, PopupType.Medium); + _popupSystem.PopupEntity(Loc.GetString("regenerative-stasis-begin", ("entity", uid)), uid, PopupType.Medium); _psionics.LogPowerUsed(uid, "regenerative stasis", psionic, 4, 6); - _actions.TryGetActionData(component.RegenerativeStasisActionEntity, out var actionData); - if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.RegenerativeStasisActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); args.Handled = true; } } diff --git a/Content.Server/Psionics/Abilities/TelegnosisPowerSystem.cs b/Content.Server/Psionics/Abilities/TelegnosisPowerSystem.cs index 95b7995e673..c5f8471a654 100644 --- a/Content.Server/Psionics/Abilities/TelegnosisPowerSystem.cs +++ b/Content.Server/Psionics/Abilities/TelegnosisPowerSystem.cs @@ -27,16 +27,17 @@ public override void Initialize() private void OnInit(EntityUid uid, TelegnosisPowerComponent component, ComponentInit args) { - EnsureComp(uid, out var psionic); _actions.AddAction(uid, ref component.TelegnosisActionEntity, component.TelegnosisActionId ); _actions.TryGetActionData( component.TelegnosisActionEntity, out var actionData ); if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.TelegnosisActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); - - psionic.ActivePowers.Add(component); - psionic.PsychicFeedback.Add(component.TelegnosisFeedback); - psionic.Amplification += 0.3f; - psionic.Dampening += 0.3f; + _actions.StartUseDelay(component.TelegnosisActionEntity); + if (TryComp(uid, out var psionic)) + { + psionic.ActivePowers.Add(component); + psionic.PsychicFeedback.Add(component.TelegnosisFeedback); + psionic.Amplification += 0.3f; + psionic.Dampening += 0.3f; + } } private void OnShutdown(EntityUid uid, TelegnosisPowerComponent component, ComponentShutdown args) @@ -66,10 +67,6 @@ private void OnPowerUsed(EntityUid uid, TelegnosisPowerComponent component, Tele component.ProjectionUid = projection; _mindSwap.Swap(uid, projection); - _actions.TryGetActionData( component.TelegnosisActionEntity, out var actionData ); - if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.TelegnosisActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); - if (EnsureComp(projection, out var projectionComponent)) projectionComponent.OriginalEntity = uid; diff --git a/Content.Server/Psionics/Glimmer/GlimmerReactiveSystem.cs b/Content.Server/Psionics/Glimmer/GlimmerReactiveSystem.cs index 584b1a61e2c..85034574885 100644 --- a/Content.Server/Psionics/Glimmer/GlimmerReactiveSystem.cs +++ b/Content.Server/Psionics/Glimmer/GlimmerReactiveSystem.cs @@ -374,10 +374,10 @@ public override void Update(float frameTime) _ghostSystem.MakeVisible(true); _revenantSystem.MakeVisible(true); GhostsVisible = true; - //foreach (var reactive in reactives) - //{ - // BeamRandomNearProber(reactive.Owner, 1, 12); - //} + foreach (var reactive in reactives) + { + BeamRandomNearProber(reactive.Owner, 1, 12); + } } else if (GhostsVisible == true) { _ghostSystem.MakeVisible(false); diff --git a/Content.Server/Psionics/Glimmer/Structures/GlimmerSourceComponent.cs b/Content.Server/Psionics/Glimmer/Structures/GlimmerSourceComponent.cs index 34cdba29bb2..5babb6c446d 100644 --- a/Content.Server/Psionics/Glimmer/Structures/GlimmerSourceComponent.cs +++ b/Content.Server/Psionics/Glimmer/Structures/GlimmerSourceComponent.cs @@ -6,42 +6,22 @@ namespace Content.Server.Psionics.Glimmer /// public sealed partial class GlimmerSourceComponent : Component { - [DataField] + [DataField("accumulator")] public float Accumulator = 0f; - [DataField] + [DataField("active")] public bool Active = true; /// /// Since glimmer is an int, we'll do it like this. /// - [DataField] + [DataField("secondsPerGlimmer")] public float SecondsPerGlimmer = 10f; /// /// True if it produces glimmer, false if it subtracts it. /// - [DataField] + [DataField("addToGlimmer")] public bool AddToGlimmer = true; - - /// - /// If not null, this entity generates this value as a baseline number of research points per second, eg: Probers. - /// Actual glimmer research sources will scale with GlimmerEquilibriumRatio - /// - [DataField] - public int? ResearchPointGeneration = null; - - /// - /// Controls whether this entity requires electrical power to generate research points. - /// - [DataField] - public bool RequiresPower = true; - - /// - /// Above GlimmerEquilibrium, glimmer generation is increased exponentially, but has an offset to prevent things from spiralling out of control. - /// Increasing the offset will make this entity's exponential growth weaker, while decreasing it makes it stronger. Negative numbers are valid by the way :) - /// - [DataField] - public int GlimmerExponentOffset = 0; } } diff --git a/Content.Server/Psionics/Glimmer/Structures/GlimmerStructuresSystem.cs b/Content.Server/Psionics/Glimmer/Structures/GlimmerStructuresSystem.cs index 76ff5a823b3..309bd732ef7 100644 --- a/Content.Server/Psionics/Glimmer/Structures/GlimmerStructuresSystem.cs +++ b/Content.Server/Psionics/Glimmer/Structures/GlimmerStructuresSystem.cs @@ -1,7 +1,6 @@ using Content.Server.Anomaly.Components; using Content.Server.Power.Components; using Content.Server.Power.EntitySystems; -using Content.Server.Research.Components; using Content.Shared.Anomaly.Components; using Content.Shared.Mobs; using Content.Shared.Psionics.Glimmer; @@ -25,17 +24,6 @@ public override void Initialize() SubscribeLocalEvent(OnAnomalyPulse); SubscribeLocalEvent(OnAnomalySupercritical); SubscribeLocalEvent(OnMobStateChanged); - SubscribeLocalEvent(OnInit); - } - - private void OnInit(EntityUid uid, GlimmerSourceComponent component, ComponentStartup args) - { - if (component.ResearchPointGeneration != null) - { - EnsureComp(uid, out var points); - points.PointsPerSecond = component.ResearchPointGeneration.Value; - points.Active = true; - } } private void OnAnomalyVesselPowerChanged(EntityUid uid, AnomalyVesselComponent component, ref PowerChangedEvent args) @@ -59,7 +47,7 @@ private void OnAnomalyPulse(EntityUid uid, GlimmerSourceComponent component, ref // component. if (TryComp(uid, out var anomaly)) - _glimmerSystem.DeltaGlimmerOutput(5f * anomaly.Severity); + _glimmerSystem.DeltaGlimmerInput(5f * anomaly.Severity); } private void OnAnomalySupercritical(EntityUid uid, GlimmerSourceComponent component, ref AnomalySupercriticalEvent args) @@ -76,56 +64,31 @@ private void OnMobStateChanged(EntityUid uid, GlimmerSourceComponent component, public override void Update(float frameTime) { base.Update(frameTime); - var glimmerSources = Count(); foreach (var source in EntityQuery()) { - if (!_powerReceiverSystem.IsPowered(source.Owner) - && source.RequiresPower) - { - glimmerSources--; + if (!_powerReceiverSystem.IsPowered(source.Owner)) continue; - } if (!source.Active) - { - glimmerSources--; continue; - } source.Accumulator += frameTime; if (source.Accumulator > source.SecondsPerGlimmer) { + var glimmerEquilibrium = GlimmerSystem.GlimmerEquilibrium; source.Accumulator -= source.SecondsPerGlimmer; - // https://www.desmos.com/calculator/zjzefpue03 - // In Short: 1 prober makes 20 research points. 4 probers makes twice as many points as 1 prober. 9 probers makes 69 points in total between all 9. - // This is then modified by afterwards by GlimmerEquilibrium, to help smooth out the curves. But also, now if you have more drainers than probers, the probers won't generate research! - // Also, this counts things like Anomalies & Glimmer Mites! Which means scientists should be more encouraged to actively hunt mites. - // As a fun novelty, this means that a highly psionic Epistemics department can essentially "Study" their powers for actual research points! - if (source.ResearchPointGeneration != null - && TryComp(source.Owner, out var research)) - research.PointsPerSecond = (int) MathF.Round( - source.ResearchPointGeneration.Value / (MathF.Log(glimmerSources, 4) + 1) - * _glimmerSystem.GetGlimmerEquilibriumRatio()); - // Shorthand explanation: // This makes glimmer far more "Swingy", by making both positive and negative glimmer sources scale quite dramatically with glimmer - if (!_glimmerSystem.GetGlimmerEnabled()) - return; - - var glimmerEquilibrium = GlimmerSystem.GlimmerEquilibrium; - if (source.AddToGlimmer) { - _glimmerSystem.DeltaGlimmerInput((_glimmerSystem.GlimmerOutput > glimmerEquilibrium - ? MathF.Pow(_glimmerSystem.GetGlimmerOutputInteger() - source.GlimmerExponentOffset + glimmerSources, 2) : 1f) + _glimmerSystem.DeltaGlimmerInput((_glimmerSystem.GlimmerOutput > glimmerEquilibrium ? _glimmerSystem.GetGlimmerOutputInteger() : 1f) * (_glimmerSystem.GlimmerOutput < glimmerEquilibrium ? _glimmerSystem.GetGlimmerEquilibriumRatio() : 1f)); } else { - _glimmerSystem.DeltaGlimmerInput(-(_glimmerSystem.GlimmerOutput > glimmerEquilibrium - ? MathF.Pow(_glimmerSystem.GetGlimmerOutputInteger() - source.GlimmerExponentOffset + glimmerSources, 2) : 1f) + _glimmerSystem.DeltaGlimmerInput(-(_glimmerSystem.GlimmerOutput > glimmerEquilibrium ? _glimmerSystem.GetGlimmerOutputInteger() : 1f) * (_glimmerSystem.GlimmerOutput > glimmerEquilibrium ? _glimmerSystem.GetGlimmerEquilibriumRatio() : 1f)); } } diff --git a/Content.Shared/Psionics/Abilities/PsionicInvisibility/PsionicInvisibilityPowerSystem.cs b/Content.Shared/Psionics/Abilities/PsionicInvisibility/PsionicInvisibilityPowerSystem.cs index 0eeb7ec280d..540dc03341b 100644 --- a/Content.Shared/Psionics/Abilities/PsionicInvisibility/PsionicInvisibilityPowerSystem.cs +++ b/Content.Shared/Psionics/Abilities/PsionicInvisibility/PsionicInvisibilityPowerSystem.cs @@ -40,20 +40,20 @@ public override void Initialize() SubscribeLocalEvent(OnShootAttempt); SubscribeLocalEvent(OnThrowAttempt); SubscribeLocalEvent(OnInsulated); - SubscribeLocalEvent(OnDoAfter); } private void OnInit(EntityUid uid, PsionicInvisibilityPowerComponent component, ComponentInit args) { - EnsureComp(uid, out var psionic); _actions.AddAction(uid, ref component.PsionicInvisibilityActionEntity, component.PsionicInvisibilityActionId); - _actions.TryGetActionData(component.PsionicInvisibilityActionEntity, out var actionData); + _actions.TryGetActionData( component.PsionicInvisibilityActionEntity, out var actionData); if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.PsionicInvisibilityActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); - - psionic.ActivePowers.Add(component); - psionic.PsychicFeedback.Add(component.InvisibilityFeedback); - psionic.Amplification += 0.5f; + _actions.StartUseDelay(component.PsionicInvisibilityActionEntity); + if (TryComp(uid, out var psionic)) + { + psionic.ActivePowers.Add(component); + psionic.PsychicFeedback.Add(component.InvisibilityFeedback); + psionic.Amplification += 0.5f; + } } private void OnShutdown(EntityUid uid, PsionicInvisibilityPowerComponent component, ComponentShutdown args) @@ -71,7 +71,10 @@ private void OnShutdown(EntityUid uid, PsionicInvisibilityPowerComponent compone private void OnPowerUsed(EntityUid uid, PsionicInvisibilityPowerComponent component, PsionicInvisibilityPowerActionEvent args) { - if (!_psionics.CheckCanSelfCast(uid, out var psionic)) + if (!TryComp(uid, out var psionic)) + return; + + if (HasComp(uid)) return; var ev = new PsionicInvisibilityTimerEvent(_gameTiming.CurTime); @@ -88,10 +91,6 @@ private void OnPowerUsed(EntityUid uid, PsionicInvisibilityPowerComponent compon _psionics.LogPowerUsed(uid, "psionic invisibility", psionic, 8, 12); args.Handled = true; } - - _actions.TryGetActionData(component.PsionicInvisibilityActionEntity, out var actionData); - if (actionData is { UseDelay: not null }) - _actions.SetCooldown(component.PsionicInvisibilityActionEntity, actionData.UseDelay.Value - TimeSpan.FromSeconds(psionic.Dampening + psionic.Amplification)); } private void OnPowerOff(RemovePsionicInvisibilityOffPowerActionEvent args) @@ -163,7 +162,7 @@ public void ToggleInvisibility(EntityUid uid) } } - private void OnDoAfter(EntityUid uid, PsionicInvisibilityPowerComponent component, PsionicInvisibilityTimerEvent args) + public void OnDoAfter(EntityUid uid, PsionicInvisibilityPowerComponent component, PsionicInvisibilityTimerEvent args) { if (!args.Cancelled) RemComp(uid); diff --git a/Content.Shared/Psionics/PsionicInsulationComponent.cs b/Content.Shared/Psionics/PsionicInsulationComponent.cs index 4b999523bca..2ab054b1f8f 100644 --- a/Content.Shared/Psionics/PsionicInsulationComponent.cs +++ b/Content.Shared/Psionics/PsionicInsulationComponent.cs @@ -6,8 +6,5 @@ public sealed partial class PsionicInsulationComponent : Component public bool Passthrough = false; public List SuppressedFactions = new(); - - [DataField] - public bool MindBroken = false; } } diff --git a/Content.Shared/Psionics/SharedPsionicAbilitiesSystem.cs b/Content.Shared/Psionics/SharedPsionicAbilitiesSystem.cs index fda1ef4fd40..4dd8fa2442f 100644 --- a/Content.Shared/Psionics/SharedPsionicAbilitiesSystem.cs +++ b/Content.Shared/Psionics/SharedPsionicAbilitiesSystem.cs @@ -1,12 +1,9 @@ -using System.Diagnostics.CodeAnalysis; using Content.Shared.Actions; using Content.Shared.Administration.Logs; -using Content.Shared.Examine; using Content.Shared.Mobs; using Content.Shared.Mobs.Components; using Content.Shared.Popups; using Content.Shared.Psionics.Glimmer; -using Robust.Shared.Network; using Robust.Shared.Random; using Robust.Shared.Serialization; @@ -20,7 +17,6 @@ public sealed class SharedPsionicAbilitiesSystem : EntitySystem [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!; [Dependency] private readonly GlimmerSystem _glimmerSystem = default!; [Dependency] private readonly IRobustRandom _robustRandom = default!; - [Dependency] private readonly INetManager _net = default!; public override void Initialize() { @@ -28,7 +24,6 @@ public override void Initialize() SubscribeLocalEvent(OnInit); SubscribeLocalEvent(OnShutdown); SubscribeLocalEvent(OnPowerUsed); - SubscribeLocalEvent(OnExamined); SubscribeLocalEvent(OnMobStateChanged); } @@ -81,37 +76,12 @@ public void SetPsionicsThroughEligibility(EntityUid uid) _actions.SetEnabled(uid, IsEligibleForPsionics(uid)); } - private void OnExamined(EntityUid uid, PsionicInsulationComponent component, ExaminedEvent args) - { - if (!component.MindBroken || !args.IsInDetailsRange) - return; - - args.PushMarkup($"[color=mediumpurple]{Loc.GetString("examine-mindbroken-message", ("entity", uid))}[/color]"); - } - private bool IsEligibleForPsionics(EntityUid uid) { return !HasComp(uid) && (!TryComp(uid, out var mobstate) || mobstate.CurrentState == MobState.Alive); } - public bool CheckCanSelfCast(EntityUid uid, [NotNullWhen(true)] out PsionicComponent? psiComp) - { - if (!HasComp(uid)) - return TryComp(uid, out psiComp); - psiComp = null; - return false; - } - - public bool CheckCanTargetCast(EntityUid performer, EntityUid target, [NotNullWhen(true)] out PsionicComponent? psiComp) - { - if (!HasComp(performer) - && !HasComp(target)) - return TryComp(performer, out psiComp); - psiComp = null; - return false; - } - public void LogPowerUsed(EntityUid uid, string power, PsionicComponent? psionic = null, int minGlimmer = 8, int maxGlimmer = 12, bool overrideGlimmer = false) { _adminLogger.Add(Database.LogType.Psionics, Database.LogImpact.Medium, $"{ToPrettyString(uid):player} used {power}"); diff --git a/Resources/Locale/en-US/nyanotrasen/psionics/psychic-feedback.ftl b/Resources/Locale/en-US/nyanotrasen/psionics/psychic-feedback.ftl index 76e67a5a02d..311d71d6ac7 100644 --- a/Resources/Locale/en-US/nyanotrasen/psionics/psychic-feedback.ftl +++ b/Resources/Locale/en-US/nyanotrasen/psionics/psychic-feedback.ftl @@ -51,6 +51,3 @@ pyrokinesis-refund-cooldown = You reclaim some of the energy spent drawing forth # Misc Psionic Messages telepathic-mute-message = You strain, but are unable to send your thoughts to the Noosphere -examine-mindbroken-message = Eyes unblinking, staring listfully into the horizon. {CAPITALIZE($entity)} is a sack of meat pretending it has a soul. - There is nothing behind its gaze. -cloning-console-insulation-error = ERROR: NON-SOPHONT LOADED, NO SOUL FOUND. diff --git a/Resources/Locale/en-US/traits/traits.ftl b/Resources/Locale/en-US/traits/traits.ftl index 9bc453f50a0..be90a388260 100644 --- a/Resources/Locale/en-US/traits/traits.ftl +++ b/Resources/Locale/en-US/traits/traits.ftl @@ -41,10 +41,10 @@ trait-description-LatentPsychic = Your mind and soul are open to the noosphere, It is possible that you may be hunted by otherworldly forces, so consider keeping your powers a secret. trait-name-PsionicInsulation = χ Waveform Misalignment -trait-description-PsionicInsulation = You are a flesh automaton animated by neurotransmitters. Within your skull lies a - 1.5kg sack of meat pretending at sentience. By modern epistemiological theory, you aren't even a sophont. - The good news is that you are immune to most positive and negative effects of psychic powers. There may be other - consequences to this malady. +trait-description-PsionicInsulation = Through a quirk of fate, your brainwaves are permanently out of phase with the noösphere + You are immune to both positive and negative effects of nearly all psychic powers, + But you can never be a psionic yourself in this life. This trait is incompatible with + all other psychic traits. trait-name-NaturalTelepath = Natural Telepath trait-description-NaturalTelepath = As a naturally occuring Telepath, you are capable of fluent telepathic communication, regardless of diff --git a/Resources/Prototypes/DeltaV/Entities/Mobs/NPCs/glimmer_creatures.yml b/Resources/Prototypes/DeltaV/Entities/Mobs/NPCs/glimmer_creatures.yml index d0982c81744..1f1000f04a7 100644 --- a/Resources/Prototypes/DeltaV/Entities/Mobs/NPCs/glimmer_creatures.yml +++ b/Resources/Prototypes/DeltaV/Entities/Mobs/NPCs/glimmer_creatures.yml @@ -29,7 +29,6 @@ psychicFeedback: - "glimmer-mite-feedback" - type: GlimmerSource - glimmerExponentOffset: 3 - type: AmbientSound range: 6 volume: -3 diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml b/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml index cf563989bf5..d1b3bd6a6a9 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/regalrat.yml @@ -118,6 +118,7 @@ - type: Grammar attributes: gender: male + - type: PotentialPsionic # Nyano - type: LanguageKnowledge speaks: - GalacticCommon diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml b/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml index d618e407134..397989643e6 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml @@ -121,6 +121,8 @@ molsPerSecondPerUnitMass: 0.0005 - type: Speech speechVerb: LargeMob + - type: PotentialPsionic #Nyano - Summary: makes potentially psionic. + chance: -2 - type: Psionic #Nyano - Summary: makes psionic by default. removable: false - type: LanguageKnowledge diff --git a/Resources/Prototypes/Entities/Mobs/Player/skeleton.yml b/Resources/Prototypes/Entities/Mobs/Player/skeleton.yml index f9132ce0ea0..bf41f2dda6e 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/skeleton.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/skeleton.yml @@ -8,6 +8,7 @@ interactSuccessString: hugging-success-generic interactSuccessSound: /Audio/Effects/thudswoosh.ogg messagePerceivedByOthers: hugging-success-generic-others + - type: PotentialPsionic #Nyano - Summary: makes potentially psionic. - type: entity name: skeleton pirate diff --git a/Resources/Prototypes/Entities/Mobs/Species/human.yml b/Resources/Prototypes/Entities/Mobs/Species/human.yml index ac373725ce4..e00e06279e5 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/human.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/human.yml @@ -16,6 +16,7 @@ spawned: - id: FoodMeatHuman amount: 5 + - type: PotentialPsionic #Nyano - Summary: makes potentially psionic. - type: LanguageKnowledge speaks: - GalacticCommon diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Clothing/Head/hats.yml b/Resources/Prototypes/Nyanotrasen/Entities/Clothing/Head/hats.yml index 781e42c1728..83e3756c0f2 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Clothing/Head/hats.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Clothing/Head/hats.yml @@ -113,8 +113,6 @@ sprite: Nyanotrasen/Clothing/Head/Helmets/insulative_skullcap.rsi - type: Clothing sprite: Nyanotrasen/Clothing/Head/Helmets/insulative_skullcap.rsi - - type: TinfoilHat - destroyOnFry: false - type: Armor modifiers: coefficients: diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Structures/Research/glimmer_prober.yml b/Resources/Prototypes/Nyanotrasen/Entities/Structures/Research/glimmer_prober.yml index 161c5b4ef52..eca5b5e3758 100644 --- a/Resources/Prototypes/Nyanotrasen/Entities/Structures/Research/glimmer_prober.yml +++ b/Resources/Prototypes/Nyanotrasen/Entities/Structures/Research/glimmer_prober.yml @@ -11,7 +11,6 @@ psychicFeedback: - "prober-feedback" - type: GlimmerSource - researchPointGeneration: 20 - type: Construction graph: GlimmerDevices node: glimmerProber diff --git a/Resources/Prototypes/Traits/psionics.yml b/Resources/Prototypes/Traits/psionics.yml index b896a8f745c..277070617cf 100644 --- a/Resources/Prototypes/Traits/psionics.yml +++ b/Resources/Prototypes/Traits/psionics.yml @@ -17,7 +17,6 @@ points: -5 components: - type: PsionicInsulation - mindBroken: true requirements: - !type:CharacterTraitRequirement inverted: true From 9d5dfbdffbbabf4b16b4ca079a455eb4100733f1 Mon Sep 17 00:00:00 2001 From: ShatteredSwords <135023515+ShatteredSwords@users.noreply.github.com> Date: Thu, 15 Aug 2024 05:59:11 -0400 Subject: [PATCH 02/11] Commit all files without any conflicts --- .../Cartridges/CrimeAssistUi.cs | 9 + .../Cartridges/CrimeAssistUiFragment.xaml.cs | 3 + .../Cartridges/SecWatchEntryControl.xaml | 19 -- .../Cartridges/SecWatchEntryControl.xaml.cs | 21 -- .../CartridgeLoader/Cartridges/SecWatchUi.cs | 27 --- .../Cartridges/SecWatchUiFragment.xaml | 13 -- .../Cartridges/SecWatchUiFragment.xaml.cs | 25 --- .../Cartridges}/GlimmerMonitorUi.cs | 3 +- .../Cartridges}/GlimmerMonitorUiFragment.xaml | 3 +- .../GlimmerMonitorUiFragment.xaml.cs | 20 +- .../Chat}/PsionicChatUpdateSystem.cs | 4 +- .../Glimmer/GlimmerReactiveVisuals.cs | 0 .../Psionics/UI}/AcceptPsionicsEUI.cs | 0 .../Psionics/UI}/AcceptPsionicsWindow.cs | 0 .../UserInterface/GlimmerGraph.cs | 2 +- .../UI/HumanoidProfileEditor.xaml.cs | 2 +- .../Systems/Chat/ChatUIController.cs | 9 +- .../Abilities/Mime/MimePowersComponent.cs | 12 -- .../Abilities/Mime/MimePowersSystem.cs | 38 +--- .../Components/IgniteOnCollideComponent.cs | 4 +- .../Cartridges/SecWatchCartridgeComponent.cs | 23 --- .../Cartridges/SecWatchCartridgeSystem.cs | 73 ------- .../CrimeAssistCartridgeComponent.cs | 5 + .../CrimeAssistCartridgeSystem.cs | 16 ++ .../Events/GlimmerMobSpawnRule.cs | 2 +- .../Psionics/Abilities/DispelPowerSystem.cs | 36 ++-- .../Abilities/MetapsionicPowerSystem.cs | 74 +++++++ .../Psionics/Abilities/MindSwapPowerSystem.cs | 63 ++---- .../Abilities/MindSwappedComponent.cs | 5 +- .../Abilities/NoosphericZapPowerSystem.cs | 42 ++-- .../PsionicInvisibilityPowerSystem.cs | 118 ++++------- .../PsionicRegenerationPowerSystem.cs | 113 ++++------- .../Abilities/PyrokinesisPowerSystem.cs | 66 +++++++ .../Abilities/TelegnosisPowerSystem.cs | 67 +++++++ .../Psionics/PsionicAbilitiesSystem.cs | 143 ++++++++++++++ .../Audio/GlimmerSoundComponent.cs | 6 +- .../Chat/NyanoChatSystem.cs} | 28 +-- .../Chat}/TelepathicRepeaterComponent.cs | 2 +- .../Chemistry/Effects/ChemRemovePsionic.cs | 2 +- .../ChangeGlimmerReactionEffect.cs | 2 +- .../BecomePsionicConditionComponent.cs | 11 ++ .../Systems/BecomePsionicConditionSystem.cs | 32 +++ .../Systems/RaiseGlimmerConditionSystem.cs | 5 +- .../Psionics/AcceptPsionicsEui.cs | 2 +- .../Psionics/AntiPsychicWeaponComponent.cs | 0 .../Psionics/Dreams/DreamSystem.cs | 3 + .../Psionics/Glimmer/GlimmerCommands.cs | 4 +- .../Psionics/Glimmer/GlimmerReactiveSystem.cs | 23 ++- .../Glimmer/PassiveGlimmerReductionSystem.cs | 80 ++++++++ .../Structures/GlimmerSourceComponent.cs | 0 .../Structures/GlimmerStructuresSystem.cs | 22 +-- .../Invisibility/PsionicInvisibilitySystem.cs | 26 +-- .../PsionicInvisibleContactsComponent.cs | 3 +- .../PsionicInvisibleContactsSystem.cs | 4 +- .../PsionicallyInvisibleComponent.cs | 2 +- .../Psionics/PotentialPsionicComponent.cs | 14 ++ .../PsionicAwaitingPlayerComponent.cs | 0 .../Psionics/PsionicBonusChanceComponent.cs | 0 .../Psionics/PsionicsCommands.cs | 7 +- .../Psionics/PsionicsSystem.cs | 28 +-- .../SophicScribe/SophicScribeSystem.cs | 10 +- .../StationEvents/Events/FreeProberRule.cs | 2 +- .../Events/GlimmerEventSystem.cs | 2 +- .../Events/GlimmerWispSpawnRule.cs | 2 +- .../StationEvents/Events/MassMindSwapRule.cs | 5 +- .../StationEvents/Events/NoosphericFryRule.cs | 6 +- .../Events/NoosphericStormRule.cs | 8 +- .../StationEvents/Events/NoosphericZapRule.cs | 20 +- .../Events/PsionicCatGotYourTongueRule.cs | 2 +- .../Abilities/MetapsionicPowerSystem.cs | 174 ----------------- .../Abilities/PsionicAbilitiesSystem.cs | 111 ----------- .../Abilities/PyrokinesisPowerSystem.cs | 157 --------------- .../RegenerativeStasisPowerSystem.cs | 72 ------- .../Abilities/TelegnosisPowerSystem.cs | 104 ---------- .../Glimmer/PassiveGlimmerReductionSystem.cs | 57 ------ .../Psionics/PotentialPsionicComponent.cs | 21 -- .../Psionics/Telepathy/TSayCommand.cs | 45 ----- .../EntitySystems/EventHorizonSystem.cs | 4 +- .../StationEvents/EventManagerSystem.cs | 4 +- .../Systems/ArtifactAnalyzerSystem.cs | 4 +- .../Zombies/ZombieSystem.Transform.cs | 4 +- Content.Shared/CCVar/CCVars.cs | 8 +- .../Clothing/EntitySystems/ClothingSystem.cs | 5 - .../EntitySystems/ToggleableClothingSystem.cs | 2 +- .../Cartridges/CrimeAssistUiState.cs | 18 ++ .../Cartridges/SecWatchUiState.cs | 24 --- .../Inventory/InventorySystem.Equip.cs | 2 +- .../Inventory/InventoryTemplatePrototype.cs | 2 +- .../Abilities/AcceptPsionicsEuiMessage.cs | 0 .../Dispel/DamageOnDispelComponent.cs | 4 +- .../Abilities/Dispel/DispelPowerComponent.cs | 8 +- .../Abilities/Dispel/DispellableComponent.cs | 2 +- .../MassSleep/MassSleepPowerComponent.cs | 18 ++ .../MassSleep/MassSleepPowerSystem.cs | 59 ++++++ .../Metapsionics/MetapsionicPowerComponent.cs | 21 ++ .../MindSwap/MindSwapPowerComponent.cs | 5 +- .../NoosphericZapPowerComponent.cs | 5 +- .../PsionicInvisibilityPowerComponent.cs | 8 +- .../PsionicInvisibilityUsedComponent.cs | 10 +- .../PsionicRegenerationPowerComponent.cs | 10 +- .../Pyrokinesis/PyrokinesisPowerComponent.cs | 18 ++ .../Telegnosis/TelegnosisPowerComponent.cs | 10 +- .../TelegnosticProjectionComponent.cs | 6 + .../ClothingGrantPsionicPowerComponent.cs | 2 +- .../Psionics/Items/HeadCageComponent.cs | 2 +- .../Psionics/Items/HeadCagedComponent.cs | 2 +- .../Psionics/Items/PsionicItemsSystem.cs | 2 +- .../Psionics/Items/TinfoilHatComponent.cs | 2 +- .../Abilities/Psionics/PsionicComponent.cs | 20 ++ .../Psionics/PsionicInsulationComponent.cs | 2 +- .../Psionics/PsionicsDisabledComponent.cs | 2 +- .../Psionics/SharedPsionicAbilitiesSystem.cs | 16 +- .../Events/MassSleepPowerActionEvent.cs | 2 + .../Events/MetapsionicPowerActionEvent.cs | 3 +- .../Events/PyrokinesisPowerActionEvent.cs | 5 +- .../RegenerativeStasisPowerActionEvent.cs | 2 - Content.Shared/Nyanotrasen/Psionics/Events.cs | 28 +++ .../Psionics/Glimmer/GlimmerSystem.cs | 65 +++++++ .../Glimmer/SharedGlimmerReactiveComponent.cs | 0 .../Glimmer/SharedGlimmerReactiveVisuals.cs | 0 .../Metapsionics/MetapsionicPowerComponent.cs | 38 ---- .../Pyrokinesis/PyrokinesisPowerComponent.cs | 45 ----- .../PyrokinesisPrechargeComponent.cs | 0 .../RegenerativeStasisPowerComponent.cs | 19 -- .../TelegnosticProjectionComponent.cs | 8 - Content.Shared/Psionics/Events.cs | 82 -------- .../Psionics/Glimmer/GlimmerSystem.cs | 183 ------------------ Content.Shared/Psionics/PsionicComponent.cs | 41 ---- .../Psionics/SharedPsionicSystem.Insulated.cs | 4 - .../Weapons/Ranged/Systems/SharedGunSystem.cs | 2 +- .../Audio/Nyanotrasen/heartbeat_fast.ogg | Bin 39983 -> 0 bytes .../deltav/cartridge-loader/secwatch.ftl | 5 - .../en-US/nyanotrasen/abilities/psionic.ftl | 24 ++- .../nyanotrasen/psionics/psychic-feedback.ftl | 53 ----- Resources/Locale/en-US/traits/categories.ftl | 1 - .../DeltaV/Body/Prototypes/harpy.yml | 5 +- .../DeltaV/Body/Prototypes/vulpkanin.yml | 6 +- .../DeltaV/Entities/Mobs/NPCs/familiars.yml | 7 +- .../Entities/Mobs/NPCs/glimmer_creatures.yml | 4 - .../DeltaV/Entities/Mobs/Player/vulpkanin.yml | 1 + .../Entities/Objects/Devices/cartridges.yml | 22 +-- .../DeltaV/Entities/Objects/Devices/pda.yml | 3 +- .../Entities/Mobs/NPCs/elemental.yml | 23 --- .../Prototypes/Entities/Mobs/NPCs/flesh.yml | 5 - .../Entities/Mobs/Player/arachnid.yml | 1 + .../Prototypes/Entities/Mobs/Player/diona.yml | 1 + .../Prototypes/Entities/Mobs/Player/dwarf.yml | 2 + .../Prototypes/Entities/Mobs/Player/harpy.yml | 1 + .../Prototypes/Entities/Mobs/Player/human.yml | 2 + .../Prototypes/Entities/Mobs/Player/moth.yml | 2 + .../Entities/Mobs/Player/reptilian.yml | 2 + .../Prototypes/Entities/Mobs/Player/slime.yml | 2 + .../Entities/Objects/Devices/pda.yml | 24 +-- .../Ammunition/Cartridges/base_cartridge.yml | 9 +- .../Structures/Specific/Anomaly/anomalies.yml | 62 +----- Resources/Prototypes/Guidebook/psionics.yml | 9 - .../Prototypes/Nyanotrasen/Actions/types.yml | 50 ++--- .../Entities/Body/Prototypes/felinid.yml | 4 +- .../Entities/Clothing/Head/hats.yml | 3 - .../Nyanotrasen/Entities/Mobs/Player/Oni.yml | 1 + .../Entities/Mobs/Player/felinid.yml | 2 + .../Entities/Objects/Devices/pda.yml | 3 +- .../Machines/metempsychoticMachine.yml | 3 - .../Structures/Research/glimmer_prober.yml | 10 - .../Structures/Research/sophicscribe.yml | 2 - .../Nyanotrasen/GameRules/events.yml | 2 +- .../Nyanotrasen/Guidebook/epistemics.yml | 10 + .../Nyanotrasen/Objectives/traitor.yml | 23 +++ .../Prototypes/Nyanotrasen/psionicPowers.yml | 6 +- .../Prototypes/Objectives/objectiveGroups.yml | 1 + .../Prototypes/Roles/Jobs/Civilian/mime.yml | 1 - .../Roles/Jobs/Science/research_director.yml | 22 +-- Resources/Prototypes/Traits/categories.yml | 3 - Resources/Prototypes/Traits/psionics.yml | 39 ---- Resources/ServerInfo/Guidebook/Psionics.xml | 108 ----------- .../Guidebook/Epistemics/Psionics.xml | 73 +++++++ 176 files changed, 1281 insertions(+), 2363 deletions(-) delete mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchEntryControl.xaml delete mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchEntryControl.xaml.cs delete mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUi.cs delete mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUiFragment.xaml delete mode 100644 Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUiFragment.xaml.cs rename Content.Client/{Psionics/GlimmerMonitor => Nyanotrasen/CartridgeLoader/Cartridges}/GlimmerMonitorUi.cs (92%) rename Content.Client/{Psionics/GlimmerMonitor => Nyanotrasen/CartridgeLoader/Cartridges}/GlimmerMonitorUiFragment.xaml (87%) rename Content.Client/{Psionics/GlimmerMonitor => Nyanotrasen/CartridgeLoader/Cartridges}/GlimmerMonitorUiFragment.xaml.cs (87%) rename Content.Client/{Psionics/Telepathy => Nyanotrasen/Chat}/PsionicChatUpdateSystem.cs (92%) rename Content.Client/{ => Nyanotrasen}/Psionics/Glimmer/GlimmerReactiveVisuals.cs (100%) rename Content.Client/{Psionics/UserInterface => Nyanotrasen/Psionics/UI}/AcceptPsionicsEUI.cs (100%) rename Content.Client/{Psionics/UserInterface => Nyanotrasen/Psionics/UI}/AcceptPsionicsWindow.cs (100%) rename Content.Client/{Psionics => Nyanotrasen}/UserInterface/GlimmerGraph.cs (97%) delete mode 100644 Content.Server/DeltaV/CartridgeLoader/Cartridges/SecWatchCartridgeComponent.cs delete mode 100644 Content.Server/DeltaV/CartridgeLoader/Cartridges/SecWatchCartridgeSystem.cs create mode 100644 Content.Server/DeltaV/CartridgeLoader/CrimeAssistCartridgeComponent.cs create mode 100644 Content.Server/DeltaV/CartridgeLoader/CrimeAssistCartridgeSystem.cs rename Content.Server/{ => Nyanotrasen/Abilities}/Psionics/Abilities/DispelPowerSystem.cs (80%) create mode 100644 Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/MetapsionicPowerSystem.cs rename Content.Server/{ => Nyanotrasen/Abilities}/Psionics/Abilities/MindSwapPowerSystem.cs (79%) rename Content.Server/{ => Nyanotrasen/Abilities}/Psionics/Abilities/MindSwappedComponent.cs (79%) rename Content.Server/{ => Nyanotrasen/Abilities}/Psionics/Abilities/NoosphericZapPowerSystem.cs (57%) rename {Content.Shared/Psionics/Abilities/PsionicInvisibility => Content.Server/Nyanotrasen/Abilities/Psionics/Abilities}/PsionicInvisibilityPowerSystem.cs (51%) rename Content.Server/{ => Nyanotrasen/Abilities}/Psionics/Abilities/PsionicRegenerationPowerSystem.cs (50%) create mode 100644 Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/PyrokinesisPowerSystem.cs create mode 100644 Content.Server/Nyanotrasen/Abilities/Psionics/Abilities/TelegnosisPowerSystem.cs create mode 100644 Content.Server/Nyanotrasen/Abilities/Psionics/PsionicAbilitiesSystem.cs rename Content.Server/{Psionics => Nyanotrasen}/Audio/GlimmerSoundComponent.cs (80%) rename Content.Server/{Psionics/Telepathy/TelepathyChatSystem.cs => Nyanotrasen/Chat/NyanoChatSystem.cs} (79%) rename Content.Server/{Psionics/Telepathy => Nyanotrasen/Chat}/TelepathicRepeaterComponent.cs (82%) create mode 100644 Content.Server/Nyanotrasen/Objectives/Components/BecomePsionicConditionComponent.cs create mode 100644 Content.Server/Nyanotrasen/Objectives/Systems/BecomePsionicConditionSystem.cs rename Content.Server/{ => Nyanotrasen}/Psionics/AcceptPsionicsEui.cs (95%) rename Content.Server/{ => Nyanotrasen}/Psionics/AntiPsychicWeaponComponent.cs (100%) rename Content.Server/{ => Nyanotrasen}/Psionics/Dreams/DreamSystem.cs (93%) rename Content.Server/{ => Nyanotrasen}/Psionics/Glimmer/GlimmerCommands.cs (94%) rename Content.Server/{ => Nyanotrasen}/Psionics/Glimmer/GlimmerReactiveSystem.cs (95%) create mode 100644 Content.Server/Nyanotrasen/Psionics/Glimmer/PassiveGlimmerReductionSystem.cs rename Content.Server/{ => Nyanotrasen}/Psionics/Glimmer/Structures/GlimmerSourceComponent.cs (100%) rename Content.Server/{ => Nyanotrasen}/Psionics/Glimmer/Structures/GlimmerStructuresSystem.cs (69%) rename Content.Server/{ => Nyanotrasen}/Psionics/Invisibility/PsionicInvisibilitySystem.cs (87%) rename {Content.Shared/Psionics/Abilities/PsionicInvisibility => Content.Server/Nyanotrasen/Psionics/Invisibility}/PsionicInvisibleContactsComponent.cs (89%) rename {Content.Shared/Psionics/Abilities/PsionicInvisibility => Content.Server/Nyanotrasen/Psionics/Invisibility}/PsionicInvisibleContactsSystem.cs (94%) rename {Content.Shared/Psionics/Abilities/PsionicInvisibility => Content.Server/Nyanotrasen/Psionics/Invisibility}/PsionicallyInvisibleComponent.cs (76%) create mode 100644 Content.Server/Nyanotrasen/Psionics/PotentialPsionicComponent.cs rename Content.Server/{ => Nyanotrasen}/Psionics/PsionicAwaitingPlayerComponent.cs (100%) rename Content.Server/{ => Nyanotrasen}/Psionics/PsionicBonusChanceComponent.cs (100%) rename Content.Server/{ => Nyanotrasen}/Psionics/PsionicsCommands.cs (82%) rename Content.Server/{ => Nyanotrasen}/Psionics/PsionicsSystem.cs (89%) delete mode 100644 Content.Server/Psionics/Abilities/MetapsionicPowerSystem.cs delete mode 100644 Content.Server/Psionics/Abilities/PsionicAbilitiesSystem.cs delete mode 100644 Content.Server/Psionics/Abilities/PyrokinesisPowerSystem.cs delete mode 100644 Content.Server/Psionics/Abilities/RegenerativeStasisPowerSystem.cs delete mode 100644 Content.Server/Psionics/Abilities/TelegnosisPowerSystem.cs delete mode 100644 Content.Server/Psionics/Glimmer/PassiveGlimmerReductionSystem.cs delete mode 100644 Content.Server/Psionics/PotentialPsionicComponent.cs delete mode 100644 Content.Server/Psionics/Telepathy/TSayCommand.cs create mode 100644 Content.Shared/DeltaV/CartridgeLoader/Cartridges/CrimeAssistUiState.cs delete mode 100644 Content.Shared/DeltaV/CartridgeLoader/Cartridges/SecWatchUiState.cs rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Abilities/AcceptPsionicsEuiMessage.cs (100%) rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Abilities/Dispel/DamageOnDispelComponent.cs (77%) rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Abilities/Dispel/DispelPowerComponent.cs (79%) rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Abilities/Dispel/DispellableComponent.cs (69%) create mode 100644 Content.Shared/Nyanotrasen/Abilities/Psionics/Abilities/MassSleep/MassSleepPowerComponent.cs create mode 100644 Content.Shared/Nyanotrasen/Abilities/Psionics/Abilities/MassSleep/MassSleepPowerSystem.cs create mode 100644 Content.Shared/Nyanotrasen/Abilities/Psionics/Abilities/Metapsionics/MetapsionicPowerComponent.cs rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Abilities/MindSwap/MindSwapPowerComponent.cs (76%) rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Abilities/NoosphericZap/NoosphericZapPowerComponent.cs (77%) rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Abilities/PsionicInvisibility/PsionicInvisibilityPowerComponent.cs (71%) rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Abilities/PsionicInvisibility/PsionicInvisibilityUsedComponent.cs (68%) rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Abilities/PsionicRegeneration/PsionicRegenerationPowerComponent.cs (76%) create mode 100644 Content.Shared/Nyanotrasen/Abilities/Psionics/Abilities/Pyrokinesis/PyrokinesisPowerComponent.cs rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Abilities/Telegnosis/TelegnosisPowerComponent.cs (73%) create mode 100644 Content.Shared/Nyanotrasen/Abilities/Psionics/Abilities/Telegnosis/TelegnosticProjectionComponent.cs rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Items/ClothingGrantPsionicPowerComponent.cs (84%) rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Items/HeadCageComponent.cs (96%) rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Items/HeadCagedComponent.cs (81%) rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Items/PsionicItemsSystem.cs (98%) rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/Items/TinfoilHatComponent.cs (90%) create mode 100644 Content.Shared/Nyanotrasen/Abilities/Psionics/PsionicComponent.cs rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/PsionicInsulationComponent.cs (82%) rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/PsionicsDisabledComponent.cs (84%) rename Content.Shared/{ => Nyanotrasen/Abilities}/Psionics/SharedPsionicAbilitiesSystem.cs (82%) create mode 100644 Content.Shared/Nyanotrasen/Actions/Events/MassSleepPowerActionEvent.cs delete mode 100644 Content.Shared/Nyanotrasen/Actions/Events/RegenerativeStasisPowerActionEvent.cs create mode 100644 Content.Shared/Nyanotrasen/Psionics/Events.cs create mode 100644 Content.Shared/Nyanotrasen/Psionics/Glimmer/GlimmerSystem.cs rename Content.Shared/{ => Nyanotrasen}/Psionics/Glimmer/SharedGlimmerReactiveComponent.cs (100%) rename Content.Shared/{ => Nyanotrasen}/Psionics/Glimmer/SharedGlimmerReactiveVisuals.cs (100%) delete mode 100644 Content.Shared/Psionics/Abilities/Metapsionics/MetapsionicPowerComponent.cs delete mode 100644 Content.Shared/Psionics/Abilities/Pyrokinesis/PyrokinesisPowerComponent.cs delete mode 100644 Content.Shared/Psionics/Abilities/Pyrokinesis/PyrokinesisPrechargeComponent.cs delete mode 100644 Content.Shared/Psionics/Abilities/RegenerativeStasis/RegenerativeStasisPowerComponent.cs delete mode 100644 Content.Shared/Psionics/Abilities/Telegnosis/TelegnosticProjectionComponent.cs delete mode 100644 Content.Shared/Psionics/Events.cs delete mode 100644 Content.Shared/Psionics/Glimmer/GlimmerSystem.cs delete mode 100644 Content.Shared/Psionics/PsionicComponent.cs delete mode 100644 Content.Shared/Psionics/SharedPsionicSystem.Insulated.cs delete mode 100644 Resources/Audio/Nyanotrasen/heartbeat_fast.ogg delete mode 100644 Resources/Locale/en-US/deltav/cartridge-loader/secwatch.ftl delete mode 100644 Resources/Locale/en-US/nyanotrasen/psionics/psychic-feedback.ftl delete mode 100644 Resources/Prototypes/Guidebook/psionics.yml delete mode 100644 Resources/Prototypes/Traits/psionics.yml delete mode 100644 Resources/ServerInfo/Guidebook/Psionics.xml create mode 100644 Resources/ServerInfo/Nyanotrasen/Guidebook/Epistemics/Psionics.xml diff --git a/Content.Client/DeltaV/CartridgeLoader/Cartridges/CrimeAssistUi.cs b/Content.Client/DeltaV/CartridgeLoader/Cartridges/CrimeAssistUi.cs index 2dbe923b2a6..ea5aa3cf256 100644 --- a/Content.Client/DeltaV/CartridgeLoader/Cartridges/CrimeAssistUi.cs +++ b/Content.Client/DeltaV/CartridgeLoader/Cartridges/CrimeAssistUi.cs @@ -18,6 +18,15 @@ public override Control GetUIFragmentRoot() public override void Setup(BoundUserInterface userInterface, EntityUid? fragmentOwner) { _fragment = new CrimeAssistUiFragment(); + + _fragment.OnSync += _ => SendSyncMessage(userInterface); + } + + private void SendSyncMessage(BoundUserInterface userInterface) + { + var syncMessage = new CrimeAssistSyncMessageEvent(); + var message = new CartridgeUiMessage(syncMessage); + userInterface.SendMessage(message); } public override void UpdateState(BoundUserInterfaceState state) diff --git a/Content.Client/DeltaV/CartridgeLoader/Cartridges/CrimeAssistUiFragment.xaml.cs b/Content.Client/DeltaV/CartridgeLoader/Cartridges/CrimeAssistUiFragment.xaml.cs index fb085a8a799..e3163975d12 100644 --- a/Content.Client/DeltaV/CartridgeLoader/Cartridges/CrimeAssistUiFragment.xaml.cs +++ b/Content.Client/DeltaV/CartridgeLoader/Cartridges/CrimeAssistUiFragment.xaml.cs @@ -1,6 +1,7 @@ using Content.Client.Message; using Content.Shared.DeltaV.CartridgeLoader.Cartridges; using Robust.Client.AutoGenerated; +using Robust.Client.ResourceManagement; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; using Robust.Shared.Prototypes; @@ -12,7 +13,9 @@ namespace Content.Client.DeltaV.CartridgeLoader.Cartridges; public sealed partial class CrimeAssistUiFragment : BoxContainer { [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly IResourceCache _resourceCache = default!; + public event Action? OnSync; private CrimeAssistPage _currentPage; private List? _pages; diff --git a/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchEntryControl.xaml b/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchEntryControl.xaml deleted file mode 100644 index 2de8a37ff77..00000000000 --- a/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchEntryControl.xaml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - diff --git a/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchEntryControl.xaml.cs b/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchEntryControl.xaml.cs deleted file mode 100644 index e8dd4eea446..00000000000 --- a/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchEntryControl.xaml.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Content.Shared.CartridgeLoader.Cartridges; -using Robust.Client.AutoGenerated; -using Robust.Client.UserInterface; -using Robust.Client.UserInterface.Controls; -using Robust.Client.UserInterface.XAML; - -namespace Content.Client.DeltaV.CartridgeLoader.Cartridges; - -[GenerateTypedNameReferences] -public sealed partial class SecWatchEntryControl : BoxContainer -{ - public SecWatchEntryControl(SecWatchEntry entry) - { - RobustXamlLoader.Load(this); - - Status.Text = Loc.GetString($"criminal-records-status-{entry.Status.ToString().ToLower()}"); - Title.Text = Loc.GetString("sec-watch-entry", ("name", entry.Name), ("job", entry.Job)); - - Reason.Text = entry.Reason ?? Loc.GetString("sec-watch-no-reason"); - } -} diff --git a/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUi.cs b/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUi.cs deleted file mode 100644 index da5ff825b91..00000000000 --- a/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUi.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Content.Client.UserInterface.Fragments; -using Content.Shared.CartridgeLoader; -using Content.Shared.CartridgeLoader.Cartridges; -using Robust.Client.UserInterface; - -namespace Content.Client.DeltaV.CartridgeLoader.Cartridges; - -public sealed partial class SecWatchUi : UIFragment -{ - private SecWatchUiFragment? _fragment; - - public override Control GetUIFragmentRoot() - { - return _fragment!; - } - - public override void Setup(BoundUserInterface ui, EntityUid? owner) - { - _fragment = new SecWatchUiFragment(); - } - - public override void UpdateState(BoundUserInterfaceState state) - { - if (state is SecWatchUiState cast) - _fragment?.UpdateState(cast); - } -} diff --git a/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUiFragment.xaml b/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUiFragment.xaml deleted file mode 100644 index 7fb2c42debc..00000000000 --- a/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUiFragment.xaml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUiFragment.xaml.cs b/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUiFragment.xaml.cs deleted file mode 100644 index ad152840529..00000000000 --- a/Content.Client/DeltaV/CartridgeLoader/Cartridges/SecWatchUiFragment.xaml.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Content.Shared.CartridgeLoader.Cartridges; -using Robust.Client.AutoGenerated; -using Robust.Client.UserInterface.Controls; -using Robust.Client.UserInterface.XAML; - -namespace Content.Client.DeltaV.CartridgeLoader.Cartridges; - -[GenerateTypedNameReferences] -public sealed partial class SecWatchUiFragment : BoxContainer -{ - public SecWatchUiFragment() - { - RobustXamlLoader.Load(this); - } - - public void UpdateState(SecWatchUiState state) - { - NoEntries.Visible = state.Entries.Count == 0; - Entries.RemoveAllChildren(); - foreach (var entry in state.Entries) - { - Entries.AddChild(new SecWatchEntryControl(entry)); - } - } -} diff --git a/Content.Client/Psionics/GlimmerMonitor/GlimmerMonitorUi.cs b/Content.Client/Nyanotrasen/CartridgeLoader/Cartridges/GlimmerMonitorUi.cs similarity index 92% rename from Content.Client/Psionics/GlimmerMonitor/GlimmerMonitorUi.cs rename to Content.Client/Nyanotrasen/CartridgeLoader/Cartridges/GlimmerMonitorUi.cs index 0d8accb9f86..0b5fc7ad38c 100644 --- a/Content.Client/Psionics/GlimmerMonitor/GlimmerMonitorUi.cs +++ b/Content.Client/Nyanotrasen/CartridgeLoader/Cartridges/GlimmerMonitorUi.cs @@ -1,11 +1,10 @@ using Robust.Client.GameObjects; using Robust.Client.UserInterface; -using Content.Client.Psionics.UI; using Content.Client.UserInterface.Fragments; using Content.Shared.CartridgeLoader.Cartridges; using Content.Shared.CartridgeLoader; -namespace Content.Client.Psionics.GlimmerMonitor; +namespace Content.Client.Nyanotrasen.CartridgeLoader.Cartridges; public sealed partial class GlimmerMonitorUi : UIFragment { diff --git a/Content.Client/Psionics/GlimmerMonitor/GlimmerMonitorUiFragment.xaml b/Content.Client/Nyanotrasen/CartridgeLoader/Cartridges/GlimmerMonitorUiFragment.xaml similarity index 87% rename from Content.Client/Psionics/GlimmerMonitor/GlimmerMonitorUiFragment.xaml rename to Content.Client/Nyanotrasen/CartridgeLoader/Cartridges/GlimmerMonitorUiFragment.xaml index ade0720696b..119a1831e6e 100644 --- a/Content.Client/Psionics/GlimmerMonitor/GlimmerMonitorUiFragment.xaml +++ b/Content.Client/Nyanotrasen/CartridgeLoader/Cartridges/GlimmerMonitorUiFragment.xaml @@ -1,9 +1,8 @@ -