SHA256
Add Renderer Feature
This commit is contained in:
1 parent
c9314c264d
commit
2556bc7f62
13 files changed
+727
-21
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using HarmonyLib;
|
||||
using MelonLoader;
|
||||
|
||||
namespace ADOFAIRenderer.Patch.ClassPatch
|
||||
{
|
||||
@@ -12,5 +13,33 @@ namespace ADOFAIRenderer.Patch.ClassPatch
|
||||
{
|
||||
return !RenderMod.IsRendering;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch("PortalTravelAction")]
|
||||
public static bool PreventPortalTravel()
|
||||
{
|
||||
return !RenderMod.IsRendering;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch("FailAction")]
|
||||
public static bool PreventFailAction()
|
||||
{
|
||||
return !RenderMod.IsRendering;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch("Fail2Action")]
|
||||
public static bool PreventFail2Action()
|
||||
{
|
||||
return !RenderMod.IsRendering;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch("OnPlayerDied")]
|
||||
public static bool PreventPlayerDied()
|
||||
{
|
||||
return !RenderMod.IsRendering;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ADOFAIRenderer.Patch.ClassPatch
|
||||
{
|
||||
[HarmonyPatch(typeof(scrDecoration))]
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static class scrDecorationPatch
|
||||
{
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch("SetRotation")]
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static bool SetRotationPrefix(scrDecoration __instance)
|
||||
{
|
||||
if (__instance == null || !__instance || __instance.pivotTrans == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch("SetScale")]
|
||||
public static bool SetScalePrefix(scrDecoration __instance)
|
||||
{
|
||||
if (__instance == null || !__instance || __instance.pivotTrans == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch("SetOpacity")]
|
||||
public static bool SetOpacityPrefix(scrDecoration __instance)
|
||||
{
|
||||
if (__instance == null || !__instance)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch("UpdatePosition")]
|
||||
public static bool UpdatePositionPrefix(scrDecoration __instance)
|
||||
{
|
||||
if (__instance == null || !__instance || __instance.pivotTrans == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace ADOFAIRenderer.Patch.ClassPatch
|
||||
{
|
||||
if (!RenderMod.IsRendering) return true;
|
||||
|
||||
__result = RenderManager.Countdown == 0;
|
||||
__result = RenderManager.FrameCount == 0 && RenderManager.Countdown == 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user