Upload from upload_mods.ps1
This commit is contained in:
41
Harmony/Inactive/Harmony_Origin.cs
Normal file
41
Harmony/Inactive/Harmony_Origin.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using Unity.Collections;
|
||||
|
||||
public class HarmonyOriginPatches
|
||||
{
|
||||
//[HarmonyPatch(typeof(Origin), nameof(Origin.Awake))]
|
||||
public class AwakePatch
|
||||
{
|
||||
public static bool Prefix(Origin __instance)
|
||||
{
|
||||
Log.Out($"Origin::Awake Prefix");
|
||||
|
||||
if (Origin.Instance == null)
|
||||
{
|
||||
Origin.Instance = __instance;
|
||||
}
|
||||
|
||||
__instance.isAuto = false;
|
||||
__instance.particles = new NativeArray<ParticleSystem.Particle>(512, Allocator.Persistent);
|
||||
__instance.physicsCheckT = __instance.transform.GetChild(0);
|
||||
Origin.Instance.Reposition(Vector3.zero);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//[HarmonyPatch(typeof(Origin), nameof(Origin.FixedUpdate))]
|
||||
public class FixedUpdatePatch
|
||||
{
|
||||
public static bool Prefix(Origin __instance)
|
||||
{
|
||||
if (__instance.isActiveAndEnabled)
|
||||
{
|
||||
Log.Out($"Origin::FixedUpdate - Disabling Origin");
|
||||
__instance.isAuto = false;
|
||||
__instance.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user