Constructor






Methods


DarkInventory:addItem(item: string|Item, ignore_light: boolean?)

@param ignore_light — Whether to add the item to this inventory even if it is a Light item

Arguments:

item: string|Item

The Item class represents all types of item in Kristal.
Items are data files contained in scripts/data/items that should extend this class or one of its extensions (see below), and their filepath starting at this location becomes their id, unless an id for them is specified as the second argument to Class().
There are extensions of item that provide additional functionality when extended from: HealItem and TensionItem
Items that are Light World equipment should extend LightEquipItem instead of this class (it provides all of the same fields and functions as Item).
Items can be given to the player directly in the code through Inventory:addItem().

ignore_light: boolean?

Whether to add the item to this inventory even if it is a Light item

Returns:

1: Item|nil






DarkInventory:getDarkInventory()

Gets the Dark World inventory

Returns:

1: DarkInventory


DarkInventory:getLightInventory()

Gets the Light World inventory

Returns:

1: LightInventory


DarkInventory:tryGiveItem(item: string|Item, ignore_light: boolean?)

@param ignore_light — Whether to add the item to this inventory even if it is a Light item

@return success — Whether the item was successfully picked up

@return result_text — The text that should be displayed

Arguments:

item: string|Item

The Item class represents all types of item in Kristal.
Items are data files contained in scripts/data/items that should extend this class or one of its extensions (see below), and their filepath starting at this location becomes their id, unless an id for them is specified as the second argument to Class().
There are extensions of item that provide additional functionality when extended from: HealItem and TensionItem
Items that are Light World equipment should extend LightEquipItem instead of this class (it provides all of the same fields and functions as Item).
Items can be given to the player directly in the code through Inventory:addItem().

ignore_light: boolean?

Whether to add the item to this inventory even if it is a Light item

Returns:

success: boolean

Whether the item was successfully picked up

result_text: string

The text that should be displayed




Fields



Undocumented



DarkInventory.convert_order: table

Order the storages are converted to the light world