Модуль:Delve

Материал из Path of Exile Wiki
Перейти к: навигация, поиск
--
-- Module for delve templates
--

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

local p = {}

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

local i18n = {
}

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

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

tables.delve_level_scaling = {
    table = 'delve_level_scaling',
    fields = {
        depth = {
            field = 'depth',
            type = 'Integer',
        },
        monster_level = {
            field = 'monster_level',
            type = 'Integer',
        },
        sulphite_cost = {
            field = 'sulphite_cost',
            type = 'Integer',
        },
        darkness_resistance = {
            field = 'darkness_resistance',
            type = 'Integer',
        },
        light_radius = {
            field = 'light_radius',
            type = 'Integer',
        },
        monster_life = {
            field = 'monster_life',
            type = 'Integer',
        },
        monster_damage = {
            field = 'monster_damage',
            type = 'Integer',
        },
    },
}

tables.delve_resources_per_level = {
    table = 'delve_resources_per_level',
    fields = {
        area_level = {
            field = 'area_level',
            type = 'Integer',
        },
        sulphite = {
            field = 'sulphite',
            type = 'Integer',
        },
    },
}

tables.delve_upgrades = {
    table = 'delve_upgrades',
    fields = {
        type = {
            field = 'type',
            type = 'String',
        },
        level = {
            field = 'level',
            type = 'Integer',
        },
        cost = {
            field = 'cost',
            type = 'Integer',
        },
    },
}

tables.delve_upgrade_stats = {
    table = 'delve_upgrade_stats',
    fields = {
        type = {
            field = 'type',
            type = 'String',
        },
        level = {
            field = 'level',
            type = 'Integer',
        },
        id = {
            field = 'id',
            type = 'String',
        },
        value = {
            field = 'value',
            type = 'Integer',
        },
    },
}

-- DelveCraftingModifiers.dat
tables.fossils = {
    table = 'fossils',
    fields = {
        base_item_id = {
            field = 'base_item_id',
            type = 'String',
        },
        added_modifier_ids = {
            field = 'added_modifier_ids',
            type = 'List (,) of String',
        },
        forced_modifier_ids = {
            field = 'forced_modifier_ids',
            type = 'List (,) of String',
        },
        sell_price_modifier_ids = {
            field = 'sell_price_modifier_ids',
            type = 'List (,) of String',
        },
        forbidden_tags = {
            field = 'forbidden_tags',
            type = 'List (,) of String',
        },
        allowed_tags = {
            field = 'allowed_tags',
            type = 'List (,) of String',
        },
        corrupted_essence_chance = {
            field = 'corrupted_essence_chance',
            type = 'Integer',
        },
        can_mirror = {
            field = 'can_mirror',
            type = 'Boolean',
        },
        can_enchant = {
            field = 'can_enchant',
            type = 'Boolean',
        },
        can_quality = {
            field = 'can_quality',
            type = 'Boolean',
        },
        can_roll_white_sockets = {
            field = 'can_roll_white_sockets',
            type = 'Boolean',
        },
        is_lucky = {
            field = 'is_lucky',
            type = 'Boolean',
        },
    },
}

tables.fossil_weights = {
    table = 'fossil_weights',
    fields = {
        base_item_id = {
            field = 'base_item_id',
            type = 'String',
        },
        type = {
            field = 'type',
            type = 'String',
        },
        ordinal = {
            field = 'ordinal',
            type = 'Integer',
        },
        tag = {
            field = 'tag',
            type = 'String',
        },
        weight = {
            field = 'weight',
            type = 'Integer',
        },

    },
}

-- ----------------------------------------------------------------------------
-- Page functions
-- ----------------------------------------------------------------------------

local p = {}

p.table_delve_level_scaling = m_cargo.declare_factory{data=tables.delve_level_scaling}
p.table_delve_resources_per_level = m_cargo.declare_factory{data=tables.delve_resources_per_level}
p.table_delve_upgrades = m_cargo.declare_factory{data=tables.delve_upgrades}
p.table_delve_upgrade_stats = m_cargo.declare_factory{data=tables.delve_upgrade_stats}

p.table_fossils = m_cargo.declare_factory{data=tables.fossils}
p.table_fossil_weights = m_cargo.declare_factory{data=tables.fossil_weights}

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

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

return p