Module:Harvest/sandbox

From Path of Exile Wiki
Revision as of 22:14, 29 August 2022 by Vinifera7 (talk | contribs) (Create sandbox version of Module:Harvest)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is the module sandbox page for Module:Harvest (diff).

Module documentation[view] [edit] [history] [purge]


Lua logo

This module depends on the following other modules:

Store Harvest related data

Subpages

No results


--
-- 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