Template:Sandbox: Difference between revisions

MDFW - The Mystery Dungeon Tree of Information.
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(48 intermediate revisions by 2 users not shown)
Line 1: Line 1:
--------------------------------------------------------------------------------
<onlyinclude>
--
{{#vardefine:imgSize | {{#ifeq: {{lc:{{{2|}}}}} | small | 16x16 | 32x32 }} }}
-- Module:Rescue Team DX Pokémon Locations table
{{#vardefine:vcImgSize | {{#ifeq: {{lc:{{{2|}}}}} | small | 16x16 | 24x24 }} }}
--
--------------------------------------------------------------------------------


local p = {}
{{#switch: {{lc:{{{1|}}}}}
local mw = require('mw')
  | sfc | snes | super nintendo | supernintendo  | super famicom | superfamicom            = [[File:Super Famicom Logo small.svg|alt=Super Famicom|{{#var:imgSize}}px|link=Category:Super Famicom Games|Super Famicom]]
 
  | n64 | nintendo 64 | nintendo64                                                        = [[File:Nintendo 64 Logo small.svg|alt=Nintendo 64|{{#var:imgSize}}px|link=Category:Nintendo 64 Games|Nintendo 64]]
function p.main(frame)
  | wii                                                                                    = [[File:Wii Logo.svg|alt=Wii|{{#var:imgSize}}px|link=Category:Wii Games|Wii]]
local args = frame.args
  | wii vc | wiivc                                                                        = [[File:Wii Logo.svg|alt=Wii|{{#var:imgSize}}px|link=Category:Wii Games|Wii]] [[File:Virtual Console Logo small.png|alt=Virtual Console|{{#var:vcImgSize}}px|link=Category:Virtual Console Games|Virtual Console]]
local output = {}
  | wii u | wiiu                                                                          = [[File:Wii U Logo.svg|alt=Wii U|{{#var:imgSize}}px|link=Category:Wii U Games|Wii U]]
-- Header row
  | wii u vc | wiiu vc | wiiuvc                                                            = [[File:Wii U Logo.svg|alt=Wii U|{{#var:imgSize}}px|link=Category:Wii U Games|Wii U]] [[File:Virtual Console Logo small.png|alt=Virtual Console|{{#var:vcImgSize}}px|link=Category:Virtual Console Games|Virtual Console]]
table.insert(output, '<table class="templateTheme" style="text-align: center; width: 50%; margin: auto;">')
  | switch | switch 1 | switch1 | ns | ns1 | nsw | nsw1 | nintendo switch | nintendoswitch = [[File:Nintendo Switch Logo small.svg|alt=Nintendo Switch|{{#var:imgSize}}px|link=Category:Nintendo Switch Games|Nintendo Switch]]
table.insert(output, '<tr>')
  | switch 2 | switch2 | ns2 | nsw2 | nintendo switch 2 | nintendoswitch2                  = [[File:Nintendo Switch 2 Logo small.svg|alt=Nintendo Switch 2|{{#var:imgSize}}px|link=Category:Nintendo Switch 2 Games|Nintendo Switch 2]]
table.insert(output, '<th colspan="1" class="templatePrimary" style="width: 15%;">Location</th>')
  | gb | gameboy                                                                          = [[File:Game Boy Logo small.png|alt=Game Boy|{{#var:imgSize}}px|link=Category:Game Boy Games|Game Boy]]
table.insert(output, '<th colspan="1" class="templatePrimary" style="width: 15%;">Floors</th>')
  | gbc | gameboy color | gameboycolor                                                    = [[File:Game Boy Color Logo small.png|alt=Game Boy Color|{{#var:imgSize}}px|link=Category:Game Boy Color Games|Game Boy Color]]
table.insert(output, '<th colspan="1" class="templatePrimary" style="width: 15%;">' .. frame:expandTemplate{title = "RescueTeamDX", args = {"Levels"}} .. '</th>')
  | gba | gameboy advance | gameboyadvance                                                = [[File:Game Boy Advance Logo small.png|alt=Game Boy Advance|{{#var:imgSize}}px|link=Category:Game Boy Advance Games|Game Boy Advance]]
table.insert(output, '<th colspan="1" class="templatePrimary" style="width: 15%;">Method</th>')
  | ds | nds | nintendo ds | nintendods                                                    = [[File:Nintendo DS Logo small.svg|alt=Nintendo DS|{{#var:imgSize}}px|link=Category:Nintendo DS Games|Nintendo DS]]
table.insert(output, '<th colspan="1" class="templatePrimary" style="width: 15%;">Spawn Rate</th>')
  | 3ds | n3ds | nintendo 3ds | nintendo3ds                                                = [[File:Nintendo 3DS Logo small.svg|alt=Nintendo 3DS|{{#var:imgSize}}px|link=Category:Nintendo 3DS Games|Nintendo 3DS]]
table.insert(output, '</tr>')
  | ps1 | psx | ps | playstation                                                          = [[File:PlayStation Logo small.svg|alt=PlayStation|{{#var:imgSize}}px|link=Category:PlayStation Games|PlayStation]]
-- Data rows
  | ps2 | playstation 2 | playstation2                                                    = [[File:PlayStation 2 Logo small.svg|alt=PlayStation 2|{{#var:imgSize}}px|link=Category:PlayStation 2 Games|PlayStation 2]]
for i = 1, 100 do
  | ps4 | playstation 4 | playstation4                                                    = [[File:PlayStation 4 Logo small.svg|alt=PlayStation 4|{{#var:imgSize}}px|link=Category:PlayStation 4 Games|PlayStation 4]]
local locationArg = args["location_" .. i]
  | psp | playstation portable | playstationportable                                      = [[File:PlayStation Portable Logo small.svg|alt=PlayStation Portable|{{#var:imgSize}}px|link=Category:PlayStation Portable Games|PlayStation Portable]]
local floorsArg = args["floors_" .. i]
  | vita | psv | psvita | playstation vita | playstationvita                              = [[File:PlayStation Vita Logo small.svg|alt=PlayStation Vita|{{#var:imgSize}}px|link=Category:PlayStation Vita Games|PlayStation Vita]]
local levelsArg = args["levels_" .. i]
  | dc | dreamcast                                                                        = [[File:Dreamcast Logo small.svg|alt=DreamCast|{{#var:imgSize}}px|link=Category:Dreamcast Games|DreamCast]]
local methodArg = args["method_" .. i]
  | ws | wonderswam                                                                        = [[File:WonderSwan Logo small.png|alt=WonderSwan|{{#var:imgSize}}px|link=Category:WonderSwan Games|WonderSwan]]
local spawnArg = args["spawnrate_" .. i]
  | win | windows | microsoft                                                              = [[File:Windows Logo small.svg|alt=Windows|{{#var:imgSize}}px|link=Category:Windows Games|Microsoft Windows]]
if not locationArg and not floorsArg and not levelsArg and not methodArg and not spawnArg then
  | ios | ipados | apple                                                                  = [[File:iOS Logo small.svg|alt=iOS|{{#ifeq: {{lc:{{{2|}}}}} | small | 12 | 28 }}px|link=Category:Smartphone Games|iOS]]
break -- exit loop when no more rows are found
  | android | droid                                                                        = [[File:Android Logo small.svg|alt=Android|{{#var:imgSize}}px|link=Category:Smartphone Games|Android]]
end
  | steam | pc                                                                            = [[File:Steam Logo small.svg|alt=Steam|{{#var:imgSize}}px|link=Category:Steam Games|Steam]]
local rowData = {}
}}
table.insert(rowData, '<tr class="itemsTableRow">')
</onlyinclude><noinclude>[[Category:Notice Templates]]{{Doc}}</noinclude>
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

Latest revision as of 09:23, 21 June 2025

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

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 {{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Super Famicom , while {{Sandbox|SFC|small}} results in a smaller version {{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Super Famicom

of the logo for the Super Famicom.
Google Android

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Android

{{Sandbox|Android}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Android

{{Sandbox|Android|small}}
Apple iOS / Apple iPadOS

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

iOS

{{Sandbox|iOS}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

iOS

{{Sandbox|iOS|small}}
Microsoft Windows

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Windows

{{Sandbox|Win}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Windows

{{Sandbox|Win|small}}
Nintendo DS

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Nintendo DS

{{Sandbox|DS}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Nintendo DS

{{Sandbox|DS|small}}
Nintendo 64

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Nintendo 64

{{Sandbox|N64}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Nintendo 64

{{Sandbox|N64|small}}
Nintendo 3DS

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Nintendo 3DS

{{Sandbox|3DS}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Nintendo 3DS

{{Sandbox|3DS|small}}
Nintendo Game Boy Advance

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Game Boy Advance

{{Sandbox|GBA}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Game Boy Advance

{{Sandbox|GBA|small}}
Nintendo Game Boy Color

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Game Boy Color

{{Sandbox|GBC}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Game Boy Color

{{Sandbox|GBC|small}}
Nintendo Game Boy

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Game Boy

{{Sandbox|GB}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Game Boy

{{Sandbox|GB|small}}
Nintendo Switch

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Nintendo Switch

{{Sandbox|Switch}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Nintendo Switch

{{Sandbox|Switch|small}}
Nintendo Switch 2

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Nintendo Switch 2

{{Sandbox|Switch 2}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Nintendo Switch 2

{{Sandbox|Switch 2|small}}
Nintendo Wii U

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Wii U

{{Sandbox|WiiU}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Wii U

{{Sandbox|WiiU|small}}
Nintendo Wii U Virtual Console

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Wii U Virtual Console

{{Sandbox|WiiUVC}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Wii U Virtual Console

{{Sandbox|WiiUVC|small}}
Nintendo Wii

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Wii

{{Sandbox|Wii}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Wii

{{Sandbox|Wii|small}}
Wii Virtual Console

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Wii Virtual Console

{{Sandbox|WiiVC}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Wii Virtual Console

{{Sandbox|WiiVC|small}}
Satellaview

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}


{{Sandbox|Satellaview}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}


{{Sandbox|Satellaview|small}}
SEGA Dreamcast

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

DreamCast

{{Sandbox|DC}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

DreamCast

{{Sandbox|DC|small}}
Sony PlayStation

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

PlayStation

{{Sandbox|PS1}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

PlayStation

{{Sandbox|PS1|small}}
Sony PlayStation 2

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

PlayStation 2

{{Sandbox|PS2}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

PlayStation 2

{{Sandbox|PS2|small}}
Sony PlayStation 4

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

PlayStation 4

{{Sandbox|PS4}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

PlayStation 4

{{Sandbox|PS4|small}}
Sony PlayStation Portable

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

PlayStation Portable

{{Sandbox|PSP}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

PlayStation Portable

{{Sandbox|PSP|small}}
Sony PlayStation Vita

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

PlayStation Vita

{{Sandbox|Vita}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

PlayStation Vita

{{Sandbox|Vita|small}}
Steam

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Steam

{{Sandbox|Steam}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Steam

{{Sandbox|Steam|small}}
Super Famicom

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

Super Famicom

{{Sandbox|SFC}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

Super Famicom

{{Sandbox|SFC|small}}
Namco WonderSwan

{{#vardefine:imgSize | 32x32 }} {{#vardefine:vcImgSize | 24x24 }}

WonderSwan

{{Sandbox|WS}}

{{#vardefine:imgSize | 16x16 }} {{#vardefine:vcImgSize | 16x16 }}

WonderSwan

{{Sandbox|WS|small}}