-
Notifications
You must be signed in to change notification settings - Fork 9
/
Economy Lib Framework.txt
340 lines (231 loc) · 8.81 KB
/
Economy Lib Framework.txt
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
#region JESSBOT2.0LIB
#region GENERAL SUBLIB
// Used to send data packets around in performing necessary functions, or to act as a predefined set of values
class JessDataLibrary
{
// All information values
string identifier = "NUL000";
string name = "NULL";
string category = "N/A";
string subcategory = "N/A";
string definition = "N/A";
#region ECONOMY CATEGORY SUBDEFS
// Store Info
ulong purchasePrice = 0;
ulong sellPrice = 0;
// Powerups and Upgradeables
int level = 0;
int size = 0;
int availablePlots = 0;
// Buildings
bool isGreenhouse = false;
bool canCraft = false;
bool canSmelt = false;
bool isBarn = false;
bool isAutomated = false;
bool isResourceProducer = false;
bool isPasture = false;
int resourceType = -1;
TimeSpan resProdInterval = new TimeSpan();
// Farm Plots
bool isPartOfBuilding = false;
int livestockCapacity = 0;
// Crafting
bool canBeCrafted = false;
string ingredient1 = "NUL000";
int ingredient1_mult = 0;
string ingredient2 = "NUL000";
int ingredient2_mult = 0;
string ingredient3 = "NUL000";
int ingredient3_mult = 0;
string ingredient4 = "NUL000";
int ingredient4_mult = 0;
string result = "NUL000";
int result_mult = 0;
#endregion
public JessDataLibrary(string identifier, string name, string category, string subcategory, string definition, ulong purchasePrice, ulong sellPrice, int level, int size, int availablePlots, bool isGreenhouse, bool canCraft, bool canSmelt, bool isBarn, bool isAutomated, bool isResourceProducer, bool isPasture, int resourceType, TimeSpan resProdInterval, bool isPartOfBuilding, int livestockCapacity, bool canBeCrafted, string ingredient1, int ingredient1_mult, string ingredient2, int ingredient2_mult, string ingredient3, int ingredient3_mult, string ingredient4, int ingredient4_mult, string result, int result_mult)
{
}
}
#endregion
#region ECONOMY SUBLIB
// Used to store the unique identification data for items, buildings, etc.
// A template will be necessary for the scanLibrary function
class JessEconomyIdentifier
{
string identification = "NUL000"; // Begin with NUL000 - the "non-identifiable" ID
public string GetBuildingID() { return identification; }
public void SetBuildingID(string incomingID) { identification = incomingID; }
JessDataLibrary searcher = new JessDataLibrary();
// This is the library functionality and the biggest reason why this class is important!
public JessDataLibrary ScanLibrary()
{
switch (identification)
{
// BX - EXP Booster
#region EXP BOOSTERS
case "BX000": // EXP Booster 1
break;
case "BX001": // EXP Booster 2
break;
case "BX002": // EXP Booster 3
break;
case "BX003": // EXP Booster 4
break;
#endregion
// CB - Cash Boosters
#region CASH BOOSTERS
case "CB000": // Cash Booster 1
break;
case "CB001": // Cash Booster 2
break;
#endregion
// ITP - Purchaseable Items
#region PURCHASEABLE ITEMS
case "ITP000": // Fishing Rod 1
break;
case "ITP001": // Mining Tools 1
break;
case "ITP002": // Fishing Rod 2
break;
case "ITP003": // Axe 1
break;
case "ITP004": // Mining Tools 2
break;
#endregion
// UM - User Marketplace
#region USER MARKETPLACE
case "UM000": // User Market Access
break;
case "UM001": // User Market Investor 1
break;
case "UM002": // Stock Market License
break;
#endregion
// BLG - Buildings
#region BUILDINGS
case "BLG000": // Small Greenhouse 1
break;
case "BLG001": // Crafting Station 1
break;
case "BLG002": // Mill 1
break;
case "BLG003": // Small Pasture 1
break;
case "BLG004": // Small Barn 1
break;
case "BLG005": // Forge 1
break;
case "BLG006": // Glassworks 1
break;
case "BLG007": // Sieve 1
break;
#endregion
// LND - Land Plots
#region LAND PLOTS
case "LND000": // Small Field Plot
break;
case "LND001": // Medium Field Plot
break;
#endregion
// WPN - Weapons
#region WEAPONS
case "WPN000": // Wooden Bow 1
break;
#endregion
// AM - Ammunition
#region AMMUNITION
case "AM000": // Arrows 1
break;
#endregion
// RES - Resources
#region RESOURCES
case "RES000": // Resource: Wood
break;
case "RES001": // Resource: Stone
break;
case "RES002": // Resource: Tin Ore
break;
case "RES003": // Resource: Coal
break;
#endregion
// SED - Seeds
#region SEEDS
case "SED000": // Seed Packet 1
break;
case "SED001": // Sapling 1
break;
#endregion
// LSK - Livestock
#region LIVESTOCK
case "LSK000": // Chicken
break;
case "LSK001": // Turkey
break;
case "LSK002": // Pig
break;
case "LSK003": // Sheep
break;
case "LSK004": // Goat
break;
case "LSK005": // Cow
break;
#endregion
case "NUL000":
default:
// NULL
// Nothing should be done here.
break;
}
return searcher;
}
}
// Used to store data for farm plots, pastures, greenhouse plots
class JessEconomyFarmPlot
{
ulong landID = 0;
ulong plotID = 0;
bool isPartOfBuilding = false;
bool isPasture = false;
// Default to -1 for these as this information is unknown
int crop = -1;
int livestock = -1;
int livestockCapacity = -1; // Unneeded unless isPasture
int livestockCapUsage = -1; // Unneeded unless isPasture
}
// Used to store data for buildings
class JessEconomyBuilding
{
ulong landID = 0;
ulong ownerID = 0;
JessEconomyIdentifier buildingID = new JessEconomyIdentifier();
bool isGreenhouse = false;
bool canCraft = false;
bool canSmelt = false;
bool isBarn = false;
bool isAutomated = false;
bool isResourceProducer = false;
bool isPasture = false;
int resourceType = -1; // Default to -1 as this information isn't used by anything except isResourceProducer
int level = 0; // Default to 0 as this is assumed to be a base-level building
TimeSpan resProdInterval = new TimeSpan(); // Initialize this as it determines the span of time between each resource production interval
DateTime prodStart = new DateTime(); // Initialize this as it is used to determine when any type of production began in this building
public string GetBuildingID()
{
return buildingID.GetBuildingID();
}
public void SetBuildingID(string incomingID)
{
buildingID.SetBuildingID(incomingID);
}
}
// Used to store all data for land plots
class JessEconomyLand
{
ulong ownerID = 0;
ulong landID = 0;
bool convertedToFarm = false;
int size = 0; // 0 = small, 1 = medium, 2 = big, 3 = huge
}
#endregion
#endregion