Files
7d2dXG/Mods/zzz_REBIRTH__Utils/Dayuppy/Harmony/Harmony_AIDirectorBloodMoonParty.cs
Nathaniel Cosford 062dfab2cd Patched
2025-05-30 01:04:40 +09:30

30 lines
1.1 KiB
C#

internal class Dayuppy_AIDirectorBloodMoonPartyPatches
{
[HarmonyPatch(typeof(AIDirectorBloodMoonParty))]
[HarmonyPatch("IsPlayerATarget")]
public class IsPlayerATargetPatch
{
public static void Postfix(AIDirectorBloodMoonParty __instance, ref bool __result, EntityPlayer player)
{
__result = !player.IsDead() && player.IsSpawned() && !player.IsIgnoredByAI() && player.entityId != -1;
}
}
[HarmonyPatch(typeof(AIDirectorBloodMoonParty))]
[HarmonyPatch("SpawnZombie")]
public class SpawnZombiePatch
{
public static bool Prefix(AIDirectorBloodMoonParty __instance, ref bool __result, World _world, EntityPlayer _target, Vector3 _focusPos, Vector3 _radiusV)
{
if (RebirthUtilities.ScenarioSkip())
{
//Log.Out("Dayuppy_AIDirectorBloodMoonPartyPatches-SpawnZombie START: " + _target.biomeStandingOn.m_sBiomeName + $" ({_target.position})");
string biomeName = RebirthUtilities.GetBiomeName(_target);
RebirthUtilities.SetHiveSpawnGroup(biomeName);
}
return true;
}
}
}