From Dark and Darker Wiki
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local enchantments_data = mw.loadJsonData("Data:Enchantments.json")
local p = {}
function p.draw_table(base_or_gem)
-- Handle based on how it was called
if type(base_or_gem) == "table" and base_or_gem.args then -- if called via wikitext instead of lua
local frame = base_or_gem
base_or_gem = frame.args[1]
end
-- Validate
if base_or_gem ~= "base" and base_or_gem ~= "gem" then return "1st parameter 'base_or_gem' must be either 'base' or 'gem'." end
local slot_headers = '<th rowspan="2"></th><th rowspan="2">Enchantments</th>'
local min_max_headers = ''
-- Create enchant_name_headers (row1) and min/max (row2)
-- Iterate enchant groups
for i, slot_name in ipairs(enchantments_data["slottype_order"]) do
slot_headers = slot_headers .. '<th colspan="2">' .. slot_name .. '</th>'
000
1:0
Templates used on this page:
Return to Module:Enchantments.