-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIo.cs
More file actions
485 lines (416 loc) · 21.8 KB
/
Io.cs
File metadata and controls
485 lines (416 loc) · 21.8 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
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
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
using System;
using System.IO;
using System.Windows.Forms;
using NWN2Toolset;
using NWN2Toolset.NWN2.Data.TypedCollections;
using NWN2Toolset.NWN2.Data.Blueprints;
using NWN2Toolset.NWN2.Data.Campaign;
using NWN2Toolset.NWN2.Data.Instances;
using NWN2Toolset.NWN2.Data.Templates;
using NWN2Toolset.NWN2.IO;
using OEIShared.IO;
using OEIShared.Utils;
namespace creaturevisualizer
{
static class Io
{
#region Fields (static)
internal static IResourceEntry AppearanceSEF;
#endregion Fields (static)
#region Methods (internal)
// NWN2Toolset.NWN2.Views.NWN2BlueprintView.ᐌ(object P_0, EventArgs P_1)
// yeah whatever. Those idiots were too clever for anybody's good.
/// <summary>
/// Saves a specified blueprint to a user-labeled file.
/// IMPORTANT: Allow only creature-blueprints to be saved!
/// - NWN2ObjectType.Creature
/// - resourcetype #2027
/// @note Check that blueprint is valid before call.
/// </summary>
/// <param name="iblueprint">ElectronPanel_.Blueprint or .Instance
/// converted to a blueprint</param>
/// <param name="repo">null if Override</param>
internal static void SaveBlueprintToFile(INWN2Blueprint iblueprint, DirectoryResourceRepository repo = null)
{
string fil = iblueprint.Resource.ResRef.Value;
string ext = BWResourceTypes.GetFileExtension(iblueprint.Resource.ResourceType);
var sfd = new SaveFileDialog();
sfd.Title = "Save blueprint as ...";
sfd.FileName = fil + "." + ext; // iblueprint.Resource.FullName
sfd.Filter = "blueprints (*." + ext + ")|*." + ext + "|all files (*.*)|*.*";
// sfd.DefaultExt = ext;
string dir;
if (repo != null) dir = repo.DirectoryName;
else dir = String.Empty;
if (!String.IsNullOrEmpty(dir))
{
if (Directory.Exists(dir))
{
sfd.InitialDirectory = dir;
sfd.RestoreDirectory = true;
}
}
else if (!String.IsNullOrEmpty(CreatureVisualizerPreferences.that.LastSaveDirectory)
&& Directory.Exists(CreatureVisualizerPreferences.that.LastSaveDirectory))
{
sfd.InitialDirectory = CreatureVisualizerPreferences.that.LastSaveDirectory;
}
// else TODO: use NWN2ResourceManager.Instance.UserOverrideDirectory
// else TODO: get BlueprintLocation dir if exists
if (sfd.ShowDialog() == DialogResult.OK)
{
if (String.IsNullOrEmpty(dir))
CreatureVisualizerPreferences.that.LastSaveDirectory = Path.GetDirectoryName(sfd.FileName);
// NOTE: Add 'AppearanceSEF' back in from the original blueprint
// since it was removed when the original was duplicated by
// ElectronPanel_.DuplicateBlueprint().
(iblueprint as NWN2CreatureTemplate).AppearanceSEF = AppearanceSEF;
IOEISerializable iserializable = iblueprint;
if (iserializable != null)
{
iserializable.OEISerialize(sfd.FileName);
if (File.Exists(sfd.FileName)) // test that file exists before proceeding
{
INWN2BlueprintSet blueprintset;
dir = Path.GetDirectoryName(sfd.FileName).ToLower();
if (dir == NWN2ToolsetMainForm.App.Module.Repository.DirectoryName.ToLower())
{
repo = NWN2ToolsetMainForm.App.Module.Repository;
blueprintset = NWN2ToolsetMainForm.App.Module as INWN2BlueprintSet;
iblueprint.BlueprintLocation = NWN2BlueprintLocationType.Module;
}
else if ( NWN2CampaignManager.Instance.ActiveCampaign != null
&& dir == NWN2CampaignManager.Instance.ActiveCampaign.Repository.DirectoryName.ToLower())
{
repo = NWN2CampaignManager.Instance.ActiveCampaign.Repository;
blueprintset = NWN2CampaignManager.Instance.ActiveCampaign as INWN2BlueprintSet;
iblueprint.BlueprintLocation = NWN2BlueprintLocationType.Campaign;
}
else if (IsOverride(dir))
{
repo = NWN2ResourceManager .Instance.UserOverrideDirectory;
blueprintset = NWN2GlobalBlueprintManager.Instance as INWN2BlueprintSet;
iblueprint.BlueprintLocation = NWN2BlueprintLocationType.Global;
}
else
return;
// so, which should be tested for first: resource or blueprint?
// and is there even any point in having one w/out the other?
string filelabel = Path.GetFileNameWithoutExtension(sfd.FileName);
NWN2BlueprintCollection collection = blueprintset.GetBlueprintCollectionForType(NWN2ObjectType.Creature);
INWN2Blueprint extantblueprint = NWN2GlobalBlueprintManager.FindBlueprint(NWN2ObjectType.Creature,
new OEIResRef(filelabel),
iblueprint.BlueprintLocation == NWN2BlueprintLocationType.Global,
iblueprint.BlueprintLocation == NWN2BlueprintLocationType.Module,
iblueprint.BlueprintLocation == NWN2BlueprintLocationType.Campaign);
if (extantblueprint != null && extantblueprint.Resource.Repository is DirectoryResourceRepository) // ie. exclude Data\Templates*.zip
{
collection.Remove(extantblueprint); // so, does removing a blueprint also remove its resource? no.
}
IResourceEntry extantresource = repo.FindResource(new OEIResRef(filelabel), 2027); // it's maaaaaagick
if (extantresource != null)
{
repo.Resources.Remove(extantresource); // so, does removing a resource also remove its blueprint? no.
}
iblueprint.Resource = repo.CreateResource(iblueprint.Resource.ResRef, iblueprint.Resource.ResourceType);
collection.Add(iblueprint);
var viewer = NWN2ToolsetMainForm.App.BlueprintView;
var list = viewer.GetFocusedList();
list.Resort();
var objects = new object[1] { iblueprint as INWN2Object };
viewer.Selection = objects;
}
}
}
}
/// <summary>
/// Saves the currently selected instance in the Area viewer to a
/// user-labeled file.
/// @note Check that instance is valid before call.
/// </summary>
/// <param name="iinstance"></param>
/// <param name="repo"></param>
internal static void SaveInstanceToFile(INWN2Instance iinstance, DirectoryResourceRepository repo = null)
{
INWN2Blueprint iblueprint = CreateBlueprint(iinstance, repo);
if (iblueprint != null)
SaveBlueprintToFile(iblueprint, repo);
}
#endregion Methods (internal)
#region Methods (private)
/// <summary>
/// Creates a blueprint and its resource for a given instance.
/// Cf. ElectronPanel_.DuplicateBlueprint()
/// </summary>
/// <param name="iinstance"></param>
/// <param name="irepo"></param>
/// <returns></returns>
static INWN2Blueprint CreateBlueprint(INWN2Instance iinstance, IResourceRepository irepo)
{
INWN2Blueprint iblueprint = new NWN2CreatureBlueprint();
// NWN2Toolset.NWN2.Data.Instances.NWN2CreatureInstance.CreateBlueprintFromInstance()
iblueprint.CopyFromTemplate(iinstance as INWN2Template); // does not copy inventory or equipped!
// workaround toolset glitch re. template resref string ->
// Loading a module with an instance that doesn't have a template
// resref string isn't the same as deleting that string. And vice
// versa: loading a module with an instance that has an invalid
// template resref string isn't the same as filling a blank string
// with an invalid resref string.
//
// So basically go through things step by step to ensure that all
// this resource crap exits the poop chute w/out constipation.
OEIResRef resref;
if ( iinstance.Template == null
|| iinstance.Template.ResRef == null
|| iinstance.Template.ResRef.IsEmpty())
{
string tag = iinstance.Name.ToLower(); // create a resref based on tag
if (String.IsNullOrEmpty(tag))
tag = "creature";
resref = new OEIResRef(tag);
}
else
resref = CommonUtils.SerializationClone(iinstance.Template.ResRef) as OEIResRef;
iblueprint.TemplateResRef = resref;
if (iinstance.Template != null)
iblueprint.Resource = CommonUtils.SerializationClone(iinstance.Template) as IResourceEntry;
if (iblueprint.Resource == null)
iblueprint.Resource = new MissingResourceEntry(resref);
if ( iblueprint.Resource.ResRef == null
|| iblueprint.Resource.ResRef.IsEmpty())
{
iblueprint.Resource.ResRef = resref;
}
iblueprint.Resource.ResourceType = 2027;
iblueprint.Comment = iinstance.Comment;
// copy equipped ->
(iblueprint as NWN2CreatureTemplate).EquippedItems = new NWN2EquipmentSlotCollection();
NWN2InventoryItem equipped;
for (int i = 0; i != 18; ++i)
{
if ((equipped = (iinstance as NWN2CreatureTemplate).EquippedItems[i].Item) != null && equipped.ValidItem)
{
(iblueprint as NWN2CreatureTemplate).EquippedItems[i].Item = (new NWN2BlueprintInventoryItem(equipped as NWN2InstanceInventoryItem)) as NWN2InventoryItem;
}
}
// copy inventory ->
(iblueprint as NWN2CreatureBlueprint).Inventory = new NWN2BlueprintInventoryItemCollection();
foreach (NWN2InstanceInventoryItem item in (iinstance as NWN2CreatureInstance).Inventory)
{
(iblueprint as NWN2CreatureBlueprint).Inventory.Add(new NWN2BlueprintInventoryItem(item));
}
return iblueprint; // a blueprint with a resource for an Instance
}
/// <summary>
/// Performs a case-insensitive path comparison (valid on Windows only).
/// </summary>
/// <param name="dir">lowercase</param>
/// <returns></returns>
static bool IsOverride(string dir)
{
string root = NWN2ResourceManager.Instance.UserOverrideDirectory.DirectoryName.ToLower();
if (dir == root)
return true;
var di = new DirectoryInfo(dir);
while (di.Parent != null)
{
if (di.Parent.FullName.ToLower() == root)
return true;
di = di.Parent;
}
return false;
}
#endregion Methods (private)
#region Methods (stupid)
/* static string GetResourceInfo(INWN2Template itemplate)
{
string info = "tag= " + (itemplate as INWN2Template).Name + "\n"; // string
var iinstance = itemplate as INWN2Instance;
if (iinstance != null)
{
if ((iinstance as INWN2Instance).Template != null) // IResourceEntry
{
info += "Template.ResourceType= " + (iinstance as INWN2Instance).Template.ResourceType + "\n"; // ushort
info += "Template.FullName= " + (iinstance as INWN2Instance).Template.FullName + "\n"; // string
if ((iinstance as INWN2Instance).Template.ResRef != null) // OEIResRef
{
info += "Template.ResRef.Value= " + (iinstance as INWN2Instance).Template.ResRef.Value + "\n"; // string
}
else
info += "Template.Resref NULL\n";
if ((iinstance as INWN2Instance).Template.Repository != null) // IResourceRepository
{
info += "Template.Repository.Name= " + (iinstance as INWN2Instance).Template.Repository.Name + "\n"; // string
}
else
info += "Template.Repository NULL\n";
}
else
info += "Template NULL\n";
}
else
{
var iblueprint = itemplate as INWN2Blueprint;
if (iblueprint != null)
{
// iblueprint.ResourceName; // <- is Resource.ResRef
info += "BlueprintLocation= " + Enum.GetName(typeof(NWN2BlueprintLocationType), iblueprint.BlueprintLocation) + "\n";
if ((iblueprint as INWN2Blueprint).Resource != null) // IResourceEntry
{
info += "Resource.ResourceType= " + (iblueprint as INWN2Blueprint).Resource.ResourceType + "\n"; // ushort
info += "Resource.FullName= " + (iblueprint as INWN2Blueprint).Resource.FullName + "\n"; // string
if (iblueprint.Resource.ResRef != null)
{
info += "Resource.ResRef.Value= " + (iblueprint as INWN2Blueprint).Resource.ResRef.Value + "\n"; // string
}
else
info += "Resource.ResRef NULL\n";
if ((iblueprint as INWN2Blueprint).Resource.Repository != null) // IResourceRepository
{
info += "Resource.Repository.Name= " + (iblueprint as INWN2Blueprint).Resource.Repository.Name + "\n"; // string
}
else
info += "iblueprint.Resource.Repository NULL\n";
}
else
info += "Resource NULL\n";
if ((iblueprint as INWN2Blueprint).TemplateResRef != null) // OEIResRef
{
info += "TemplateResRef.Value= " + (iblueprint as INWN2Blueprint).TemplateResRef.Value + "\n"; // string
}
else
info += "TemplateResRef NULL\n";
}
}
return info;
} */
/* static void PrintResourceTypes()
{
// // Create a file to write to.
// string createText = "Hello and Welcome" + Environment.NewLine;
// File.WriteAllText(path, createText);
//
// // Open the file to read from.
// string readText = File.ReadAllText(path);
string info = String.Empty;
info += "OEIShared.Utils.BWResourceTypes" + Environment.NewLine + Environment.NewLine;
info += "0= " + StringDecryptor.Decrypt("ᒻᒮᒼ") + Environment.NewLine;
info += "1= " + StringDecryptor.Decrypt("ᒫᒶᒹ") + Environment.NewLine;
info += "2= " + StringDecryptor.Decrypt("ᒶᒿᒮ") + Environment.NewLine;
info += "3= " + StringDecryptor.Decrypt("ᒽᒰᒪ") + Environment.NewLine;
info += "4= " + StringDecryptor.Decrypt("ᓀᒪᒿ") + Environment.NewLine;
info += "5= " + StringDecryptor.Decrypt("ᓀᒯᓁ") + Environment.NewLine;
info += "6= " + StringDecryptor.Decrypt("ᒹᒵᒽ") + Environment.NewLine;
info += "7= " + StringDecryptor.Decrypt("ᓒᓗᓒ") + Environment.NewLine;
info += "8= " + StringDecryptor.Decrypt("ᒶᒹᒜ") + Environment.NewLine;
info += "9= " + StringDecryptor.Decrypt("ᒶᒹᒰ") + Environment.NewLine;
info += "10= " + StringDecryptor.Decrypt("ᒽᓁᒽ") + Environment.NewLine;
info += "2000= " + StringDecryptor.Decrypt("ᒹᒵᒱ") + Environment.NewLine;
info += "2001= " + StringDecryptor.Decrypt("ᒽᒮᓁ") + Environment.NewLine;
info += "2002= " + StringDecryptor.Decrypt("ᒶᒭᒵ") + Environment.NewLine;
info += "2003= " + StringDecryptor.Decrypt("ᒽᒱᒰ") + Environment.NewLine;
info += "2005= " + StringDecryptor.Decrypt("ᒯᒷᒽ") + Environment.NewLine;
info += "2007= " + StringDecryptor.Decrypt("ᒵᒾᒪ") + Environment.NewLine;
info += "2008= " + StringDecryptor.Decrypt("ᒼᒵᒽ") + Environment.NewLine;
info += "2009= " + StringDecryptor.Decrypt("ᒷᒼᒼ") + Environment.NewLine;
info += "2010= " + StringDecryptor.Decrypt("ᒷᒬᒼ") + Environment.NewLine;
info += "2011= " + StringDecryptor.Decrypt("ᒶᒸᒭ") + Environment.NewLine;
info += "2012= " + StringDecryptor.Decrypt("ᒪᒻᒮ") + Environment.NewLine;
info += "2013= " + StringDecryptor.Decrypt("ᒼᒮᒽ") + Environment.NewLine;
info += "2014= " + StringDecryptor.Decrypt("ᒲᒯᒸ") + Environment.NewLine;
info += "2015= " + StringDecryptor.Decrypt("ᒫᒲᒬ") + Environment.NewLine;
info += "2016= " + StringDecryptor.Decrypt("ᓀᒸᒴ") + Environment.NewLine;
info += "2017= " + StringDecryptor.Decrypt("ᒛᒭᒪ") + Environment.NewLine;
info += "2018= " + StringDecryptor.Decrypt("ᒽᒵᒴ") + Environment.NewLine;
info += "2022= " + StringDecryptor.Decrypt("ᒽᓁᒲ") + Environment.NewLine;
info += "2023= " + StringDecryptor.Decrypt("ᒰᒲᒽ") + Environment.NewLine;
info += "2024= " + StringDecryptor.Decrypt("ᒫᒽᒲ") + Environment.NewLine;
info += "2025= " + StringDecryptor.Decrypt("ᒾᒽᒲ") + Environment.NewLine;
info += "2026= " + StringDecryptor.Decrypt("ᒫᒽᒬ") + Environment.NewLine;
info += "2027= " + StringDecryptor.Decrypt("ᒾᒽᒬ") + Environment.NewLine;
info += "2029= " + StringDecryptor.Decrypt("ᒭᒵᒰ") + Environment.NewLine;
info += "2030= " + StringDecryptor.Decrypt("ᒲᒽᒹ") + Environment.NewLine;
info += "2031= " + StringDecryptor.Decrypt("ᒫᒽᒽ") + Environment.NewLine;
info += "2032= " + StringDecryptor.Decrypt("ᒾᒽᒽ") + Environment.NewLine;
info += "2033= " + StringDecryptor.Decrypt("ᒭᒭᒼ") + Environment.NewLine;
info += "2034= " + StringDecryptor.Decrypt("ᒫᒽᒼ") + Environment.NewLine;
info += "2035= " + StringDecryptor.Decrypt("ᒾᒽᒼ") + Environment.NewLine;
info += "2036= " + StringDecryptor.Decrypt("ᒵᒽᒻ") + Environment.NewLine;
info += "2037= " + StringDecryptor.Decrypt("ᒰᒯᒯ") + Environment.NewLine;
info += "2038= " + StringDecryptor.Decrypt("ᒯᒪᒬ") + Environment.NewLine;
info += "2039= " + StringDecryptor.Decrypt("ᒫᒽᒮ") + Environment.NewLine;
info += "2040= " + StringDecryptor.Decrypt("ᒾᒽᒮ") + Environment.NewLine;
info += "2041= " + StringDecryptor.Decrypt("ᒫᒽᒭ") + Environment.NewLine;
info += "2042= " + StringDecryptor.Decrypt("ᒾᒽᒭ") + Environment.NewLine;
info += "2043= " + StringDecryptor.Decrypt("ᒫᒽᒹ") + Environment.NewLine;
info += "2044= " + StringDecryptor.Decrypt("ᒾᒽᒹ") + Environment.NewLine;
info += "2045= " + StringDecryptor.Decrypt("ᒭᒯᒽ") + Environment.NewLine;
info += "2046= " + StringDecryptor.Decrypt("ᒰᒲᒬ") + Environment.NewLine;
info += "2047= " + StringDecryptor.Decrypt("ᒰᒾᒲ") + Environment.NewLine;
info += "2048= " + StringDecryptor.Decrypt("ᒬᒼᒼ") + Environment.NewLine;
info += "2049= " + StringDecryptor.Decrypt("ᒬᒬᒼ") + Environment.NewLine;
info += "2050= " + StringDecryptor.Decrypt("ᒫᒽᒶ") + Environment.NewLine;
info += "2051= " + StringDecryptor.Decrypt("ᒾᒽᒶ") + Environment.NewLine;
info += "2052= " + StringDecryptor.Decrypt("ᒭᓀᒴ") + Environment.NewLine;
info += "2053= " + StringDecryptor.Decrypt("ᒹᓀᒴ") + Environment.NewLine;
info += "2054= " + StringDecryptor.Decrypt("ᒫᒽᒰ") + Environment.NewLine;
info += "2055= " + StringDecryptor.Decrypt("ᒾᒽᒰ") + Environment.NewLine;
info += "2056= " + StringDecryptor.Decrypt("ᒳᒻᒵ") + Environment.NewLine;
info += "2057= " + StringDecryptor.Decrypt("ᒼᒪᒿ") + Environment.NewLine;
info += "2058= " + StringDecryptor.Decrypt("ᒾᒽᓀ") + Environment.NewLine;
info += "2059= " + StringDecryptor.Decrypt("ᒝᒹᒬ") + Environment.NewLine;
info += "2060= " + StringDecryptor.Decrypt("ᒼᒼᒯ") + Environment.NewLine;
info += "2061= " + StringDecryptor.Decrypt("ᒱᒪᒴ") + Environment.NewLine;
info += "2062= " + StringDecryptor.Decrypt("ᒷᓀᒶ") + Environment.NewLine;
info += "2063= " + StringDecryptor.Decrypt("ᒫᒲᒴ") + Environment.NewLine;
info += "2064= " + StringDecryptor.Decrypt("ᒷᒭᒫ") + Environment.NewLine;
info += "2065= " + StringDecryptor.Decrypt("ᒹᒽᒶ") + Environment.NewLine;
info += "2066= " + StringDecryptor.Decrypt("ᒹᒽᒽ") + Environment.NewLine;
info += "2067= " + StringDecryptor.Decrypt("ᒫᒪᒴ") + Environment.NewLine;
info += "3000= " + StringDecryptor.Decrypt("ᒸᒼᒬ") + Environment.NewLine;
info += "3001= " + StringDecryptor.Decrypt("ᒾᒼᒬ") + Environment.NewLine;
info += "3002= " + StringDecryptor.Decrypt("ᒽᒻᒷ") + Environment.NewLine;
info += "3003= " + StringDecryptor.Decrypt("ᒾᒽᒻ") + Environment.NewLine;
info += "3004= " + StringDecryptor.Decrypt("ᒾᒮᒷ") + Environment.NewLine;
info += "3005= " + StringDecryptor.Decrypt("ᒾᒵᒽ") + Environment.NewLine;
info += "3006= " + StringDecryptor.Decrypt("ᒼᒮᒯ") + Environment.NewLine;
info += "3007= " + StringDecryptor.Decrypt("ᒹᒯᓁ") + Environment.NewLine;
info += "3008= " + StringDecryptor.Decrypt("ᒬᒪᒶ") + Environment.NewLine;
info += "3009= " + StringDecryptor.Decrypt("ᒵᒯᓁ") + Environment.NewLine;
info += "3010= " + StringDecryptor.Decrypt("ᒫᒯᓁ") + Environment.NewLine;
info += "3011= " + StringDecryptor.Decrypt("ᒾᒹᒮ") + Environment.NewLine;
info += "3012= " + StringDecryptor.Decrypt("ᒻᒸᒼ") + Environment.NewLine;
info += "3013= " + StringDecryptor.Decrypt("ᒻᒼᒽ") + Environment.NewLine;
info += "3014= " + StringDecryptor.Decrypt("ᒲᒯᓁ") + Environment.NewLine;
info += "3015= " + StringDecryptor.Decrypt("ᒹᒯᒫ") + Environment.NewLine;
info += "3016= " + StringDecryptor.Decrypt("ᓃᒲᒹ") + Environment.NewLine;
info += "3017= " + StringDecryptor.Decrypt("ᓀᒶᒹ") + Environment.NewLine;
info += "3018= " + StringDecryptor.Decrypt("ᒫᒫᓁ") + Environment.NewLine;
info += "3019= " + StringDecryptor.Decrypt("ᒽᒯᓁ") + Environment.NewLine;
info += "3020= " + StringDecryptor.Decrypt("ᓀᒵᒴ") + Environment.NewLine;
info += "3021= " + StringDecryptor.Decrypt("ᓁᒶᒵ") + Environment.NewLine;
info += "3022= " + StringDecryptor.Decrypt("ᒼᒬᒬ") + Environment.NewLine;
info += "3033= " + StringDecryptor.Decrypt("ᒹᒽᓁ") + Environment.NewLine;
info += "3034= " + StringDecryptor.Decrypt("ᒵᒽᓁ") + Environment.NewLine;
info += "3035= " + StringDecryptor.Decrypt("ᒽᒻᓁ") + Environment.NewLine;
info += "4007= " + StringDecryptor.Decrypt("ᒳᒹᒰ") + Environment.NewLine;
info += "4008= " + StringDecryptor.Decrypt("ᒹᓀᒬ") + Environment.NewLine;
info += "4000= " + StringDecryptor.Decrypt("ᒶᒭᒫ") + Environment.NewLine;
info += "4001= " + StringDecryptor.Decrypt("ᒶᒭᒪ") + Environment.NewLine;
info += "4002= " + StringDecryptor.Decrypt("ᒼᒹᒽ") + Environment.NewLine;
info += "4003= " + StringDecryptor.Decrypt("ᒰᒻᒛ") + Environment.NewLine;
info += "4004= " + StringDecryptor.Decrypt("ᒯᓁᒪ") + Environment.NewLine;
info += "4005= " + StringDecryptor.Decrypt("ᒯᓁᒮ") + Environment.NewLine;
info += "9999= " + StringDecryptor.Decrypt("ᒴᒮᓂ") + Environment.NewLine;
info += "9998= " + StringDecryptor.Decrypt("ᒫᒲᒯ") + Environment.NewLine;
info += "9997= " + StringDecryptor.Decrypt("ᒮᒻᒯ") + Environment.NewLine;
info += "9996= " + StringDecryptor.Decrypt("ᒲᒭᒼ") + Environment.NewLine;
info += ushort.MaxValue + "= \"\"" + Environment.NewLine;
File.WriteAllText(@"C:\GIT\CreatureVisualizer\t\BWResourceTypes.txt", info);
// ps. Fuck you. If you're going to release a toolset and expect it
// to be user-friendly for the creation of plugins don't obfuscate
// the shit that's needed to write those plugins.
} */
#endregion Methods (stupid)
}
}