forked from InscryptionModding/InscryptionAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlugin.cs
More file actions
57 lines (49 loc) · 1.75 KB
/
Plugin.cs
File metadata and controls
57 lines (49 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using BepInEx;
using BepInEx.Logging;
using BepInEx.Configuration;
using HarmonyLib;
using DiskCardGame;
using UnityEngine.SceneManagement;
#pragma warning disable 169
namespace APIPlugin
{
[BepInPlugin(PluginGuid, PluginName, PluginVersion)]
public partial class Plugin : BaseUnityPlugin
{
private const string PluginGuid = "cyantist.inscryption.api";
private const string PluginName = "API";
private const string PluginVersion = "1.11.0.0";
internal static ManualLogSource Log;
internal static ConfigEntry<bool> configEnergy;
internal static ConfigEntry<bool> configDrone;
internal static ConfigEntry<bool> configMox;
internal static ConfigEntry<bool> configDroneMox;
private void Awake()
{
Logger.LogInfo($"Loaded {PluginName}!");
Plugin.Log = base.Logger;
configEnergy = Config.Bind("Energy","Energy Refresh",true,"Max energy increaces and energy refreshes at end of turn");
configDrone = Config.Bind("Energy","Energy Drone",false,"Drone is visible to display energy (requires Energy Refresh)");
configMox = Config.Bind("Mox","Mox Refresh",false,"Mox refreshes at end of battle");
configDroneMox = Config.Bind("Mox","Mox Drone",false,"Drone displays mox (requires Energy Drone and Mox Refresh)");
Harmony harmony = new Harmony(PluginGuid);
harmony.PatchAll();
}
private void Start()
{
SetAbilityIdentifiers();
SetEvolveIdentifiers();
SetIceCubeIdentifiers();
SetTailIdentifiers();
ScriptableObjectLoader<CardInfo>.allData = null;
}
private void OnEnable()
{
SceneManager.sceneLoaded += this.OnSceneLoaded;
}
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
EnableEnergy(scene.name);
}
}
}