-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGateKarmaRandomizerOptions.cs
More file actions
55 lines (43 loc) · 2.18 KB
/
GateKarmaRandomizerOptions.cs
File metadata and controls
55 lines (43 loc) · 2.18 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
48
49
50
51
52
53
54
55
using Menu.Remix.MixedUI;
using UnityEngine;
namespace GateKarmaRandomizer;
public class GateKarmaRandomizerOptions : OptionInterface
{
public static Configurable<int> Seed;
public static Configurable<bool> ScugBasedSeed;
public static Configurable<bool> DynamicRNG;
public static Configurable<int> MaximumKarma;
public GateKarmaRandomizerOptions()
{
Seed = this.config.Bind<int>("Seed", UnityEngine.Random.Range(0, int.MaxValue), new ConfigAcceptableRange<int>(0, int.MaxValue));
ScugBasedSeed = this.config.Bind<bool>("ScugBasedRNG", true);
DynamicRNG = this.config.Bind<bool>("RandomKarmaPerSession", false);
MaximumKarma = this.config.Bind<int>("MaximumKarma", 5, new ConfigAcceptableRange<int>(1, Hooks.KarmaExpansionMaxKarma)); // TODO: Should be dynamic using Hooks.KarmaCap so its not dependent on KE
}
private UIelement[] UIArrRandomOptions;
public override void Initialize()
{
var opTab = new OpTab(this, "Options");
this.Tabs = new[]
{
opTab
};
UIArrRandomOptions = new UIelement[]
{
new OpLabel(10f, 550f, "Options", true),
new OpLabel(10f, 520f, "Karma RNG Seed"),
new OpUpdown(Seed, new Vector2(10f, 490f), 120f) {description = "Seed used to determine gate rng. Change it if you want a different experience than before" },
new OpLabel(10f, 460f, "Scug Based Seed"),
new OpCheckBox(ScugBasedSeed, 10f, 430f) {description = "If enabled, will make campaigns have different gate requirements even with the same seed." },
new OpLabel(10f, 400f, "Dynamic Gate Karma"),
new OpCheckBox(DynamicRNG, 10f, 370f) {description = "If enabled, makes gate karma dynamic throughout a playthrough. (might not be as fun)" },
new OpLabel(10f, 300f, "Maximum Karma Requirement"),
new OpUpdown(MaximumKarma, new Vector2(10f, 270f), 120f) { description = "The maximum karma requirement that gates can randomly be assigned." }
};
opTab.AddItems(UIArrRandomOptions);
}
public override void Update()
{
//if (((OpUpdown)UIArrRandomOptions[2]).IsInt)
}
}