Remove() Methods
v4.0
Remove()
Remove()There are many ways to remove an item from the list
Remove(gameStat) will remove the first item that has the uid of the gameStat provided. If you want to ensure you remove the specific GameStat object, use RemoveExact(gameStat) instead.
// Remove by Stat, GameStat, or uid
gameStatList.Remove(stat);
gameStatList.Remove(gameStat);
gameStatList.Remove(uid);
// Remove all by Stat, GameStat, or uid
gameStatList.RemoveAll(stat);
gameStatList.RemoveAll(gameStat);
gameStatList.RemoveAll(uid);
// Remove by a gameId -- These do the same thing
gameStatList.RemoveGameId(gameId);
gameStatList.RemoveExact(gameId);
// Remove an exact Game Module Object
gameStatList.RemoveExact(gameStat); // pass in the gameStat we want to remove
// Clear the entire list
gameStatList.Clear();GameConditionList
GameConditionListRemove all from a specific IHaveStats source
IHaveStats sourceExpire all from a specific IHaveStats source
IHaveStats sourceGameItemObjectList
GameItemObjectListThe Remove() methods below do not take into account "Equipment" -- that is, they do not update Stats when they are removed. If you plan on removing ItemObjects that are active in an "Equipment" list, you'll want to create your own remove methods to handle your inventory appropriately.
Remove all based on number of ItemAttributes
ItemAttributesRemove all based on specific ItemAttributes
ItemAttributesRemove duplicates
These methods will remove any duplicates. The single-object methods have an optional itemObjectUid, when null, will remove any duplicate in the entire 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.
Last updated
Was this helpful?