Skip to content

Commit

Permalink
Return hijack objective (#1903)
Browse files Browse the repository at this point in the history
  • Loading branch information
kerisargit authored Mar 8, 2024
1 parent 8f4fe11 commit b6fefa1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Content.Shared.Access;
using Content.Shared.CCVar;
using Content.Shared.Database;
using Content.Shared.Emag.Systems;
using Content.Shared.DeviceNetwork;
using Content.Shared.Popups;
using Content.Shared.Shuttles.BUIStates;
Expand Down Expand Up @@ -93,6 +94,7 @@ private void InitializeEmergencyConsole()
SubscribeLocalEvent<EmergencyShuttleConsoleComponent, EmergencyShuttleRepealMessage>(OnEmergencyRepeal);
SubscribeLocalEvent<EmergencyShuttleConsoleComponent, EmergencyShuttleRepealAllMessage>(OnEmergencyRepealAll);
SubscribeLocalEvent<EmergencyShuttleConsoleComponent, ActivatableUIOpenAttemptEvent>(OnEmergencyOpenAttempt);
SubscribeLocalEvent<EmergencyShuttleConsoleComponent, GotEmaggedEvent>(OnEmagged); // Corvax-Hijack
}

private void OnEmergencyOpenAttempt(EntityUid uid, EmergencyShuttleConsoleComponent component, ActivatableUIOpenAttemptEvent args)
Expand All @@ -105,6 +107,14 @@ private void OnEmergencyOpenAttempt(EntityUid uid, EmergencyShuttleConsoleCompon
}
}

// Corvax-Hijack-Start
private void OnEmagged(EntityUid uid, EmergencyShuttleConsoleComponent component, ref GotEmaggedEvent args)
{
_logger.Add(LogType.EmergencyShuttle, LogImpact.Extreme, $"{ToPrettyString(args.UserUid):player} emagged shuttle console for early launch");
EarlyLaunch();
}
// Corvax-Hijack-End

private void SetAuthorizeTime(float obj)
{
_authorizeTime = obj;
Expand Down
13 changes: 13 additions & 0 deletions Resources/Prototypes/Corvax/Objectives/traitorObjectives.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
- type: entity
noSpawn: true
parent: [BaseTraitorObjective, BaseLivingObjective]
id: HijackShuttleObjective
name: Hijack emergency shuttle
description: Leave on the shuttle free and clear of the loyal Nanotrasen crew on board. Use ANY methods available to you. Syndicate agents, Nanotrasen enemies, and handcuffed hostages may remain alive on the shuttle. Ignore assistance from anyone other than a support agent.
components:
- type: Objective
difficulty: 5 #Hijacker don't help anyone else
icon:
sprite: Objects/Tools/emag.rsi
state: icon
- type: HijackShuttleCondition
2 changes: 1 addition & 1 deletion Resources/Prototypes/Objectives/objectiveGroups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
weights:
EscapeShuttleObjective: 1
DieObjective: 0.05
#HijackShuttleObjective: 0.02
HijackShuttleObjective: 0.02 #Corvax-Hijack

- type: weightedRandom
id: TraitorObjectiveGroupSocial
Expand Down

0 comments on commit b6fefa1

Please sign in to comment.