Anonymous

Module:Township: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 605: Line 605:
-- Gets the cost of the current price of land
-- Gets the cost of the current price of land
-- Taken from township.js -> Township.getNextSectionCost
-- Taken from township.js -> Township.getNextSectionCost
function p._GetLandCost(frame)
function p.GetLandCost(frame)
local nthland = tonumber(frame.args ~= nil and frame.args[1] or frame)
local nthland = tonumber(frame.args ~= nil and frame.args[1] or frame)
return p._GetLandCost(nthland)
return p._GetLandCost(nthland)
Line 628: Line 628:
local cost = 0
local cost = 0
while totalLand > FREE_LAND do
while totalLand > FREE_LAND do
cost = cost + p.GetLandCost(totalLand)
cost = cost + p._GetLandCost(totalLand)
totalLand = totalLand - 1
totalLand = totalLand - 1
end
end
572

edits