Module:SkillInfoCard: Difference between revisions
From Eco - English Wiki
| [checked revision] | [checked revision] |
No edit summary |
No edit summary |
||
| Line 13: | Line 13: | ||
local WikiText ='' | local WikiText ='' | ||
if (Skill.IsRoot == | if (Skill.IsRoot == 'True') then WikiText = WikiText .. SkillName .. ' it is [[Skills|Profession]].<br>' else WikiText = WikiText .. SkillName .. ' it is [[Skills|Specialty]].<br>' end | ||
return WikiText | return WikiText | ||
Revision as of 05:03, 10 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]
local WikiText =''
if (Skill.IsRoot == 'True') then WikiText = WikiText .. SkillName .. ' it is [[Skills|Profession]].<br>' else WikiText = WikiText .. SkillName .. ' it is [[Skills|Specialty]].<br>' end
return WikiText
end
return p