-
Notifications
You must be signed in to change notification settings - Fork 0
/
ModSettings.cs
30 lines (26 loc) · 1.67 KB
/
ModSettings.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
using MelonLoader;
namespace CustomLoadingScreens
{
internal class ModSettings
{
private static MelonPreferences_Entry<bool> _verboseLogging;
private static MelonPreferences_Entry<string> _customImageFolder;
private static MelonPreferences_Entry<string> _customQuoteFolder;
private static MelonPreferences_Entry<double> _probabilityOfCustomImage;
private static MelonPreferences_Entry<double> _probabilityOfCustomQuote;
public static bool VerboseLogging => _verboseLogging.Value;
public static string CustomImageFolder => _customImageFolder.Value;
public static string CustomQuoteFolder => _customQuoteFolder.Value;
public static double CustomImageProbability => _probabilityOfCustomImage.Value;
public static double CustomQuoteProbability => _probabilityOfCustomQuote.Value;
internal static void Register()
{
var category = MelonPreferences.CreateCategory("CustomLoadingScreens", "Custom Loading Screens");
_verboseLogging = category.CreateEntry("VerboseLogging", false, "Enable Verbose Logging");
_customImageFolder = category.CreateEntry("CustomImageFolder", "UserData/CustomLoadingScreens", "Custom Image Folder Path");
_customQuoteFolder = category.CreateEntry("CustomQuoteFolder", "UserData/CustomLoadingQuotes", "Custom Quote Folder Path");
_probabilityOfCustomImage = category.CreateEntry("ImageProbability", 0.5, "Probability of Loading Custom Image (between 0-1)");
_probabilityOfCustomQuote = category.CreateEntry("QuoteProbability", 0.5, "Probability of Loading Custom Quote (between 0-1)");
}
}
}