Этот модуль зависит от следующих других модулей: |
Модуль для обработки данных, связанных с верстаком.
Шаблоны
{{???}}
Подстраницы
Вышеприведенная документация извлекается из Модуль:Crafting bench/doc.
Редакторы могут экспериментировать в sandbox этого модуля и в testcases страницах.
Подстраницы этого модуля.
Редакторы могут экспериментировать в sandbox этого модуля и в testcases страницах.
Подстраницы этого модуля.
--
-- Module for bestiary 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.crafting_bench_options = {
table = 'crafting_bench_options',
order = {'id', 'npc', 'ordinal', 'mod_id', 'required_level', 'name', 'item_classes', 'item_classeds_ids', 'links', 'sockets', 'socket_colours', 'description', 'recipe_unlock_location', 'rank', 'mod_group', 'crafting_item_class_categories', 'crafting_bench_unlock_category', 'crafting_bench_unlock_category_description', 'unveils_requred', 'affix_type'},
fields = {
id = {
field = 'id',
type = 'Integer',
},
npc = {
field = 'npc',
type = 'String',
},
ordinal = {
field = 'ordinal',
type = 'Integer',
},
mod_id = {
field = 'mod_id',
type = 'String',
},
required_level = {
field = 'required_level',
type = 'Integer',
},
name = {
field = 'name',
type = 'String',
},
-- crafting bench action
item_classes = {
field = 'item_classes',
type = 'List (,) of String',
},
item_classes_ids = {
field = 'item_classes_ids',
type = 'List (,) of String',
},
links = {
field = 'links',
type = 'Integer',
},
sockets = {
field = 'sockets',
type = 'Integer',
},
socket_colours = {
field = 'socket_colours',
type = 'String',
},
description = {
field = 'description',
type = 'Text',
},
-- IsDisabled, IsAreaOption
-- from RecipeUnlockDisplay over RecipeIds
recipe_unlock_location = {
field = 'recipe_unlock_location',
type = 'Text',
},
-- called tier
rank = {
field = 'rank',
type = 'Integer',
},
mod_group = {
field = 'mod_group',
type = 'String',
},
crafting_item_class_categories = {
field = 'crafting_item_class_categories',
type = 'List (,) of String',
},
-- field "UnlockType", "ObtainingDescription" from CraftingBenchUnlockCategories
crafting_bench_unlock_category = {
field = 'crafting_bench_unlock_category',
type = 'String',
},
crafting_bench_unlock_category_description = {
field = 'crafting_bench_unlock_category_description',
type = 'String',
},
-- regular fields again
unveils_required = {
field = 'unveils_required',
type = 'Integer',
},
affix_type = {
field = 'affix_type',
type = 'String',
},
},
}
tables.crafting_bench_options_costs = {
table = 'crafting_bench_options_costs',
order = {'option_id', 'name', 'amount'},
fields = {
option_id = {
field = 'option_id',
type = 'Integer',
},
name = {
field = 'name',
type = 'String',
},
amount = {
field = 'amount',
type = 'Integer',
},
},
}
-- ----------------------------------------------------------------------------
-- Page functions
-- ----------------------------------------------------------------------------
local p = {}
p.table_crafting_bench_options = m_cargo.declare_factory{data=tables.crafting_bench_options}
p.table_crafting_bench_options_costs = m_cargo.declare_factory{data=tables.crafting_bench_options_costs}
p.store_data = m_cargo.store_from_lua{tables=tables, module='Crafting bench'}
-- ----------------------------------------------------------------------------
-- End
-- ----------------------------------------------------------------------------
return p