#ifndef BAG_SLOT_H #define BAG_SLOT_H #include "core/reference.h" #include "../data/item_instance.h" class BagSlot : public Reference { GDCLASS(BagSlot, Reference); public: Ref get_item(); void set_item(Ref item); void set_item_count(Ref item, int count = 1); int get_count(); void set_count(int value); int get_slot_index(); void set_slot_index(int value); bool has_item(); void clear(); BagSlot(); BagSlot(Ref item); BagSlot(Ref item, int count); protected: static void _bind_methods(); private: Ref _item; int _count; int _slot_index; }; #endif