Anonymous

Module:Calculator/ItemEconomy: Difference between revisions

From Melvor Idle
m
wikitext doesn't like booleans
m (Return table to represent data)
m (wikitext doesn't like booleans)
Line 49: Line 49:
return tbl
return tbl
end
local function booleanToYesNo(bool)
    if booleanValue then
        return "Yes"
    else
        return "No"
    end
end
end


Line 65: Line 73:


local function createTable(userAmount, calcAmount, useRoW, ecoType)
local function createTable(userAmount, calcAmount, useRoW, ecoType)
local RoWYN = useRoW and "Yes" or "No"
local tbl = mw.html.create("table")
local tbl = mw.html.create("table")
:addClass("wikitable sticky-header text-align-right align-left-1")
:addClass("wikitable sticky-header text-align-right align-left-1")
Line 77: Line 87:
addTableRow(tbl, "Economy Factor", calculateFactor(userAmount, calcAmount))
addTableRow(tbl, "Economy Factor", calculateFactor(userAmount, calcAmount))
addTableRow(tbl, "[[Ring of Wealth]] benefits", useRoW)
addTableRow(tbl, "[[Ring of Wealth]] benefits", RoWYN)
end
end


1,055

edits