Method | Description | |
---|---|---|
Add ( Item item ) : bool |
Adds item to pocket, at the first possible position.
|
|
AddUnsafe ( Item item ) : void |
Adds item to pocket, at its position.
|
|
CountItem ( bool>.Func |
Returns amount of items by specified conditions.
|
|
CountItem ( int itemId ) : int |
Returns amount of items by item id.
|
|
CountItem ( string tag ) : int |
Returns amount of items by matching tag.
|
|
FillStacks ( Item item, List |
Fills stacks that take this item. Returns true if item has been completely added to stacks/sacs.
|
|
GetItem ( bool>.Func |
Returns first item to match predicate, or null.
|
|
GetItem ( long entityId ) : Item |
Returns item by entity id, or null.
|
|
GetItemAt ( int x, int y ) : Item |
Returns the item at the location, or null.
|
|
GetItems ( bool>.Func |
Returns items that match predicate.
|
|
Has ( Item item ) : bool |
Returns whether the item exists in this pocket.
|
|
HasSpace ( Item item ) : bool |
Returns true if there's enough space for the item in this pocket.
|
|
Remove ( Item item ) : bool |
Removes item from pocket.
|
|
Remove ( int itemId, int amount, List |
Removes items by item id and amount. Modified items are returned as a list.
|
|
TryAdd ( Item item, byte targetX, byte targetY, Item &colliding ) : bool |
Attempts to put item at the coordinates. If another item is in the new item's space it's returned in colliding. Returns whether the attempt was successful.
|
Method | Description | |
---|---|---|
InventoryPocket ( Pocket pocket ) : System |
public abstract AddUnsafe ( Item item ) : void | ||
item | Item | |
return | void |
public abstract CountItem ( bool>.Func |
||
predicate | bool>.Func | |
return | int |
public abstract CountItem ( int itemId ) : int | ||
itemId | int | |
return | int |
public abstract CountItem ( string tag ) : int | ||
tag | string | |
return | int |
public abstract FillStacks ( Item item, List |
||
item | Item | |
changed | List |
|
return | bool |
public abstract GetItem ( bool>.Func |
||
predicate | bool>.Func | |
startAt | StartAt | |
return | Item |
public abstract GetItem ( long entityId ) : Item | ||
entityId | long | |
return | Item |
public abstract GetItemAt ( int x, int y ) : Item | ||
x | int | |
y | int | |
return | Item |
public abstract GetItems ( bool>.Func |
||
predicate | bool>.Func | |
startAt | StartAt | |
return | List |
public abstract HasSpace ( Item item ) : bool | ||
item | Item | |
return | bool |
protected InventoryPocket ( Pocket pocket ) : System | ||
return | System |
public abstract Remove ( int itemId, int amount, List |
||
itemId | int | |
amount | int | |
changed | List |
|
return | int |
public abstract TryAdd ( Item item, byte targetX, byte targetY, Item &colliding ) : bool | ||
item | Item | |
targetX | byte | |
targetY | byte | |
colliding | Item | |
return | bool |