Example #1
0
 public LoadoutSlot(string name, GearSlotTypes slot, bool hidden)
 {
     this.name     = name;
     this.type     = slot;
     this.hidden   = hidden;
     this.contains = null;
 }
Example #2
0
 public static List <GearData> GetAllGearBySlotType(GearSlotTypes slot)
 {
     if (gearBySlotType.TryGetValue(slot, out List <GearData> gd))
     {
         return(gd);
     }
     else
     {
         return(new List <GearData>());
     }
 }
    /// <summary>
    /// Get a list of each kind of unique gear piece in the inventory that fits in a given slot
    /// </summary>
    /// <param name="slotFilter">The requiredSlot to filter for</param>
    /// <returns></returns>
    public List <GearData> GetAllGearTypesOfSlot(GearSlotTypes slotFilter)
    {
        List <GearData> output = new List <GearData>();

        foreach (KeyValuePair <int, int> pair in contents)
        {
            GearData gear = GearDatabase.GetGearDataByID(pair.Key);
            if (gear.requiredSlot == slotFilter)
            {
                output.Add(gear);
            }
        }
        return(output);
    }