forked from chomp/BotGenerator
pass bottypes array into basebot class
This commit is contained in:
parent
d8e216d773
commit
6846d518c1
@ -14,12 +14,14 @@ namespace Generator
|
|||||||
{
|
{
|
||||||
private readonly List<Datum> _rawParsedBots;
|
private readonly List<Datum> _rawParsedBots;
|
||||||
private readonly string _workingPath;
|
private readonly string _workingPath;
|
||||||
|
private readonly string[] _botTypes;
|
||||||
|
|
||||||
//TODO: pass in bot types and use those to create the clases in rawBots list
|
//TODO: pass in bot types and use those to create the clases in rawBots list
|
||||||
public BaseBotGenerator(List<Datum> parsedBots, string workingPath)
|
public BaseBotGenerator(List<Datum> parsedBots, string workingPath, string[] botTypes)
|
||||||
{
|
{
|
||||||
_rawParsedBots = parsedBots;
|
_rawParsedBots = parsedBots;
|
||||||
_workingPath = workingPath;
|
_workingPath = workingPath;
|
||||||
|
_botTypes = botTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Bot> AddBaseDetails()
|
public List<Bot> AddBaseDetails()
|
||||||
|
@ -15,7 +15,7 @@ namespace Generator
|
|||||||
{
|
{
|
||||||
private readonly string _dumpPath;
|
private readonly string _dumpPath;
|
||||||
|
|
||||||
public BotParser(string dumpPath, string[] botTypes)
|
public BotParser(string dumpPath)
|
||||||
{
|
{
|
||||||
_dumpPath = dumpPath;
|
_dumpPath = dumpPath;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ namespace Generator
|
|||||||
"bosskilla",
|
"bosskilla",
|
||||||
"bosskojaniy",
|
"bosskojaniy",
|
||||||
"bosssanitar",
|
"bosssanitar",
|
||||||
"bossstormtrooper",
|
//"bossstormtrooper",
|
||||||
|
|
||||||
"followerbully",
|
"followerbully",
|
||||||
"followergluharassault",
|
"followergluharassault",
|
||||||
@ -25,7 +25,7 @@ namespace Generator
|
|||||||
"followergluharsnipe",
|
"followergluharsnipe",
|
||||||
"followerkojaniy",
|
"followerkojaniy",
|
||||||
"followersanitar",
|
"followersanitar",
|
||||||
"followerstormtrooper",
|
//"followerstormtrooper",
|
||||||
|
|
||||||
"cursedassault",
|
"cursedassault",
|
||||||
|
|
||||||
@ -36,7 +36,8 @@ namespace Generator
|
|||||||
// Read raw bot dumps from live and turn into c# objects
|
// Read raw bot dumps from live and turn into c# objects
|
||||||
var workingPath = Directory.GetCurrentDirectory();
|
var workingPath = Directory.GetCurrentDirectory();
|
||||||
var dumpPath = $"{workingPath}//dumps";
|
var dumpPath = $"{workingPath}//dumps";
|
||||||
var botParser = new BotParser(dumpPath, botTypes);
|
|
||||||
|
var botParser = new BotParser(dumpPath);
|
||||||
var parsedBots = botParser.Parse();
|
var parsedBots = botParser.Parse();
|
||||||
|
|
||||||
if (parsedBots.Count == 0)
|
if (parsedBots.Count == 0)
|
||||||
@ -47,7 +48,7 @@ namespace Generator
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate the base bot class and add basic details (health/body part hp etc)
|
// Generate the base bot class and add basic details (health/body part hp etc)
|
||||||
var baseBotGenerator = new BaseBotGenerator(parsedBots, workingPath);
|
var baseBotGenerator = new BaseBotGenerator(parsedBots, workingPath, botTypes);
|
||||||
var baseBots = baseBotGenerator.AddBaseDetails();
|
var baseBots = baseBotGenerator.AddBaseDetails();
|
||||||
|
|
||||||
// Add weapons/armor to bot
|
// Add weapons/armor to bot
|
||||||
|
Loading…
x
Reference in New Issue
Block a user