Module:Cargo/doc

From Path of Exile Wiki
Revision as of 18:14, 12 August 2018 by >OmegaK2 (→‎m_cargo.store)
Jump to navigation Jump to search

Functions

m_cargo.declare

This function is a simple wrapper around cargo_declare.

m_cargo.attach

This function is a simple wrapper around cargo_attach.

m_cargo.store

This function is a wrapper around cargo_store.

It will cast certain native lua to acceptable values for the store. In particular:

  • booleans -> cast to 1 or 0
  • tables -> cast to a list separated by a delimiter (default is comma)

It will also avoid calling the store function if no values are passed.

Parameters

Parameter Type Description Required Default
frame table Frame object
N/A
values assoc. table Table containing key-value pairs to store in the table.

It works exactly like cargo_store, expecting the key to be the of the field and the value the value to be stored.

The _table field must be supplied as well.

N/A
args assoc table Additional parameters for this function
N/A
args.sep assoc table Table mapping the desired delimiter/separator for fields as value to the fields in question as key.
N/A
args.store_empty boolean Allows the storing of empty rows
false
args.debug assoc table If set, log the values written by this function to console
false

m_cargo.query

m_cargo.table_query

m_cargo.parse_field_arguments

m_cargo.declare_factory

m_cargo.attach_factory

m_cargo.map_results_to_id

m_cargo.array_query

m_cargo.replace_holds

m_cargo.parse_field