GameItemObjectList Contains() Methods
v4.0
Contains amounts of a group of GameItemObjects, optionally distinct
GameItemObjects, optionally distinct// Most of these have an optional bool distinct parameter, false by default. When true
// the comparison will only count one GameItemObject of each uid. No differentiation
// will be made for GameItemObjects of the same uid with different ItemAttributes
// Contains > X ItemObjects
public bool ContainsMoreThanXItemObjects(int amount, IEnumerable<ItemObject> itemObjects, bool distinct = false)
public bool ContainsMoreThanXItemObjects(int amount, IEnumerable<GameItemObject> gameItemObjects, bool distinct = false)
public bool ContainsMoreThanXItemObjects(int amount, IEnumerable<string> itemObjectUids, bool distinct = false)
// Contains < X ItemObjects
public bool ContainsLessThanXItemObjects(int amount, IEnumerable<ItemObject> itemObjects, bool distinct = false)
public bool ContainsLessThanXItemObjects(int amount, IEnumerable<GameItemObject> gameItemObjects, bool distinct = false)
public bool ContainsLessThanXItemObjects(int amount, IEnumerable<string> itemObjectUids, bool distinct = false)
// Contains exactly X ItemObjects
public bool ContainsExactlyXItemObjects(int amount, IEnumerable<ItemObject> itemObjects, bool distinct = false)
public bool ContainsExactlyXItemObjects(int amount, IEnumerable<GameItemObject> gameItemObjects, bool distinct = false)
public bool ContainsExactlyXItemObjects(int amount, IEnumerable<string> itemObjectUids, bool distinct = false)
// Contains any of the ItemObjects [No distinct option]
public bool ContainsAnyItemObjects(IEnumerable<ItemObject> itemObjects, bool distinct = false)
public bool ContainsAnyItemObjects(IEnumerable<GameItemObject> gameItemObjects, bool distinct = false)
public bool ContainsAnyItemObjects(IEnumerable<string> itemObjectUids, bool distinct = false)
// Contains all of the ItemObjects
public bool ContainsAllItemObjects(IEnumerable<ItemObject> itemObjects, bool distinct = false)
public bool ContainsAllItemObjects(IEnumerable<GameItemObject> gameItemObjects, bool distinct = false)
public bool ContainsAllItemObjects(IEnumerable<string> itemObjectUids, bool distinct = false)
// Contains none of the ItemObjets [No distinct option]
public bool ContainsNoItemObjects(IEnumerable<ItemObject> itemObjects, bool distinct = false)
public bool ContainsNoItemObjects(IEnumerable<GameItemObject> gameItemObjects, bool distinct = false)
public bool ContainsNoItemObjects(IEnumerable<string> itemObjectUids, bool distinct = false)
// Example
ItemObject[] itemObjects = new[] { WhistleBerry, Lemon, Cranberries };
if (gameItemObjectList.ContainsAllItemObjects(itemObjects))
MakeCranberryCocktail();Contains a GameItemObject with Attribute(s)
GameItemObject with Attribute(s)Contains a GameItemObject with Attribute(s)
GameItemObject with Attribute(s)Contains a ItemAttribute (anywhere in any item)
ItemAttribute (anywhere in any item)Contains by status
Find out if the list contains quests of a specific status, optionally of a specific uid.
Contains quests which affect stats
GameQuests can modify Stats while they are in any of their states.
Contains Duplicates
These methods will return true if there are duplicates. The single-object methods have an optional itemObjectUid, when null, will return true if there are any duplicates in the list.
There is also an optional bool includeItemAttributes, which is false by default. When true, a GameItemObject must match both its Uid() and its list of ItemAttributes to qualify as a duplicate.
Additional Contains Methods
Last updated
Was this helpful?