Module:Harvest/sandbox
Jump to navigation
Jump to search
This is the module sandbox page for Module:Harvest (diff).
The above documentation is transcluded from Module:Harvest/doc.
Editors can experiment in this module's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this module.
Editors can experiment in this module's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this module.
--
-- Module for harvest templates
--
local m_cargo = require('Module:Cargo')
-- ----------------------------------------------------------------------------
-- Cargo tables
-- ----------------------------------------------------------------------------
local tables = {}
tables.harvest_crafting_options = {
table = 'harvest_crafting_options',
order = {'id'},
fields = {
ordinal = {
field = 'ordinal',
type = 'Integer',
},
id = {
field = 'id',
type = 'String',
},
effect = {
field = 'effect',
type = 'Text',
},
effect_html = {
field = 'effect_html',
type = 'Text',
},
cost_wild = {
field = 'cost_wild',
type = 'Integer',
},
cost_vivid = {
field = 'cost_vivid',
type = 'Integer',
},
cost_primal = {
field = 'cost_primal',
type = 'Integer',
},
cost_sacred = {
field = 'cost_sacred',
type = 'Integer',
},
},
}
-- ----------------------------------------------------------------------------
-- Page functions
-- ----------------------------------------------------------------------------
local p = {}
p.table_harvest_crafting_options = m_cargo.declare_factory{data=tables.harvest_crafting_options}
p.store_data = m_cargo.store_from_lua{tables=tables, module='Harvest'}
-- ----------------------------------------------------------------------------
-- End
-- ----------------------------------------------------------------------------
return p