Content added Content deleted
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
local constants = {} |
local constants = {} |
||
constants. |
constants.UNIT_ABBR_TO_UNIT = { |
||
-- VIRTUAL SINGER |
-- VIRTUAL SINGER |
||
['virtual singer'] = 'VIRTUAL SINGER', |
['virtual singer'] = 'VIRTUAL SINGER', |
||
Line 34: | Line 34: | ||
} |
} |
||
local |
local UNIT_IMAGES = { |
||
['VIRTUAL SINGER'] = 'Virtualsingerlogo.png', |
['VIRTUAL SINGER'] = 'Virtualsingerlogo.png', |
||
['Leo/need'] = 'Leoneedlogo.png', |
['Leo/need'] = 'Leoneedlogo.png', |
||
Line 43: | Line 43: | ||
} |
} |
||
local |
local UNIT_COLORS = { |
||
['VIRTUAL SINGER'] = { ['background-color'] = '#00CDBA', color = '#FFFFFF' }, |
['VIRTUAL SINGER'] = { ['background-color'] = '#00CDBA', color = '#FFFFFF' }, |
||
['Leo/need'] = { ['background-color'] = '#4455DD', color = '#FFFFFF' }, |
['Leo/need'] = { ['background-color'] = '#4455DD', color = '#FFFFFF' }, |
||
Line 55: | Line 55: | ||
function constants.get_unit_image(unit_name) |
function constants.get_unit_image(unit_name) |
||
if unit_name and unit_name ~= '' then |
if unit_name and unit_name ~= '' then |
||
local unit = constants. |
local unit = constants.UNIT_ABBR_TO_UNIT[string.lower(unit_name)] |
||
if unit then |
if unit then |
||
return |
return UNIT_IMAGES[unit] |
||
end |
end |
||
end |
end |
||
Line 66: | Line 66: | ||
function constants.get_unit_colors(unit_name) |
function constants.get_unit_colors(unit_name) |
||
if unit_name and unit_name ~= '' then |
if unit_name and unit_name ~= '' then |
||
local unit = constants. |
local unit = constants.UNIT_ABBR_TO_UNIT[string.lower(unit_name)] |
||
if unit then |
if unit then |
||
return |
return UNIT_COLORS[unit] |
||
end |
end |
||
end |
end |
||
Line 75: | Line 75: | ||
end |
end |
||
constants. |
constants.ATTRIBUTE_COLORS = { |
||
cute = { ['background-color'] = '#ff70a8', color = '#ffffff' }, |
cute = { ['background-color'] = '#ff70a8', color = '#ffffff' }, |
||
cool = { ['background-color'] = '#435cff', color = '#ffffff'}, |
cool = { ['background-color'] = '#435cff', color = '#ffffff'}, |
Revision as of 06:57, 4 July 2021
Documentation for this module may be created at Module:Constants/doc
local constants = {}
constants.UNIT_ABBR_TO_UNIT = {
-- VIRTUAL SINGER
['virtual singer'] = 'VIRTUAL SINGER',
['vs'] = 'VIRTUAL SINGER',
-- Leo/need
['leo/need'] = 'Leo/need',
['ln'] = 'Leo/need',
['l/n'] = 'Leo/need',
-- MORE MORE JUMP!
['more more jump!'] = 'MORE MORE JUMP!',
['mmj'] = 'MORE MORE JUMP!',
['mmj!'] = 'MORE MORE JUMP!',
-- Vivid BAD SQUAD
['vivid bad squad'] = 'Vivid BAD SQUAD',
['vbs'] = 'Vivid BAD SQUAD',
-- Wonderlands×Showtime
['wonderlands×showtime'] = 'Wonderlands×Showtime',
['wxs'] = 'Wonderlands×Showtime',
-- 25-ji, Night Code de.
['25-ji, night code de.'] = '25-ji, Night Code de.',
['25ji'] = '25-ji, Night Code de.',
['25-ji'] = '25-ji, Night Code de.',
['niigo'] = '25-ji, Night Code de.',
-- Other
['other'] = 'Other'
}
local UNIT_IMAGES = {
['VIRTUAL SINGER'] = 'Virtualsingerlogo.png',
['Leo/need'] = 'Leoneedlogo.png',
['MORE MORE JUMP!'] = 'MMJ logo.png',
['Vivid BAD SQUAD'] = 'Vivid logo.png',
['Wonderlands×Showtime'] = 'Wonderlandsxswowtimelogo.png',
['25-ji, Night Code de.'] = '25ji-logo.png'
}
local UNIT_COLORS = {
['VIRTUAL SINGER'] = { ['background-color'] = '#00CDBA', color = '#FFFFFF' },
['Leo/need'] = { ['background-color'] = '#4455DD', color = '#FFFFFF' },
['MORE MORE JUMP!'] = { ['background-color'] = '#6CCB20', color = '#FFFFFF' },
['Vivid BAD SQUAD'] = { ['background-color'] = '#EE1166', color = '#FFFFFF' },
['Wonderlands×Showtime'] = { ['background-color'] = '#FF9900', color = '#FFFFFF' },
['25-ji, Night Code de.'] = { ['background-color'] = '#884499', color = '#FFFFFF' },
['Other'] = { ['background-color'] = '#3F939D', color = '#FFFFFF' }
}
function constants.get_unit_image(unit_name)
if unit_name and unit_name ~= '' then
local unit = constants.UNIT_ABBR_TO_UNIT[string.lower(unit_name)]
if unit then
return UNIT_IMAGES[unit]
end
end
return nil
end
function constants.get_unit_colors(unit_name)
if unit_name and unit_name ~= '' then
local unit = constants.UNIT_ABBR_TO_UNIT[string.lower(unit_name)]
if unit then
return UNIT_COLORS[unit]
end
end
return nil
end
constants.ATTRIBUTE_COLORS = {
cute = { ['background-color'] = '#ff70a8', color = '#ffffff' },
cool = { ['background-color'] = '#435cff', color = '#ffffff'},
pure = { ['background-color'] = '#00bf51', color = '#ffffff'},
happy = { ['background-color'] = '#ff9821', color = '#ffffff'},
mysterious = { ['background-color'] = '#8651bc', color = '#ffffff' }
}
return constants