ninja criminal records hacking (#24982)

* more humour

* spotted a troll

* add TryFindObjective to MindSystem

* replace copypaste bool conditions with CodeCondition

* use CodeConditionSystem in ninja + add handling for criminal hack

* add criminal records hacking

* update objectives

* :trollface:

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2024-05-09 06:35:11 +00:00
committed by GitHub
parent fe35188e2c
commit 24ab5c0982
20 changed files with 349 additions and 50 deletions

View File

@@ -23,11 +23,8 @@ public sealed class NinjaConditionsSystem : EntitySystem
SubscribeLocalEvent<SpiderChargeConditionComponent, RequirementCheckEvent>(OnSpiderChargeRequirementCheck);
SubscribeLocalEvent<SpiderChargeConditionComponent, ObjectiveAfterAssignEvent>(OnSpiderChargeAfterAssign);
SubscribeLocalEvent<SpiderChargeConditionComponent, ObjectiveGetProgressEvent>(OnSpiderChargeGetProgress);
SubscribeLocalEvent<StealResearchConditionComponent, ObjectiveGetProgressEvent>(OnStealResearchGetProgress);
SubscribeLocalEvent<TerrorConditionComponent, ObjectiveGetProgressEvent>(OnTerrorGetProgress);
}
// doorjack
@@ -88,11 +85,6 @@ public sealed class NinjaConditionsSystem : EntitySystem
_metaData.SetEntityName(uid, title, args.Meta);
}
private void OnSpiderChargeGetProgress(EntityUid uid, SpiderChargeConditionComponent comp, ref ObjectiveGetProgressEvent args)
{
args.Progress = comp.Detonated ? 1f : 0f;
}
// steal research
private void OnStealResearchGetProgress(EntityUid uid, StealResearchConditionComponent comp, ref ObjectiveGetProgressEvent args)
@@ -108,9 +100,4 @@ public sealed class NinjaConditionsSystem : EntitySystem
return MathF.Min(comp.DownloadedNodes.Count / (float) target, 1f);
}
private void OnTerrorGetProgress(EntityUid uid, TerrorConditionComponent comp, ref ObjectiveGetProgressEvent args)
{
args.Progress = comp.CalledInThreat ? 1f : 0f;
}
}