This repository was archived by the owner on May 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathModSettings.cs
More file actions
34 lines (31 loc) · 1.97 KB
/
ModSettings.cs
File metadata and controls
34 lines (31 loc) · 1.97 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
using MelonLoader;
namespace ActionMenuUtils
{
public static class ModSettings
{
private static string categoryName = "ActionMenuRespawn"; //Old Name
private static string categoryDisplayName = "ActionMenuUtils"; //New Name
public static bool confirmRespawn { get; private set; } = false;
public static bool confirmGoHome { get; private set; } = false;
public static bool confirmAvatarReset { get; private set; } = false;
public static bool confirmInstanceRejoin { get; private set; } = true;
public static bool forceGoHome { get; private set; } = false;
public static void RegisterSettings()
{
MelonPreferences.CreateCategory(categoryName, categoryDisplayName);
MelonPreferences.CreateEntry(categoryName, "ConfirmRespawn", confirmRespawn, "Add a confirmation for respawn");
MelonPreferences.CreateEntry(categoryName, "ConfirmGoHome", confirmGoHome, "Add a confirmation for go home");
MelonPreferences.CreateEntry(categoryName, "ForceGoHome", forceGoHome, "Skip the go home popup");
MelonPreferences.CreateEntry(categoryName, "ConfirmAvatarReset", confirmAvatarReset, "Add a confirmation for avatar reset");
MelonPreferences.CreateEntry(categoryName, "ConfirmInstanceReJoin", confirmInstanceRejoin, "Add a confirmation for rejoin instance");
}
public static void Apply()
{
confirmRespawn = MelonPreferences.GetEntryValue<bool>(categoryName, "ConfirmRespawn");
confirmGoHome = MelonPreferences.GetEntryValue<bool>(categoryName, "ConfirmGoHome");
forceGoHome = MelonPreferences.GetEntryValue<bool>(categoryName, "ForceGoHome");
confirmAvatarReset = MelonPreferences.GetEntryValue<bool>(categoryName, "ConfirmAvatarReset");
confirmInstanceRejoin = MelonPreferences.GetEntryValue<bool>(categoryName, "ConfirmInstanceReJoin");
}
}
}