572
edits
(Create p.GetTaskReferenceTable (task goal/reward for items/monsters/dungeons)) |
(Handle items with 0 tasks, and also add a Tasks header) |
||
Line 904: | Line 904: | ||
-- Find all tasks that contain the desired ids | -- Find all tasks that contain the desired ids | ||
local tasks = GameData.getEntities(Township.tasks, checkTask) | local tasks = GameData.getEntities(Township.tasks, checkTask) | ||
if #tasks == 0 then | |||
return '' | |||
end | |||
-- Build the table | -- Build the table | ||
local ret = {} | local ret = {} | ||
table.insert(ret, '==Tasks==') | |||
table.insert(ret, '\r\n{| class="wikitable" style="text-align:left"') | table.insert(ret, '\r\n{| class="wikitable" style="text-align:left"') | ||
table.insert(ret, '\r\n!Task') | table.insert(ret, '\r\n!Task') |
edits