1234567891011121314151617181920212223242526272829303132 |
- #pragma once
- #include "ItemStack.h"
- #include "Area.h"
- class ItemSlot : public virtual Framework::ReferenceCounter
- {
- private:
- ItemStack* items;
- int maxSize;
- Directions allowedPullSide;
- Directions allowedPushSides;
- int pullPriority;
- int pushPriority;
- bool allowHigherStackSize;
- public:
- ItemSlot( int maxSize, int pullPriority, int pushPriority, int allowedPullSide, int allowedPushSides, bool allowHigherStackSize );
- ~ItemSlot();
- ItemStack* takeItemsOut( int count, Direction dir );
- void addItems( ItemStack* zStack, Direction dir );
- int numberOfAddableItems( const ItemStack* zStack, Direction dir ) const;
- const ItemStack* zStack() const;
- int getPullPriority() const;
- int getPushPriority() const;
- bool isFull() const;
- int getFreeSpace() const;
- bool isEmpty() const;
- int getNumberOfItems() const;
- };
|