Module:SkillInfoCard: Difference between revisions
From Eco - English Wiki
| [checked revision] | [checked revision] |
No edit summary |
No edit summary |
||
| Line 8: | Line 8: | ||
function p.main(frame) | function p.main(frame) | ||
local PageName = frame.args[1] | local PageName = frame.args[1] | ||
if (Lang == 'English') then SkillName = PageName else SkillName = | if (Lang == 'English') then SkillName = PageName else SkillName = Utils.SkillSearch(PageName) end | ||
local SkillData = require( "Module:SkillData" ) | |||
local Skill = SkillData.skills[SkillName] | |||
Revision as of 06:57, 7 July 2025
ATTENTION! Data files are generated using game data and are not intended for manual editing.
Warning about use
To prevent multiple call of data array, you must use the function: local SkillInfoCard = mw.loadData("Module:SkillInfoCard")
local p = {}
local Utils = require('Module:Utils')
local IconUtils = require('Module:IconUtils')
local L = require('Module:Localization')
local Lang = Utils.getLanguageName()
function p.main(frame)
local PageName = frame.args[1]
if (Lang == 'English') then SkillName = PageName else SkillName = Utils.SkillSearch(PageName) end
local SkillData = require( "Module:SkillData" )
local Skill = SkillData.skills[SkillName]
return SkillName
end
return p