Update 1.1.0
The mod will now be disabled during the checkout tutorials, allowing them to be completed.
This commit is contained in:
parent
2ae4c98738
commit
6ae292d705
2 changed files with 23 additions and 5 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
<TargetFramework>netstandard2.1</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<AssemblyName>CashOnly</AssemblyName>
|
<AssemblyName>CashOnly</AssemblyName>
|
||||||
<Description>My first plugin</Description>
|
<Description>My first plugin</Description>
|
||||||
<Version>1.0.0</Version>
|
<Version>1.1.0</Version>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
26
Plugin.cs
26
Plugin.cs
|
|
@ -1,17 +1,35 @@
|
||||||
using BepInEx;
|
using BepInEx;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
|
using MyBox;
|
||||||
|
|
||||||
namespace CashOnly
|
namespace CashOnly
|
||||||
{
|
{
|
||||||
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
|
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
|
||||||
|
[BepInIncompatibility("CardOnly")]
|
||||||
public class Plugin : BaseUnityPlugin
|
public class Plugin : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
|
bool patched = false;
|
||||||
|
Harmony harmony;
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
// Plugin startup logic
|
Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!");
|
||||||
Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded! Applying patch...");
|
harmony = new Harmony("com.orpticon.CashOnly");
|
||||||
Harmony harmony = new Harmony("com.orpticon.CashOnly");
|
}
|
||||||
harmony.PatchAll();
|
private void Update()
|
||||||
|
{
|
||||||
|
if (Singleton<OnboardingManager>.Instance != null && Singleton<OnboardingManager>.Instance.Completed && !patched)
|
||||||
|
{
|
||||||
|
patched = true;
|
||||||
|
Logger.LogInfo("Patching...");
|
||||||
|
// Plugin startup logic
|
||||||
|
harmony.PatchAll();
|
||||||
|
}
|
||||||
|
if (Singleton<OnboardingManager>.Instance != null && !Singleton<OnboardingManager>.Instance.Completed && patched)
|
||||||
|
{
|
||||||
|
patched = false;
|
||||||
|
Logger.LogInfo("Unpatching...");
|
||||||
|
harmony.UnpatchSelf();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static class PaymentFixerPatch
|
public static class PaymentFixerPatch
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue