fixed bug relating to mechs and pawns with no relations defined
This commit is contained in:
parent
5d3e7d94a3
commit
25fba08b2d
Binary file not shown.
|
@ -18,7 +18,8 @@ namespace C0ffee_s_RJW_Ideology_Addons
|
||||||
|
|
||||||
public static void Prefix(JobDriver_SexBaseInitiator __instance)
|
public static void Prefix(JobDriver_SexBaseInitiator __instance)
|
||||||
{
|
{
|
||||||
if (__instance is JobDriver_Masturbate || __instance.Partner == null) return;
|
if (__instance is JobDriver_Masturbate || __instance.Partner == null
|
||||||
|
|| __instance.pawn?.relations == null || __instance.pawn.RaceProps.IsMechanoid) return;
|
||||||
|
|
||||||
HistoryEventDef def = __instance.pawn.relations.DirectRelationExists(PawnRelationDefOf.Spouse, __instance.Partner) ? HistoryEventDefOf.GotLovin_Spouse : HistoryEventDefOf.GotLovin_NonSpouse;
|
HistoryEventDef def = __instance.pawn.relations.DirectRelationExists(PawnRelationDefOf.Spouse, __instance.Partner) ? HistoryEventDefOf.GotLovin_Spouse : HistoryEventDefOf.GotLovin_NonSpouse;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue