diff --git a/Content.Server/Objectives/Components/HijackShuttleComponent.cs b/Content.Server/Objectives/Components/HijackShuttleComponent.cs deleted file mode 100644 index 010f6f1407..0000000000 --- a/Content.Server/Objectives/Components/HijackShuttleComponent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Content.Server.Objectives.Systems; - -namespace Content.Server.Objectives.Components; - -[RegisterComponent, Access(typeof(HijackShuttleConditionSystem))] -public sealed partial class HijackShuttleComponent : Component -{ -} diff --git a/Content.Server/Objectives/Components/HijackShuttleConditionComponent.cs b/Content.Server/Objectives/Components/HijackShuttleConditionComponent.cs new file mode 100644 index 0000000000..2f07086af6 --- /dev/null +++ b/Content.Server/Objectives/Components/HijackShuttleConditionComponent.cs @@ -0,0 +1,11 @@ +using Content.Server.Objectives.Systems; + +namespace Content.Server.Objectives.Components; + +/// +/// Objective condition that requires the player to leave station of escape shuttle with only antags on board or handcuffed humanoids +/// +[RegisterComponent, Access(typeof(HijackShuttleConditionSystem))] +public sealed partial class HijackShuttleConditionComponent : Component +{ +} diff --git a/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs b/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs index 5ea560297c..9e0d2c3d5b 100644 --- a/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs +++ b/Content.Server/Objectives/Systems/HijackShuttleConditionSystem.cs @@ -23,17 +23,17 @@ public sealed class HijackShuttleConditionSystem : EntitySystem { base.Initialize(); - SubscribeLocalEvent(OnGetProgress); + SubscribeLocalEvent(OnGetProgress); } - private void OnGetProgress(EntityUid uid, HijackShuttleComponent comp, ref ObjectiveGetProgressEvent args) + private void OnGetProgress(EntityUid uid, HijackShuttleConditionComponent comp, ref ObjectiveGetProgressEvent args) { args.Progress = GetProgress(args.MindId, args.Mind); } private float GetProgress(EntityUid mindId, MindComponent mind) { - // not escaping alive if you're deleted/dead + // Not escaping alive if you're deleted/dead if (mind.OwnedEntity == null || _mind.IsCharacterDeadIc(mind)) return 0f; diff --git a/Resources/Locale/en-US/objectives/conditions/hijack-shuttle-condition.ftl b/Resources/Locale/en-US/objectives/conditions/hijack-shuttle-condition.ftl deleted file mode 100644 index 5a0c1fd88b..0000000000 --- a/Resources/Locale/en-US/objectives/conditions/hijack-shuttle-condition.ftl +++ /dev/null @@ -1,2 +0,0 @@ -objective-condition-hijack-shuttle-title = Hijack emergency shuttle -objective-condition-hijack-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. diff --git a/Resources/Prototypes/Objectives/traitor.yml b/Resources/Prototypes/Objectives/traitor.yml index f0e8daad3d..dd188765b9 100644 --- a/Resources/Prototypes/Objectives/traitor.yml +++ b/Resources/Prototypes/Objectives/traitor.yml @@ -64,6 +64,20 @@ - StealCondition - type: DieCondition +- 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 # insane, default config max difficulty + icon: + sprite: Objects/Tools/emag.rsi + state: icon + - type: HijackShuttleCondition + # kill - type: entity