Fix hijack objective (#21241)

* Fix hijack

* Max difficulty
This commit is contained in:
Morb
2023-10-28 05:33:18 +03:00
committed by GitHub
parent 2c7e2b62dc
commit d27df9705d
5 changed files with 28 additions and 13 deletions

View File

@@ -23,17 +23,17 @@ public sealed class HijackShuttleConditionSystem : EntitySystem
{
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);
}
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;