Module:BATTD costs: Difference between revisions

mNo edit summary
mNo edit summary
Line 2: Line 2:


-- helper functions
-- helper functions


local function GetTotalCosts(baseCost, initialPurchasedUpgrades, accessibleUpgrades, nextUpgrades,
local function GetTotalCosts(baseCost, initialPurchasedUpgrades, accessibleUpgrades, nextUpgrades,
Line 63: Line 61:
-- lock this upgrade combination so we never retread this ground again
-- lock this upgrade combination so we never retread this ground again
--upgradeLocksById[purchasedUpgradeId][availableUpgradeId] = true
if not initialPurchasedUpgrades[purchasedUpgradeId] then
--upgradeLocksById[availableUpgradeId][purchasedUpgradeId] = true
upgradeLocksById[purchasedUpgradeId][availableUpgradeId] = true
upgradeLocksById[availableUpgradeId][purchasedUpgradeId] = true
end
end
end