2022-07-26 03:55:56 +00:00
|
|
|
|
using RimWorld;
|
2022-11-21 17:40:44 +00:00
|
|
|
|
using RJWSexperience.Ideology.Filters;
|
2022-07-26 03:55:56 +00:00
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
|
using Verse;
|
|
|
|
|
|
|
|
|
|
namespace RJWSexperience.Ideology.HistoryEvents
|
|
|
|
|
{
|
2022-11-21 17:40:44 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Type to associate single HistoryEventDef with a TwoPawnFilter
|
|
|
|
|
/// </summary>
|
|
|
|
|
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Def loader")]
|
2022-07-26 03:55:56 +00:00
|
|
|
|
public class TwoPawnEventRule
|
|
|
|
|
{
|
|
|
|
|
public HistoryEventDef historyEventDef;
|
|
|
|
|
public TwoPawnFilter filter;
|
|
|
|
|
|
2022-11-21 17:40:44 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Check if the pair of pawns fits filter conditions
|
|
|
|
|
/// </summary>
|
2022-07-26 03:55:56 +00:00
|
|
|
|
public bool Applies(Pawn pawn, Pawn partner) => filter?.Applies(pawn, partner) == true;
|
|
|
|
|
}
|
|
|
|
|
}
|