Module:Cargo/doc
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 | ![]() |
— |
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. |
![]() |
— |
args | assoc table | Additional parameters for this function | ![]() |
— |
args.sep | assoc table | Table mapping the desired delimiter/separator for fields as value to the fields in question as key. | ![]() |
— |
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 |