private void OnDeserialized(StreamingContext context) { FactionNameTemplates = TextGenerator.GetAtoms(FactionNameFile); NameTemplates = TextGenerator.GetAtoms(NameFile); }
public static string GenerateMotto() { var templates = TextGenerator.GetAtoms(ContentPaths.Text.Templates.mottos); return(TextGenerator.GenerateRandom(Datastructures.SelectRandom(templates).ToArray())); }
public static string GenerateRandomName() { var templates = TextGenerator.GetAtoms(ContentPaths.Text.Templates.company_exploration); return(TextGenerator.GenerateRandom(Datastructures.SelectRandom(templates).ToArray())); }
public static string GetRandomWorldName() { List <List <string> > templates = TextGenerator.GetAtoms(ContentPaths.Text.Templates.worlds); return(TextGenerator.GenerateRandom(templates)); }
public static Resource CreateMeal(Resource componentA, Resource componentB) { Resource toReturn = new Resource(Resources[ResourceType.Meal]) { FoodContent = componentA.FoodContent + componentB.FoodContent, Type = TextGenerator.GenerateRandom(new List<string>() {componentA.ResourceName, componentB.ResourceName}, TextGenerator.GetAtoms(ContentPaths.Text.Templates.food)), MoneyValue = 2*(componentA.MoneyValue + componentB.MoneyValue) }; toReturn.ShortName = toReturn.Type; if (!Resources.ContainsKey(toReturn.Type)) Add(toReturn); return toReturn; }