mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
Stickers: fixed shader replacement hitting stickers
This commit is contained in:
parent
958f07ed08
commit
af00f4c6d0
3 changed files with 15 additions and 2 deletions
|
@ -26,6 +26,7 @@ public class StickerMod : MelonMod
|
||||||
ApplyPatches(typeof(Patches.PlayerSetupPatches));
|
ApplyPatches(typeof(Patches.PlayerSetupPatches));
|
||||||
ApplyPatches(typeof(Patches.ControllerRayPatches));
|
ApplyPatches(typeof(Patches.ControllerRayPatches));
|
||||||
ApplyPatches(typeof(Patches.ShaderFilterHelperPatches));
|
ApplyPatches(typeof(Patches.ShaderFilterHelperPatches));
|
||||||
|
ApplyPatches(typeof(Patches.CVRToolsPatches));
|
||||||
|
|
||||||
LoadAssetBundle();
|
LoadAssetBundle();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using ABI_RC.Core.InteractionSystem;
|
using ABI_RC.Core;
|
||||||
|
using ABI_RC.Core.InteractionSystem;
|
||||||
using ABI_RC.Core.IO;
|
using ABI_RC.Core.IO;
|
||||||
using ABI_RC.Core.Player;
|
using ABI_RC.Core.Player;
|
||||||
using ABI_RC.Core.Savior;
|
using ABI_RC.Core.Savior;
|
||||||
|
@ -49,3 +50,14 @@ internal static class ShaderFilterHelperPatches
|
||||||
MetaPort.Instance.settings.SetSettingsBool("ExperimentalShaderLimitEnabled", false);
|
MetaPort.Instance.settings.SetSettingsBool("ExperimentalShaderLimitEnabled", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static class CVRToolsPatches
|
||||||
|
{
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(CVRTools), nameof(CVRTools.ReplaceShaders), typeof(Material), typeof(string))]
|
||||||
|
private static bool Prefix_CVRTools_ReplaceShaders(Material material, string fallbackShaderName = "")
|
||||||
|
{
|
||||||
|
if (material == null || material.shader == null) return true;
|
||||||
|
return material.shader != StickerMod.DecalSimpleShader; // prevent replacing decals with fallback shader
|
||||||
|
}
|
||||||
|
}
|
|
@ -27,6 +27,6 @@ using System.Reflection;
|
||||||
namespace NAK.Stickers.Properties;
|
namespace NAK.Stickers.Properties;
|
||||||
internal static class AssemblyInfoParams
|
internal static class AssemblyInfoParams
|
||||||
{
|
{
|
||||||
public const string Version = "1.0.6";
|
public const string Version = "1.0.7";
|
||||||
public const string Author = "NotAKidoS";
|
public const string Author = "NotAKidoS";
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue