Anonymous

Module:Calculator/Summoning Interval Efficiency: Difference between revisions

From Melvor Idle
m
Replace deprecated functions with TimeSpan
m (Use outputmultiplier instead, since we are dealing with just one action)
m (Replace deprecated functions with TimeSpan)
Line 1: Line 1:
local number = require('Module:Number')
local number = require('Module:Number')
local economy = require('Module:ItemEconomy')
local economy = require('Module:ItemEconomy')
local TimeSpan = require('Module:TimeSpan')


local p = {}
local p = {}
Line 98: Line 99:
else
else
-- Calculate time saved in seconds for two and three tablet synergy
-- Calculate time saved in seconds for two and three tablet synergy
local twoTab = number.actionTimeToTimeSpan(calcResult.twoTabletTimeSave)
local twoTab = TimeSpan.fromSeconds(calcResult.twoTabletTimeSave)
     local threeTab = number.actionTimeToTimeSpan(calcResult.threeTabletTimeSave)
     local threeTab = TimeSpan.fromSeconds(calcResult.threeTabletTimeSave)
     tableData.effectiveTablets = number.round(calcResult.effectiveTablets, 2)
     tableData.effectiveTablets = number.round(calcResult.effectiveTablets, 2)
tableData.twoTabletTimeSave = number.round(twoTab.totalSeconds, 2)
tableData.twoTabletTimeSave = number.round(twoTab:getTotalSeconds(), 2)
tableData.threeTabletTimeSave = number.round(threeTab.totalSeconds, 2)
tableData.threeTabletTimeSave = number.round(threeTab:getTotalSeconds(), 2)
end
end


2,875

edits