Beispiel #1
0
 private void OnDeserialized(StreamingContext context)
 {
     FactionNameTemplates = TextGenerator.GetAtoms(FactionNameFile);
     NameTemplates        = TextGenerator.GetAtoms(NameFile);
 }
Beispiel #2
0
        public static string GenerateMotto()
        {
            var templates = TextGenerator.GetAtoms(ContentPaths.Text.Templates.mottos);

            return(TextGenerator.GenerateRandom(Datastructures.SelectRandom(templates).ToArray()));
        }
Beispiel #3
0
        public static string GenerateRandomName()
        {
            var templates = TextGenerator.GetAtoms(ContentPaths.Text.Templates.company_exploration);

            return(TextGenerator.GenerateRandom(Datastructures.SelectRandom(templates).ToArray()));
        }
Beispiel #4
0
        public static string GetRandomWorldName()
        {
            List <List <string> > templates = TextGenerator.GetAtoms(ContentPaths.Text.Templates.worlds);

            return(TextGenerator.GenerateRandom(templates));
        }
Beispiel #5
0
        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;
        }