SHA256
56 lines
1.5 KiB
C#
56 lines
1.5 KiB
C#
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;
|
|
}
|
|
}
|
|
}
|