public List <Augment> GetAugments(Character.BodyPartSlot.SlotType slot)
        {
            List <Augment> result = new List <Augment>();

            foreach (BodyPart item in Items)
            {
                if (item is Augment aug && aug.Slot == slot)
                {
                    result.Add(aug);
                }
            }
            return(result);
        }
        public List <Organ> GetOrgans(Character.BodyPartSlot.SlotType slot)
        {
            List <Organ> result = new List <Organ>();

            foreach (BodyPart item in Items)
            {
                if (item is Organ organ && organ.Slot == slot)
                {
                    result.Add(organ);
                }
            }
            return(result);
        }
Example #3
0
        // Valid primary augment constructor
        public Augment(string name, string description,
                       Character.BodyPartSlot.SlotType slot, Character.RaceType race, Character.GenderType gender,
                       Dictionary <string, string> customParams = null)
            : base(name, slot, string.Empty, description)
        {
            CustomParameters = customParams ?? new Dictionary <string, string>();
            Visible          = true;

            Race   = race;
            Gender = gender;

            if (CustomParameters.Count > 0 && CustomParameters.Keys.Contains("Полная замена"))
            {
                ImagePath = Character.BodyPartSlot.GetSlotPicture(slot, race, gender, 2);
            }
            else
            {
                ImagePath = Character.BodyPartSlot.GetSlotPicture(slot, race, gender, 1);
            }
        }
 public Organ(string name, Character.BodyPartSlot.SlotType slot, string image, string description = "") : base(name, slot, image, description)
 {
 }