From 87e5c64c101cec79a5c9e46f357c84162ddcfad5 Mon Sep 17 00:00:00 2001 From: FoxxoTrystan Date: Thu, 31 Oct 2024 04:55:41 +0100 Subject: [PATCH 1/9] Oooh Hypno --- .../Floofstation/HypnotizedSystem.cs | 35 +++ .../Floofstation/PsionicHypnoSystem.cs | 35 +++ .../Psionics/Abilities/PsionicHypnoSystem.cs | 224 ++++++++++++++++++ .../Actions/Events/HypnoPowerActionEvent.cs | 2 + .../Floofstation/Hypno/HypnotizedComponent.cs | 10 + .../Hypno/PsionicHypnoComponent.cs | 42 ++++ Resources/Locale/en-US/Floof/hypno.ftl | 26 ++ .../Prototypes/Floof/Actions/psionics.yml | 18 ++ .../Floof/Mood/genericPositiveEffects.yml | 6 + .../Prototypes/Floof/StatusIcon/hypnosis.yml | 13 + Resources/Prototypes/Floof/psionics.yml | 12 + .../Floof/Interface/Actions/hypno.png | Bin 0 -> 358 bytes .../Interface/Misc/hypno_icons.rsi/master.png | Bin 0 -> 184 bytes .../Interface/Misc/hypno_icons.rsi/meta.json | 17 ++ .../Misc/hypno_icons.rsi/subject.png | Bin 0 -> 185 bytes 15 files changed, 440 insertions(+) create mode 100644 Content.Client/Floofstation/HypnotizedSystem.cs create mode 100644 Content.Client/Floofstation/PsionicHypnoSystem.cs create mode 100644 Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs create mode 100644 Content.Shared/Floofstation/Actions/Events/HypnoPowerActionEvent.cs create mode 100644 Content.Shared/Floofstation/Hypno/HypnotizedComponent.cs create mode 100644 Content.Shared/Floofstation/Hypno/PsionicHypnoComponent.cs create mode 100644 Resources/Locale/en-US/Floof/hypno.ftl create mode 100644 Resources/Prototypes/Floof/Actions/psionics.yml create mode 100644 Resources/Prototypes/Floof/StatusIcon/hypnosis.yml create mode 100644 Resources/Prototypes/Floof/psionics.yml create mode 100644 Resources/Textures/Floof/Interface/Actions/hypno.png create mode 100644 Resources/Textures/Floof/Interface/Misc/hypno_icons.rsi/master.png create mode 100644 Resources/Textures/Floof/Interface/Misc/hypno_icons.rsi/meta.json create mode 100644 Resources/Textures/Floof/Interface/Misc/hypno_icons.rsi/subject.png diff --git a/Content.Client/Floofstation/HypnotizedSystem.cs b/Content.Client/Floofstation/HypnotizedSystem.cs new file mode 100644 index 0000000000..992c43ca72 --- /dev/null +++ b/Content.Client/Floofstation/HypnotizedSystem.cs @@ -0,0 +1,35 @@ +using Content.Shared.Floofstation.Hypno; +using Content.Shared.StatusIcon; +using Content.Shared.StatusIcon.Components; +using Robust.Shared.Prototypes; +using Robust.Client.Player; +using Content.Client.Overlays; + +namespace Content.Client.Floofstation; + +public sealed class HypnotizedSystem : EquipmentHudSystem +{ + [Dependency] private readonly IPrototypeManager _prototype = default!; + [Dependency] private readonly IPlayerManager _playerManager = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnGetStatusIconsEvent); + } + + private void OnGetStatusIconsEvent(EntityUid uid, PsionicHypnoComponent component, ref GetStatusIconsEvent args) + { + if (!IsActive || args.InContainer) + return; + + if (_playerManager.LocalEntity is not { Valid: true } player + || !TryComp(player, out var hypnoComp) + || hypnoComp.Master != uid) + return; + + if (_prototype.TryIndex(component.MasterIcon, out var iconPrototype)) + args.StatusIcons.Add(iconPrototype); + } +} diff --git a/Content.Client/Floofstation/PsionicHypnoSystem.cs b/Content.Client/Floofstation/PsionicHypnoSystem.cs new file mode 100644 index 0000000000..7b70be0e2c --- /dev/null +++ b/Content.Client/Floofstation/PsionicHypnoSystem.cs @@ -0,0 +1,35 @@ +using Content.Shared.Floofstation.Hypno; +using Content.Shared.StatusIcon; +using Content.Shared.StatusIcon.Components; +using Robust.Shared.Prototypes; +using Robust.Client.Player; +using Content.Client.Overlays; + +namespace Content.Client.Floofstation; + +public sealed class PsionicHypnoSystem : EquipmentHudSystem +{ + [Dependency] private readonly IPrototypeManager _prototype = default!; + [Dependency] private readonly IPlayerManager _playerManager = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnGetStatusIconsEvent); + } + + private void OnGetStatusIconsEvent(EntityUid uid, HypnotizedComponent component, ref GetStatusIconsEvent args) + { + if (!IsActive || args.InContainer) + return; + + if (_playerManager.LocalEntity is not { Valid: true } player + || !TryComp(player, out var hypnoComp) + || component.Master != player) + return; + + if (_prototype.TryIndex(hypnoComp.SubjectIcon, out var iconPrototype)) + args.StatusIcons.Add(iconPrototype); + } +} diff --git a/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs b/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs new file mode 100644 index 0000000000..6c28bb504f --- /dev/null +++ b/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs @@ -0,0 +1,224 @@ +using Content.Shared.Abilities.Psionics; +using Content.Shared.Actions.Events; +using Content.Shared.Floofstation.Hypno; +using Content.Shared.Popups; +using Content.Server.DoAfter; +using Content.Shared.DoAfter; +using Robust.Shared.Utility; +using Content.Shared.Verbs; +using Content.Shared.Examine; +using Content.Shared.Mood; +using Content.Server.Chat.Managers; +using Content.Shared.Chat; +using Robust.Server.Player; +using Content.Shared.Database; +using Content.Shared.Administration.Logs; +using Content.Shared.Mobs.Systems; +using Content.Shared.Mobs.Components; + + +namespace Content.Server.Abilities.Psionics +{ + public sealed class PsionicHypnoSystem : EntitySystem + { + [Dependency] private readonly SharedPsionicAbilitiesSystem _psionics = default!; + [Dependency] private readonly DoAfterSystem _doAfterSystem = default!; + [Dependency] private readonly SharedPopupSystem _popups = default!; + [Dependency] private readonly IChatManager _chatManager = default!; + [Dependency] private readonly IPlayerManager _playerManager = default!; + [Dependency] private readonly ISharedAdminLogManager _adminLog = default!; + [Dependency] private readonly MobStateSystem _mobState = default!; + + public override void Initialize() + { + base.Initialize(); + SubscribeLocalEvent(OnPowerUsed); + SubscribeLocalEvent>(ReleaseSubjectVerb); + SubscribeLocalEvent(OnDispelledHypnotized); + SubscribeLocalEvent(OnDispelled); + SubscribeLocalEvent(OnDoAfter); + SubscribeLocalEvent((uid, _, args) => OnExamine(uid, args)); + } + + private void OnPowerUsed(EntityUid uid, PsionicHypnoComponent component, HypnoPowerActionEvent args) + { + if (!_psionics.OnAttemptPowerUse(args.Performer, "hypno") + || TryComp(args.Target, out var mob) + || !_mobState.IsDead(args.Target, mob) + || !_mobState.IsCritical(args.Target, mob)) + return; + + if (component.Subjects >= component.MaxSubjects) + { + _popups.PopupEntity(Loc.GetString("hypno-max-subject"), uid, uid, PopupType.Large); + return; + } + + if (HasComp(args.Target)) + { + _popups.PopupEntity(Loc.GetString("hypno-already-under"), uid, uid, PopupType.Large); + return; + } + + _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, uid, component.UseDelay, new PsionicHypnosisDoAfterEvent(1), uid, target: args.Target) + { + Hidden = true, + BreakOnTargetMove = true, + BreakOnDamage = true, + BreakOnUserMove = true + }, out var doAfterId); + + component.DoAfter = doAfterId; + + _popups.PopupEntity(Loc.GetString("hypno-start", ("entity", args.Target)), uid, uid, PopupType.LargeCaution); + _popups.PopupEntity(Loc.GetString("hypno-phase-1", ("entity", uid)), uid, args.Target, PopupType.Small); + + args.Handled = true; + _psionics.LogPowerUsed(args.Performer, "hypno"); + } + + private void OnDispelled(EntityUid uid, PsionicHypnoComponent component, DispelledEvent args) + { + if (component.DoAfter is null) + return; + + _doAfterSystem.Cancel(component.DoAfter); + component.DoAfter = null; + args.Handled = true; + } + + private void OnDispelledHypnotized(EntityUid uid, HypnotizedComponent component, DispelledEvent args) + { + StopHypno(uid, component); + } + + private void ReleaseSubjectVerb(EntityUid uid, PsionicHypnoComponent component, GetVerbsEvent args) + { + if (args.User == args.Target) + return; + + InnateVerb verbReleaseHypno = new() + { + Act = () => StopHypno(uid), + Text = Loc.GetString("hypno-release"), + Icon = new SpriteSpecifier.Texture(new ResPath("/Textures/Floof/Interface/Actions/hypno.png")), + Priority = 1 + }; + args.Verbs.Add(verbReleaseHypno); + } + + private void OnDoAfter(EntityUid uid, PsionicHypnoComponent component, PsionicHypnosisDoAfterEvent args) + { + if (component is null) + return; + + component.DoAfter = null; + + if (args.Target is null + || args.Cancelled) + return; + + if (args.Phase == 1) + { + _popups.PopupEntity(Loc.GetString("hypno-phase-2", ("entity", uid)), uid, args.Target.Value, PopupType.Medium); + + _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, uid, component.UseDelay, new PsionicHypnosisDoAfterEvent(2), uid, target: args.Target) + { + Hidden = true, + BreakOnTargetMove = true, + BreakOnDamage = true, + BreakOnUserMove = true + }, out var doAfterId); + component.DoAfter = doAfterId; + } + else if (args.Phase == 2) + { + _popups.PopupEntity(Loc.GetString("hypno-phase-3"), uid, args.Target.Value, PopupType.Medium); + + _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, uid, component.UseDelay, new PsionicHypnosisDoAfterEvent(3), uid, target: args.Target) + { + Hidden = true, + BreakOnTargetMove = true, + BreakOnDamage = true, + BreakOnUserMove = true + }, out var doAfterId); + component.DoAfter = doAfterId; + } + else + { + _popups.PopupEntity(Loc.GetString("hypno-success"), uid, uid, PopupType.LargeCaution); + + Hypnotize(uid, args.Target.Value, component); + } + } + + public void Hypnotize(EntityUid uid, EntityUid target, PsionicHypnoComponent? component = null) + { + if (!Resolve(uid, ref component)) + return; + + EnsureComp(target, out var hypnotized); + hypnotized.Master = uid; + + Dirty(target, hypnotized); + + component.Subjects += 1; + + _adminLog.Add(LogType.Action, LogImpact.High, $"{ToPrettyString(uid)} hypnotized {ToPrettyString(target)}"); + + RaiseLocalEvent(target, new MoodEffectEvent("BeingHypnotized")); + + if (_playerManager.TryGetSessionByEntity(target, out var session) + || session is not null) + { + var message = Loc.GetString("hypnotized", ("entity", uid)); + _chatManager.ChatMessageToOne( + ChatChannel.Emotes, + message, + message, + EntityUid.Invalid, + false, + session.Channel); + } + } + + public void StopHypno(EntityUid uid, HypnotizedComponent? component = null) + { + if (!Resolve(uid, ref component)) + return; + + _adminLog.Add(LogType.Action, LogImpact.High, $"{ToPrettyString(uid)} is not longer hypnotized."); + + _popups.PopupEntity(Loc.GetString("hypno-free"), uid, uid, PopupType.LargeCaution); + + if (_playerManager.TryGetSessionByEntity(uid, out var session) + || session is not null) + { + var message = Loc.GetString("stophypno", ("entity", uid)); + _chatManager.ChatMessageToOne( + ChatChannel.Emotes, + message, + message, + EntityUid.Invalid, + false, + session.Channel); + } + + if (component.Master is not null + && TryComp(component.Master, out var hypnotist)) + { + hypnotist.Subjects -= 1; + _popups.PopupEntity(Loc.GetString("lost-subject"), uid, uid, PopupType.LargeCaution); + } + + RemComp(uid, component); + } + + private void OnExamine(EntityUid uid, ExaminedEvent args) + { + args.PushMarkup(Loc.GetString("examined-hypno"), -1); + } + } +} + + diff --git a/Content.Shared/Floofstation/Actions/Events/HypnoPowerActionEvent.cs b/Content.Shared/Floofstation/Actions/Events/HypnoPowerActionEvent.cs new file mode 100644 index 0000000000..8c2aba6641 --- /dev/null +++ b/Content.Shared/Floofstation/Actions/Events/HypnoPowerActionEvent.cs @@ -0,0 +1,2 @@ +namespace Content.Shared.Actions.Events; +public sealed partial class HypnoPowerActionEvent : EntityTargetActionEvent { } diff --git a/Content.Shared/Floofstation/Hypno/HypnotizedComponent.cs b/Content.Shared/Floofstation/Hypno/HypnotizedComponent.cs new file mode 100644 index 0000000000..f6e027c507 --- /dev/null +++ b/Content.Shared/Floofstation/Hypno/HypnotizedComponent.cs @@ -0,0 +1,10 @@ +using Robust.Shared.GameStates; + +namespace Content.Shared.Floofstation.Hypno; + +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] +public sealed partial class HypnotizedComponent : Component +{ + [DataField, AutoNetworkedField] + public EntityUid? Master; +} diff --git a/Content.Shared/Floofstation/Hypno/PsionicHypnoComponent.cs b/Content.Shared/Floofstation/Hypno/PsionicHypnoComponent.cs new file mode 100644 index 0000000000..99a1f9130e --- /dev/null +++ b/Content.Shared/Floofstation/Hypno/PsionicHypnoComponent.cs @@ -0,0 +1,42 @@ +using Content.Shared.DoAfter; +using Robust.Shared.Serialization; +using Robust.Shared.GameStates; + +namespace Content.Shared.Floofstation.Hypno; + +[RegisterComponent, NetworkedComponent] + +public sealed partial class PsionicHypnoComponent : Component +{ + [DataField] + public float UseDelay = 2f; + + [DataField] + public float Subjects = 0; + + [DataField] + public float MaxSubjects = 1; + + [DataField] + public DoAfterId? DoAfter; + + [DataField] + public string MasterIcon = "HypnoMaster"; + + [DataField] + public string SubjectIcon = "HypnoSubject"; +} + +[Serializable, NetSerializable] +public sealed partial class PsionicHypnosisDoAfterEvent : DoAfterEvent +{ + [DataField("phase", required: true)] + public int Phase; + + public PsionicHypnosisDoAfterEvent(int phase) + { + Phase = phase; + } + + public override DoAfterEvent Clone() => this; +} diff --git a/Resources/Locale/en-US/Floof/hypno.ftl b/Resources/Locale/en-US/Floof/hypno.ftl new file mode 100644 index 0000000000..34c8d26889 --- /dev/null +++ b/Resources/Locale/en-US/Floof/hypno.ftl @@ -0,0 +1,26 @@ +action-name-hypno = Psionic Hypnosis +action-description-hypno = You are capable to hypnotize people and make them do your bidding. + +hypnosis-power-initialization-feedback = I am ready to hypnotize and make peoples do my bidding, reaching them in the deepest of their mind and play with their minds to fully control them. +hypnosis-power-feedback = {CAPITALIZE($entity)} wields the power to control minds. + +hypno-max-subject = I cannot take more subjects. +hypno-already-under = His already hypnotized. +examined-hypno = Looks mindless, happy... +lost-subject = I lost the control of one of my subjects. +hypno-free = I feel able to make my own toughts again. +hypno-release = Release Subject + +hypno-start = You stare at {CAPITALIZE($entity)} eyes... +hypno-phase-1 = {CAPITALIZE($entity)} eyes glows in such pretty colors... its hard to look away... +hypno-phase-2 = The more you stare at {CAPITALIZE($entity)} eyes... the more its is hard to think... to have a tought... +hypno-phase-3 = What im i doing again? Its soo hard to think... maybe i should not think and just stare... its just... soo pretty... +hypno-success = {CAPITALIZE($entity)} stares at your eyes... lost in them, happy... hypnotized. + +mood-effect-BeingHypnotized = Its soo nice to not think, to be mindless... i love to obey... + +hypnotized = [bold][color=red]You are hypnotized! + You are now completely loyal to {CAPITALIZE($entity)}.[/color][/bold] + +stophypno = [bold][color=red]You are no longer hypnotized! + You are not anymore loyal to {CAPITALIZE($entity)}, you can now make your own toughts.[/color][/bold] diff --git a/Resources/Prototypes/Floof/Actions/psionics.yml b/Resources/Prototypes/Floof/Actions/psionics.yml new file mode 100644 index 0000000000..4bb52dd0ce --- /dev/null +++ b/Resources/Prototypes/Floof/Actions/psionics.yml @@ -0,0 +1,18 @@ +- type: entity + id: ActionHypno + name: action-name-hypno + description: action-description-hypno + noSpawn: true + components: + - type: EntityTargetAction + icon: Floof/Interface/Actions/hypno.png + useDelay: 5 + checkCanAccess: false + range: 6 + itemIconStyle: BigAction + canTargetSelf: true + blacklist: + components: + - PsionicInsulation + - Mindbroken + event: !type:HypnoPowerActionEvent diff --git a/Resources/Prototypes/Floof/Mood/genericPositiveEffects.yml b/Resources/Prototypes/Floof/Mood/genericPositiveEffects.yml index 9646bf40f8..4654c45270 100644 --- a/Resources/Prototypes/Floof/Mood/genericPositiveEffects.yml +++ b/Resources/Prototypes/Floof/Mood/genericPositiveEffects.yml @@ -9,3 +9,9 @@ moodChange: 4 timeout: 120 category: PositiveInteraction + +- type: moodEffect + id: BeingHypnotized + moodChange: 10 + timeout: 300 + category: PositiveInteraction diff --git a/Resources/Prototypes/Floof/StatusIcon/hypnosis.yml b/Resources/Prototypes/Floof/StatusIcon/hypnosis.yml new file mode 100644 index 0000000000..6de1ed2f5b --- /dev/null +++ b/Resources/Prototypes/Floof/StatusIcon/hypnosis.yml @@ -0,0 +1,13 @@ +- type: statusIcon + id: HypnoMaster + priority: 11 + icon: + sprite: /Textures/Floof/Interface/Misc/hypno_icons.rsi + state: Master + +- type: statusIcon + id: HypnoSubject + priority: 11 + icon: + sprite: /Textures/Floof/Interface/Misc/hypno_icons.rsi + state: Subject diff --git a/Resources/Prototypes/Floof/psionics.yml b/Resources/Prototypes/Floof/psionics.yml new file mode 100644 index 0000000000..159b0bab63 --- /dev/null +++ b/Resources/Prototypes/Floof/psionics.yml @@ -0,0 +1,12 @@ +- type: psionicPower + id: HypnosisPower + name: Psionic Hypnosis + description: action-description-hypno + actions: + - ActionHypno + components: + - type: PsionicHypno + initializationFeedback: hypnosis-power-initialization-feedback + metapsionicFeedback: hypnosis-power-feedback + amplificationModifier: 1 + powerSlotCost: 1 diff --git a/Resources/Textures/Floof/Interface/Actions/hypno.png b/Resources/Textures/Floof/Interface/Actions/hypno.png new file mode 100644 index 0000000000000000000000000000000000000000..a36882018a0c21704a197e01853c6e3ded1927a3 GIT binary patch literal 358 zcmV-s0h#`ZP)bQtvquA+b6JOZh*M~>8VhZ${p=i7I1)QODbgTDR&@4l%D;? z$ohKzo*4uDj~en040$wSpaq4E1&0Eljlq!)P7uR{RyI5_iO>;(2F8p;Y*TDZOglA) zkWPmbblRujUWVQ7`$N!Nc1nyM`k=XpL41zNMt0{bjg1i;L5vb=2*5k^T)lM42jy48 zA;IYgXI6gCa=K3KdiqVB?pZ+=0_}Jm+U~dzv?W=4G>Zl5dZ)H07*qoM6N<$ Ef;;w-n*aa+ literal 0 HcmV?d00001 diff --git a/Resources/Textures/Floof/Interface/Misc/hypno_icons.rsi/master.png b/Resources/Textures/Floof/Interface/Misc/hypno_icons.rsi/master.png new file mode 100644 index 0000000000000000000000000000000000000000..5a78e3fd37afc14d716009ccba3b13017591007e GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqjKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL0?Z7#}JL+k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`211o(uw<}ooXU%veR|NlUNU*FT`g4C4+`2~YS9JE$`0rEKuJR*x382Ao@ zFyrz36)8YLHBT4E5Q*^Qgfs?bg`+1}Sb7}Hgq1lMBnt#LFbH!oYq4HDcYue1Q=h@1 TdU?xspbiF4S3j3^P6 Date: Thu, 31 Oct 2024 05:44:23 +0100 Subject: [PATCH 2/9] Apply Fixes and changes --- .../Psionics/Abilities/PsionicHypnoSystem.cs | 49 ++++++++++++++++--- .../Hypno/PsionicHypnoComponent.cs | 5 +- Resources/Locale/en-US/Floof/hypno.ftl | 6 ++- .../Prototypes/Floof/Actions/psionics.yml | 4 +- .../Floof/Mood/genericPositiveEffects.yml | 6 ++- .../Prototypes/Nyanotrasen/psionicPowers.yml | 3 +- 6 files changed, 60 insertions(+), 13 deletions(-) diff --git a/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs b/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs index 6c28bb504f..2ded4c4c8f 100644 --- a/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs +++ b/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs @@ -15,6 +15,12 @@ using Content.Shared.Administration.Logs; using Content.Shared.Mobs.Systems; using Content.Shared.Mobs.Components; +using Content.Shared.Mindshield.Components; +using Content.Shared.Psionics; +using Content.Shared.Tag; +using Content.Shared.Implants; +using Content.Shared.Implants.Components; +using Content.Shared.Mindshield.Components; namespace Content.Server.Abilities.Psionics @@ -28,6 +34,7 @@ public sealed class PsionicHypnoSystem : EntitySystem [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly ISharedAdminLogManager _adminLog = default!; [Dependency] private readonly MobStateSystem _mobState = default!; + [Dependency] private readonly TagSystem _tag = default!; public override void Initialize() { @@ -37,15 +44,17 @@ public override void Initialize() SubscribeLocalEvent(OnDispelledHypnotized); SubscribeLocalEvent(OnDispelled); SubscribeLocalEvent(OnDoAfter); + SubscribeLocalEvent(OnMindbreak); + SubscribeLocalEvent(OnMindShield); SubscribeLocalEvent((uid, _, args) => OnExamine(uid, args)); } private void OnPowerUsed(EntityUid uid, PsionicHypnoComponent component, HypnoPowerActionEvent args) { if (!_psionics.OnAttemptPowerUse(args.Performer, "hypno") - || TryComp(args.Target, out var mob) - || !_mobState.IsDead(args.Target, mob) - || !_mobState.IsCritical(args.Target, mob)) + || !TryComp(args.Target, out var mob) + || _mobState.IsDead(args.Target, mob) + || _mobState.IsCritical(args.Target, mob)) return; if (component.Subjects >= component.MaxSubjects) @@ -54,6 +63,12 @@ private void OnPowerUsed(EntityUid uid, PsionicHypnoComponent component, HypnoPo return; } + if (!component.ByPassMindShield && HasComp(args.Target)) + { + _popups.PopupEntity(Loc.GetString("has-mindshield"), uid, uid, PopupType.Large); + return; + } + if (HasComp(args.Target)) { _popups.PopupEntity(Loc.GetString("hypno-already-under"), uid, uid, PopupType.Large); @@ -71,7 +86,7 @@ private void OnPowerUsed(EntityUid uid, PsionicHypnoComponent component, HypnoPo component.DoAfter = doAfterId; _popups.PopupEntity(Loc.GetString("hypno-start", ("entity", args.Target)), uid, uid, PopupType.LargeCaution); - _popups.PopupEntity(Loc.GetString("hypno-phase-1", ("entity", uid)), uid, args.Target, PopupType.Small); + _popups.PopupEntity(Loc.GetString("hypno-phase-1", ("entity", uid)), args.Target, args.Target, PopupType.Small); args.Handled = true; _psionics.LogPowerUsed(args.Performer, "hypno"); @@ -92,6 +107,24 @@ private void OnDispelledHypnotized(EntityUid uid, HypnotizedComponent component, StopHypno(uid, component); } + private void OnMindbreak(EntityUid uid, HypnotizedComponent component, ref OnMindbreakEvent args) + { + StopHypno(uid, component); + } + + private void OnMindShield(EntityUid uid, HypnotizedComponent component, ref ImplantImplantedEvent ev) + { + if (_tag.HasTag(ev.Implant, "MindShield") && ev.Implanted != null) + { + if (component.Master is not null + && TryComp(component.Master, out var hypnotist) + && hypnotist.ByPassMindShield) + return; + + StopHypno(uid, component); + } + } + private void ReleaseSubjectVerb(EntityUid uid, PsionicHypnoComponent component, GetVerbsEvent args) { if (args.User == args.Target) @@ -99,7 +132,7 @@ private void ReleaseSubjectVerb(EntityUid uid, PsionicHypnoComponent component, InnateVerb verbReleaseHypno = new() { - Act = () => StopHypno(uid), + Act = () => StopHypno(args.Target), Text = Loc.GetString("hypno-release"), Icon = new SpriteSpecifier.Texture(new ResPath("/Textures/Floof/Interface/Actions/hypno.png")), Priority = 1 @@ -120,7 +153,7 @@ private void OnDoAfter(EntityUid uid, PsionicHypnoComponent component, PsionicHy if (args.Phase == 1) { - _popups.PopupEntity(Loc.GetString("hypno-phase-2", ("entity", uid)), uid, args.Target.Value, PopupType.Medium); + _popups.PopupEntity(Loc.GetString("hypno-phase-2", ("entity", uid)), args.Target.Value, args.Target.Value, PopupType.Medium); _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, uid, component.UseDelay, new PsionicHypnosisDoAfterEvent(2), uid, target: args.Target) { @@ -133,7 +166,7 @@ private void OnDoAfter(EntityUid uid, PsionicHypnoComponent component, PsionicHy } else if (args.Phase == 2) { - _popups.PopupEntity(Loc.GetString("hypno-phase-3"), uid, args.Target.Value, PopupType.Medium); + _popups.PopupEntity(Loc.GetString("hypno-phase-3"), args.Target.Value, args.Target.Value, PopupType.Medium); _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, uid, component.UseDelay, new PsionicHypnosisDoAfterEvent(3), uid, target: args.Target) { @@ -191,6 +224,8 @@ public void StopHypno(EntityUid uid, HypnotizedComponent? component = null) _popups.PopupEntity(Loc.GetString("hypno-free"), uid, uid, PopupType.LargeCaution); + RaiseLocalEvent(uid, new MoodEffectEvent("LostHypnosis")); + if (_playerManager.TryGetSessionByEntity(uid, out var session) || session is not null) { diff --git a/Content.Shared/Floofstation/Hypno/PsionicHypnoComponent.cs b/Content.Shared/Floofstation/Hypno/PsionicHypnoComponent.cs index 99a1f9130e..c3c390af3d 100644 --- a/Content.Shared/Floofstation/Hypno/PsionicHypnoComponent.cs +++ b/Content.Shared/Floofstation/Hypno/PsionicHypnoComponent.cs @@ -9,7 +9,7 @@ namespace Content.Shared.Floofstation.Hypno; public sealed partial class PsionicHypnoComponent : Component { [DataField] - public float UseDelay = 2f; + public float UseDelay = 10f; [DataField] public float Subjects = 0; @@ -17,6 +17,9 @@ public sealed partial class PsionicHypnoComponent : Component [DataField] public float MaxSubjects = 1; + [DataField] + public bool ByPassMindShield = false; + [DataField] public DoAfterId? DoAfter; diff --git a/Resources/Locale/en-US/Floof/hypno.ftl b/Resources/Locale/en-US/Floof/hypno.ftl index 34c8d26889..227b87ff31 100644 --- a/Resources/Locale/en-US/Floof/hypno.ftl +++ b/Resources/Locale/en-US/Floof/hypno.ftl @@ -11,16 +11,20 @@ lost-subject = I lost the control of one of my subjects. hypno-free = I feel able to make my own toughts again. hypno-release = Release Subject -hypno-start = You stare at {CAPITALIZE($entity)} eyes... +hypno-start = You stare into {CAPITALIZE($entity)} eyes... hypno-phase-1 = {CAPITALIZE($entity)} eyes glows in such pretty colors... its hard to look away... hypno-phase-2 = The more you stare at {CAPITALIZE($entity)} eyes... the more its is hard to think... to have a tought... hypno-phase-3 = What im i doing again? Its soo hard to think... maybe i should not think and just stare... its just... soo pretty... hypno-success = {CAPITALIZE($entity)} stares at your eyes... lost in them, happy... hypnotized. mood-effect-BeingHypnotized = Its soo nice to not think, to be mindless... i love to obey... +mood-effect-LostHypnosis = Its was nice to not think... i kinda miss that. + hypnotized = [bold][color=red]You are hypnotized! You are now completely loyal to {CAPITALIZE($entity)}.[/color][/bold] stophypno = [bold][color=red]You are no longer hypnotized! You are not anymore loyal to {CAPITALIZE($entity)}, you can now make your own toughts.[/color][/bold] + +has-mindshield = I cannot enter his mind. diff --git a/Resources/Prototypes/Floof/Actions/psionics.yml b/Resources/Prototypes/Floof/Actions/psionics.yml index 4bb52dd0ce..382ce2f852 100644 --- a/Resources/Prototypes/Floof/Actions/psionics.yml +++ b/Resources/Prototypes/Floof/Actions/psionics.yml @@ -6,9 +6,9 @@ components: - type: EntityTargetAction icon: Floof/Interface/Actions/hypno.png - useDelay: 5 + useDelay: 240 checkCanAccess: false - range: 6 + range: 8 itemIconStyle: BigAction canTargetSelf: true blacklist: diff --git a/Resources/Prototypes/Floof/Mood/genericPositiveEffects.yml b/Resources/Prototypes/Floof/Mood/genericPositiveEffects.yml index 4654c45270..05d1e2473c 100644 --- a/Resources/Prototypes/Floof/Mood/genericPositiveEffects.yml +++ b/Resources/Prototypes/Floof/Mood/genericPositiveEffects.yml @@ -14,4 +14,8 @@ id: BeingHypnotized moodChange: 10 timeout: 300 - category: PositiveInteraction + +- type: moodEffect + id: LostHypnosis + moodChange: -3 + timeout: 120 diff --git a/Resources/Prototypes/Nyanotrasen/psionicPowers.yml b/Resources/Prototypes/Nyanotrasen/psionicPowers.yml index eaa77f05d5..5c34bf99d9 100644 --- a/Resources/Prototypes/Nyanotrasen/psionicPowers.yml +++ b/Resources/Prototypes/Nyanotrasen/psionicPowers.yml @@ -14,4 +14,5 @@ HealingWordPower: 0.85 RevivifyPower: 0.1 ShadeskipPower: 0.15 - TelekineticPulsePower: 0.15 \ No newline at end of file + TelekineticPulsePower: 0.15 + HypnosisPower: 0.15 # Floofstation From 9a5252786f63b2039b85dfbc209b144f1e0b3399 Mon Sep 17 00:00:00 2001 From: FoxxoTrystan Date: Thu, 31 Oct 2024 05:51:13 +0100 Subject: [PATCH 3/9] FTL/Fixes --- Resources/Locale/en-US/Floof/hypno.ftl | 23 +++++++++---------- .../Interface/Misc/hypno_icons.rsi/meta.json | 4 ++-- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Resources/Locale/en-US/Floof/hypno.ftl b/Resources/Locale/en-US/Floof/hypno.ftl index 227b87ff31..98cfd7adc0 100644 --- a/Resources/Locale/en-US/Floof/hypno.ftl +++ b/Resources/Locale/en-US/Floof/hypno.ftl @@ -1,30 +1,29 @@ action-name-hypno = Psionic Hypnosis action-description-hypno = You are capable to hypnotize people and make them do your bidding. -hypnosis-power-initialization-feedback = I am ready to hypnotize and make peoples do my bidding, reaching them in the deepest of their mind and play with their minds to fully control them. +hypnosis-power-initialization-feedback = I am able to hypnotize and make people do my bidding, reaching them in the deepest parts of their mind. hypnosis-power-feedback = {CAPITALIZE($entity)} wields the power to control minds. hypno-max-subject = I cannot take more subjects. -hypno-already-under = His already hypnotized. +hypno-already-under = {CAPITALIZE($target)} is already hypnotized. examined-hypno = Looks mindless, happy... -lost-subject = I lost the control of one of my subjects. +lost-subject = I lost control of one of my subjects. hypno-free = I feel able to make my own toughts again. hypno-release = Release Subject -hypno-start = You stare into {CAPITALIZE($entity)} eyes... -hypno-phase-1 = {CAPITALIZE($entity)} eyes glows in such pretty colors... its hard to look away... -hypno-phase-2 = The more you stare at {CAPITALIZE($entity)} eyes... the more its is hard to think... to have a tought... -hypno-phase-3 = What im i doing again? Its soo hard to think... maybe i should not think and just stare... its just... soo pretty... -hypno-success = {CAPITALIZE($entity)} stares at your eyes... lost in them, happy... hypnotized. - -mood-effect-BeingHypnotized = Its soo nice to not think, to be mindless... i love to obey... -mood-effect-LostHypnosis = Its was nice to not think... i kinda miss that. +hypno-start = You stare into {POSS-ADJ($target)} eyes... +hypno-phase-1 = {CAPITALIZE($entity)} eyes glows in such pretty colors... it's hard to look away... +hypno-phase-2 = The more you stare at {POSS-ADJ($target)} eyes... the more its i's hard to think... to have a thought... +hypno-phase-3 = What was I doing... again? It's so hard to think... maybe I don't need to anymore, just stare... its just... so pretty... +hypno-success = {CAPITALIZE(SUBJECT($target))} stares into your eyes, lost in them, lost in you. +mood-effect-BeingHypnotized = It's nice to not think, to be mindless... I love to obey. +mood-effect-LostHypnosis = It was nice to not think, I miss that. hypnotized = [bold][color=red]You are hypnotized! You are now completely loyal to {CAPITALIZE($entity)}.[/color][/bold] stophypno = [bold][color=red]You are no longer hypnotized! - You are not anymore loyal to {CAPITALIZE($entity)}, you can now make your own toughts.[/color][/bold] + You are no longer loyal to {CAPITALIZE($entity)}, you are now thinking properly again.[/color][/bold] has-mindshield = I cannot enter his mind. diff --git a/Resources/Textures/Floof/Interface/Misc/hypno_icons.rsi/meta.json b/Resources/Textures/Floof/Interface/Misc/hypno_icons.rsi/meta.json index 86c233beeb..0c689cfba7 100644 --- a/Resources/Textures/Floof/Interface/Misc/hypno_icons.rsi/meta.json +++ b/Resources/Textures/Floof/Interface/Misc/hypno_icons.rsi/meta.json @@ -8,10 +8,10 @@ "copyright": "Taken from https://github.com/ParadiseSS13/Paradise/", "states": [ { - "name": "Master" + "name": "master" }, { - "name": "Subject" + "name": "subject" } ] } From 23f26ba6a68426981cee17df5bb659694bd2bad5 Mon Sep 17 00:00:00 2001 From: FoxxoTrystan Date: Thu, 31 Oct 2024 05:52:18 +0100 Subject: [PATCH 4/9] dingus --- Resources/Prototypes/Floof/Actions/psionics.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/Floof/Actions/psionics.yml b/Resources/Prototypes/Floof/Actions/psionics.yml index 382ce2f852..a8d9286d21 100644 --- a/Resources/Prototypes/Floof/Actions/psionics.yml +++ b/Resources/Prototypes/Floof/Actions/psionics.yml @@ -10,7 +10,7 @@ checkCanAccess: false range: 8 itemIconStyle: BigAction - canTargetSelf: true + canTargetSelf: false blacklist: components: - PsionicInsulation From 66b79093a50be073d6a037cf162481befcb7d73a Mon Sep 17 00:00:00 2001 From: FoxxoTrystan Date: Thu, 31 Oct 2024 05:57:28 +0100 Subject: [PATCH 5/9] fixes --- Resources/Prototypes/Floof/Actions/psionics.yml | 2 +- Resources/Prototypes/Floof/StatusIcon/hypnosis.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Resources/Prototypes/Floof/Actions/psionics.yml b/Resources/Prototypes/Floof/Actions/psionics.yml index a8d9286d21..12c3d3c351 100644 --- a/Resources/Prototypes/Floof/Actions/psionics.yml +++ b/Resources/Prototypes/Floof/Actions/psionics.yml @@ -6,7 +6,7 @@ components: - type: EntityTargetAction icon: Floof/Interface/Actions/hypno.png - useDelay: 240 + useDelay: 45 checkCanAccess: false range: 8 itemIconStyle: BigAction diff --git a/Resources/Prototypes/Floof/StatusIcon/hypnosis.yml b/Resources/Prototypes/Floof/StatusIcon/hypnosis.yml index 6de1ed2f5b..3ace66590d 100644 --- a/Resources/Prototypes/Floof/StatusIcon/hypnosis.yml +++ b/Resources/Prototypes/Floof/StatusIcon/hypnosis.yml @@ -3,11 +3,11 @@ priority: 11 icon: sprite: /Textures/Floof/Interface/Misc/hypno_icons.rsi - state: Master + state: master - type: statusIcon id: HypnoSubject priority: 11 icon: sprite: /Textures/Floof/Interface/Misc/hypno_icons.rsi - state: Subject + state: subject From 4e107d349c9aebeb760a456f7b303400af30ea4b Mon Sep 17 00:00:00 2001 From: FoxxoTrystan Date: Thu, 31 Oct 2024 06:01:25 +0100 Subject: [PATCH 6/9] Noice --- .../Abilities/Psionics/Abilities/PsionicHypnoSystem.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs b/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs index 2ded4c4c8f..1954ecfa7d 100644 --- a/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs +++ b/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs @@ -19,8 +19,6 @@ using Content.Shared.Psionics; using Content.Shared.Tag; using Content.Shared.Implants; -using Content.Shared.Implants.Components; -using Content.Shared.Mindshield.Components; namespace Content.Server.Abilities.Psionics @@ -251,7 +249,8 @@ public void StopHypno(EntityUid uid, HypnotizedComponent? component = null) private void OnExamine(EntityUid uid, ExaminedEvent args) { - args.PushMarkup(Loc.GetString("examined-hypno"), -1); + if (args.IsInDetailsRange) + args.PushMarkup(Loc.GetString("examined-hypno"), -1); } } } From 3c6970b51e3d5537792e97bedd41ea9c7448a0ca Mon Sep 17 00:00:00 2001 From: FoxxoTrystan Date: Thu, 31 Oct 2024 06:36:21 +0100 Subject: [PATCH 7/9] FinalTouch --- .../Psionics/Abilities/PsionicHypnoSystem.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs b/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs index 1954ecfa7d..5b517abb62 100644 --- a/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs +++ b/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs @@ -69,7 +69,7 @@ private void OnPowerUsed(EntityUid uid, PsionicHypnoComponent component, HypnoPo if (HasComp(args.Target)) { - _popups.PopupEntity(Loc.GetString("hypno-already-under"), uid, uid, PopupType.Large); + _popups.PopupEntity(Loc.GetString("hypno-already-under", ("target", uid)), uid, uid, PopupType.Large); return; } @@ -83,8 +83,8 @@ private void OnPowerUsed(EntityUid uid, PsionicHypnoComponent component, HypnoPo component.DoAfter = doAfterId; - _popups.PopupEntity(Loc.GetString("hypno-start", ("entity", args.Target)), uid, uid, PopupType.LargeCaution); - _popups.PopupEntity(Loc.GetString("hypno-phase-1", ("entity", uid)), args.Target, args.Target, PopupType.Small); + _popups.PopupEntity(Loc.GetString("hypno-start", ("target", args.Target)), uid, uid, PopupType.LargeCaution); + _popups.PopupEntity(Loc.GetString("hypno-phase-1", ("target", uid)), args.Target, args.Target, PopupType.Small); args.Handled = true; _psionics.LogPowerUsed(args.Performer, "hypno"); @@ -151,7 +151,7 @@ private void OnDoAfter(EntityUid uid, PsionicHypnoComponent component, PsionicHy if (args.Phase == 1) { - _popups.PopupEntity(Loc.GetString("hypno-phase-2", ("entity", uid)), args.Target.Value, args.Target.Value, PopupType.Medium); + _popups.PopupEntity(Loc.GetString("hypno-phase-2", ("target", uid)), args.Target.Value, args.Target.Value, PopupType.Medium); _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, uid, component.UseDelay, new PsionicHypnosisDoAfterEvent(2), uid, target: args.Target) { @@ -177,7 +177,7 @@ private void OnDoAfter(EntityUid uid, PsionicHypnoComponent component, PsionicHy } else { - _popups.PopupEntity(Loc.GetString("hypno-success"), uid, uid, PopupType.LargeCaution); + _popups.PopupEntity(Loc.GetString("hypno-success", ("target", uid)), uid, uid, PopupType.LargeCaution); Hypnotize(uid, args.Target.Value, component); } @@ -241,7 +241,7 @@ public void StopHypno(EntityUid uid, HypnotizedComponent? component = null) && TryComp(component.Master, out var hypnotist)) { hypnotist.Subjects -= 1; - _popups.PopupEntity(Loc.GetString("lost-subject"), uid, uid, PopupType.LargeCaution); + _popups.PopupEntity(Loc.GetString("lost-subject"), hypnotist.Owner, hypnotist.Owner, PopupType.LargeCaution); } RemComp(uid, component); From ae4341c9830443a91a88271916abee7462df8f98 Mon Sep 17 00:00:00 2001 From: FoxxoTrystan Date: Fri, 1 Nov 2024 19:36:25 +0100 Subject: [PATCH 8/9] MindSwap Fix --- .../Psionics/Abilities/MindSwapPowerSystem.cs | 32 +++++++++++++++++-- .../MindSwap/MindSwapPowerComponent.cs | 16 +++++++++- Resources/Prototypes/Actions/psionics.yml | 3 +- 3 files changed, 46 insertions(+), 5 deletions(-) diff --git a/Content.Server/Abilities/Psionics/Abilities/MindSwapPowerSystem.cs b/Content.Server/Abilities/Psionics/Abilities/MindSwapPowerSystem.cs index 869bf269ab..4bd2a08d43 100644 --- a/Content.Server/Abilities/Psionics/Abilities/MindSwapPowerSystem.cs +++ b/Content.Server/Abilities/Psionics/Abilities/MindSwapPowerSystem.cs @@ -12,6 +12,8 @@ using Content.Server.GameTicking; using Content.Shared.Mind; using Content.Shared.Actions.Events; +using Content.Server.DoAfter; +using Content.Shared.DoAfter; namespace Content.Server.Abilities.Psionics { @@ -23,11 +25,13 @@ public sealed class MindSwapPowerSystem : EntitySystem [Dependency] private readonly PopupSystem _popupSystem = default!; [Dependency] private readonly MindSystem _mindSystem = default!; [Dependency] private readonly MetaDataSystem _metaDataSystem = default!; + [Dependency] private readonly DoAfterSystem _doAfterSystem = default!; public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnPowerUsed); + SubscribeLocalEvent(OnPowerUsed); + SubscribeLocalEvent(OnDoAfter); SubscribeLocalEvent(OnPowerReturned); SubscribeLocalEvent(OnDispelled); SubscribeLocalEvent(OnMobStateChanged); @@ -36,18 +40,40 @@ public override void Initialize() SubscribeLocalEvent(OnSwapInit); } - private void OnPowerUsed(MindSwapPowerActionEvent args) + private void OnPowerUsed(EntityUid uid, MindSwapPowerComponent component, MindSwapPowerActionEvent args) { if (!_psionics.OnAttemptPowerUse(args.Performer, "mind swap") || !(TryComp(args.Target, out var damageable) && damageable.DamageContainerID == "Biological")) return; - Swap(args.Performer, args.Target); + _doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, args.Performer, component.UseDelay, new MindSwapPowerDoAfterEvent(), args.Performer, target: args.Target) + { + Hidden = true, + BreakOnTargetMove = true, + BreakOnDamage = true, + BreakOnUserMove = true + }, out var doAfterId); + + if (TryComp(uid, out var magic)) + magic.DoAfter = doAfterId; _psionics.LogPowerUsed(args.Performer, "mind swap"); args.Handled = true; } + private void OnDoAfter(EntityUid uid, PsionicComponent component, MindSwapPowerDoAfterEvent args) + { + if (component is null) + return; + component.DoAfter = null; + + if (args.Target is null + || args.Cancelled) + return; + + Swap(uid, args.Target.Value); + } + private void OnPowerReturned(EntityUid uid, MindSwappedComponent component, MindSwapPowerReturnActionEvent args) { if (HasComp(component.OriginalEntity) || HasComp(uid)) diff --git a/Content.Shared/Psionics/Abilities/MindSwap/MindSwapPowerComponent.cs b/Content.Shared/Psionics/Abilities/MindSwap/MindSwapPowerComponent.cs index 216972df1e..3a33a5be35 100644 --- a/Content.Shared/Psionics/Abilities/MindSwap/MindSwapPowerComponent.cs +++ b/Content.Shared/Psionics/Abilities/MindSwap/MindSwapPowerComponent.cs @@ -1,5 +1,19 @@ +using Content.Shared.DoAfter; +using Robust.Shared.Serialization; + namespace Content.Shared.Abilities.Psionics { [RegisterComponent] - public sealed partial class MindSwapPowerComponent : Component { } + public sealed partial class MindSwapPowerComponent : Component + { + [DataField] + public float UseDelay = 5f; + } + + [Serializable, NetSerializable] + public sealed partial class MindSwapPowerDoAfterEvent : DoAfterEvent + { + public override DoAfterEvent Clone() => this; + } + } diff --git a/Resources/Prototypes/Actions/psionics.yml b/Resources/Prototypes/Actions/psionics.yml index 70f7846088..4feb89817d 100644 --- a/Resources/Prototypes/Actions/psionics.yml +++ b/Resources/Prototypes/Actions/psionics.yml @@ -39,7 +39,7 @@ components: - type: EntityTargetAction icon: Interface/VerbIcons/mind_swap.png - useDelay: 240 + useDelay: 120 checkCanAccess: false range: 8 itemIconStyle: BigAction @@ -47,6 +47,7 @@ components: - PsionicInsulation - Mindbroken + - MindShield event: !type:MindSwapPowerActionEvent - type: entity From 87dc1da98e7c5e65281ebb75b1b173e43cb14bb2 Mon Sep 17 00:00:00 2001 From: FoxxoTrystan Date: Fri, 1 Nov 2024 20:06:12 +0100 Subject: [PATCH 9/9] Oops --- .../Abilities/Psionics/Abilities/PsionicHypnoSystem.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs b/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs index 5b517abb62..d2c2c63749 100644 --- a/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs +++ b/Content.Server/FloofStation/Abilities/Psionics/Abilities/PsionicHypnoSystem.cs @@ -125,7 +125,9 @@ private void OnMindShield(EntityUid uid, HypnotizedComponent component, ref Impl private void ReleaseSubjectVerb(EntityUid uid, PsionicHypnoComponent component, GetVerbsEvent args) { - if (args.User == args.Target) + if (args.User == args.Target + || !TryComp(args.Target, out var hypno) + || args.User != uid) return; InnateVerb verbReleaseHypno = new()