SHA256
Add Safety Checks and Exception Handling to Game Patches
This commit is contained in:
4 files changed
+17
-1
No files matched your search
@@ -1,5 +1,6 @@
|
|||||||
using ADOFAIRenderer.Core;
|
using ADOFAIRenderer.Core;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
|
using MelonLoader;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
@@ -15,6 +16,11 @@ namespace ADOFAIRenderer.Patch.Game
|
|||||||
public static void AddButtonRender(scnEditor __instance)
|
public static void AddButtonRender(scnEditor __instance)
|
||||||
{
|
{
|
||||||
if (RenderMod.IsFeatureDisabled) return;
|
if (RenderMod.IsFeatureDisabled) return;
|
||||||
|
if (!__instance || !__instance.buttonExit)
|
||||||
|
{
|
||||||
|
Melon<RenderMod>.Logger.Msg("scnEditor에 렌더 버튼을 만들 수 없습니다.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var cloneTarget = __instance.buttonExit!.gameObject;
|
var cloneTarget = __instance.buttonExit!.gameObject;
|
||||||
var buttonContainer = cloneTarget.transform.parent!;
|
var buttonContainer = cloneTarget.transform.parent!;
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
namespace ADOFAIRenderer.Patch.Game
|
||||||
|
{
|
||||||
|
public class scrFloorPatch
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using ADOFAIRenderer.Core;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@@ -12,6 +13,7 @@ namespace ADOFAIRenderer.Patch.Game
|
|||||||
// ReSharper disable once InconsistentNaming
|
// ReSharper disable once InconsistentNaming
|
||||||
public static void ForceScaledTime(scrPortalParticles __instance)
|
public static void ForceScaledTime(scrPortalParticles __instance)
|
||||||
{
|
{
|
||||||
|
if (!RenderManager.IsActive) return;
|
||||||
if (__instance == null) return;
|
if (__instance == null) return;
|
||||||
|
|
||||||
var particleSystems = __instance.GetComponentsInChildren<ParticleSystem>(true);
|
var particleSystems = __instance.GetComponentsInChildren<ParticleSystem>(true);
|
||||||
|
|||||||
@@ -133,7 +133,8 @@ namespace ADOFAIRenderer.Util
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
Melon<RenderMod>.Logger.Msg("[FFmpegVideoBGPlayer] 색공간 변환에 Compute Shader를 사용할 수 없습니다.");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user