Anonymous

Module:Sandbox/GauTest/Township: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 794: Line 794:
table.insert(ret, '<li>'..Shared.formatnum(building.quantity)..' '..Icons.Icon({buildingname, type='building'})..'</li>')
table.insert(ret, '<li>'..Shared.formatnum(building.quantity)..' '..Icons.Icon({buildingname, type='building'})..'</li>')
end
end
-- We don't check tasks.requirements (so far it's only used to enumerate the Tutorial tasks so you only see 1 at a time)
table.insert(ret, '</ul>')
table.insert(ret, '</ul>')
-- Rewards
-- Rewards
Line 810: Line 811:
table.insert(ret, '<li>'..Shared.formatnum(skill.quantity)..' '..Icons.Icon({skillname, type='skill'})..'XP </li>')
table.insert(ret, '<li>'..Shared.formatnum(skill.quantity)..' '..Icons.Icon({skillname, type='skill'})..'XP </li>')
end
end
for _, townshipResource in ipairs(task.goals.townshipResources) do
for _, townshipResource in ipairs(task.rewards.townshipResources) do
local resourcename = p._GetResourceByID(townshipResource.id).name
local resourcename = p._GetResourceByID(townshipResource.id).name
table.insert(ret, '<li>'..Shared.formatnum(building.quantity)..' '..Icons.Icon({resourcename, type='resource'})..'</li>')
table.insert(ret, '<li>'..Shared.formatnum(townshipResource.quantity)..' '..Icons.Icon({resourcename, type='resource'})..'</li>')
end
end
table.insert(ret, '</ul>')
table.insert(ret, '</ul>')
-- Debug
if task.requirements ~= nil then
mw.log(_)
mw.log(task.name)
mw.logObject(task.requirements)
end
end
end
end
end
572

edits