Module:Sandbox/Aurelain: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
local Unit = require('Module:Unit') | local Unit = require('Module:Unit') | ||
-- | -- Wrapper function that allows us to easily invoke the Module:Unit. | ||
local function get( | local function get(unit, property, lang) | ||
return Unit.get({ | |||
args = { | args = { | ||
[ | ["unit"] = unit, | ||
[" | ["property"] = property, | ||
["lang"] = lang | |||
} | } | ||
} | }) | ||
end | end | ||
function p.hello(frame) | function p.hello(frame) | ||
return | return get('Archangel', 'initiative') | ||
end | end | ||
return p | return p | ||
Revision as of 15:16, 14 May 2026
Documentation for this module may be created at Module:Sandbox/Aurelain/doc
local p = {}
local Unit = require('Module:Unit')
-- Wrapper function that allows us to easily invoke the Module:Unit.
local function get(unit, property, lang)
return Unit.get({
args = {
["unit"] = unit,
["property"] = property,
["lang"] = lang
}
})
end
function p.hello(frame)
return get('Archangel', 'initiative')
end
return p


