8,756
edits
mNo edit summary |
mNo edit summary |
||
Line 28: | Line 28: | ||
limit= '1' | limit= '1' | ||
} | } | ||
-- Try to find a mutation with this name, if not, just return the name unlinked. | |||
result = util_cargo.queryAndCast(query)[1] | |||
local parentheses = "" | |||
if not next(result) then | |||
else | |||
local cost, type = tonumber(util_cargo.queryAndCast(result["Cost"])), result[1]["Type"] | |||
local isDefect = false | local isDefect = false | ||
local isMental = false | local isMental = false | ||
Line 36: | Line 42: | ||
end | end | ||
local modifier = math.floor((ego-16)/2) | local modifier = math.floor((ego-16)/2) | ||
if isDefect then | if isDefect then | ||
parentheses ='<b><span style="color:#b1c9c3;"> (</span><span style="color:#a64a2e;">D</span><span style="color:#b1c9c3;">)</b>' | parentheses ='<b><span style="color:#b1c9c3;"> (</span><span style="color:#a64a2e;">D</span><span style="color:#b1c9c3;">)</b>' | ||
Line 54: | Line 59: | ||
parentheses = parentheses .. ")</span></b>" | parentheses = parentheses .. ")</span></b>" | ||
end | end | ||
end | |||
-- formatting | |||
local mutationString = mw.html.create('div') | local mutationString = mw.html.create('div') | ||
mutationString | mutationString |