Module:BATTD costs: Difference between revisions
No edit summary |
mNo edit summary |
||
| Line 136: | Line 136: | ||
for i, upgrade in ipairs(upgrades) do | for i, upgrade in ipairs(upgrades) do | ||
upgradesById[upgrade.id] = upgrade | upgradesById[upgrade.id] = upgrade | ||
upgradeLocksById[upgrade.id] = {} | upgradeLocksById[upgrade.id] = {} | ||
end | end | ||
| Line 179: | Line 177: | ||
end | end | ||
local function Upgrade(towerName, | local function Upgrade(towerName, upgradeId, Y, N) | ||
local upgradesById, upgradeLocksById, upgradePrereqsById, upgradePrereqsOfById, baseCost = SetUpTables(towerName) | local upgradesById, upgradeLocksById, upgradePrereqsById, upgradePrereqsOfById, baseCost = SetUpTables(towerName) | ||
local purchasedUpgrades = {} -- this upgrade and any other upgrades that had to already be purchased to get it | local purchasedUpgrades = {} -- this upgrade and any other upgrades that had to already be purchased to get it | ||