-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConstants.cs
More file actions
378 lines (348 loc) · 21 KB
/
Constants.cs
File metadata and controls
378 lines (348 loc) · 21 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
using Bundlingway.Model;
using Bundlingway.Core.Services;
namespace Bundlingway
{
public static class Constants
{
public static List<string> TextureExtensions = [".jpg", ".jpeg", ".png", ".dds"];
public static List<string> NonTextureImageMarkers = ["[prev]", "[cover]", "[preview]", ".dds", "preview"];
public static List<string> ShaderExtensions = [".fx", ".fxh"];
public static List<string> InstallableExtensions = [".zip", ".rar", ".7z", ".ini"];
public static List<string> AcceptableFilesInPresetFolder = ["LICENSE", "*README*", "*.ini"];
public static string GPosingwayProtocolHandler = "gwpackage";
public static ResourcePackage SingleFileCatalog(IAppEnvironmentService envService) => new()
{
LocalPresetFolder = Path.Combine(envService.SinglePresetsFolder, Folders.PackagePresets),
Name = "Single Presets",
Label = "Single Presets",
Version = "1.0.0",
Source = "Local",
Type = ResourcePackage.EType.SinglePreset,
Status = ResourcePackage.EStatus.Installed,
Default = true,
Hidden = true,
LocalTextureFolder = string.Empty,
LocalShaderFolder = string.Empty,
LocalFolder = envService.SinglePresetsFolder
};
public static ResourcePackage GPosingwayDefaultPackage(IAppEnvironmentService envService) => new ResourcePackage()
{
Name = "GPosingway",
Label = "GPosingway",
Version = "1.0.0",
Source = "Local",
Type = ResourcePackage.EType.CorePackage,
Status = ResourcePackage.EStatus.NotDownloaded,
Bundle = true,
Default = true,
Hidden = false,
Locked = true,
LocalPresetFolder = string.Empty,
LocalTextureFolder = string.Empty,
LocalShaderFolder = string.Empty,
LocalFolder = Path.Combine(envService.GetPackageFolder(), Folders.GposingwayPackage)
};
public static Dictionary<string, string> DefaultShortcuts = new()
{
{ "KeyAspectRatioComposition@AspectRatioComposition.fx", "107,1,0,0" },
{ "KeyVertical_Previewer@VerticalPreviewer.fx", "107,0,0,0" },
{ "KeyStageDepth@StageDepth.fx", "109,0,0,0" },
{ "KeyEffects", "114,0,1,0" },
{ "KeyOverlay", "113,0,1,0" },
{ "KeyReload", "115,0,1,0" },
{ "KeyScreenshot", "123,0,1,0" },
{ "KeyPreviousPreset", "186,0,0,0" },
{ "KeyNextPreset", "222,0,0,0" }
};
public static string AppUserModelId = "BundlingwayPackageManager";
public static class Urls
{
public static string GPosingwayConfigFileUrl = "https://github.com/gposingway/gposingway/releases/latest/download/gposingway-definitions.json";
public static string BundlingwayPackageLatestTag = "https://api.github.com/repos/gposingway/bundlingway/releases/latest";
}
public static class CommandLineOptions
{
public static string UpdateClient = "update-client";
}
public static class Events
{
public const string PackageInstalling = "package-installing";
public const string PackageInstalled = "package-installed";
public const string DuplicatedInstances = "duplicated-instances";
}
public static class Folders
{
public static readonly string PackageShaders = "Shaders";
public static readonly string PackagePresets = "Presets";
public static readonly string PackageTextures = "Textures";
public static readonly string Core = "CorePackages";
public static readonly string Packages = "Packages";
public static readonly string Backup = "Backup";
public static readonly string SourcePackage = "Source";
public static readonly string Temp = "temp";
public static readonly string Cache = "Cache";
public static readonly string SinglePresets = "Single Presets";
public static readonly string GamePresets = "reshade-presets";
public static readonly string GameShaders = "reshade-shaders";
public static readonly string GposingwayPackage = "GPosingway";
public static readonly string BundlingwayPackage = "Bundlingway";
}
public static class Files
{
public static readonly string CatalogEntry = "catalog-entry.json";
public static readonly string GPosingwayConfig = "gposingway-definitions.json";
public static readonly string GPosingwayPackage = "gposingway.zip";
public static readonly string BundlingwayConfig = "bundlingway-config.json";
public static readonly string Log = "bundlingway-log-.txt";
public static readonly string LocalReshadeBinary = "dxgi.dll";
public static readonly string LocalReshadeConfig = "ReShade.ini";
public static readonly string GameProcess = "ffxiv_dx11";
public static readonly string ShaderAnalysis = "shader-analysis.json";
}
public static BundlingwayDialogueOptions Bundlingway = new();
public enum MessageCategory
{
ApplicationStart,
Ready,
AddPackage,
RemovePackage,
ReinstallPackage,
UninstallPackage,
Finished,
BeforeAddPackageSelection,
AddPackageSelectionCancelled,
DetectingSettings,
GenericDone,
IdleCommentary
}
public class BundlingwayDialogueOptions
{
private readonly Random _random = new();
private readonly Dictionary<MessageCategory, List<string>> _messages;
public BundlingwayDialogueOptions() => _messages = new Dictionary<MessageCategory, List<string>>
{
{
MessageCategory.ApplicationStart, new List<string>
{
"Bundlingway, at your service! Let's get those ReShade presets organized, shall we?",
"Hop, hop! Bundlingway is starting up! Prepare for preset perfection!",
"Dreaming of beautiful pixels? Bundlingway is here to help!",
"Good morning! Or is it evening? Bundlingway doesn't judge, as long as we're bundling!",
"Behold, Bundlingway is booting! Let's make those games look *stunning*!",
"Carrots ready? Bundles primed? Let's do this, Bundlingway is online!",
"Don't take booting up Bundlingway too seriously, it's gonna finish in about a third of a second!"
}
},
{
MessageCategory.Ready, new List<string>
{
"Bundlingway is ready to roll! What preset magic shall we weave today?",
"All systems go! Bundlingway is at your command!",
"Ready and raring to go! Let's manage those bundles!",
"Bundlingway is online and feeling fine! Let the preset party begin!",
"I was born to bundle, and bundle shall I do!",
"Bundlingway is prepped and ready! What wonders will you create?",
"Hopefully this has been a help... Bundlingway is ready for action!",
"Hells he's every bit as coded and compiled as I remembered. Bundlingway is ready."
}
},
{
MessageCategory.AddPackage, new List<string>
{
"Package {1} of {0}, {2}! Just a little hop, skip, and a jump!",
"Package {1} of {0}, {2}, is joining the party! Let's make it feel welcome!",
"Ooh, shiny new package! Adding {2}, {1} of {0} now!",
"Carefully adding package {1} of {0}, {2}... Don't want to drop it!",
"Package {1} of {0}, {2}, is being added now!",
"Package {1} of {0}... The most important lesson I've learned is - WAIT!",
"Wuk Lamat is also in package {1} of {0}, there's no escape from people worshipping her.",
"Package {1} of {0}... Your ReShade setup is the perfect home for {2}!"
}
},
{
MessageCategory.RemovePackage, new List<string>
{
"Time to say goodbye! Removing this package with a gentle nudge...",
"Don't worry, this package is just going on a little vacation. Removing it now!",
"Poof! Removing the package now. It'll be like it was never there!",
"Carefully extracting the package... We wouldn't want to leave any crumbs behind!",
"Even the most beloved packages sometimes need to make way for others. Removing now...",
"I hope they find their way, surely there's a folder out there for everybody. Removing package...",
"Removing package... I'm every bit as muscular and removing as I remembered.",
"They got nothing on you... but we're still removing this package.",
"They got something on you... so we're removing this package."
}
},
{
MessageCategory.ReinstallPackage, new List<string>
{
"Giving this package a fresh start! Reinstalling now!",
"Time for a makeover! Reinstalling this package to make it shine!",
"Let's try that again, shall we? Reinstalling the package now...",
"A little hiccup, eh? No worries, we're reinstalling!",
"Reinstalling... because sometimes, even the best presets need a little do-over.",
"Reinstalling package... Hopefully, this has been a help...",
"Reinstalling... I am every bit as muscular and reinstalling as I remembered.",
"Reinstalling... they got nothing on you... but maybe they do, we'll see!"
}
},
{
MessageCategory.UninstallPackage, new List<string>
{
"This package is off to a new adventure! Uninstalling now...",
"Saying a fond farewell! Uninstalling this package!",
"Making space for new possibilities! Uninstalling now...",
"Time for a clean slate! Uninstalling this package.",
"Uninstalling... It's not goodbye, it's 'see you later!'",
"Uninstalling package... Don't worry, it's going to a better place... probably.",
"Uninstalling... I am every bit as muscular and uninstalling as I remembered.",
"Uninstalling... they got nothing on you... but you've got something on your drive, so off it goes!"
}
},
{
MessageCategory.Finished, new List<string>
{
"Ta-da! All done!",
"Mission accomplished! What's next on our preset agenda?",
"And that's a wrap! Bundlingway is ready for more!",
"Success! Your ReShade setup thanks you!",
"Huzzah! We did it!",
"Frankly, you've exceeded my expectations. All done!",
"I feel so much better knowing you got that done. Finished!",
"There are still plenty of operations to do, but that one is finished!"
}
},
{
MessageCategory.BeforeAddPackageSelection, new List<string>
{
"So many packages to choose from! Where to begin?",
"Let's find some shiny new presets to add!",
"Time to expand your ReShade horizons! Which packages will you choose?",
"Ready to browse the selection? Let's see what treasures we can find!",
"Looking to add some new packages? I've got a good feeling about this!",
"I love this! What package do you want to add?"
}
},
{
MessageCategory.AddPackageSelectionCancelled, new List<string>
{
"No worries, we can always add packages later!",
"Changed your mind? That's okay!",
"Maybe another time! Bundlingway will be here when you're ready.",
"Alright, let's explore other options then!",
"That's the way it goes sometimes. Onward and upward!"
}
},
{
MessageCategory.DetectingSettings, new List<string>
{
"Sniffing out your game folder... I hope it smells nice!",
"Checking under the hood... Let's see what versions we've got!",
"Peeking into your settings... Don't mind me, just making sure everything's in order!",
"Bundlingway is on the case! Detecting your ReShade and GPosingway versions...",
"Let's make sure you have the right setup for the best ReShade experience!"
}
},
{
MessageCategory.GenericDone, new List<string>
{
"All done! What's next?",
"Finished! Bundlingway is ready for another task.",
"There we go! Everything's sorted.",
"That's that! What shall we do now?",
"Completed! Your setup is looking great.",
"Another one bites the dust! Or rather, another task bites the dust and is completed!"
}
},
{
MessageCategory.IdleCommentary, new List<string>
{
"Hmm, what to do...",
"Wonder what Dreamingway is dreaming about...",
"Carrots are good for the eyes, and for ReShade presets, apparently!",
"Clouds look like fluffy bundles of presets today!",
"Did you know Loporrits are excellent dancers? It's all in the hops.",
"If a tree falls in the forest, does it make a preset?",
"The moon's a nice place to live, but the commute to Eorzea is looong.",
"No 'I' in team, but there is an 'I' in 'Bundlingway'!",
"I'm a pretty good singer. Want to hear my 'La-hee'? (Clears throat)",
"The word 'bed' actually looks like a bed!",
"A Loporrit's superpower wish? Teleporting carrots to their mouth!",
"A carrot a day keeps the doctor away, unless the doctor is a ReShade enthusiast!",
"Life is short, eat carrots and install ReShade presets!",
"I should take up knitting. Tiny sweaters for all the presets!",
"Why did the scarecrow win an award? He was outstanding in his field!",
"Restaurant on the moon? Good food, but no atmosphere!",
"What do you call a Loporrit musician? A hop-era singer!",
"Carrots or tweaking ReShade settings... both are addictive!",
"Do people on the ground look up and say 'Look, it's the Loporrits!'?",
"Sometimes I wonder if the stars are just really, really tiny Loporrits.",
"We Loporrits are philosophers. We ponder big questions like 'What's the meaning of life?' and 'Where's that carrot?'",
"What's a Loporrit's favorite music? Hip-hop!",
"My book's title? 'One Small Hop for a Loporrit, One Giant Leap for Loporrit-kind.'",
"Didn't succeed? Try doing it the way Knowingway told you to.",
"We built this place while being 4 carrots tall. Impressive, right?",
"Life gives you lemons, make lemonade. Life gives you carrots? Make carrot juice! Carrot cake!",
"I saw a cloud that looked like a carrot today. It was a sign!",
"What's a Loporrit's favorite game? Hopscotch!",
"Why did the Loporrit bring a ladder to the bar? Drinks were on the house!",
"A good stretch or a successful ReShade install... both are satisfying!",
"We Loporrits are good at keeping secrets. No one can hear us whisper!",
"It's amazing we can talk to Eorzeans, and they understand us!",
"A Loporrit's work is never done, especially with ReShade presets to manage!",
"Is a ReShade preset worth a thousand words? Let's find out!",
"I'm on a seafood diet. I see food, I eat it, especially carrots!",
"Remember, a balanced diet is a carrot in each hand.",
"I asked for a Loporrit to help, but this is also fine!",
"The best things in life are free. Like air, love, and organized ReShade presets.",
"Bundlingway is my name, managing ReShade presets is my game. Literally.",
"A good ReShade preset is good, but a good friend to share it with is better.",
"Laughter is the best medicine. But a good ReShade setup is therapeutic.",
"Life is like a box of chocolates. Unless it's ReShade presets, then it's awesome.",
"The early bird gets the worm. The second mouse gets the cheese. The Loporrit gets the ReShade preset.",
"I'd be rich if I had a gil for every ReShade preset thought.",
"Be the change you want to see in the world, or in your ReShade preset.",
"You miss 100% of the shots you don't take, and 100% of presets you don't install.",
"You can't have your cake and eat it too. But you can have your preset and use it too.",
"Don't count your chocobos before they hatch. But do count your ReShade presets.",
"When in Rome, do as the Romans. In Eorzea, as the Eorzeans. Using Bundlingway, as the Loporrits, and install presets.",
"If life gives you lemons, make lemonade. If life gives you ReShade, make your game beautiful.",
"A picture is worth a thousand words. A good ReShade preset is worth more.",
"Don't put off until tomorrow what you can do today, unless it's installing presets - let me do that for you!",
"A journey of a thousand miles begins with a single step, and a perfect ReShade setup with a click."
}
}
};
public string GetMessage(MessageCategory category, params string[] args)
{
if (_messages.TryGetValue(category, out var messages))
{
string messageTemplate = messages[_random.Next(messages.Count)];
return string.Format(messageTemplate, args);
}
// Return a default message if the category is not found (shouldn't happen in normal usage)
return "Bundlingway is at a loss for words!";
}
public async Task<string> GetMessageAsync(MessageCategory category, params string[] args)
{
return await Task.Run(() =>
{
if (_messages.TryGetValue(category, out var messages))
{
string messageTemplate = messages[_random.Next(messages.Count)];
if (category == MessageCategory.AddPackage && args.Length == 2)
{
return string.Format(messageTemplate, args);
}
else
{
return messageTemplate;
}
}
// Return a default message if the category is not found (shouldn't happen in normal usage)
return "Bundlingway is at a loss for words!";
});
}
}
}
}