From 2c46d4cdc2b9803d407d073d3267e0dd1e3cd619 Mon Sep 17 00:00:00 2001 From: deltanedas <@deltanedas:kde.org> Date: Tue, 13 Feb 2024 09:16:22 +0000 Subject: [PATCH] fixy --- .../Systems/ParadoxAnomalySystem.cs | 19 +++++++++++------- .../game-rules/rule-paradox-anomaly.ftl | 5 +++++ .../ghost/roles/ghost-role-component.ftl | 4 ++++ .../objectives/conditions/paradox-anomaly.ftl | 1 + .../game-rules/rule-terminator.ftl | 6 +++++- .../Entities/Markers/Spawners/ghost_roles.yml | 6 +++++- .../DeltaV/Objectives/paradox_anomaly.yml | 20 ++++++++++++++++--- 7 files changed, 49 insertions(+), 12 deletions(-) create mode 100644 Resources/Locale/en-US/deltav/game-ticking/game-rules/rule-paradox-anomaly.ftl diff --git a/Content.Server/DeltaV/ParadoxAnomaly/Systems/ParadoxAnomalySystem.cs b/Content.Server/DeltaV/ParadoxAnomaly/Systems/ParadoxAnomalySystem.cs index 1689829c1da..62d994dac34 100644 --- a/Content.Server/DeltaV/ParadoxAnomaly/Systems/ParadoxAnomalySystem.cs +++ b/Content.Server/DeltaV/ParadoxAnomaly/Systems/ParadoxAnomalySystem.cs @@ -1,6 +1,8 @@ using Content.Server.DeltaV.ParadoxAnomaly.Components; using Content.Server.DetailExaminable; using Content.Server.GenericAntag; +using Content.Server.Ghost.Roles; +using Content.Server.Ghost.Roles.Components; using Content.Server.Psionics; using Content.Server.Spawners.Components; using Content.Server.Station.Systems; @@ -12,7 +14,6 @@ using Content.Shared.Preferences; using Content.Shared.Roles; using Content.Shared.Roles.Jobs; -using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Utility; @@ -27,6 +28,7 @@ namespace Content.Server.DeltaV.ParadoxAnomaly.Systems; public sealed class ParadoxAnomalySystem : EntitySystem { [Dependency] private readonly GenericAntagSystem _genericAntag = default!; + [Dependency] private readonly GhostRoleSystem _ghostRole = default!; [Dependency] private readonly IPrototypeManager _proto = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly MetaDataSystem _metaData = default!; @@ -42,18 +44,21 @@ public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnPlayerAttached); + SubscribeLocalEvent(OnTakeGhostRole); } - private void OnPlayerAttached(Entity ent, ref PlayerAttachedEvent args) + private void OnTakeGhostRole(Entity ent, ref TakeGhostRoleEvent args) { - if (!_mind.TryGetMind(args.Player, out var mindId, out var mind)) - return; - + Log.Info($"Using paradox anomaly spawner {ent}"); if (!TrySpawnParadoxAnomaly(ent.Comp.Rule, out var twin)) return; - _mind.TransferTo(mindId, twin, ghostCheckOverride: true, mind: mind); + Log.Info($"Created paradox anomaly {ToPrettyString(twin):twin}"); + var role = Comp(ent); + _ghostRole.GhostRoleInternalCreateMindAndTransfer(args.Player, ent, twin.Value, role); + _ghostRole.UnregisterGhostRole((ent.Owner, role)); + + args.TookRole = true; QueueDel(ent); } diff --git a/Resources/Locale/en-US/deltav/game-ticking/game-rules/rule-paradox-anomaly.ftl b/Resources/Locale/en-US/deltav/game-ticking/game-rules/rule-paradox-anomaly.ftl new file mode 100644 index 00000000000..45bd554deef --- /dev/null +++ b/Resources/Locale/en-US/deltav/game-ticking/game-rules/rule-paradox-anomaly.ftl @@ -0,0 +1,5 @@ +paradox-anomaly-round-end-agent-name = Paradox Anomaly + +objective-issuer-self = [color=#1708EC]Self[/color] + +# briefing is in terminator ftl diff --git a/Resources/Locale/en-US/deltav/ghost/roles/ghost-role-component.ftl b/Resources/Locale/en-US/deltav/ghost/roles/ghost-role-component.ftl index f2e9238dfbf..977a5f47bcb 100644 --- a/Resources/Locale/en-US/deltav/ghost/roles/ghost-role-component.ftl +++ b/Resources/Locale/en-US/deltav/ghost/roles/ghost-role-component.ftl @@ -6,3 +6,7 @@ ghost-role-information-nukie-mouse-rules = Normal syndicate antagonist rules app ghost-role-information-listeningop-name = Listening Post Operative ghost-role-information-listeningop-description = You are a Listening Post operative. Get into range, observe the station, intercept communications and assist any operatives in the area! ghost-role-information-listeningop-rules = You are a Syndicate Operative tasked with the continuous reporting and monitoring of the station and its activities, as well as assisting any fellow operatives who may be aboard the station. As an antagonist, do whatever is required for you to complete this task. Make sure your station doesn't fall into enemy hands and DO NOT abandon your station! Hide your existence at any cost! + +ghost-role-information-paradox-anomaly-name = Paradox Anomaly +ghost-role-information-paradox-anomaly-description = Replace your double, or befriend them. +ghost-role-information-paradox-anomaly-rules = Try and replace your twin with this funny roleplay antag rather than plasma flooding the station or something. You can also just befriend them. diff --git a/Resources/Locale/en-US/deltav/objectives/conditions/paradox-anomaly.ftl b/Resources/Locale/en-US/deltav/objectives/conditions/paradox-anomaly.ftl index a06899b6de2..2eac3339bf4 100644 --- a/Resources/Locale/en-US/deltav/objectives/conditions/paradox-anomaly.ftl +++ b/Resources/Locale/en-US/deltav/objectives/conditions/paradox-anomaly.ftl @@ -1 +1,2 @@ +objective-paradox-anomaly-kill-title = Kill this universe's {$targetName} objective-paradox-anomaly-friend-title = Keep your new friend {$targetName} alive diff --git a/Resources/Locale/en-US/game-ticking/game-rules/rule-terminator.ftl b/Resources/Locale/en-US/game-ticking/game-rules/rule-terminator.ftl index 41237a5c10d..2e167431773 100644 --- a/Resources/Locale/en-US/game-ticking/game-rules/rule-terminator.ftl +++ b/Resources/Locale/en-US/game-ticking/game-rules/rule-terminator.ftl @@ -8,7 +8,11 @@ terminator-role-greeting = Use any means at your disposal to complete the mission. Glory to Cybersun. -terminator-role-briefing = Kill the target at all costs. +# DeltaV - paradox anomaly +terminator-role-briefing = + You are a bluespace anomaly that looks and sound identical to someone from this reality. + Kill them and assume their identity, or talk it out and become friends. + Your objectives support either playstyle (and you obviously can't do both). terminator-endoskeleton-gib-popup = All the battered flesh falls apart, revealing a titanium endoskeleton! terminator-endoskeleton-burn-popup = The seared flesh is burned to a crisp, revealing a titanium endoskeleton! diff --git a/Resources/Prototypes/DeltaV/Entities/Markers/Spawners/ghost_roles.yml b/Resources/Prototypes/DeltaV/Entities/Markers/Spawners/ghost_roles.yml index 91e1635ff6c..88a2488db09 100644 --- a/Resources/Prototypes/DeltaV/Entities/Markers/Spawners/ghost_roles.yml +++ b/Resources/Prototypes/DeltaV/Entities/Markers/Spawners/ghost_roles.yml @@ -47,7 +47,7 @@ state: radiation - type: entity - parent: SpawnPointGhostTerminator # for terminator skull icon + parent: MarkerBase id: SpawnPointGhostParadoxAnomaly name: paradox anomaly spawn point components: @@ -56,3 +56,7 @@ description: ghost-role-information-paradox-anomaly-description rules: ghost-role-information-paradox-anomaly-rules - type: ParadoxAnomalySpawner + - type: Sprite + sprite: Markers/jobs.rsi + layers: + - state: green diff --git a/Resources/Prototypes/DeltaV/Objectives/paradox_anomaly.yml b/Resources/Prototypes/DeltaV/Objectives/paradox_anomaly.yml index ea9e0ae2a1d..dd0b74c4616 100644 --- a/Resources/Prototypes/DeltaV/Objectives/paradox_anomaly.yml +++ b/Resources/Prototypes/DeltaV/Objectives/paradox_anomaly.yml @@ -6,30 +6,44 @@ - type: Objective issuer: self +# not using base kill/keep alive objectives since these intentionally conflict with eachother - type: entity noSpawn: true - parent: [BaseParadoxAnomalyObjective, BaseKillObjective] + parent: BaseParadoxAnomalyObjective id: ParadoxAnomalyKillObjective description: This universe doesn't have room for both of us. components: + - type: Objective + icon: + sprite: Objects/Weapons/Guns/Pistols/viper.rsi + state: icon + - type: TargetObjective + title: objective-paradox-anomaly-kill-title - type: TerminatorTargetOverride - type: KillPersonCondition requireDead: true - type: entity noSpawn: true - parent: [BaseParadoxAnomalyObjective, BaseKeepAliveObjective] + parent: BaseParadoxAnomalyObjective id: ParadoxAnomalyFriendObjective description: Perhaps there is room, as friends. components: + - type: Objective + icon: + sprite: Objects/Misc/bureaucracy.rsi + state: folder-white - type: TargetObjective - title: objective-condition-paradox-anomaly-friend-title + title: objective-paradox-anomaly-friend-title - type: TerminatorTargetOverride + - type: KeepAliveCondition - type: entity noSpawn: true parent: [BaseParadoxAnomalyObjective, BaseLivingObjective] id: ParadoxAnomalyEscapeObjective + name: Escape to centcom alive and unrestrained. + description: This is your universe now. components: - type: Objective icon: