Module:BATTD costs: Difference between revisions

mNo edit summary
mNo edit summary
 
Line 25: Line 25:
local upgrades, upgradePrereqs, upgradeLocks =
local upgrades, upgradePrereqs, upgradeLocks =
query("battd_upgrades", "_pageName, id, name, tower, cost", {
query("battd_upgrades", "_pageName, id, name, tower, cost", {
where=sFormat("tower='%s'", towerName)
where=sFormat("tower='%s'", towerName),
orderBy="cost"
}),
}),
query("battd_upgrades=main, battd_upgrades__previous=prev", "main.id=thisId, prev._value=prevId", {
query("battd_upgrades=main, battd_upgrades__previous=prev", "main.id=thisId, prev._value=prevId", {
Line 137: Line 138:
-- lock this combination so it isn't repeated on the graph again
-- lock this combination so it isn't repeated on the graph again
--if not upgradeLocksById[thisUpgradeId] then upgradeLocksById[thisUpgradeId] = {} end
if not upgradeLocksById[thisUpgradeId] then upgradeLocksById[thisUpgradeId] = {} end
--upgradeLocksById[thisUpgradeId][nextUpgradeId] = true
upgradeLocksById[thisUpgradeId][nextUpgradeId] = true
--if not upgradeLocksById[nextUpgradeId] then upgradeLocksById[nextUpgradeId] = {} end
if not upgradeLocksById[nextUpgradeId] then upgradeLocksById[nextUpgradeId] = {} end
--upgradeLocksById[nextUpgradeId][thisUpgradeId] = true
upgradeLocksById[nextUpgradeId][thisUpgradeId] = true
end
end
end
end