public static void RemoveEquipCollection(CharacterUI collection) { _equipToCollections.RemoveAll(o => o.collection == collection); //var found = equipToCollections.FirstOrDefault(o => o.collection == collection); //if (found != null) //equipToCollections.Remove(found); }
protected virtual CharacterUI GetBestEquipToCollection() { CharacterUI last = null; foreach (var col in InventoryManager.GetEquipToCollections()) { var best = GetBestEquipSlot(col); if (best != null && (best.slot.item == null || last == null)) { last = col; } } return(last); }
/// <summary> /// Add a collection that functions as an Equippable collection. Items can be equipped to this collection. /// </summary> /// <param name="collection">The collection to add.</param> /// <param name="priority"> /// How important is the collection, if you 2 collections can hold the item, which one should be chosen? /// Range of 0 to 100 /// /// Note: This method is not used yet, it only registers the Equippable collection, that's it. /// </param> public static void AddEquipCollection(CharacterUI collection, int priority) { _equipToCollections.Add(new ItemCollectionPriority <CharacterUI>(collection, priority)); }