mirror of
https://gitgud.io/LonelyRain/rjw-quirks.git
synced 2024-08-15 00:03:31 +00:00
be5f2bdf9a
Updated to parity with quirk removal updates that added helper functions
28 lines
786 B
C#
28 lines
786 B
C#
using HarmonyLib;
|
|
using rjw;
|
|
using rjwquirks.Modules.Quirks;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Verse;
|
|
using Verse.AI;
|
|
|
|
namespace rjwquirks.HarmonyPatches
|
|
{
|
|
[HarmonyPatch(typeof(ThinkNode_ChancePerHour_Fappin), nameof(ThinkNode_ChancePerHour_Fappin.AloneFactor))]
|
|
public static class Patch_ThinkNode_ChancePerHour_Fappin
|
|
{
|
|
[HarmonyPostfix]
|
|
public static void Postfix(Pawn pawn, ref float __result)
|
|
{
|
|
bool isAlone = !pawn.Map.mapPawns.AllPawnsSpawned.Any(x => pawn.CanSee(x) && xxx.is_human(x));
|
|
|
|
if (pawn.HasQuirk(QuirkDefOf.Exhibitionist))
|
|
{
|
|
__result = isAlone ? 1.0f : 0.6f;
|
|
}
|
|
}
|
|
}
|
|
}
|