make objectives use yml defined mind filters (#36030)

* add MindHasRole whitelist overload

* add mind filters framework

* add different mind filters and pools

* update traitor stuff to use mind filters

* line

* don't duplicate kill objectives

* g

* gs

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Co-authored-by: ScarKy0 <scarky0@onet.eu>
Co-authored-by: SlamBamActionman <slambamactionman@gmail.com>
This commit is contained in:
deltanedas
2025-08-08 16:58:46 +01:00
committed by GitHub
parent 1374ceea47
commit 1d21e13360
17 changed files with 362 additions and 173 deletions

View File

@@ -91,6 +91,12 @@
- type: TargetObjective
title: objective-condition-maroon-person-title
- type: PickRandomPerson
filters:
# Can't have multiple objectives to kill the same person.
- !type:TargetObjectiveMindFilter
blacklist:
components:
- KillPersonCondition
- type: KillPersonCondition
requireMaroon: true
@@ -106,7 +112,17 @@
unique: true
- type: TargetObjective
title: objective-condition-kill-maroon-title
- type: PickRandomHead
- type: PickRandomPerson
filters:
- !type:BodyMindFilter
whitelist:
components:
- CommandStaff
# Can't have multiple objectives to kill the same person.
- !type:TargetObjectiveMindFilter
blacklist:
components:
- KillPersonCondition
- type: KillPersonCondition
# don't count missing evac as killing as heads are higher profile, so you really need to do the dirty work
# if ce flies a shittle to centcom you better find a way onto it
@@ -124,7 +140,18 @@
difficulty: 1.75
- type: TargetObjective
title: objective-condition-other-traitor-alive-title
- type: RandomTraitorAlive
- type: PickRandomPerson
filters:
- !type:HasRoleMindFilter
whitelist:
components:
- TraitorRole
# Can't have multiple objectives to help/save the same person
- !type:TargetObjectiveMindFilter
blacklist:
components:
- RandomTraitorAlive
- RandomTraitorProgress
- type: entity
parent: [BaseTraitorSocialObjective, BaseHelpProgressObjective]
@@ -135,7 +162,25 @@
difficulty: 2.5
- type: TargetObjective
title: objective-condition-other-traitor-progress-title
- type: RandomTraitorProgress
- type: PickRandomPerson
filters:
- !type:HasRoleMindFilter
whitelist:
components:
- TraitorRole
# Can't help anyone who is tasked with helping:
# 1. thats boring
# 2. no cyclic progress dependencies!!!
- !type:ObjectiveMindFilter
blacklist:
components:
- HelpProgressCondition
# Can't have multiple objectives to help/save the same person
- !type:TargetObjectiveMindFilter
blacklist:
components:
- RandomTraitorAlive
- RandomTraitorProgress
# steal