rjw-std/1.4/Source/Mod/harmony_update_stds.cs

33 lines
555 B
C#
Raw Normal View History

2022-10-26 09:44:02 +00:00
using Verse;
using HarmonyLib;
using rjw;
using System;
using System.Reflection;
namespace rjwstd
{
///<summary>
2023-01-02 10:25:26 +00:00
///roll for STD update
2022-10-26 09:44:02 +00:00
///</summary>
[HarmonyPatch(typeof(Need_Sex), "NeedInterval")]
[StaticConstructorOnStartup]
static class Need_Sex_STD_Update
{
[HarmonyPostfix]
private static void Need_Sex_STD_Patch(Need_Sex __instance, Pawn ___pawn)
{
try
{
if (__instance.isInvisible)
return; // no caravans
2023-01-02 10:25:26 +00:00
std_updater.update(___pawn);
2022-10-26 09:44:02 +00:00
}
catch (Exception e)
{
Log.Error(e.ToString());
}
}
}
}