Class MyInventoryItemFilter
Implements inventory item filter
Inheritance
System.Object
MyInventoryItemFilter
Namespace: Sandbox.ModAPI.Ingame
Assembly: Sandbox.Common.dll
Syntax
public sealed class MyInventoryItemFilter : ValueType
Constructors
MyInventoryItemFilter(String, Boolean)
Implements MyInventoryItemFilter constructor
Declaration
public MyInventoryItemFilter(string itemId, bool allSubTypes = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | itemId | item id |
System.Boolean | allSubTypes | true if all sub types |
MyInventoryItemFilter(MyDefinitionId, Boolean)
Implements MyInventoryItemFilter constructor
Declaration
public MyInventoryItemFilter(MyDefinitionId itemId, bool allSubTypes = false)
Parameters
Type | Name | Description |
---|---|---|
MyDefinitionId | itemId | item id |
System.Boolean | allSubTypes | true if all sub types |
Fields
AllSubTypes
Determines whether all subtypes of the given item ID should pass this filter check.
Declaration
public readonly bool AllSubTypes
Field Value
Type | Description |
---|---|
System.Boolean |
ItemId
Specifies an item to filter. Set AllSubTypes to true to only check the main type part of this ID.
Declaration
public readonly MyDefinitionId ItemId
Field Value
Type | Description |
---|---|
MyDefinitionId |
Properties
ItemType
Declaration
public MyItemType ItemType { get; }
Property Value
Type | Description |
---|---|
MyItemType |
Operators
Implicit(MyItemType to MyInventoryItemFilter)
Implements implicit operator
Declaration
public static implicit operator MyInventoryItemFilter(MyItemType itemType)
Parameters
Type | Name | Description |
---|---|---|
MyItemType | itemType | item type |
Returns
Type | Description |
---|---|
MyInventoryItemFilter |
Implicit(MyDefinitionId to MyInventoryItemFilter)
Implements implicit operator
Declaration
public static implicit operator MyInventoryItemFilter(MyDefinitionId definitionId)
Parameters
Type | Name | Description |
---|---|---|
MyDefinitionId | definitionId | definition id |
Returns
Type | Description |
---|---|
MyInventoryItemFilter |