2021-11-26 14:50:07 +00:00
|
|
|
|
namespace Generator;
|
2021-08-12 16:52:06 +01:00
|
|
|
|
|
2021-11-26 14:50:07 +00:00
|
|
|
|
internal static class Program
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2021-11-26 14:50:07 +00:00
|
|
|
|
internal static async Task Main(string[] args)
|
2021-08-12 16:52:06 +01:00
|
|
|
|
{
|
2021-11-26 14:50:07 +00:00
|
|
|
|
// Create list of bots we want to process
|
|
|
|
|
string[] botTypes = {
|
2021-08-17 17:32:03 +01:00
|
|
|
|
"assault",
|
|
|
|
|
"marksman",
|
2021-08-20 08:33:49 +01:00
|
|
|
|
"pmcBot",
|
2021-12-12 14:39:22 +00:00
|
|
|
|
"exUsec",
|
|
|
|
|
|
2021-08-17 17:32:03 +01:00
|
|
|
|
"bossbully",
|
|
|
|
|
"bossgluhar",
|
|
|
|
|
"bosskilla",
|
|
|
|
|
"bosskojaniy",
|
2021-08-18 21:13:46 +01:00
|
|
|
|
"bosssanitar",
|
2021-09-01 14:41:21 +01:00
|
|
|
|
"bosstagilla",
|
2021-08-20 08:23:55 +01:00
|
|
|
|
//"bossstormtrooper",
|
2021-08-18 21:41:59 +01:00
|
|
|
|
|
2021-08-18 21:13:46 +01:00
|
|
|
|
"followerbully",
|
|
|
|
|
"followergluharassault",
|
|
|
|
|
"followergluharscout",
|
|
|
|
|
"followergluharsecurity",
|
2021-08-20 08:34:11 +01:00
|
|
|
|
//"followergluharsnipe",
|
2021-08-18 21:13:46 +01:00
|
|
|
|
"followerkojaniy",
|
|
|
|
|
"followersanitar",
|
2021-08-20 08:23:55 +01:00
|
|
|
|
//"followerstormtrooper",
|
2021-08-18 21:41:59 +01:00
|
|
|
|
|
|
|
|
|
"cursedassault",
|
|
|
|
|
|
|
|
|
|
"sectantpriest",
|
|
|
|
|
"sectantwarrior",
|
2021-08-17 17:32:03 +01:00
|
|
|
|
};
|
2021-08-12 16:52:06 +01:00
|
|
|
|
|
2021-11-26 14:50:07 +00:00
|
|
|
|
// Read raw bot dumps and turn into c# objects
|
|
|
|
|
var workingPath = Directory.GetCurrentDirectory();
|
|
|
|
|
var dumpPath = $"{workingPath}//dumps";
|
|
|
|
|
var parsedBots = await BotParser.ParseAsync(dumpPath);
|
2021-08-12 16:52:06 +01:00
|
|
|
|
|
2021-11-26 14:50:07 +00:00
|
|
|
|
if (parsedBots.Count == 0)
|
|
|
|
|
{
|
|
|
|
|
LoggingHelpers.LogToConsole("no bots found, unable to continue");
|
|
|
|
|
LoggingHelpers.LogToConsole("Check your dumps are in 'Generator\\bin\\Debug\\netcoreapp3.1\\dumps' and start with 'resp.' NOT 'req.'");
|
|
|
|
|
return;
|
|
|
|
|
}
|
2021-08-12 22:26:25 +01:00
|
|
|
|
|
2021-11-26 14:50:07 +00:00
|
|
|
|
// Generate the base bot class with basic details (health/body part hp etc) and then append everything else
|
|
|
|
|
var bots = BaseBotGenerator.GenerateBaseDetails(parsedBots, workingPath, botTypes)
|
|
|
|
|
.AddGear(parsedBots) // Add weapons/armor
|
|
|
|
|
.AddLoot(parsedBots)
|
|
|
|
|
.AddChances(parsedBots); // Add mod/equipment chances
|
2021-08-27 21:34:12 +01:00
|
|
|
|
|
2021-11-26 14:50:07 +00:00
|
|
|
|
// Output bot to json file
|
|
|
|
|
var jsonWriter = new JsonWriter(workingPath, "output");
|
|
|
|
|
jsonWriter.WriteJson(bots.ToList());
|
2021-08-12 16:52:06 +01:00
|
|
|
|
}
|
|
|
|
|
}
|