Constructor






Methods


LightInventory:addItem(item: string|Item, ignore_dark: boolean?)

@param ignore_dark — Whether to add the item to this inventory even if it is a Dark 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_dark: boolean?

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

Returns:

1: Item|nil






LightInventory:getDarkInventory()

Gets the Dark World inventory

Returns:

1: DarkInventory


LightInventory:getDefaultStorage(item_type: string|Item)

Arguments:

item_type: 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().

Returns:

storage: table


LightInventory:getLightInventory()

Gets the Light World inventory

Returns:

1: LightInventory


LightInventory:tryGiveItem(item: string|Item, ignore_dark: boolean?)

@param ignore_dark — Whether to add the item to this inventory even if it is a Dark 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_dark: boolean?

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

Returns:

success: boolean

Whether the item was successfully picked up

result_text: string

The text that should be displayed




Fields



Undocumented



LightInventory.convert_order: table

Order the storages are converted to the dark world



LightInventory.storage_enabled: boolean

Never true for the light world, as Undertale doesnt use storage fallback but temporarily set to true during item conversion (to overflow to storage)