Module:Sandbox/Samlovesmath: Difference between revisions

Jump to navigation Jump to search
Samlovesmath (talk | contribs)
mNo edit summary
Samlovesmath (talk | contribs)
m im so stupid apparently #invoke puts all the variables into one "frame" table variable and not separately
Line 251: Line 251:
end
end
function p.get_theme_value(heroName, themeVar)
function p.get_theme_value(frame)
local heroName = frame.args[1]
local themeVar = frame.args[2]
if infoboxVars[heroName] ~= nil and infoboxVars[heroName][themeVar] ~= nil then
if infoboxVars[heroName] ~= nil and infoboxVars[heroName][themeVar] ~= nil then
return infoboxVars[heroName][themeVar]
return infoboxVars[heroName][themeVar]
Line 257: Line 259:
return infoboxVars["default"][themeVar]
return infoboxVars["default"][themeVar]
end
end
return nil
end
end


return p
return p