Editing Module:LevelTables

Warning: You are not logged in. Once you make an edit, a temporary account will be created for you. Learn more. Log in or create an account to continue receiving notifications after this account expires, and to access other features.
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 2: Line 2:


local Icon = require('Module:Icon')
local Icon = require('Module:Icon')
local Souls = require('Module:Souls')
local Souls = require('Module:Souls/render')
local SoulsRenderer = Souls.SoulsRenderer.new()  


-- Loads the necessary data from the wiki's JSON pages.
-- Loads the necessary data from the wiki's JSON pages.
Line 101: Line 102:
local required_souls = pi_souls_list[count]
local required_souls = pi_souls_list[count]
local souls_formatted = string.format("%.1fK", (required_souls + 400) / 1000)
local souls_formatted = string.format("%.1fK", (required_souls + 400) / 1000)
local soul_display =  Souls._render(souls_formatted)
local soul_display =  SoulsRenderer:render(souls_formatted)
local full_header = header_text .. "<br /><small>(" .. soul_display .. ")</small>"
local full_header = header_text .. "<br /><small>(" .. soul_display .. ")</small>"
header_row:tag("th"):wikitext(full_header):done()
header_row:tag("th"):wikitext(full_header):done()
Line 179: Line 180:
local required_souls = pi_souls_list[i]
local required_souls = pi_souls_list[i]
local souls_formatted = string.format("%.1fK", (required_souls + 400) / 1000)
local souls_formatted = string.format("%.1fK", (required_souls + 400) / 1000)
local soul_display = Souls._render(souls_formatted)
local soul_display = SoulsRenderer:render(souls_formatted)
local row_html = string.format("<tr><td>%s</td><td style='text-align:right;'>%.2f</td></tr>", soul_display, total)
local row_html = string.format("<tr><td>%s</td><td style='text-align:right;'>%.2f</td></tr>", soul_display, total)
Please note that all contributions to The Deadlock Wiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see Deadlock:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template