Inventory Layouts

The Inventory Layouts is a handler for the game inventory.

You can configure the layouts manually but the recommended way is to use Inventory Form.


TInventoryLayoutItem

Type that represents a single inventory layout item.


TInventoryLayoutItem.ToJSON

function TInventoryLayoutItem.ToJSON(): TJSONItem;

Convert the TInventoryLayoutItem into a TJSONItem.


TInventoryLayoutSlots

Type that represents an entire inventory layout.


TInventoryLayout.ToJSON

function TInventoryLayout.ToJSON(): TJSONItem;

Convert the TInventoryLayout into a TJSONItem.


TInventoryLayout

Main type to user Inventory Layouts.


InventoryLayout.SetupBankItems

procedure TInventoryLayout.SetupBankItems();

Internal function used to setup the TInventoryLayout TBankItems. This is automatically called for you when it’s needed.


InventoryLayout.IsValid

function TInventoryLayout.IsValid(): Boolean;

Returns true/false if whatever is inr you current Inventory is valid for your TInventoryLayout.

Example:

WriteLn layout.IsValid();

InventoryLayout.DepositDiff

function TInventoryLayout.DepositDiff(): Boolean;

Assuming the Bank is open, this will deposit every item in your inventory that doesn’t match your TInventoryLayout.

Example:

if Bank.Open() then
  layout.DepositDiff();

InventoryLayout.Withdraw

function TInventoryLayout.Withdraw(): Boolean;

Assuming the Bank is open, this will withdraw anything necessay so your Inventory contents match your TInventoryLayout.

Example:

if Bank.Open() then
  layout.Withdraw();

InventoryLayout.Reorder

function TInventoryLayout.Reorder(): Boolean;

Attempts to reorder the items in your Inventory to it matches your TInventoryLayout.

Example:

layout.Reorder();