Module:Calculator/ItemEconomy: Difference between revisions

m
Replace Shared module with Number module
m (Smaller is better for RowModifier (inputs))
m (Replace Shared module with Number module)
Line 1: Line 1:
local p = {}
local p = {}


local shared = require('Module:Shared')
local number = require('Module:Number')
local eco = require("Module:ItemEconomy")
local eco = require("Module:ItemEconomy")


Line 71: Line 71:
if ecoType == ECOIN then
if ecoType == ECOIN then
addTableRow(tbl, "Desired Output", shared.formatnum(userAmount))
addTableRow(tbl, "Desired Output", number.formatnum(userAmount))
addTableRow(tbl, "Estimated Input", shared.formatnum(calcAmount))
addTableRow(tbl, "Estimated Input", number.formatnum(calcAmount))
else
else
addTableRow(tbl, "Starting Items", shared.formatnum(userAmount))
addTableRow(tbl, "Starting Items", number.formatnum(userAmount))
addTableRow(tbl, "Estimated Output", shared.formatnum(calcAmount))
addTableRow(tbl, "Estimated Output", number.formatnum(calcAmount))
end
end
Line 93: Line 93:
local economyType = parseEconomy(args.economyType)
local economyType = parseEconomy(args.economyType)
local pChance = shared.toNumberOrDefault(args.preservationChance, 0)
local pChance = number.toNumberOrDefault(args.preservationChance, 0)
local dChance = shared.toNumberOrDefault(args.duplicationChance, 0)
local dChance = number.toNumberOrDefault(args.duplicationChance, 0)
local eChance = shared.toNumberOrDefault(args.extraItemChance, 0)
local eChance = number.toNumberOrDefault(args.extraItemChance, 0)
local result = 0
local result = 0
2,875

edits