mirror of
https://gitgud.io/amevarashi/rjw-sexperience-ideology.git
synced 2024-08-15 00:43:19 +00:00
Added isBloodRelated filter attribute
This commit is contained in:
parent
765e6c0778
commit
7d6f0d043c
8 changed files with 92 additions and 142 deletions
|
@ -1,16 +1,22 @@
|
|||
using RimWorld;
|
||||
using RJWSexperience.Ideology.Filters;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Verse;
|
||||
|
||||
namespace RJWSexperience.Ideology.HistoryEvents
|
||||
{
|
||||
/// <summary>
|
||||
/// Type to associate single HistoryEventDef with a TwoPawnFilter
|
||||
/// </summary>
|
||||
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Def loader")]
|
||||
public class TwoPawnEventRule
|
||||
{
|
||||
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
|
||||
public HistoryEventDef historyEventDef;
|
||||
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
|
||||
public TwoPawnFilter filter;
|
||||
|
||||
/// <summary>
|
||||
/// Check if the pair of pawns fits filter conditions
|
||||
/// </summary>
|
||||
public bool Applies(Pawn pawn, Pawn partner) => filter?.Applies(pawn, partner) == true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue