From Dark and Darker Wiki

Module:Enchantments

You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: Users.


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>'
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
000
1:0
Debug console
* The module exports are available as the variable "p", including unsaved modifications. * Precede a line with "=" to evaluate it as an expression or use print(). Use mw.logObject() for tables. * Use mw.log() and mw.logObject() in module code to send messages to this console.

Return to Module:Enchantments.