inventory¶
-
class InventoryMixin(bar=
None, *, extra_keys: dict[str, Any] | None =None)¶ Enables the entity to have inventory control. Keeps track of the currently requested items for this entity and issues warnings if the requested items amount exceeds the inventory size of the entity.
- bar : _AndValidator object at 0x7436dd5c5660>] | None¶
Serialized
This attribute is imported/exported from blueprint strings.
The limiting bar of the inventory. Used to prevent the final-most slots in the inventory from accepting new items.
Raises
IndexWarningif the set value exceeds the Entity’sinventory_sizeattribute.
- property inventory_bar_enabled : bool | None¶
Whether or not this Entity has its inventory limiting bar enabled. Returns
Noneif this entity is not recognized by Draftsman.
- property quality_affects_inventory_size : bool | None¶
Whether or not the
qualityof this entity modifies its inventory size.
- property size : _AndValidator object at 0x7436dd5c5660>] | None¶
The number of inventory slots that this entity has. If
quality_affects_inventory_sizeisTruefor this entity, then the returned value is scaled by thequalityof the entity. If the current quality of this entity is unrecognized by the current environment, then the base, un-scaled inventory size is returned.If this entity is unrecognized by the current environment, this attribute returns
None.
- property slots_occupied : int¶
The number of inventory slots filled by the item requests for this entity. Useful for quickly determining the capacity of the chest after the item requests have been delivered.