Module:Sandbox: Difference between revisions

From Path of Exile 2 Wiki
Jump to navigation Jump to search
>OmegaK2
No edit summary
m (257 revisions imported)
 
(18 intermediate revisions by 4 users not shown)
Line 1: Line 1:
-- ----------------------------------------------------------------------------
-- This is not an actual module. Do not add code.
-- Imports
-- ----------------------------------------------------------------------------
 
local m_cargo = mw.ext.cargo
local getArgs = require('Module:Arguments').getArgs
local m_util = require('Module:Util')
 
local p = {}
 
-- ----------------------------------------------------------------------------
-- Strings
-- ----------------------------------------------------------------------------
 
local i18n = {
    arg = {
        monster_resistance_table = 'monster_resistances',
        id = 'id',
        fire = 'fire',
        cold = 'cold',
        lightning = 'lightning',
        chaos = 'chaos',
       
    },
}
 
-- ----------------------------------------------------------------------------
-- Page views
-- ----------------------------------------------------------------------------
 
 
 
--
-- Template:Monster Resistance
--
local monster_resistances = {
    id = {
        field = i18n.arg.id,
        type = 'String',
    },
}
 
 
function p.monster_resistance_table (frame)
    local tpl_args = getArgs(frame, {
        parentFirst = true
    })
    frame = m_util.misc.get_frame(frame)
   
    local args = {}
    args._table = i18n.arg.monster_resistance_table
    for k, data in pairs(monster_resistances) do
        args[data.field] = data.type
    end
   
    frame:callParserFunction('#cargo_declare:', args)
   
end
 
 
function p.monster_resistance (frame)
    local tpl_args = getArgs(frame, {
        parentFirst = true
    })
    frame = m_util.misc.get_frame(frame)
end
 
return p

Latest revision as of 01:33, 23 September 2024

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


This page is not an actual Scribunto module. It exists to provide editors a place to create experimental modules.

Naming your modules

To keep things tidy, please use the following format to name your experimental modules:

Module:Sandbox/Your username/Module name

Cleaning up unused modules

Experimental modules may be deleted by admins upon request or after a long period of inactivity.

List of modules in this area

For a list of the experimental modules under Module:Sandbox, see Special:PrefixIndex/Module:Sandbox/.

-- This is not an actual module. Do not add code.