Module:Cite/Data

local ColorData = mw.loadData("Module:Color/Data")

local Franchise = require("Module:Franchise") local utilsString = require("Module:UtilsString") local utilsTable = require("Module:UtilsTable")

local dialogueColors = {} local colorKeys = utilsTable.keys(ColorData.colors) for i, game in ipairs(Franchise.enum) do local gameColorKeys = utilsTable.filter(colorKeys, utilsString._startsWith(game.." ")) for i, colorKey in ipairs(gameColorKeys) do		local color = ColorData.colors[colorKey] if color.isDefault then dialogueColors[game] = dialogueColors[game] or {} dialogueColors[game].default = colorKey else for i, source in ipairs(color.defaultFor or {}) do				dialogueColors[game] = dialogueColors[game] or {} dialogueColors[game][source] = colorKey end end end end

return { dialogueColors = dialogueColors }