-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBetterAdvancedTabletFixed.cs
More file actions
47 lines (40 loc) · 1.79 KB
/
Copy pathBetterAdvancedTabletFixed.cs
File metadata and controls
47 lines (40 loc) · 1.79 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
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using UnityEngine;
#nullable disable
namespace BetterAdvancedTabletFixed
{
[BepInPlugin("BetterAdvancedTabletFixed", "Better Advanced Tablet Fixed", "2.1.1")]
public class BetterAdvancedTabletPlugin : BaseUnityPlugin
{
private ConfigEntry<int> configTabletSlots;
private ConfigEntry<bool> configDebugMode;
public static int TabletSlots;
public static bool DebugMode;
public static void ModLog(string text)
{
Debug.Log((object)("Better Advanced Tablet Fixed: " + text));
}
private void Awake()
{
this.HandleConfig();
this.Patch();
}
private void Patch()
{
Debug.Log((object)"Plugin Better Advanced Tablet Fixed 2.1.1 is loaded!");
new Harmony("BetterAdvancedTabletFixed").PatchAll();
Debug.Log((object)"Better Advanced Tablet Patching complete!");
}
public void OnLoad() => this.Patch();
public void OnUnload() => Debug.Log((object)"Better Advanced Tablet bye!");
private void HandleConfig()
{
this.configTabletSlots = this.Config.Bind<int>("General", "AdvancedTabletSlots", 2, "Number of slots to add on the Advanced Tablet.\nVanilla has 2 already. You can add up to 6 extra slots for a total of 8 slots.\nCAUTION! Removing slots on a already created world with more slots will crash the game.");
BetterAdvancedTabletPlugin.TabletSlots = this.configTabletSlots.Value;
this.configDebugMode = this.Config.Bind<bool>("Debug", "DebugMode", false, "Turns debug mode");
BetterAdvancedTabletPlugin.DebugMode = this.configDebugMode.Value;
}
}
}