Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Возврат хайджека #1903

Merged
merged 3 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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();
}
Morb0 marked this conversation as resolved.
Show resolved Hide resolved
// 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
Loading