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)); } } }
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); }
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); }