diff --git a/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs b/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs index 9e0d2c3d5b513b..cbc6499e670fa8 100644 --- a/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs +++ b/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs @@ -1,4 +1,4 @@ -using Content.Server.Objectives.Components; +using Content.Server.Objectives.Components; using Content.Server.Shuttles.Components; using Content.Server.Shuttles.Systems; using Content.Shared.Cuffs.Components; @@ -82,7 +82,7 @@ private bool IsShuttleHijacked(EntityUid shuttleGridId, EntityUid mindId) if (!isHumanoid) // Only humanoids count as enemies continue; - var isAntagonist = _role.MindIsAntagonist(mindId); + var isAntagonist = _role.MindIsAntagonist(crewMindId); //SS220 Return hijack objective if (isAntagonist) // Allow antagonist continue; diff --git a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs index 537b04f3fd559a..d3198f97a6c058 100644 --- a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs +++ b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs @@ -8,6 +8,7 @@ using Content.Shared.CCVar; using Content.Shared.Database; using Content.Shared.DeviceNetwork; +using Content.Shared.Emag.Systems; //SS220 Return hijack objective using Content.Shared.Popups; using Content.Shared.Shuttles.BUIStates; using Content.Shared.Shuttles.Events; @@ -95,6 +96,7 @@ private void InitializeEmergencyConsole() SubscribeLocalEvent(OnEmergencyRepeal); SubscribeLocalEvent(OnEmergencyRepealAll); SubscribeLocalEvent(OnEmergencyOpenAttempt); + SubscribeLocalEvent(OnEmagged); //SS220 Return hijack objective } private void OnEmergencyOpenAttempt(EntityUid uid, EmergencyShuttleConsoleComponent component, ActivatableUIOpenAttemptEvent args) @@ -107,6 +109,14 @@ private void OnEmergencyOpenAttempt(EntityUid uid, EmergencyShuttleConsoleCompon } } + //SS220 Return hijack objective begin + 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(); + } + //SS220 Return hijack objective end + private void SetAuthorizeTime(float obj) { _authorizeTime = obj; diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs index 8a02f222bf4251..0bbbe2d9932745 100644 --- a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs +++ b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs @@ -675,10 +675,12 @@ public bool TryFTLDock(EntityUid shuttleUid, ShuttleComponent component, EntityU if (config != null) { FTLDock((shuttleUid, shuttleXform), config); + Smimsh(shuttleUid, xform: shuttleXform); //SS220 Emergency shuttle gib return true; } TryFTLProximity(shuttleUid, targetUid, shuttleXform, targetXform); + Smimsh(shuttleUid, xform: shuttleXform); //SS220 Emergency shuttle gib return false; } diff --git a/Resources/Prototypes/Objectives/objectiveGroups.yml b/Resources/Prototypes/Objectives/objectiveGroups.yml index 1c258ad81f3dd0..66f4e66ee9327a 100644 --- a/Resources/Prototypes/Objectives/objectiveGroups.yml +++ b/Resources/Prototypes/Objectives/objectiveGroups.yml @@ -34,7 +34,7 @@ weights: EscapeShuttleObjective: 1 DieObjective: 0.05 - #HijackShuttleObjective: 0.02 + HijackShuttleObjective: 0.02 #SS220 Return hijack objective - type: weightedRandom id: TraitorObjectiveGroupSocial diff --git a/Resources/Prototypes/Objectives/traitor.yml b/Resources/Prototypes/Objectives/traitor.yml index e5cd7ae4df4fc9..b35a0b421ffdc6 100644 --- a/Resources/Prototypes/Objectives/traitor.yml +++ b/Resources/Prototypes/Objectives/traitor.yml @@ -66,18 +66,20 @@ - StealCondition - type: DieCondition -#- type: entity -# 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 # insane, default config max difficulty -# icon: -# sprite: Objects/Tools/emag.rsi -# state: icon -# - type: HijackShuttleCondition +#SS220 Return hijack objective begin +- type: entity + 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 # insane, default config max difficulty + icon: + sprite: Objects/Tools/emag.rsi + state: icon + - type: HijackShuttleCondition +#SS220 Return hijack objective end # kill