-
Notifications
You must be signed in to change notification settings - Fork 0
/
DepositItemsDeskModBase.cs
50 lines (39 loc) · 1.41 KB
/
DepositItemsDeskModBase.cs
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
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using SetCompanySellTime.Patches;
namespace SetCompanySellTime
{
[BepInPlugin(modGUID, modName, modVersion)]
public class DepositItemsDeskModBase : BaseUnityPlugin
{
private const string modGUID = "com.peter.lethalcompany.deposititemsdeskmod";
private const string modName = "Set Company Sell Time";
private const string modVersion = "1.0.0";
private readonly Harmony harmony = new Harmony(modGUID);
public static DepositItemsDeskModBase instance;
internal ManualLogSource log;
public static ConfigEntry<float> configSellTime;
void Awake()
{
if (instance == null)
{
instance = this;
}
log = BepInEx.Logging.Logger.CreateLogSource(modGUID);
configSellTime = Config.Bind("General", "sellTime", 2f, "Time in seconds to sell items (min 1 sec max 10 sec)");
if (configSellTime.Value < 1f)
{
configSellTime.Value = 1f;
}
if (configSellTime.Value > 10f)
{
configSellTime.Value = 10f;
}
log.LogInfo("Set Company Sell Time loaded");
harmony.PatchAll(typeof(DepositItemsDeskModBase));
harmony.PatchAll(typeof(DepositItemsDeskPatch));
}
}
}