-
Notifications
You must be signed in to change notification settings - Fork 181
/
Copy pathTowerSettings.cs
233 lines (206 loc) · 6.84 KB
/
TowerSettings.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
using System;
using BTD_Mod_Helper.Api.Components;
using BTD_Mod_Helper.Api.Data;
using BTD_Mod_Helper.Api.Enums;
using BTD_Mod_Helper.Api.ModOptions;
using UnityEngine;
namespace UltimateCrosspathing;
public class TowerSettings : ModSettings
{
private static readonly ModSettingCategory IndividualTowers = new("Individual Towers")
{
modifyCategory = category =>
{
var enableAll = category.AddButton(
new Info("Enable All", 1000, -100, 562, 200, anchor: new Vector2(0.5f, 1)),
VanillaSprites.GreenBtnLong, new Action(() =>
{
foreach (var loadInfo in ModContent.GetContent<LoadInfo>())
{
loadInfo.Enabled.SetValue(true);
}
}));
enableAll.LayoutElement.ignoreLayout = true;
enableAll.AddText(new Info("Text", InfoPreset.FillParent), "Enable All", 80f);
var disableAll = category.AddButton(
new Info("Disable All", -1000, -100, 562, 200, anchor: new Vector2(0.5f, 1)),
VanillaSprites.RedBtnLong, new Action(() =>
{
foreach (var loadInfo in ModContent.GetContent<LoadInfo>())
{
loadInfo.Enabled.SetValue(false);
}
}));
disableAll.LayoutElement.ignoreLayout = true;
disableAll.AddText(new Info("Text", InfoPreset.FillParent), "Disable All", 80f);
}
};
public static readonly ModSettingBool DartMonkeyEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.DartMonkeyIcon,
requiresRestart = true
};
public static readonly ModSettingBool BoomerangMonkeyEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.BoomerangMonkeyIcon,
requiresRestart = true
};
public static readonly ModSettingBool BombShooterEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.BombShooterIcon,
requiresRestart = true
};
public static readonly ModSettingBool TackShooterEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.TackShooterIcon,
requiresRestart = true
};
public static readonly ModSettingBool IceMonkeyEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.IceMonkeyIcon,
requiresRestart = true
};
public static readonly ModSettingBool GlueGunnerEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.GlueGunnerIcon,
requiresRestart = true
};
public static readonly ModSettingBool SniperMonkeyEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.SniperMonkeyIcon,
requiresRestart = true
};
public static readonly ModSettingBool MonkeySubEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.MonkeySubIcon,
requiresRestart = true
};
public static readonly ModSettingBool MonkeyBuccaneerEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.MonkeyBuccaneerIcon,
requiresRestart = true
};
public static readonly ModSettingBool MonkeyAceEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.MonkeyAceIcon,
requiresRestart = true
};
public static readonly ModSettingBool HeliPilotEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.HeliPilotIcon,
requiresRestart = true
};
public static readonly ModSettingBool MortarMonkeyEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.MortarMonkeyIcon,
requiresRestart = true
};
public static readonly ModSettingBool DartlingGunnerEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.DartlingGunnerIcon,
requiresRestart = true
};
public static readonly ModSettingBool WizardMonkeyEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.WizardIcon,
requiresRestart = true
};
public static readonly ModSettingBool SuperMonkeyEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.SuperMonkeyIcon,
requiresRestart = true
};
public static readonly ModSettingBool NinjaMonkeyEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.NInjaMonkeyIcon,
requiresRestart = true
};
public static readonly ModSettingBool AlchemistEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.AlchemistIcon,
requiresRestart = true
};
public static readonly ModSettingBool DruidEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.DruidIcon,
requiresRestart = true
};
public static readonly ModSettingBool MermonkeyEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = "MonkeyIcons[MermonkeyIcon]", // TODO replace with VanillaSprites.MermonkeyIcon
requiresRestart = true
};
public static readonly ModSettingBool BananaFarmEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.BananaFarmIcon2,
requiresRestart = true
};
public static readonly ModSettingBool SpikeFactoryEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.SpikeFactoryIcon,
requiresRestart = true
};
public static readonly ModSettingBool MonkeyVillageEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.MonkeyVillageIcon,
requiresRestart = true
};
public static readonly ModSettingBool EngineerMonkeyEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.EngineerMonkeyicon,
requiresRestart = true
};
public static readonly ModSettingBool BeastHandlerEnabled = new(true)
{
button = true,
category = IndividualTowers,
icon = VanillaSprites.BeastHandlerIcon,
requiresRestart = true
};
}