forked from chomp/BotGenerator
35 lines
1.3 KiB
C#
35 lines
1.3 KiB
C#
using System.IO;
|
|
|
|
namespace Generator
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
string[] botTypes = {"assault", "marksman", "pmcbot", "bossbully", "bosskilla" };
|
|
|
|
// Read raw bot dumps from live and turn into c# objects
|
|
var workingPath = Directory.GetCurrentDirectory();
|
|
var dumpPath = $"{workingPath}//dumps";
|
|
var botParser = new BotParser(workingPath, dumpPath, botTypes);
|
|
var parsedBots = botParser.Parse();
|
|
|
|
// Generate the base bot class and add basic details (health/body part hp etc)
|
|
var baseBotGenerator = new BaseBotGenerator(parsedBots);
|
|
var baseBots = baseBotGenerator.AddBaseDetails();
|
|
|
|
// Add weapons/armor to bot
|
|
var botGearGenerator = new BotGearGenerator(baseBots, parsedBots);
|
|
var botsWithGear = botGearGenerator.AddGear();
|
|
|
|
// Add loot to bot
|
|
var botLootGenerator = new BotLootGenerator(botsWithGear, parsedBots);
|
|
var botsWithGearAndLoot = botLootGenerator.AddLoot();
|
|
|
|
// Output bot to json file
|
|
var jsonWriter = new JsonWriter(workingPath, "output");
|
|
jsonWriter.WriteJson(botsWithGearAndLoot);
|
|
}
|
|
}
|
|
}
|