Skip to content

Commit

Permalink
fixy
Browse files Browse the repository at this point in the history
  • Loading branch information
deltanedas committed Feb 13, 2024
1 parent 392fdbc commit 2c46d4c
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand All @@ -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!;
Expand All @@ -42,18 +44,21 @@ public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<ParadoxAnomalySpawnerComponent, PlayerAttachedEvent>(OnPlayerAttached);
SubscribeLocalEvent<ParadoxAnomalySpawnerComponent, TakeGhostRoleEvent>(OnTakeGhostRole);
}

private void OnPlayerAttached(Entity<ParadoxAnomalySpawnerComponent> ent, ref PlayerAttachedEvent args)
private void OnTakeGhostRole(Entity<ParadoxAnomalySpawnerComponent> 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<GhostRoleComponent>(ent);
_ghostRole.GhostRoleInternalCreateMindAndTransfer(args.Player, ent, twin.Value, role);
_ghostRole.UnregisterGhostRole((ent.Owner, role));

args.TookRole = true;
QueueDel(ent);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
paradox-anomaly-round-end-agent-name = Paradox Anomaly
objective-issuer-self = [color=#1708EC]Self[/color]
# briefing is in terminator ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
objective-paradox-anomaly-kill-title = Kill this universe's {$targetName}
objective-paradox-anomaly-friend-title = Keep your new friend {$targetName} alive
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
state: radiation

- type: entity
parent: SpawnPointGhostTerminator # for terminator skull icon
parent: MarkerBase
id: SpawnPointGhostParadoxAnomaly
name: paradox anomaly spawn point
components:
Expand All @@ -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
20 changes: 17 additions & 3 deletions Resources/Prototypes/DeltaV/Objectives/paradox_anomaly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2c46d4c

Please sign in to comment.