From 392fdbc4a95c7916e4225c942380e59f1a59b0c5 Mon Sep 17 00:00:00 2001 From: deltanedas <@deltanedas:kde.org> Date: Tue, 13 Feb 2024 08:02:32 +0000 Subject: [PATCH] hopefully fully rename it --- .../Components/EvilTwinSpawnerComponent.cs | 14 ------- .../Components/ParadoxAnomalySpawner.cs | 17 +++++++++ .../Systems/ParadoxAnomalySystem.cs} | 18 ++++----- .../GenericAntag/GenericAntagSystem.cs | 2 +- .../Systems/HumanoidAppearanceSystem.cs | 2 +- .../Components/MidRoundAntagRuleComponent.cs | 2 +- .../Terminator/Systems/TerminatorSystem.cs | 4 +- .../Humanoid/HumanoidAppearanceComponent.cs | 2 +- .../SharedHumanoidAppearanceSystem.cs | 2 +- .../objectives/conditions/paradox-anomaly.ftl | 1 + .../Locale/en-US/prototypes/roles/antags.ftl | 4 +- .../Entities/Markers/Spawners/ghost_roles.yml | 12 +++--- .../Prototypes/DeltaV/GameRules/midround.yml | 9 +++-- .../Prototypes/DeltaV/Objectives/eviltwin.yml | 31 --------------- .../DeltaV/Objectives/paradox_anomaly.yml | 38 +++++++++++++++++++ Resources/Prototypes/GameRules/events.yml | 2 +- 16 files changed, 86 insertions(+), 74 deletions(-) delete mode 100644 Content.Server/DeltaV/EvilTwin/Components/EvilTwinSpawnerComponent.cs create mode 100644 Content.Server/DeltaV/ParadoxAnomaly/Components/ParadoxAnomalySpawner.cs rename Content.Server/DeltaV/{EvilTwin/Systems/EvilTwinSystem.cs => ParadoxAnomaly/Systems/ParadoxAnomalySystem.cs} (87%) create mode 100644 Resources/Locale/en-US/deltav/objectives/conditions/paradox-anomaly.ftl delete mode 100644 Resources/Prototypes/DeltaV/Objectives/eviltwin.yml create mode 100644 Resources/Prototypes/DeltaV/Objectives/paradox_anomaly.yml diff --git a/Content.Server/DeltaV/EvilTwin/Components/EvilTwinSpawnerComponent.cs b/Content.Server/DeltaV/EvilTwin/Components/EvilTwinSpawnerComponent.cs deleted file mode 100644 index a4d5c159b16..00000000000 --- a/Content.Server/DeltaV/EvilTwin/Components/EvilTwinSpawnerComponent.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Content.Server.DeltaV.EvilTwin.Systems; -using Robust.Shared.Prototypes; - -namespace Content.Server.DeltaV.EvilTwin.Components; - -/// -/// Creates a random evil twin and tranfers mind to it when taken by a player. -/// -[RegisterComponent, Access(typeof(EvilTwinSystem))] -public sealed partial class EvilTwinSpawnerComponent : Component -{ - [DataField] - public EntProtoId Rule = "EvilTwin"; -} diff --git a/Content.Server/DeltaV/ParadoxAnomaly/Components/ParadoxAnomalySpawner.cs b/Content.Server/DeltaV/ParadoxAnomaly/Components/ParadoxAnomalySpawner.cs new file mode 100644 index 00000000000..c3264584a1c --- /dev/null +++ b/Content.Server/DeltaV/ParadoxAnomaly/Components/ParadoxAnomalySpawner.cs @@ -0,0 +1,17 @@ +using Content.Server.DeltaV.ParadoxAnomaly.Systems; +using Robust.Shared.Prototypes; + +namespace Content.Server.DeltaV.ParadoxAnomaly.Components; + +/// +/// Creates a random paradox anomaly and tranfers mind to it when taken by a player. +/// +[RegisterComponent, Access(typeof(ParadoxAnomalySystem))] +public sealed partial class ParadoxAnomalySpawnerComponent : Component +{ + /// + /// Antag game rule to start for the paradox anomaly. + /// + [DataField] + public EntProtoId Rule = "ParadoxAnomaly"; +} diff --git a/Content.Server/DeltaV/EvilTwin/Systems/EvilTwinSystem.cs b/Content.Server/DeltaV/ParadoxAnomaly/Systems/ParadoxAnomalySystem.cs similarity index 87% rename from Content.Server/DeltaV/EvilTwin/Systems/EvilTwinSystem.cs rename to Content.Server/DeltaV/ParadoxAnomaly/Systems/ParadoxAnomalySystem.cs index 50af91aded6..1689829c1da 100644 --- a/Content.Server/DeltaV/EvilTwin/Systems/EvilTwinSystem.cs +++ b/Content.Server/DeltaV/ParadoxAnomaly/Systems/ParadoxAnomalySystem.cs @@ -1,4 +1,4 @@ -using Content.Server.DeltaV.EvilTwin.Components; +using Content.Server.DeltaV.ParadoxAnomaly.Components; using Content.Server.DetailExaminable; using Content.Server.GenericAntag; using Content.Server.Psionics; @@ -18,13 +18,13 @@ using Robust.Shared.Utility; using System.Diagnostics.CodeAnalysis; -namespace Content.Server.DeltaV.EvilTwin.Systems; +namespace Content.Server.DeltaV.ParadoxAnomaly.Systems; /// /// 90% of the work is done by exterminator since its a reskin. /// All the logic here is spawning since thats tricky. /// -public sealed class EvilTwinSystem : EntitySystem +public sealed class ParadoxAnomalySystem : EntitySystem { [Dependency] private readonly GenericAntagSystem _genericAntag = default!; [Dependency] private readonly IPrototypeManager _proto = default!; @@ -42,22 +42,22 @@ public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnPlayerAttached); + SubscribeLocalEvent(OnPlayerAttached); } - private void OnPlayerAttached(Entity ent, ref PlayerAttachedEvent args) + private void OnPlayerAttached(Entity ent, ref PlayerAttachedEvent args) { if (!_mind.TryGetMind(args.Player, out var mindId, out var mind)) return; - if (!TrySpawnEvilTwin(ent.Comp.Rule, out var twin)) + if (!TrySpawnParadoxAnomaly(ent.Comp.Rule, out var twin)) return; _mind.TransferTo(mindId, twin, ghostCheckOverride: true, mind: mind); QueueDel(ent); } - private bool TrySpawnEvilTwin(string rule, [NotNullWhen(true)] out EntityUid? twin) + private bool TrySpawnParadoxAnomaly(string rule, [NotNullWhen(true)] out EntityUid? twin) { twin = null; @@ -83,11 +83,11 @@ private bool TrySpawnEvilTwin(string rule, [NotNullWhen(true)] out EntityUid? tw candidates.Add((uid, mindId, species, profile)); } - twin = SpawnEvilTwin(candidates, rule); + twin = SpawnParadoxAnomaly(candidates, rule); return twin != null; } - private EntityUid? SpawnEvilTwin(List<(EntityUid, EntityUid, SpeciesPrototype, HumanoidCharacterProfile)> candidates, string rule) + private EntityUid? SpawnParadoxAnomaly(List<(EntityUid, EntityUid, SpeciesPrototype, HumanoidCharacterProfile)> candidates, string rule) { // Select a candidate. if (candidates.Count == 0) diff --git a/Content.Server/GenericAntag/GenericAntagSystem.cs b/Content.Server/GenericAntag/GenericAntagSystem.cs index dc98bb92026..8b7a16a4cb2 100644 --- a/Content.Server/GenericAntag/GenericAntagSystem.cs +++ b/Content.Server/GenericAntag/GenericAntagSystem.cs @@ -59,7 +59,7 @@ public void MakeAntag(EntityUid uid, EntityUid mindId, GenericAntagComponent? co } /// - /// DeltaV - used by evil twin + /// DeltaV - used by paradox anomaly /// public void MakeAntag(EntityUid uid, string rule) { diff --git a/Content.Server/Humanoid/Systems/HumanoidAppearanceSystem.cs b/Content.Server/Humanoid/Systems/HumanoidAppearanceSystem.cs index 5ce9f82a271..770e9fc39b3 100644 --- a/Content.Server/Humanoid/Systems/HumanoidAppearanceSystem.cs +++ b/Content.Server/Humanoid/Systems/HumanoidAppearanceSystem.cs @@ -64,7 +64,7 @@ public void CloneAppearance(EntityUid source, EntityUid target, HumanoidAppearan grammar.Gender = sourceHumanoid.Gender; } - targetHumanoid.LastProfileLoaded = sourceHumanoid.LastProfileLoaded; // DeltaV - let evil twin be cloned + targetHumanoid.LastProfileLoaded = sourceHumanoid.LastProfileLoaded; // DeltaV - let paradox anomaly be cloned Dirty(targetHumanoid); } diff --git a/Content.Server/Nyanotrasen/StationEvents/Components/MidRoundAntagRuleComponent.cs b/Content.Server/Nyanotrasen/StationEvents/Components/MidRoundAntagRuleComponent.cs index b51b30fe1bd..df8b687c3e1 100644 --- a/Content.Server/Nyanotrasen/StationEvents/Components/MidRoundAntagRuleComponent.cs +++ b/Content.Server/Nyanotrasen/StationEvents/Components/MidRoundAntagRuleComponent.cs @@ -12,6 +12,6 @@ public sealed partial class MidRoundAntagRuleComponent : Component "SpawnPointGhostRatKing", //"SpawnPointGhostVampSpider", //"SpawnPointGhostFugitive", - "SpawnPointGhostEvilTwin" + "SpawnPointGhostParadoxAnomaly" }; } diff --git a/Content.Server/Terminator/Systems/TerminatorSystem.cs b/Content.Server/Terminator/Systems/TerminatorSystem.cs index b12f3a051a9..837778d3c41 100644 --- a/Content.Server/Terminator/Systems/TerminatorSystem.cs +++ b/Content.Server/Terminator/Systems/TerminatorSystem.cs @@ -24,7 +24,7 @@ public override void Initialize() private void OnMapInit(EntityUid uid, TerminatorComponent comp, MapInitEvent args) { // cyborg doesn't need to breathe - //RemComp(uid); // DeltaV - evil twin does actually need to breathe + //RemComp(uid); // DeltaV - paradox anomaly does actually need to breathe } private void OnSpawned(EntityUid uid, TerminatorComponent comp, GhostRoleSpawnerUsedEvent args) @@ -48,7 +48,7 @@ private void OnCreated(EntityUid uid, TerminatorComponent comp, ref GenericAntag } /// - /// DeltaV - used for evil twin. + /// DeltaV - used for paradox anomaly. /// public void SetTarget(Entity ent, EntityUid mindId) { diff --git a/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs b/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs index b2be95c095a..b0bc0eb9a0c 100644 --- a/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs +++ b/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs @@ -85,7 +85,7 @@ public sealed partial class HumanoidAppearanceComponent : Component public Color? CachedFacialHairColor; /// - /// DeltaV - allows for evil twins to be cloned. + /// DeltaV - let paradox anomaly be cloned /// [ViewVariables] public HumanoidCharacterProfile? LastProfileLoaded; diff --git a/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs b/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs index 531d032686b..4974e283dd5 100644 --- a/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs +++ b/Content.Shared/Humanoid/SharedHumanoidAppearanceSystem.cs @@ -329,7 +329,7 @@ public virtual void LoadProfile(EntityUid uid, HumanoidCharacterProfile profile, humanoid.Age = profile.Age; - humanoid.LastProfileLoaded = profile; // DeltaV - let evil twin be cloned + humanoid.LastProfileLoaded = profile; // DeltaV - let paradox anomaly be cloned Dirty(humanoid); } diff --git a/Resources/Locale/en-US/deltav/objectives/conditions/paradox-anomaly.ftl b/Resources/Locale/en-US/deltav/objectives/conditions/paradox-anomaly.ftl new file mode 100644 index 00000000000..a06899b6de2 --- /dev/null +++ b/Resources/Locale/en-US/deltav/objectives/conditions/paradox-anomaly.ftl @@ -0,0 +1 @@ +objective-paradox-anomaly-friend-title = Keep your new friend {$targetName} alive diff --git a/Resources/Locale/en-US/prototypes/roles/antags.ftl b/Resources/Locale/en-US/prototypes/roles/antags.ftl index e4bd5a5a899..40f2c9a6820 100644 --- a/Resources/Locale/en-US/prototypes/roles/antags.ftl +++ b/Resources/Locale/en-US/prototypes/roles/antags.ftl @@ -31,5 +31,5 @@ roles-antag-space-ninja-objective = Use your stealth to sabotage the station, no roles-antag-thief-name = Thief roles-antag-thief-objective = Add some NT property to your personal collection without using violence. -roles-antag-terminator-name = Paradox Anomaly # DeltaV - evil twin -roles-antag-terminator-objective = Replace your double, or befriend them. # DeltaV - evil twin +roles-antag-terminator-name = Paradox Anomaly # DeltaV - paradox anomaly +roles-antag-terminator-objective = Replace your double, or befriend them. # DeltaV - paradox anomaly diff --git a/Resources/Prototypes/DeltaV/Entities/Markers/Spawners/ghost_roles.yml b/Resources/Prototypes/DeltaV/Entities/Markers/Spawners/ghost_roles.yml index ea49b123e86..91e1635ff6c 100644 --- a/Resources/Prototypes/DeltaV/Entities/Markers/Spawners/ghost_roles.yml +++ b/Resources/Prototypes/DeltaV/Entities/Markers/Spawners/ghost_roles.yml @@ -48,11 +48,11 @@ - type: entity parent: SpawnPointGhostTerminator # for terminator skull icon - id: SpawnPointGhostEvilTwin - name: evil twin spawn point + id: SpawnPointGhostParadoxAnomaly + name: paradox anomaly spawn point components: - type: GhostRole - name: ghost-role-information-evil-twin-name - description: ghost-role-information-evil-twin-description - rules: ghost-role-information-evil-twin-rules - - type: EvilTwinSpawner + name: ghost-role-information-paradox-anomaly-name + description: ghost-role-information-paradox-anomaly-description + rules: ghost-role-information-paradox-anomaly-rules + - type: ParadoxAnomalySpawner diff --git a/Resources/Prototypes/DeltaV/GameRules/midround.yml b/Resources/Prototypes/DeltaV/GameRules/midround.yml index 1589a6e361d..82b47c05718 100644 --- a/Resources/Prototypes/DeltaV/GameRules/midround.yml +++ b/Resources/Prototypes/DeltaV/GameRules/midround.yml @@ -1,10 +1,11 @@ - type: entity noSpawn: true parent: BaseGameRule - id: EvilTwin + id: ParadoxAnomaly components: - type: GenericAntagRule - agentName: evil-twin-round-end-agent-name + agentName: paradox-anomaly-round-end-agent-name objectives: - - EvilTwinKillObjective - - EvilTwinEscapeObjective + - ParadoxAnomalyKillObjective + - ParadoxAnomalyFriendObjective + - ParadoxAnomalyEscapeObjective diff --git a/Resources/Prototypes/DeltaV/Objectives/eviltwin.yml b/Resources/Prototypes/DeltaV/Objectives/eviltwin.yml deleted file mode 100644 index 7701b65ee69..00000000000 --- a/Resources/Prototypes/DeltaV/Objectives/eviltwin.yml +++ /dev/null @@ -1,31 +0,0 @@ -- type: entity - abstract: true - parent: BaseTerminatorObjective # mrp terminator real - id: BaseEvilTwinObjective - components: - - type: Objective - issuer: self - -- type: entity - noSpawn: true - parent: [BaseEvilTwinObjective, BaseKillObjective] - id: EvilTwinKillObjective - description: Follow your programming and terminate the target. - components: - - type: Objective - unique: false - - type: PickRandomPerson - - type: TerminatorTargetOverride - - type: KillPersonCondition - requireDead: true - -- type: entity - noSpawn: true - parent: [BaseEvilTwinObjective, BaseLivingObjective] - id: EvilTwinEscapeObjective - components: - - type: Objective - icon: - sprite: Structures/Furniture/chairs.rsi - state: shuttle - - type: EscapeShuttleCondition diff --git a/Resources/Prototypes/DeltaV/Objectives/paradox_anomaly.yml b/Resources/Prototypes/DeltaV/Objectives/paradox_anomaly.yml new file mode 100644 index 00000000000..ea9e0ae2a1d --- /dev/null +++ b/Resources/Prototypes/DeltaV/Objectives/paradox_anomaly.yml @@ -0,0 +1,38 @@ +- type: entity + abstract: true + parent: BaseTerminatorObjective # mrp terminator real + id: BaseParadoxAnomalyObjective + components: + - type: Objective + issuer: self + +- type: entity + noSpawn: true + parent: [BaseParadoxAnomalyObjective, BaseKillObjective] + id: ParadoxAnomalyKillObjective + description: This universe doesn't have room for both of us. + components: + - type: TerminatorTargetOverride + - type: KillPersonCondition + requireDead: true + +- type: entity + noSpawn: true + parent: [BaseParadoxAnomalyObjective, BaseKeepAliveObjective] + id: ParadoxAnomalyFriendObjective + description: Perhaps there is room, as friends. + components: + - type: TargetObjective + title: objective-condition-paradox-anomaly-friend-title + - type: TerminatorTargetOverride + +- type: entity + noSpawn: true + parent: [BaseParadoxAnomalyObjective, BaseLivingObjective] + id: ParadoxAnomalyEscapeObjective + components: + - type: Objective + icon: + sprite: Structures/Furniture/chairs.rsi + state: shuttle + - type: EscapeShuttleCondition diff --git a/Resources/Prototypes/GameRules/events.yml b/Resources/Prototypes/GameRules/events.yml index 0c3d248ba88..785d1906730 100644 --- a/Resources/Prototypes/GameRules/events.yml +++ b/Resources/Prototypes/GameRules/events.yml @@ -280,7 +280,7 @@ lightBreakChancePerSecond: 0.0003 doorToggleChancePerSecond: 0.001 -# - type: entity # DeltaV - replaced terminator with evil twin +# - type: entity # DeltaV - replaced terminator with paradox anomaly in midroundantag rule # parent: BaseGameRule # id: TerminatorSpawn # noSpawn: true