123456789101112131415161718192021222324252627282930313233343536373839 |
- #include "ItemSlot.h"
- ItemSlot::ItemSlot( int maxSize, int pullPriority, int pushPriority, int allowedPullSide, int allowedPushSides, bool allowHigherStackSize )
- : ReferenceCounter(),
- items( 0 ),
- maxSize( maxSize ),
- allowedPullSide( allowedPullSide ),
- allowedPushSides( allowedPushSides ),
- pullPriority( pullPriority ),
- pushPriority( pushPriority ),
- allowHigherStackSize( allowHigherStackSize )
- {}
- ItemSlot::~ItemSlot()
- {
- if( items )
- items->release();
- }
- void ItemSlot::setItems( ItemStack* items )
- {
- this->items = items;
- }
- int ItemSlot::getPullPriority() const
- {
- return pullPriority;
- }
- int ItemSlot::getPushPriority() const
- {
- return pushPriority;
- }
- ItemStack* ItemSlot::zStack() const
- {
- return items;
- }
|