Something went wrong. Try again.
A PopTracker pack, compatible with Mega Man Legends - Archipelago.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081function has(item) return Tracker:ProviderCountForCode(item) == 1end
function has(item, amount) local count = Tracker:ProviderCountForCode(item) amount = tonumber(amount) if not amount then return count > 0 else return count >= amount endend
function checkRequirements(reference, check_count) local reqCount = Tracker:ProviderCountForCode(reference) local count = Tracker:ProviderCountForCode(check_count)
if count >= reqCount then return true else return false endend
function toggle_item(code) local active = Tracker:FindObjectForCode(code).Active code = code.."_hosted" local object = Tracker:FindObjectForCode(code) if object then object.Active = active else if ENABLE_DEBUG_LOG then print(string.format("toggle_item: could not find object for code %s", code)) end endend
function tableContains(table, element) for _, value in pairs(table) do if value == element then return true end end return falseend
function dump_table(o, depth) if depth == nil then depth = 0 end if type(o) == 'table' then local tabs = ('\t'):rep(depth) local tabs2 = ('\t'):rep(depth + 1) local s = '{\n' for k, v in pairs(o) do if type(k) ~= 'number' then k = '"' .. k .. '"' end s = s .. tabs2 .. '[' .. k .. '] = ' .. dump_table(v, depth + 1) .. ',\n' end return s .. tabs .. '}' else return tostring(o) endend
function toggle_hosted_item(code) local active = Tracker:FindObjectForCode(code).Active code = code:gsub("_hosted", "") local object = Tracker:FindObjectForCode(code) if object then object.Active = active else if ENABLE_DEBUG_LOG then print(string.format("toggle_hosted_item: could not find object for code %s", code)) end endend