Module:EnemyNav: Difference between revisions
From IdleOn MMO Wiki
Kiokurashi (talk | contribs) (Created page with "local p = {} local Lists = require("Module:EnemyNav\data") function p.BuildNav( frame ) local enemyType = frame.args.Type local midEnemy = frame.args.Enemy -- Pagename local navList = {} -- branch data load based on type -- Iterate until self found. -- Using self-index get previous and next enemies, if they exist. -- construct output. return navigation end local p") |
Kiokurashi (talk | contribs) mNo edit summary |
||
Line 17: | Line 17: | ||
return navigation | return navigation | ||
end | end | ||
-- Enemy Nav format | |||
--<div class="EnemyNav"><div class="EnemyNavLeft">{{#if:{{{1|}}}|[[File:ArrowLeft.png|15px|link={{{1}}}]] {{Enemy|{{{1}}}|16}}}}</div><div class="EnemyNavCenter">Enemies</div><div class="EnemyNavRight">{{#if:{{{2|}}}|{{Enemy|{{{2}}}|16}} [[File:ArrowRight.png|15px|link={{{2}}}]]}}</div></div> | |||
-- Enemy icon and name format | |||
-- [[File:{{{1}}}_icon.png|{{#if:{{{2|}}}|{{{2}}}px{{!}}}}link={{{1}}}]] [[{{{1}}}]] | |||
local p | local p |
Revision as of 06:20, 3 April 2024
Documentation for this module may be created at Module:EnemyNav/doc
local p = {}
local Lists = require("Module:EnemyNav\data")
function p.BuildNav( frame )
local enemyType = frame.args.Type
local midEnemy = frame.args.Enemy -- Pagename
local navList = {}
-- branch data load based on type
-- Iterate until self found.
-- Using self-index get previous and next enemies, if they exist.
-- construct output.
return navigation
end
-- Enemy Nav format
--<div class="EnemyNav"><div class="EnemyNavLeft">{{#if:{{{1|}}}|[[File:ArrowLeft.png|15px|link={{{1}}}]] {{Enemy|{{{1}}}|16}}}}</div><div class="EnemyNavCenter">Enemies</div><div class="EnemyNavRight">{{#if:{{{2|}}}|{{Enemy|{{{2}}}|16}} [[File:ArrowRight.png|15px|link={{{2}}}]]}}</div></div>
-- Enemy icon and name format
-- [[File:{{{1}}}_icon.png|{{#if:{{{2|}}}|{{{2}}}px{{!}}}}link={{{1}}}]] [[{{{1}}}]]
local p