@@ -1,8 +0,0 @@
|
|||||||
using Content.Server.Objectives.Systems;
|
|
||||||
|
|
||||||
namespace Content.Server.Objectives.Components;
|
|
||||||
|
|
||||||
[RegisterComponent, Access(typeof(HijackShuttleConditionSystem))]
|
|
||||||
public sealed partial class HijackShuttleComponent : Component
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
using Content.Server.Objectives.Systems;
|
||||||
|
|
||||||
|
namespace Content.Server.Objectives.Components;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Objective condition that requires the player to leave station of escape shuttle with only antags on board or handcuffed humanoids
|
||||||
|
/// </summary>
|
||||||
|
[RegisterComponent, Access(typeof(HijackShuttleConditionSystem))]
|
||||||
|
public sealed partial class HijackShuttleConditionComponent : Component
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -23,17 +23,17 @@ public sealed class HijackShuttleConditionSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
|
||||||
SubscribeLocalEvent<HijackShuttleComponent, ObjectiveGetProgressEvent>(OnGetProgress);
|
SubscribeLocalEvent<HijackShuttleConditionComponent, ObjectiveGetProgressEvent>(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);
|
args.Progress = GetProgress(args.MindId, args.Mind);
|
||||||
}
|
}
|
||||||
|
|
||||||
private float GetProgress(EntityUid mindId, MindComponent 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))
|
if (mind.OwnedEntity == null || _mind.IsCharacterDeadIc(mind))
|
||||||
return 0f;
|
return 0f;
|
||||||
|
|
||||||
|
|||||||
@@ -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.
|
|
||||||
@@ -64,6 +64,20 @@
|
|||||||
- StealCondition
|
- StealCondition
|
||||||
- type: DieCondition
|
- 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
|
# kill
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
|
|||||||
Reference in New Issue
Block a user