Module:Setlist/Songs: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
| No edit summary Tag: Reverted | mNo edit summary Tag: Reverted | ||
| Line 90: | Line 90: | ||
| } | } | ||
| -- Определяем цвета альбомов | |||
| local albumColors = { | local albumColors = { | ||
|      ["Twenty One Pilots"] = "#87B22A", |      ["Twenty One Pilots"] = "#87B22A", | ||
| Line 100: | Line 101: | ||
| } | } | ||
| -- Определяем ссылки для альбомов | |||
| local albumLinks = { | local albumLinks = { | ||
|      ["Twenty One Pilots"] = "Twenty One Pilots (album)", |      ["Twenty One Pilots"] = "Twenty One Pilots (album)", | ||
|      ["Regional  |      ["Regional at Best"] = "Regional at Best", | ||
|      ["Vessel"] = "Vessel (album)", |      ["Vessel"] = "Vessel (album)", | ||
|      ["Blurryface"] = "Blurryface (album)", |      ["Blurryface"] = "Blurryface (album)", | ||
|      ["Trench"] = "Trench (album)", |      ["Trench"] = "Trench (album)", | ||
|      ["Scaled  |      ["Scaled and Icy"] = "Scaled and Icy", | ||
|      ["Johnny Boy"] = "Johnny Boy", |      ["Johnny Boy (EP)"] = "Johnny Boy", | ||
| } | } | ||
| -- Функция для получения таблицы песен в зависимости от даты | |||
| local function getSongsForDate(date) | |||
|     -- Дата выхода Vessel: 8 января 2013 года | |||
|     local vesselReleaseDate = os.time{year=2013, month=1, day=8} | |||
|     local modifiedSongs = {} | |||
|     -- Проходим по всем песням в исходной таблице | |||
|     for song, albums in pairs(songs) do | |||
|         if #albums == 1 then | |||
|             -- Если песня в одном альбоме, оставляем как есть | |||
|             modifiedSongs[song] = albums | |||
|         elseif #albums == 2 and albums[1] == "Regional At Best" and albums[2] == "Vessel" then | |||
|             -- Если песня в обоих альбомах, выбираем альбом в зависимости от даты | |||
|             if date < vesselReleaseDate then | |||
|                 modifiedSongs[song] = {"Regional At Best"} | |||
|             else | |||
|                 modifiedSongs[song] = {"Vessel"} | |||
|             end | |||
|         else | |||
|             -- Для всех остальных случаев (хотя в текущих данных таких нет) | |||
|             modifiedSongs[song] = albums | |||
|         end | |||
|     end | |||
|     return modifiedSongs | |||
| end | |||
| -- Возвращаем модуль с таблицами и функцией | |||
| return { | return { | ||
|      songs = songs, |      songs = songs, | ||
|      albumColors = albumColors, |      albumColors = albumColors, | ||
|      albumLinks = albumLinks, |      albumLinks = albumLinks, | ||
|     getSongsForDate = getSongsForDate | |||
| } | } | ||
Revision as of 04:40, 11 July 2025
Documentation for this module may be created at Module:Setlist/Songs/doc
local songs = {
    ["Implicit Demand For Proof"] = {"Twenty One Pilots"},
    ["Fall Away"] = {"Twenty One Pilots"},
    ["The Pantaloon"] = {"Twenty One Pilots"},
    ["Addict With A Pen"] = {"Twenty One Pilots"},
    ["Friend, Please"] = {"Twenty One Pilots"},
    ["March To The Sea"] = {"Twenty One Pilots"},
    ["Johnny Boy"] = {"Twenty One Pilots"},
    ["Oh Ms Believer"] = {"Twenty One Pilots"},
    ["Air Catcher"] = {"Twenty One Pilots"},
    ["Trapdoor"] = {"Twenty One Pilots"},
    ["A Car, A Torch, A Death"] = {"Twenty One Pilots"},
    ["Taxi Cab"] = {"Twenty One Pilots"},
    ["Before You Start Your Day"] = {"Twenty One Pilots"},
    ["Isle Of Flightless Birds"] = {"Twenty One Pilots"},
    ["Guns For Hands"] = {"Regional At Best", "Vessel"},
    ["Holding On To You"] = {"Regional At Best", "Vessel"},
    ["Ode To Sleep"] = {"Regional At Best", "Vessel"},
    ["Slowtown"] = {"Regional At Best"},
    ["Car Radio"] = {"Regional At Best", "Vessel"},
    ["Forest"] = {"Regional At Best"},
    ["Glowing Eyes"] = {"Regional At Best"},
    ["Kitchen Sink"] = {"Regional At Best"},
    ["Anathema"] = {"Regional At Best"},
    ["Lovely"] = {"Regional At Best"},
    ["Ruby"] = {"Regional At Best"},
    ["Trees"] = {"Regional At Best", "Vessel"},
    ["Be Concerned"] = {"Regional At Best"},
    ["Clear"] = {"Regional At Best"},
    ["Migraine"] = {"Vessel"},
    ["House Of Gold"] = {"Vessel"},
    ["Semi-Automatic"] = {"Vessel"},
    ["Screen"] = {"Vessel"},
    ["The Run And Go"] = {"Vessel"},
    ["Fake You Out"] = {"Vessel"},
    ["Truce"] = {"Vessel"},
    ["Heavydirtysoul"] = {"Blurryface"},
    ["Stressed Out"] = {"Blurryface"},
    ["Ride"] = {"Blurryface"},
    ["Fairly Local"] = {"Blurryface"},
    ["Tear In My Heart"] = {"Blurryface"},
    ["Lane Boy"] = {"Blurryface"},
    ["The Judge"] = {"Blurryface"},
    ["Doubt"] = {"Blurryface"},
    ["Polarize"] = {"Blurryface"},
    ["We Don't Believe What's On TV"] = {"Blurryface"},
    ["Message Man"] = {"Blurryface"},
    ["Hometown"] = {"Blurryface"},
    ["Not Today"] = {"Blurryface"},
    ["Goner"] = {"Blurryface"},
    ["Jumpsuit"] = {"Trench"},
    ["Levitate"] = {"Trench"},
    ["Morph"] = {"Trench"},
    ["My Blood"] = {"Trench"},
    ["Chlorine"] = {"Trench"},
    ["Smithereens"] = {"Trench"},
    ["Neon Gravestones"] = {"Trench"},
    ["The Hype"] = {"Trench"},
    ["Nico And The Niners"] = {"Trench"},
    ["Cut My Lip"] = {"Trench"},
    ["Bandito"] = {"Trench"},
    ["Pet Cheetah"] = {"Trench"},
    ["Legend"] = {"Trench"},
    ["Leave The City"] = {"Trench"},
    ["Good Day"] = {"Scaled And Icy"},
    ["Choker"] = {"Scaled And Icy"},
    ["Shy Away"] = {"Scaled And Icy"},
    ["The Outside"] = {"Scaled And Icy"},
    ["Saturday"] = {"Scaled And Icy"},
    ["Never Take It"] = {"Scaled And Icy"},
    ["Mulberry Street"] = {"Scaled And Icy"},
    ["Formidable"] = {"Scaled And Icy"},
    ["Bounce Man"] = {"Scaled And Icy"},
    ["No Chances"] = {"Scaled And Icy"},
    ["Redecorate"] = {"Scaled And Icy"},
    ["Overcompensate"] = {"Clancy"},
    ["Next Semester"] = {"Clancy"},
    ["Backslide"] = {"Clancy"},
    ["Midwest Indigo"] = {"Clancy"},
    ["Routines In The Night"] = {"Clancy"},
    ["Vignette"] = {"Clancy"},
    ["The Craving (Jenna's Version)"] = {"Clancy"},
    ["Lavish"] = {"Clancy"},
    ["Navigating"] = {"Clancy"},
    ["Snap Back"] = {"Clancy"},
    ["Oldies Station"] = {"Clancy"},
    ["At The Risk Of Feeling Dumb"] = {"Clancy"},
    ["Paladin Strait"] = {"Clancy"},
    ["Time To Say Goodbye"] = {"Johnny Boy"}
}
-- Определяем цвета альбомов
local albumColors = {
    ["Twenty One Pilots"] = "#87B22A",
    ["Regional At Best"] = "#21ABC6",
    ["Vessel"] = "#d5d8dd",
    ["Blurryface"] = "#dc4747",
    ["Trench"] = "#ffcc4d",
    ["Scaled And Icy"] = "#b3e7fa",
    ["Johnny Boy"] = "#CECECE",
}
-- Определяем ссылки для альбомов
local albumLinks = {
    ["Twenty One Pilots"] = "Twenty One Pilots (album)",
    ["Regional at Best"] = "Regional at Best",
    ["Vessel"] = "Vessel (album)",
    ["Blurryface"] = "Blurryface (album)",
    ["Trench"] = "Trench (album)",
    ["Scaled and Icy"] = "Scaled and Icy",
    ["Johnny Boy (EP)"] = "Johnny Boy",
}
-- Функция для получения таблицы песен в зависимости от даты
local function getSongsForDate(date)
    -- Дата выхода Vessel: 8 января 2013 года
    local vesselReleaseDate = os.time{year=2013, month=1, day=8}
    local modifiedSongs = {}
    -- Проходим по всем песням в исходной таблице
    for song, albums in pairs(songs) do
        if #albums == 1 then
            -- Если песня в одном альбоме, оставляем как есть
            modifiedSongs[song] = albums
        elseif #albums == 2 and albums[1] == "Regional At Best" and albums[2] == "Vessel" then
            -- Если песня в обоих альбомах, выбираем альбом в зависимости от даты
            if date < vesselReleaseDate then
                modifiedSongs[song] = {"Regional At Best"}
            else
                modifiedSongs[song] = {"Vessel"}
            end
        else
            -- Для всех остальных случаев (хотя в текущих данных таких нет)
            modifiedSongs[song] = albums
        end
    end
    return modifiedSongs
end
-- Возвращаем модуль с таблицами и функцией
return {
    songs = songs,
    albumColors = albumColors,
    albumLinks = albumLinks,
    getSongsForDate = getSongsForDate
}