Migrate to C#12

This commit is contained in:
copecone committed 2026-10-22 11:54:26 +09:00
1 parent 7eaf4f48e6
commit 98d31404cc
24 files changed
+42 -42

No files matched your search

+2 -13
View File
@@ -28,20 +28,9 @@ public static class CustomFrameRateDeferPatch
/// <summary>
/// Checks whether the SetFramerate render timing fix is enabled.
/// Active if rendering session has the option enabled, or enabled by default during normal in-game play.
/// Active if rendering session has the option enabled.
/// </summary>
public static bool IsEnabled
{
get
{
if (RenderManager.IsActive && RenderManager.Instance?.Configuration?.AdvancedConfig != null)
{
return RenderManager.Instance.Configuration.AdvancedConfig.FixCustomFrameRate;
}
return true;
}
}
public static bool IsEnabled => RenderManager.IsActive && RenderManager.Instance.Configuration.AdvancedConfig.FixCustomFrameRate;
/// <summary>
/// Intercepts manual camera render calls from SetCustomFrameRate (Update phase) or CheckUpdateFrameRateScreen
+3 -2
View File
@@ -16,7 +16,7 @@ public static class DecorationPatch
public static bool IsEnabled =>
RenderManager.Instance &&
RenderManager.Instance.stage >= RenderStage.Load &&
RenderManager.Instance.Configuration?.AdvancedConfig?.HideFailedDecorations == true;
RenderManager.Instance.Configuration.AdvancedConfig.HideFailedDecorations;
/// <summary>
/// Checks whether the given sprite is the default placeholder or not-found sprite of the decoration manager.
@@ -46,7 +46,7 @@ public static class DecorationPatch
{
if (IsPlaceholderSprite(visualDec.spriteRenderer.sprite, manager))
{
visualDec.SetSprite((Sprite)null!);
visualDec.SetSprite(null!);
}
}
}
@@ -61,6 +61,7 @@ public static class DecorationPatch
public static class VisualDecorationSetSpritePatch
{
[HarmonyPrefix]
// ReSharper disable once InconsistentNaming
public static void Prefix(scrVisualDecoration __instance, ref Sprite? sprite)
{
if (!IsEnabled || !sprite) return;
+1 -1
View File
@@ -44,7 +44,7 @@ public static class scnGamePatch
var nonTile = RenderManager.Instance &&
RenderManager.Instance.stage >= RenderStage.Load &&
RenderManager.Instance.Configuration?.AdvancedConfig?.NonTile == true;
RenderManager.Instance.Configuration.AdvancedConfig.NonTile;
if (!nonTile) return;
foreach (var floor in scrLevelMaker.instance.listFloors)
+1
View File
@@ -91,6 +91,7 @@ public static class scrControllerPatch
/// <param name="__instance">The game controller.</param>
[HarmonyPostfix]
[HarmonyPatch("OnLandOnPortal")]
// ReSharper disable once InconsistentNaming
public static void PreventWinTextsPostfix(scrController __instance)
{
if (!RenderManager.IsActive || __instance == null) return;
+1
View File
@@ -41,6 +41,7 @@ public class scrFloorPatch
/// </summary>
[HarmonyPostfix]
[HarmonyPatch("Start")]
// ReSharper disable once InconsistentNaming
public static void ForceEnableOnStart(scrFloor __instance)
{
if (RenderManager.Instance &&