-
Notifications
You must be signed in to change notification settings - Fork 0
/
Settings.cs
64 lines (59 loc) · 1.95 KB
/
Settings.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
using SharedModConfig;
using System;
using System.Collections.Generic;
namespace WeaponSharpening
{
public class Settings
{
public static string DURABILITY_COST = "Durability_Cost";
public static string STONE_COST = "Stone_Cost";
public static string STONE_WEIGHT = "Stone_Weight";
public ModConfig config;
public T Get<T>(string setting)
{
return (T)Convert.ChangeType(this.config.GetValue(setting), typeof(T));
}
public Settings()
{
config = new ModConfig
{
ModName = "WeaponSharpening",
SettingsVersion = 1.0,
Settings = new List<BBSetting>
{
new FloatSetting
{
Name = DURABILITY_COST,
Description = "Durability Cost",
DefaultValue = 10.0f,
MinValue = 0.0f,
MaxValue = 25f,
RoundTo = 0,
ShowPercent = false
},
new FloatSetting
{
Name = STONE_COST,
Description = "Sharpening Stone Cost",
DefaultValue = 40f,
MinValue = 10f,
MaxValue = 100f,
RoundTo = 0,
ShowPercent = false
},
new FloatSetting
{
Name = STONE_WEIGHT,
Description = "Sharpening Stone Weight",
DefaultValue = 3f,
MinValue = 1f,
MaxValue = 10f,
RoundTo = 0,
ShowPercent = false
}
}
};
config.Register();
}
}
}