1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #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 )
- {
- if( this->items )
- this->items->release();
- this->items = items;
- }
- int ItemSlot::getPullPriority() const
- {
- return pullPriority;
- }
- int ItemSlot::getPushPriority() const
- {
- return pushPriority;
- }
- ItemStack* ItemSlot::zStack() const
- {
- return items;
- }
|