Example #1
0
 private static void GiveEquipment(NonPlayerDwarf Dwarf, params String[] items)
 {
     if (Dwarf.GetRoot().GetComponent <Equipment>().HasValue(out var equipment))
     {
         foreach (var item in items)
         {
             equipment.EquipItem(new Resource(item));
         }
     }
 }
Example #2
0
        private static GameComponent __factory2(ComponentManager Manager, Vector3 Position, Blackboard Data)
        {
            var r = new NonPlayerDwarf(
                Manager,
                new CreatureStats("Dwarf", "Crafter", 0)
            {
                RandomSeed = MathFunctions.Random.Next(),
            },
                Manager.World.Factions.Factions["Dwarves"], "Dwarf", Position); // Todo: Why are we adding them to a faction? Don't they just immediately get added to a different one?

            GiveEquipment(r, "Boots", "Apron", "Iron Hammer");

            return(r.Physics);
        }
Example #3
0
        private static GameComponent __factory1(ComponentManager Manager, Vector3 Position, Blackboard Data)
        {
            var r = new NonPlayerDwarf(
                Manager,
                new CreatureStats("Dwarf", "Soldier", 0)
            {
                RandomSeed = MathFunctions.Random.Next(),
            },
                Manager.World.Factions.Factions["Dwarves"], "Dwarf", Position);

            GiveEquipment(r, "Boots", "Tabard", "Iron Axe", "Helmet");

            return(r.Physics);
        }