mirror of
https://gitgud.io/amevarashi/rjw-sexperience-ideology.git
synced 2024-08-15 00:43:19 +00:00
Check if doer exists in _Gendered precept comps
This commit is contained in:
parent
94088dca61
commit
7d6809dc2a
3 changed files with 7 additions and 4 deletions
|
@ -11,9 +11,10 @@ namespace RJWSexperience.Ideology.Precepts
|
|||
|
||||
public override void Notify_MemberWitnessedAction(HistoryEvent ev, Precept precept, Pawn member)
|
||||
{
|
||||
Pawn doer = ev.args.GetArg<Pawn>(HistoryEventArgsNames.Doer);
|
||||
if (doer.gender == doersGender)
|
||||
if (ev.args.TryGetArg(HistoryEventArgsNames.Doer, out Pawn doer) && doer.gender == doersGender)
|
||||
{
|
||||
base.Notify_MemberWitnessedAction(ev, precept, member);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,9 +11,10 @@ namespace RJWSexperience.Ideology.Precepts
|
|||
|
||||
public override void Notify_MemberTookAction(HistoryEvent ev, Precept precept, bool canApplySelfTookThoughts)
|
||||
{
|
||||
Pawn doer = ev.args.GetArg<Pawn>(HistoryEventArgsNames.Doer);
|
||||
if (doer.gender == gender)
|
||||
if (ev.args.TryGetArg(HistoryEventArgsNames.Doer, out Pawn doer) && doer.gender == gender)
|
||||
{
|
||||
TakeThought(ev, precept, canApplySelfTookThoughts, doer);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DebugAction.cs" />
|
||||
<Compile Include="GlobalSuppressions.cs" />
|
||||
<Compile Include="Ideology\HistoryEvents\DefExtension_SecondaryEvents.cs" />
|
||||
<Compile Include="Ideology\HistoryEvents\DefExtension_EventOverrides.cs" />
|
||||
|
|
Loading…
Reference in a new issue