Editing Module:SoulUnlockGive feedback
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
local util_module = require('Module:Utilities') | local util_module = require('Module:Utilities') | ||
local soul_unlocks_data = mw.loadJsonData("Data:SoulUnlockData.json") | local soul_unlocks_data = mw.loadJsonData("Data:SoulUnlockData.json") | ||
local localization_map = { | local localization_map = { | ||
| Line 77: | Line 76: | ||
ret = ret .. "Index" .. i .. ": " | ret = ret .. "Index" .. i .. ": " | ||
for key, value in pairs(data) do | for key, value in pairs(data) do | ||
ret = ret .. string.format(" %s:%s, ", p.localize(key), value) | |||
end | end | ||
ret = ret .. '<br>' | ret = ret .. '<br>' | ||
| Line 103: | Line 97: | ||
last_index = #accumulated_data | last_index = #accumulated_data | ||
last_value = accumulated_data[last_index][soul_unlock_key] | last_value = accumulated_data[last_index][soul_unlock_key] | ||
return last_value | |||
end | end | ||
| Line 124: | Line 113: | ||
local ret = '' | local ret = '' | ||
-- Add header record, will be soul + each other record twice | -- Add header record, will be soul + each other record twice | ||
| Line 149: | Line 131: | ||
-- Retrieve souls agg_record | -- Retrieve souls agg_record | ||
local required_souls = agg_record['RequiredSouls'] | local required_souls = agg_record['RequiredSouls'] | ||
local souls_str = '{{Souls|' .. required_souls .. '}}' | |||
local souls_str = '{{Souls|' .. | |||
tr = tr .. '<td>' .. souls_str .. '</td>' | tr = tr .. '<td>' .. souls_str .. '</td>' | ||
| Line 180: | Line 161: | ||
end | end | ||
ret = '<table class="wikitable | ret = '<table class="wikitable">' .. ret .. '</table>' | ||
if debug_mode then | if debug_mode then | ||