예제 #1
0
 public LoadoutSlot(string name, GearSlotTypes slot, bool hidden)
 {
     this.name     = name;
     this.type     = slot;
     this.hidden   = hidden;
     this.contains = null;
 }
예제 #2
0
 public static List <GearData> GetAllGearBySlotType(GearSlotTypes slot)
 {
     if (gearBySlotType.TryGetValue(slot, out List <GearData> gd))
     {
         return(gd);
     }
     else
     {
         return(new List <GearData>());
     }
 }
예제 #3
0
    /// <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);
    }