Content deleted Content added
Jackmcbarn (talk | contribs) improve platforms function |
Jackmcbarn (talk | contribs) use the data module in new code |
||
Line 19:
-- 2 arrays with the title and code of each predefined "system type" field to be used.
local system = {{'[[Atari 2600]]','A2600'}, {'[[ColecoVision]]','CV'}, {'[[Nintendo DS|DS]]','DS'}, {'[[Game Boy]]','GB'}, {'[[Game Boy Advance|GBA]]','GBA'}, {'[[Game Boy Color|GBC]]','GBC'}, {'[[List of video game consoles|General]]', 'GEN'}, {'[[iOS]]','iOS'}, {'[[N-Gage (device)|N-Gage]]','N-G'}, {'[[Nintendo 64|N64]]','N64'}, {'[[Nintendo Entertainment System|NES]]','NES'}, {'[[GameCube|GC]]','NGC'}, {'[[Nvidia Shield|Shield]]','NSHI'}, {'[[Personal Computer|PC]]','PC'}, {'[[PlayStation|PS]]','PS'}, {'[[PlayStation 2|PS2]]','PS2'}, {'[[PlayStation 3|PS3]]','PS3'}, {'[[PlayStation 4|PS4]]','PS4'}, {'[[PlayStation Portable|PSP]]','PSP'}, {'[[Dreamcast]]','SDC'}, {'[[Sega Game Gear|SGG]]','SGG'}, {'[[Super Nintendo Entertainment System|SNES]]','SNES'}, {'[[Sega Genesis|Mega Drive]]','SMD'}, {'[[Master System]]','SMS'}, {'[[Sega Saturn|Saturn]]','SSAT'}, {'[[TurboGrafx-16]]','TG16'}, {'[[PlayStation Vita]]','VITA'}, {'[[Xbox]]','XBOX'}, {'[[Xbox 360]]','X360'}, {'[[Xbox One]]','XONE'}, {'[[Wii]]','WII'}}
local data = mw.loadData('Module:Video game reviews/data')
-- Require necessary modules.
Line 60 ⟶ 62:
function getPlatforms(args)
local count = 0
for k,v in ipairs(
if args[tostring(v[2])] ~= nil then
if string.lower(tostring(args[tostring(v[2])])) == 'true' then
|