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
a01828a080
commit
f4a52f207a
2 changed files with 24 additions and 5 deletions
|
|
@ -4,7 +4,7 @@
|
|||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<AssemblyName>CardOnly</AssemblyName>
|
||||
<Description>My first plugin</Description>
|
||||
<Version>1.0.0</Version>
|
||||
<Version>1.1.0</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
23
Plugin.cs
23
Plugin.cs
|
|
@ -1,19 +1,38 @@
|
|||
using BepInEx;
|
||||
using HarmonyLib;
|
||||
using MyBox;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CardOnly
|
||||
{
|
||||
[BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
|
||||
[BepInIncompatibility("CashOnly")]
|
||||
public class Plugin : BaseUnityPlugin
|
||||
{
|
||||
bool patched = false;
|
||||
Harmony harmony;
|
||||
private void Awake()
|
||||
{
|
||||
Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!");
|
||||
harmony = new Harmony("com.orpticon.CardOnly");
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
if (Singleton<OnboardingManager>.Instance != null && Singleton<OnboardingManager>.Instance.Completed && !patched)
|
||||
{
|
||||
patched = true;
|
||||
Logger.LogInfo("Patching...");
|
||||
// Plugin startup logic
|
||||
Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded! Applying patch...");
|
||||
Harmony harmony = new Harmony("com.orpticon.CardOnly");
|
||||
harmony.PatchAll();
|
||||
}
|
||||
if (Singleton<OnboardingManager>.Instance != null && !Singleton<OnboardingManager>.Instance.Completed && patched)
|
||||
{
|
||||
patched = false;
|
||||
Logger.LogInfo("Unpatching...");
|
||||
harmony.UnpatchSelf();
|
||||
}
|
||||
}
|
||||
}
|
||||
public static class PaymentFixerPatch
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue