Inventory¶
By Chris Proctor
-
class
quest.contrib.inventory.InventoryMixin[source]¶ A mixin for QuestGame which provides an inventory.
Pick up and drop behavior can be implemented in a very simple way because RemovableMixin provides most of what we need. Also creates an InventoryModal and binds a key to open it (by default, ‘i’).
-
inventory_shortcut¶ A key which should open the inventory.
-
-
class
quest.contrib.inventory.InventoryItemMixin[source]¶ A mixin for QuestSprite which allows it to behave as an inventory item.
-
detailed_description¶ A more detailed description.
- Type
str
-
dropped_by¶ Keeps track of whether the sprite was recently dropped.
- Type
-
usable¶ Indicates whether the item can be used.
- Type
bool
-
-
class
quest.contrib.inventory.InventoryModal(game, inventory)[source]¶ An extension of Modal which interaacts with inventories.