Path of Exile Wiki

Wiki поддерживается сообществом, поэтому подумайте над тем, чтобы внести свой вклад.

ПОДРОБНЕЕ

Path of Exile Wiki
Advertisement

--
-- Module for synthesis templates
--

local m_cargo = require('Module:Cargo')
local getArgs = require('Module:Arguments').getArgs

local p = {}

-- ----------------------------------------------------------------------------
-- Strings
-- ----------------------------------------------------------------------------

local i18n = {
}

-- ----------------------------------------------------------------------------
-- Helper functions and globals
-- ----------------------------------------------------------------------------

-- ----------------------------------------------------------------------------
-- Cargo tables
-- ----------------------------------------------------------------------------
local tables = {}

tables.synthesis_corrupted_mods = {
    table = 'synthesis_corrupted_mods',
    order = {'item_class_id', 'mods_ids'},
    fields = {
        item_class_id = {
            field = 'item_class_id',
            type = 'String',
            required = true,
        },
        mod_ids = {
            field = 'mod_ids',
            type = 'List (,) of String',
            required = true,
        },
    },
}

tables.synthesis_mods = {
    table = 'synthesis_mods',
    order = {'stat_id', 'stat_value', 'stat_text', 'item_class_ids', 'mod_ids'},
    fields = {
        stat_id = {
            field = 'stat_id',
            type = 'String',
            required = true,
        },
        stat_value = {
            field = 'stat_value',
            type = 'Integer',
            required = true,
        },
        stat_text = {
            field = 'stat_text',
            type = 'Text',
            required = true,
        },
        item_class_ids = {
            field = 'item_class_ids',
            type = 'List (,) of String',
            required = true,
        },
        mod_ids = {
            field = 'mod_ids',
            type = 'List (,) of String',
            required = true,
        },
    },
}

tables.synthesis_global_mods = {
    table = 'synthesis_global_mods',
    order = {'mod_id', 'min_level', 'max_level', 'weight'},
    fields = {
        mod_id = {
            field = 'mod_id',
            type = 'String',
            required = true,
        },
        min_level = {
            field = 'min_level',
            type = 'Integer',
            required = true,
        },
        max_level = {
            field = 'max_level',
            type = 'Integer',
            required = true,
        },
        weight = {
            field = 'weight',
            type = 'Integer',
            required = true,
        },
    },
}

tables.synthesis_areas = {
    table = 'synthesis_areas',
    order = {'id', 'name', 'min_level', 'max_level', 'weight', 'size'},
    fields = {
        id = {
            field = 'id',
            type = 'String',
            required = true,
        },
        name = {
            field = 'name',
            type = 'String',
            required = true,
        },
        min_level = {
            field = 'min_level',
            type = 'Integer',
            required = true,
        },
        max_level = {
            field = 'max_level',
            type = 'Integer',
            required = true,
        },
        weight = {
            field = 'weight',
            type = 'Integer',
            required = true,
        },
        size = {
            field = 'size',
            type = 'Integer',
            required = true,
        },
    },
}
-- ----------------------------------------------------------------------------
-- Page functions
-- ----------------------------------------------------------------------------

local p = {}

p.table_synthesis_corrupted_mods = m_cargo.declare_factory{data=tables.synthesis_corrupted_mods}
p.table_synthesis_global_mods = m_cargo.declare_factory{data=tables.synthesis_global_mods}
p.table_synthesis_mods = m_cargo.declare_factory{data=tables.synthesis_mods}
p.table_synthesis_areas = m_cargo.declare_factory{data=tables.synthesis_areas}

p.store_data = m_cargo.store_from_lua{tables=tables, module='Synthesis'}

-- ----------------------------------------------------------------------------
-- End
-- ----------------------------------------------------------------------------

return p
Advertisement