Module:GameInputs

From JoJo's Bizarre Encyclopedia - JoJo Wiki
Revision as of 07:22, 6 December 2024 by Paisley Park (talk | contribs)
Jump to navigation Jump to search

Documentation for this module may be created at Module:GameInputs/doc

local p = {}

local inputStyles = {
    normal = '<span style="border:1px solid #b566ff; color:#b566ff; font-size:12px; border-radius:5px; padding:1px 5px; font-family:Roboto Slab;">NORMAL</span>',
    stand = '<span style="border:1px solid #91b704; color:#91b704; font-size:12px; border-radius:5px; padding:1px 5px; font-family:Roboto Slab;">STAND</span>',
    chargeable = '<span style="border:1px solid #8d7cff; color:#8d7cff; font-size:12px; border-radius:5px; padding:1px 5px; font-family:Roboto Slab;">CHARGEABLE</span>',
    ["on ground"] = '<span style="border:1px solid #ff9966; color:#ff9966; font-size:12px; border-radius:5px; padding:1px 5px; font-family:Roboto Slab;">ON GROUND</span>',
    ["when downed"] = '<span style="border:1px solid #EA5AE8; color:#EA5AE8; font-size:12px; border-radius:5px; padding:1px 5px; font-family:Roboto Slab;">WHEN DOWNED</span>',
    ["in air ok"] = '<span style="border:1px solid #64bbd5; color:#64bbd5; font-size:12px; border-radius:5px; padding:1px 5px; font-family:Roboto Slab;">IN AIR OK</span>',
    ["ex skill"] = '<span style="border:1px solid #af4748; color:#af4748; font-size:12px; border-radius:5px; padding:1px 5px; font-family:Roboto Slab;">EX SKILL</span>',
    trap = '<span style="border:1px solid #c378ed; color:#c378ed; font-size:12px; border-radius:5px; padding:1px 5px; font-family:Roboto Slab;">TRAP</span>',
    ["switch mode"] = '<span style="border:1px solid #b9691e; color:#b9691e; font-size:12px; border-radius:5px; padding:1px 5px; font-family:Roboto Slab;">SWITCH MODE</span>',
    ptnnormal = '<span style="background-color:#898d96; color:white; font-size:12px; padding:3px 5px; border-radius:5px; font-family:Roboto Slab;">Normal ATK</span>',
    ptnultimate = '<span style="background-color:#a12932; color:white; font-size:12px; padding:3px 5px; border-radius:5px; font-family:Roboto Slab;">Ultimate</span>',
    ptnpassive = '<span style="background-color:#4e699e; color:white; font-size:12px; padding:3px 5px; border-radius:5px; font-family:Roboto Slab;">Passive</span>',
}

function p.renderInputs(frame)
    local args = frame.args
    local output = {}

    for _, value in ipairs(args) do
        if inputStyles[value] then
            table.insert(output, inputStyles[value])
        end
    end

    return '<div style="text-align:right; display:inline-block;">' .. table.concat(output, " ") .. '</div>'
end

return p