Upload from upload_mods.ps1
This commit is contained in:
30
Dayuppy/Harmony/Harmony_AIDirectorBloodMoonParty.cs
Normal file
30
Dayuppy/Harmony/Harmony_AIDirectorBloodMoonParty.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user