#include "ItemSlot.h" ItemSlot::ItemSlot(Framework::Text name, 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 ), name(name) {} 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; } const Framework::Text& ItemSlot::getName() const { return name; }