Template:Sandbox: Difference between revisions

MDFW - The Mystery Dungeon Tree of Information.
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
--------------------------------------------------------------------------------
<onlyinclude>{{#if:{{{2|}}}|[[Shiren 1 DS:{{{1}}}|{{#if:{{{color|}}}|<span style="color:{{{color}}}">}}{{{2}}}{{#if:{{{color|}}}|</span>}}]]|[[Shiren 1 DS:{{{1}}}|{{#if:{{{color|}}}|<span style="color:{{{color}}}">}}{{{1}}}{{#if:{{{color|}}}|</span>}}]]}}</onlyinclude><noinclude>
--
{{doc}}
-- Module:Rescue Team DX Pokémon Locations table
[[Category:Shiren 1 DS Templates]]
--
[[Category:Link Templates]]
--------------------------------------------------------------------------------
</noinclude>
 
local p = {}
local mw = require('mw')
 
function p.main(frame)
local args = frame.args
local output = {}
-- Header row
table.insert(output, '<table class="templateTheme" style="text-align: center; width: 50%; margin: auto;">')
table.insert(output, '<tr>')
table.insert(output, '<th colspan="1" class="templatePrimary" style="width: 15%;">Location</th>')
table.insert(output, '<th colspan="1" class="templatePrimary" style="width: 15%;">Floors</th>')
table.insert(output, '<th colspan="1" class="templatePrimary" style="width: 15%;">' .. frame:expandTemplate{title = "RescueTeamDX", args = {"Levels"}} .. '</th>')
table.insert(output, '<th colspan="1" class="templatePrimary" style="width: 15%;">Method</th>')
table.insert(output, '<th colspan="1" class="templatePrimary" style="width: 15%;">Spawn Rate</th>')
table.insert(output, '</tr>')
-- Data rows
for i = 1, 100 do
local locationArg = args["location_" .. i]
local floorsArg = args["floors_" .. i]
local levelsArg = args["levels_" .. i]
local methodArg = args["method_" .. i]
local spawnArg = args["spawnrate_" .. i]
if not locationArg and not floorsArg and not levelsArg and not methodArg and not spawnArg then
break -- exit loop when no more rows are found
end
local rowData = {}
table.insert(rowData, '<tr class="itemsTableRow">')
if locationArg then
table.insert(rowData, '<td class="templateSecondary">' .. frame:expandTemplate{title = "RescueTeamDX", args = {locationArg}} .. '</td>')
else
table.insert(rowData, '<td class="templateSecondary">' .. frame:expandTemplate{title = "Research"} .. '</td>')
table.insert(rowData, '<td class="templateSecondary">' .. frame:expandTemplate{title = "Research"} .. '</td>')
table.insert(rowData, '<td class="templatePrimary">' .. frame:expandTemplate{title = "Research"} .. '</td>')
end
table.insert(rowData, '<td class="templateSecondary">' .. (levelArg or frame:expandTemplate{title = "Research"}) .. '</td>')
end
table.insert(rowData, '</tr>')
table.insert(output, table.concat(rowData))
end
table.insert(output, '</table>')
return table.concat(output)
end
 
return p

Revision as of 05:13, 10 November 2023

[[Shiren 1 DS:{{{1}}}|{{{1}}}]]

Template-info.png Documentation

Console Logo is used to denote which console or platform a videogame was released for to aid users in finding the appropriate link to a videogame article that's relevant to them. {{Sandbox|SFC}} results in SFC, while {{Sandbox|SFC|small}} results in a smaller version small of the logo for the Super Famicom.

Google Android
Android {{Sandbox|Android}}
small {{Sandbox|Android|small}}
Apple iOS / Apple iPadOS
iOS {{Sandbox|iOS}}
small {{Sandbox|iOS|small}}
Microsoft Windows
Win {{Sandbox|Win}}
small {{Sandbox|Win|small}}
Nintendo DS
DS {{Sandbox|DS}}
small {{Sandbox|DS|small}}
Nintendo 64
N64 {{Sandbox|N64}}
small {{Sandbox|N64|small}}
Nintendo 3DS
3DS {{Sandbox|3DS}}
small {{Sandbox|3DS|small}}
Nintendo Game Boy Advance
GBA {{Sandbox|GBA}}
small {{Sandbox|GBA|small}}
Nintendo Game Boy Color
GBC {{Sandbox|GBC}}
small {{Sandbox|GBC|small}}
Nintendo Game Boy
GB {{Sandbox|GB}}
small {{Sandbox|GB|small}}
Nintendo Switch
Switch {{Sandbox|Switch}}
small {{Sandbox|Switch|small}}
Nintendo Switch 2
Switch 2 {{Sandbox|Switch 2}}
small {{Sandbox|Switch 2|small}}
Nintendo Wii U
WiiU {{Sandbox|WiiU}}
small {{Sandbox|WiiU|small}}
Nintendo Wii U Virtual Console
WiiUVC {{Sandbox|WiiUVC}}
small {{Sandbox|WiiUVC|small}}
Nintendo Wii
Wii {{Sandbox|Wii}}
small {{Sandbox|Wii|small}}
Wii Virtual Console
WiiVC {{Sandbox|WiiVC}}
small {{Sandbox|WiiVC|small}}
Satellaview
Satellaview {{Sandbox|Satellaview}}
small {{Sandbox|Satellaview|small}}
SEGA Dreamcast
DC {{Sandbox|DC}}
small {{Sandbox|DC|small}}
Sony PlayStation
PS1 {{Sandbox|PS1}}
small {{Sandbox|PS1|small}}
Sony PlayStation 2
PS2 {{Sandbox|PS2}}
small {{Sandbox|PS2|small}}
Sony PlayStation 4
PS4 {{Sandbox|PS4}}
small {{Sandbox|PS4|small}}
Sony PlayStation Portable
PSP {{Sandbox|PSP}}
small {{Sandbox|PSP|small}}
Sony PlayStation Vita
Vita {{Sandbox|Vita}}
small {{Sandbox|Vita|small}}
Steam
Steam {{Sandbox|Steam}}
small {{Sandbox|Steam|small}}
Super Famicom
SFC {{Sandbox|SFC}}
small {{Sandbox|SFC|small}}
Namco WonderSwan
WS {{Sandbox|WS}}
small {{Sandbox|WS|small}}