From 2a4ecff6c45f3c762415b8766f0451e81dcc5395 Mon Sep 17 00:00:00 2001
From: Lyndomen <49795619+Lyndomen@users.noreply.github.com>
Date: Thu, 14 Nov 2024 17:26:07 -0500
Subject: [PATCH] fixed real
---
.../Objectives/Systems/TeachLessonConditionSystem.cs | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/Content.Server/DeltaV/Objectives/Systems/TeachLessonConditionSystem.cs b/Content.Server/DeltaV/Objectives/Systems/TeachLessonConditionSystem.cs
index 542cd8e0a36..65447578e36 100644
--- a/Content.Server/DeltaV/Objectives/Systems/TeachLessonConditionSystem.cs
+++ b/Content.Server/DeltaV/Objectives/Systems/TeachLessonConditionSystem.cs
@@ -2,16 +2,14 @@
using Content.Shared.GameTicking;
using Content.Shared.Mind;
using Content.Shared.Objectives.Components;
-using Robust.Shared.Random;
namespace Content.Server.Objectives.Systems;
///
-/// Handles kill person condition logic and picking random kill targets.
+/// Handles teach a lesson condition logic, does not assign target.
///
public sealed class TeachLessonConditionSystem : EntitySystem
{
- [Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly SharedMindSystem _mind = default!;
[Dependency] private readonly TargetObjectiveSystem _target = default!;
@@ -36,12 +34,15 @@ private void OnGetProgress(EntityUid uid, TeachLessonConditionComponent comp, re
private float GetProgress(EntityUid target)
{
// deleted or gibbed or something, counts as dead
- if (!TryComp(target, out var mind) || mind.OwnedEntity == null || _mind.IsCharacterDeadIc(mind) || !_wasKilled.Contains(target))
+ if (!TryComp(target, out var mind) || mind.OwnedEntity == null || _mind.IsCharacterDeadIc(mind))
{
_wasKilled.Add(target);
return 1f;
}
-
+ if (_wasKilled.Contains(target))
+ {
+ return 1f;
+ }
return 0f;
}
// Clear the wasKilled list on round end