diff --git a/Assemblies/Vampire.dll b/Assemblies/Vampire.dll index 74135e4..08afe87 100644 Binary files a/Assemblies/Vampire.dll and b/Assemblies/Vampire.dll differ diff --git a/Source/Vampires/HarmonyPatches/HarmonyPatches.cs b/Source/Vampires/HarmonyPatches/HarmonyPatches.cs index 7a5308b..2cd91fc 100644 --- a/Source/Vampires/HarmonyPatches/HarmonyPatches.cs +++ b/Source/Vampires/HarmonyPatches/HarmonyPatches.cs @@ -441,10 +441,14 @@ where typeof(WorkGiver).IsAssignableFrom(assemblyType) harmony.Patch(AccessTools.Method(typeof(Listing_TreeThingFilter), "Visible", new Type[] { typeof(ThingDef) }), null, new HarmonyMethod(typeof(HarmonyPatches), nameof(CorpsesAreNotVisible))); - //Hides corpses of temporary things from the filter menus + //Prevents the game from kicking players out of spawned maps when their vampire hides in a hidey hole. harmony.Patch(AccessTools.Method(typeof(MapPawns), "get_AnyPawnBlockingMapRemoval"), null, new HarmonyMethod(typeof(HarmonyPatches), nameof(get_LetVampiresKeepMapsOpen))); + //Vampires no longer suffer global work speed reduction at night. + harmony.Patch(AccessTools.Method(typeof(StatPart_Glow), "FactorFromGlow"), null, + new HarmonyMethod(typeof(HarmonyPatches), nameof(VampiresAlwaysWorkHard))); + //Remove temporary character (PawnTemporary) corpses from the list, since they can't tie. //harmony.Patch(AccessTools.Method(typeof(ThingDefGenerator_Corpses), "ImpliedCorpseDefs"), null, // new HarmonyMethod(typeof(HarmonyPatches), nameof(RemovePawnTemporaryCorpses))); @@ -483,6 +487,14 @@ where typeof(WorkGiver).IsAssignableFrom(assemblyType) #endregion } + // RimWorld.StatPart_Glow + public static void VampiresAlwaysWorkHard(Thing t, ref float __result) //FactorFromGlow + { + if (t is Pawn p && p.IsVampire()) + __result = 1.0f; + } + + //public static int mapTimeoutTicks = 600; // Verse.MapPawns