101 void beforeItemRelocate(
Item* item);
void sort()
Sort the box contents.
QVector< Item * > items
The stored items.
void save(SaveFile *saveFile, int offset)
Flatten the box to the save.
void reset()
Empty the box.
bool getIsBag()
Is this the bag?
void itemsResetChange()
The box was reset.
void randomizeBag()
Randomizer path for the bag.
bool isBag
Bag vs PC (set at construction; treat as read-only).
void load(SaveFile *saveFile=nullptr, int offset=0)
Expand the box from the save.
ItemStorageBox * destBox()
The paired box for relocation.
int maxSize
Capacity (set at construction; treat as read-only).
void itemNew()
Add a fresh random item (never a duplicate of one already here).
ItemStorageBox(bool isBag, int maxSize, SaveFile *saveFile=nullptr, int offset=0)
How many items are there.
int itemsCountBulk()
Item count including stack amounts.
void itemInsertChange()
An item was inserted.
void itemMoveChange(int from, int to)
An item moved slot.
bool relocateAll()
Move every item to the paired box.
int randomUniqueInd()
A random non-glitch/non-once item index absent from this box, or -1 if none remain.
bool itemMove(int from, int to)
Reorder an item.
bool relocateOne(int ind)
Move one item to the paired box.
void randomizeStorage()
Randomizer path for a PC item box.
bool relocateFull()
Is relocation blocked because the paired box is full?
Item * itemAt(int ind)
Item slot ind (GC-protected return).
bool hasItemInd(int ind)
Does this box already contain an item with index ind? (Q_INVOKABLE: the SelectItem dropdown greys out...
void randomize()
Randomize (dispatches to bag/storage path); sorts afterward.
SaveFile * file
Owning save.
int amountOfInd(int ind)
Total amount of item ind across all rows in this box (Q_INVOKABLE: the SelectItem dropdown shows the ...
int itemsCount()
Distinct item count.
void itemRemoveChange(int ind)
An item was removed.
void itemsChanged()
Box contents changed.
void itemRemove(int ind)
Remove item ind.
One inventory slot: an item index and an amount, with live pricing.
One loaded save: the raw 32 KB bytes, their expanded object tree, and the tools that move between the...
Project-wide fixed-width integer aliases (var8, var16, ...).
Import/export macro for the savefile library, plus the central list of QObject types kept deliberatel...
#define SAVEFILE_AUTOPORT
Expands to the correct dllexport/dllimport decoration for this library.