4,978
edits
(Initial commit for overhauled Creation Tables (Status: Incomplete)) |
(Change Category to Source; Source text is now the skill; Add Cartography and Astrology creation data; Add item chance where applicable (L-179); Show multiple quantity data for a select few items (L-211); Add Cooking Upgrades to Cooking Recipe Requirements; Use proper colspan on "Global" data when there was >= 3 table headers; Change XP to only show skill icon when in the table;) |
||
Line 24: | Line 24: | ||
-- (Major) Either add all the data from _getItemSourceTables into a single table or convert those over to a similar style table as well | -- (Major) Either add all the data from _getItemSourceTables into a single table or convert those over to a similar style table as well | ||
-- If a single table is used, a new header will need to be added (maybe?); Could use 'Category'/'Source' | -- If a single table is used, a new header will need to be added (maybe?); Could use 'Category'/'Source' | ||
local tables = {} | local tables = {} | ||
local checkItems = { | local checkItems = { | ||
Line 38: | Line 32: | ||
'Ash', -- Requires a fix in _getCreationTable | 'Ash', -- Requires a fix in _getCreationTable | ||
'Withered Ash', -- Requires a fix in _getCreationTable | 'Withered Ash', -- Requires a fix in _getCreationTable | ||
'Generous Fire Spirit', | |||
-- "Circlet of Rhaelyx", -- The following commented out items have no creation source data; This may appear later | -- "Circlet of Rhaelyx", -- The following commented out items have no creation source data; This may appear later | ||
-- "Jewel of Rhaelyx", | -- "Jewel of Rhaelyx", | ||
Line 47: | Line 42: | ||
"Gold Bar", | "Gold Bar", | ||
"Raw Shrimp", | "Raw Shrimp", | ||
" | "Shrimp", | ||
"Rune Platebody", | "Rune Platebody", | ||
"Yew Longbow", | "Yew Longbow", | ||
Line 67: | Line 62: | ||
-- "Infernal Claw", | -- "Infernal Claw", | ||
-- "Chapeau Noir", | -- "Chapeau Noir", | ||
-- "Rope", | -- "Rope", | ||
-- "Ancient Ring of Mastery", | -- "Ancient Ring of Mastery", | ||
Line 73: | Line 67: | ||
-- "Gem Gloves", | -- "Gem Gloves", | ||
"Thief's Moneysack", | "Thief's Moneysack", | ||
"Stardust", | |||
"Golden Stardust", | |||
"Abyssal Stardust", | |||
-- "Golden Star", | -- "Golden Star", | ||
-- "Slayer Deterer", | -- "Slayer Deterer", | ||
"Paper", | |||
-- "Lemon", | -- "Lemon", | ||
-- "Aranite Brush", | -- "Aranite Brush", | ||
Line 112: | Line 108: | ||
local skill = '' | local skill = '' | ||
local specialReq = nil | local specialReq = nil | ||
local | local source = nil | ||
local time = 0 | local time = 0 | ||
local maxTime = nil | local maxTime = nil | ||
Line 120: | Line 116: | ||
local qty = nil | local qty = nil | ||
local costs = nil | local costs = nil | ||
local chance = nil | |||
local tableData = {} | local tableData = {} | ||
Line 127: | Line 124: | ||
local skillIDs = { | local skillIDs = { | ||
['Gathering'] = { | ['Gathering'] = { | ||
['Woodcutting'] = { recipeKey = 'trees' }, | ['Farming'] = { recipeKey = 'recipes', recipeType = 'item' }, | ||
['Fishing'] = { recipeKey = 'fish' }, | ['Woodcutting'] = { recipeKey = 'trees', recipeType = 'tree' }, | ||
['Firemaking'] = { recipeKey = 'logs' }, | ['Fishing'] = { recipeKey = 'fish', recipeType = 'item' }, | ||
['Mining'] = { recipeKey = 'rockData' }, | ['Firemaking'] = { recipeKey = 'logs', recipeType = 'item' }, | ||
[' | ['Mining'] = { recipeKey = 'rockData', recipeType = 'rock' }, | ||
['Harvesting'] = { recipeKey = 'veinData' } | ['Cartography'] = { recipeKey = 'paperRecipes' }, | ||
['Harvesting'] = { recipeKey = 'veinData', recipeType = 'vein' } | |||
}, | }, | ||
['Artisan'] = { | ['Artisan'] = { | ||
Line 150: | Line 148: | ||
local skillData = SkillData[localSkillID] | local skillData = SkillData[localSkillID] | ||
local skill = skillData.name | local skill = skillData.name | ||
local lvl, isAbyssal, xp, qty, costs | local lvl, isAbyssal, xp, qty, source, costs, time, maxTime, chance = 0, false, 0, 0, nil, nil, 0, nil, nil | ||
for i, recipe in ipairs(skillData[dataProp.recipeKey]) do | for i, recipe in ipairs(skillData[dataProp.recipeKey]) do | ||
local hasProduct, specialReq = doesRecipeHaveItemID(recipe, itemID) | local hasProduct, specialReq = doesRecipeHaveItemID(recipe, itemID) | ||
Line 157: | Line 155: | ||
xp = recipe.baseAbyssalExperience or recipe.baseExperience | xp = recipe.baseAbyssalExperience or recipe.baseExperience | ||
qty = recipe.baseQuantity or 1 | qty = recipe.baseQuantity or 1 | ||
source = Icons.Icon({ skill, type='skill', class=(isAbyssal and 'abyss-icon' or '') }) | |||
-- if recipe.name ~= nil then | |||
-- category = Icons.Icon({ recipe.name, type=dataProp.recipeType }) | |||
-- end | |||
if localSkillID == 'Farming' then | if localSkillID == 'Farming' then | ||
costs = { recipe.seedCost } | costs = { recipe.seedCost } | ||
local catData = GameData.getEntityByID(skillData.categories, recipe.categoryID) | local catData = GameData.getEntityByID(skillData.categories, recipe.categoryID) | ||
qty = 5 * catData.harvestMultiplier | qty = 5 * catData.harvestMultiplier | ||
end | end | ||
Line 173: | Line 174: | ||
elseif skillData.baseInterval ~= nil then | elseif skillData.baseInterval ~= nil then | ||
time = skillData.baseInterval / 1000 | time = skillData.baseInterval / 1000 | ||
elseif localSkillID == 'Cartography' then | |||
time = 5 | |||
end | end | ||
if itemID == 'melvorF:Ash' then | if itemID == 'melvorF:Ash' then | ||
qty = time | qty = time | ||
chance = '20%' | |||
elseif itemID == 'melvorItA:Withered_Ash' then | |||
qty = math.max(math.floor(recipe.abyssalLevel / 10), 1) | |||
chance = '20%' | |||
elseif itemID == 'melvorD:Generous_Fire_Spirit' then | |||
chance = '0.1%' | |||
elseif itemID == 'melvorF:Stardust' then | |||
chance = '100%' | |||
elseif localSkillID == 'Firemaking' and itemID == 'melvorD:Coal' then | |||
chance = '40%' | |||
end | end | ||
-- Special requirements | -- Special requirements | ||
Line 181: | Line 194: | ||
specialReq = Icons.Icon({'Mastery', notext=true}) .. Num.formatnum(recipe.totalMasteryRequired) .. ' total [[' .. skill .. ']] [[Mastery]]' | specialReq = Icons.Icon({'Mastery', notext=true}) .. Num.formatnum(recipe.totalMasteryRequired) .. ' total [[' .. skill .. ']] [[Mastery]]' | ||
end | end | ||
table.insert(tableData, { ['skill'] = skill, ['lvl'] = lvl, ['isAbyssal'] = isAbyssal, ['xp'] = xp, ['costs'] = costs, ['qty'] = qty, [' | table.insert(tableData, { | ||
-- | ['skill'] = skill, | ||
break | ['lvl'] = lvl, | ||
['isAbyssal'] = isAbyssal, | |||
['xp'] = xp, | |||
['costs'] = costs, | |||
['qty'] = qty, | |||
['source'] = source, | |||
['time'] = time, | |||
['maxTime'] = maxTime, | |||
['specialReq'] = specialReq, | |||
['chance'] = chance | |||
}) | |||
-- Most recipes have a single item source or the item source data | |||
-- is nearly all the same. The following items have some uniqueness | |||
if not Shared.contains({'melvorF:Ash', 'melvorItA:Withered_Ash', 'melvorAoD:Paper'}, itemID) then break end | |||
end | end | ||
end | end | ||
Line 193: | Line 219: | ||
local skillData = SkillData[localSkillID] | local skillData = SkillData[localSkillID] | ||
local skill = skillData.name | local skill = skillData.name | ||
local lvl, isAbyssal, xp, qty, | local lvl, isAbyssal, xp, qty, source, costs, time, maxTime = 0, false, 0, 0, Icons.Icon({ skill, type='skill' }), nil, 0, nil | ||
for i, recipe in ipairs(skillData.recipes) do | for i, recipe in ipairs(skillData.recipes) do | ||
if recipe.productID == itemID or | if recipe.productID == itemID or | ||
Line 201: | Line 227: | ||
xp = recipe.baseAbyssalExperience or recipe.baseExperience | xp = recipe.baseAbyssalExperience or recipe.baseExperience | ||
qty = recipe.baseQuantity or 1 | qty = recipe.baseQuantity or 1 | ||
source = Icons.Icon({ skill, type='skill', class=(isAbyssal and 'abyss-icon' or '') }) | |||
-- Action time | -- Action time | ||
if recipe.baseMinInterval ~= nil then | if recipe.baseMinInterval ~= nil then | ||
Line 213: | Line 235: | ||
end | end | ||
elseif recipe.baseInterval ~= nil then | elseif recipe.baseInterval ~= nil then | ||
time = recipe.baseInterval /1000 | time = recipe.baseInterval / 1000 | ||
elseif skillData.baseInterval ~= nil then | elseif skillData.baseInterval ~= nil then | ||
time = skillData.baseInterval / 1000 | time = skillData.baseInterval / 1000 | ||
Line 223: | Line 245: | ||
if levelUnlock ~= nil then | if levelUnlock ~= nil then | ||
specialReq = Icons._MasteryReq(item.name, levelUnlock.level, false) | specialReq = Icons._MasteryReq(item.name, levelUnlock.level, false) | ||
end | |||
end | |||
if localSkillID == 'Cooking' then | |||
-- Cooking includes the required utility (fire, furnace, pot) as a special requirement | |||
local cookingCatIcon = { | |||
["melvorD:Fire"] = 'Normal Cooking Fire', | |||
["melvorD:Furnace"] = 'Basic Furnace', | |||
["melvorD:Pot"] = 'Basic Pot' | |||
} | |||
local categoryIconName, categoryName = cookingCatIcon[recipe.categoryID], nil | |||
local recipeCategory = GameData.getEntityByID(SkillData.Cooking.categories, recipe.categoryID) | |||
if recipeCategory ~= nil then | |||
categoryName = recipeCategory.modifierName or recipeCategory.name | |||
end | |||
if categoryIconName ~= nil and categoryName ~= nil then | |||
specialReq = Icons.Icon({'Cooking', categoryName, section = 'Cooking Upgrades', img = categoryIconName, type = 'upgrade'}) | |||
end | end | ||
end | end | ||
Line 252: | Line 290: | ||
end | end | ||
end | end | ||
costs = table.concat(shardCostArray, '<br>') | |||
if not Shared.tableIsEmpty(otherCostArray) then | if not Shared.tableIsEmpty(otherCostArray) then | ||
local costLen = Shared.tableCount(otherCostArray) | local costLen = Shared.tableCount(otherCostArray) | ||
costs = costs .. '<br>' .. (costLen == 1 and '' or 'and one of the following:<br>') .. table.concat(otherCostArray, "<br>'''OR''' ") | |||
end | end | ||
specialReq = 'At least 1 ' .. Icons.Icon({'Summoning%23Summoning Marks', item.name, img=item.name, type='mark'}) .. ' mark discovered' | specialReq = 'At least 1 ' .. Icons.Icon({'Summoning%23Summoning Marks', item.name, img=item.name, type='mark'}) .. ' mark discovered' | ||
table.insert(tableData, { ['skill'] = skill, ['lvl'] = lvl, ['isAbyssal'] = isAbyssal, ['xp'] = xp, ['costs'] = | table.insert(tableData, { | ||
['skill'] = skill, | |||
['lvl'] = lvl, | |||
['isAbyssal'] = isAbyssal, | |||
['xp'] = xp, | |||
['costs'] = costs, | |||
['qty'] = qty, | |||
['source'] = source, | |||
['time'] = time, | |||
['maxTime'] = nil, | |||
['specialReq'] = specialReq | |||
}) | |||
-- Some items (such as Arrow shafts) have multiple recipes | -- Some items (such as Arrow shafts) have multiple recipes | ||
elseif type(recipe.alternativeCosts) == 'table' then | elseif type(recipe.alternativeCosts) == 'table' then | ||
Line 274: | Line 323: | ||
end | end | ||
costsStr = costsStr .. (Common.getCostString({ ["items"] = {}, ["currencies"] = recipe.currencyCosts}) or '') | costsStr = costsStr .. (Common.getCostString({ ["items"] = {}, ["currencies"] = recipe.currencyCosts}) or '') | ||
table.insert(tableData, { ['skill'] = skill, ['lvl'] = lvl, ['isAbyssal'] = isAbyssal, ['xp'] = xp, ['costs'] = costsStr, ['qty'] = Num.formatnum(qty * altCost.quantityMultiplier), [' | table.insert(tableData, { | ||
['skill'] = skill, | |||
['lvl'] = lvl, | |||
['isAbyssal'] = isAbyssal, | |||
['xp'] = xp, | |||
['costs'] = costsStr, | |||
['qty'] = Num.formatnum(qty * altCost.quantityMultiplier), | |||
['source'] = Icons.Icon({ skill, type='skill' }), | |||
['time'] = time, | |||
['maxTime'] = maxTime, | |||
['specialReq'] = specialReq | |||
}) | |||
end | end | ||
-- Finally, normal recipes with a single set of item costs | -- Finally, normal recipes with a single set of item costs | ||
elseif type(recipe.itemCosts) == 'table' and not Shared.tableIsEmpty(recipe.itemCosts) then | elseif type(recipe.itemCosts) == 'table' and not Shared.tableIsEmpty(recipe.itemCosts) then | ||
table.insert(tableData, { ['skill'] = skill, ['lvl'] = lvl, ['isAbyssal'] = isAbyssal, ['xp'] = xp, ['costs'] = recipe.itemCosts, ['qty'] = qty, [' | table.insert(tableData, { | ||
['skill'] = skill, | |||
['lvl'] = lvl, | |||
['isAbyssal'] = isAbyssal, | |||
['xp'] = xp, | |||
['costs'] = recipe.itemCosts, | |||
['qty'] = qty, | |||
['source'] = Icons.Icon({ skill, type='skill' }), | |||
['time'] = time, | |||
['maxTime'] = maxTime, | |||
['specialReq'] = specialReq, | |||
['currencyCost'] = recipe.currencyCosts | |||
}) | |||
end | end | ||
end | end | ||
Line 289: | Line 361: | ||
for i, altSpell in ipairs(Magic.getSpellsBySpellBook('altMagic')) do | for i, altSpell in ipairs(Magic.getSpellsBySpellBook('altMagic')) do | ||
if altSpell.produces == item.id then | if altSpell.produces == item.id then | ||
table.insert(tableData, { ['skill'] = 'Magic', ['lvl'] = altSpell.level, ['isAbyssal'] = false, ['xp'] = altSpell.baseExperience, ['costs'] = altSpell.runesRequired, ['qty'] = altSpell.productionRatio, [' | table.insert(tableData, { | ||
['skill'] = 'Magic', | |||
['lvl'] = altSpell.level, | |||
['isAbyssal'] = false, | |||
['xp'] = altSpell.baseExperience, | |||
['costs'] = altSpell.runesRequired, | |||
['qty'] = altSpell.productionRatio, | |||
['source'] = Icons.Icon({ altSpell.name, type='spell' }), | |||
['time'] = 2, | |||
['maxTime'] = 2, | |||
['altCosts'] = Magic._getAltSpellCostText(altSpell) | |||
}) | |||
end | |||
end | |||
-- Add in Astrology creation items manually since each constellation has (mostly) | |||
-- the same creation information so looping through them is not necessary | |||
if Shared.contains({ 'melvorF:Stardust', 'melvorF:Golden_Stardust', 'melvorItA:Abyssal_Stardust', 'melvorItA:Eternal_Stardust' }, itemID) then | |||
local namespace, localID = Shared.getLocalID(itemID) | |||
local isAbyssal = namespace == 'melvorItA' | |||
local chance = nil | |||
for i, itemChanceData in ipairs(SkillData.Astrology.baseRandomItemChances) do | |||
if itemChanceData.itemID == itemID then | |||
chance = itemChanceData.chance .. '%' | |||
break | |||
end | |||
end | end | ||
table.insert(tableData, { | |||
['skill'] = 'Astrology', | |||
['lvl'] = 1, | |||
['isAbyssal'] = isAbyssal, | |||
['xp'] = (isAbyssal and 1238 or 5), | |||
['source'] = Icons.Icon({ 'Astrology', type='skill', class=(isAbyssal and 'abyss-icon' or '')}), | |||
['time'] = 3, | |||
['chance'] = chance | |||
}) | |||
end | end | ||
Line 336: | Line 442: | ||
function p.buildCreationTable2(tableData, item) | function p.buildCreationTable2(tableData, item) | ||
local | local showSource = false | ||
local showRequirements = false | local showRequirements = false | ||
local showInputs = false | local showInputs = false | ||
Line 343: | Line 449: | ||
local showTime = false | local showTime = false | ||
local showChance = false | local showChance = false | ||
local colspan = -1 | |||
for i, data in ipairs(tableData) do | for i, data in ipairs(tableData) do | ||
if not | if not showSource and tableData[1].source ~= tableData[i].source then | ||
if not showRequirements and tableData[1].skill ~= tableData[i].skill then showRequirements = true end | showSource = true | ||
if not showInputs and tableData[1].costs ~= tableData[i].costs then showInputs = true end | colspan = colspan + 1 | ||
if not showOutputs and tableData[1].qty ~= tableData[i].qty then showOutputs = true end | end | ||
if not showXP and tableData[1].xp ~= tableData[i].xp then showXP = true end | if not showRequirements and tableData[1].skill ~= tableData[i].skill then | ||
if not showTime and tableData[1].time ~= tableData[i].time then showTime = true end | showRequirements = true | ||
if not showChance and tableData[1].chance ~= tableData[i].chance then showChance = true end | colspan = colspan + 1 | ||
end | |||
if not showInputs and tableData[1].costs ~= tableData[i].costs then | |||
showInputs = true | |||
colspan = colspan + 1 | |||
end | |||
if not showOutputs and tableData[1].qty ~= tableData[i].qty then | |||
showOutputs = true | |||
colspan = colspan + 1 | |||
end | |||
if not showXP and tableData[1].xp ~= tableData[i].xp then | |||
showXP = true | |||
colspan = colspan + 1 | |||
end | |||
if not showTime and tableData[1].time ~= tableData[i].time then | |||
showTime = true | |||
colspan = colspan + 1 | |||
end | |||
if not showChance and tableData[1].chance ~= tableData[i].chance then | |||
showChance = true | |||
colspan = colspan + 1 | |||
end | |||
end | end | ||
local function addCostsRow(row, data) | local function addCostsRow(row, data, colspan) | ||
local costsRow = row:tag('td') | local costsRow = row:tag('td'):attr('colspan', (colspan >= 2 and colspan or 1)) | ||
if type(data.costs) == 'table' then | if type(data.costs) == 'table' then | ||
for i, mat in ipairs(data.costs) do | for i, mat in ipairs(data.costs) do | ||
Line 383: | Line 511: | ||
local tableHeader = resultTable:tag('tr') | local tableHeader = resultTable:tag('tr') | ||
if | if showSource then tableHeader:tag('th'):wikitext('Source') end | ||
if showRequirements then tableHeader:tag('th'):wikitext(' | if showRequirements then tableHeader:tag('th'):wikitext('Requires') end | ||
if showInputs then tableHeader:tag('th'):wikitext('Inputs') end | if showInputs then tableHeader:tag('th'):wikitext('Inputs') end | ||
if showOutputs then tableHeader:tag('th'):wikitext('Outputs') end | if showOutputs then tableHeader:tag('th'):wikitext('Outputs') end | ||
Line 396: | Line 524: | ||
local recipeRow = resultTable:tag('tr') | local recipeRow = resultTable:tag('tr') | ||
if | if showSource then recipeRow:tag('td'):wikitext(data.source) end | ||
if showRequirements then | if showRequirements then | ||
Line 407: | Line 535: | ||
if showInputs and data.costs ~= nil then | if showInputs and data.costs ~= nil then | ||
addCostsRow(recipeRow, data) | addCostsRow(recipeRow, data, 1) | ||
elseif showInputs then | elseif showInputs then | ||
recipeRow:tag('td'):wikitext('N/A'):addClass('table-na') | recipeRow:tag('td'):wikitext('N/A'):addClass('table-na') | ||
Line 413: | Line 541: | ||
if showOutputs then recipeRow:tag('td'):wikitext(Icons.Icon({item.name, type='item', notext=true, qty=data.qty})):addClass('center') end | if showOutputs then recipeRow:tag('td'):wikitext(Icons.Icon({item.name, type='item', notext=true, qty=data.qty})):addClass('center') end | ||
if showXP then recipeRow:tag('td'):wikitext( | if showXP then recipeRow:tag('td'):wikitext(Icons.Icon({data.skill, (Num.formatnum(data.xp) .. (data.isAbyssal and ' AXP' or ' XP')), nolink=true, type='skill'})):addClass('center') end | ||
if showTime then recipeRow:tag('td'):wikitext(Shared.timeString(data.time, true)):addClass('center') end | if showTime then recipeRow:tag('td'):wikitext(Shared.timeString(data.time, true)):addClass('center') end | ||
if showChance then recipeRow:tag('td'):wikitext(data.chance):addClass('center') end | if showChance then recipeRow:tag('td'):wikitext(data.chance):addClass('center') end | ||
end | end | ||
if not | if not showSource and tableData[1].source ~= nil then | ||
resultTable:tag('tr') | resultTable:tag('tr') | ||
:tag('th') | :tag('th') | ||
:wikitext(' | :wikitext('Source') | ||
:css('text-align', 'right') | :css('text-align', 'right') | ||
:tag('td'):wikitext(tableData[1]. | :tag('td'):attr('colspan', (colspan >= 2 and colspan or 1)):wikitext(tableData[1].source) | ||
end | end | ||
if not showRequirements and tableData[1].skill ~= nil and tableData[1].lvl ~= nil then | if not showRequirements and tableData[1].skill ~= nil and tableData[1].lvl ~= nil then | ||
Line 431: | Line 558: | ||
:wikitext('Requirements') | :wikitext('Requirements') | ||
:css('text-align', 'right') | :css('text-align', 'right') | ||
local reqData = reqRow:tag('td') | local reqData = reqRow:tag('td'):attr('colspan', (colspan >= 2 and colspan or 1)) | ||
reqData:wikitext(Icons._SkillReq(tableData[1].skill, tableData[1].lvl, false, (tableData[1].isAbyssal and "melvorItA:Abyssal" or nil))) | reqData:wikitext(Icons._SkillReq(tableData[1].skill, tableData[1].lvl, false, (tableData[1].isAbyssal and "melvorItA:Abyssal" or nil))) | ||
Line 444: | Line 571: | ||
:css('text-align', 'right') | :css('text-align', 'right') | ||
addCostsRow(costRow, tableData[1]) | addCostsRow(costRow, tableData[1], colspan) | ||
end | end | ||
if not showOutputs and tableData[1].qty ~= nil then | if not showOutputs and tableData[1].qty ~= nil then | ||
Line 451: | Line 578: | ||
:wikitext('Outputs') | :wikitext('Outputs') | ||
:css('text-align', 'right') | :css('text-align', 'right') | ||
:tag('td'):wikitext(Icons.Icon({item.name, type='item', qty=tableData[1].qty})) | :tag('td'):attr('colspan', (colspan >= 2 and colspan or 1)):wikitext(Icons.Icon({ item.name, type='item', qty=tableData[1].qty })) | ||
end | end | ||
if not showXP and tableData[1].xp ~= nil then | if not showXP and tableData[1].xp ~= nil then | ||
Line 458: | Line 585: | ||
:wikitext('Base Experience') | :wikitext('Base Experience') | ||
:css('text-align', 'right') | :css('text-align', 'right') | ||
:tag('td'):wikitext(Num.formatnum(tableData[1].xp | :tag('td'):attr('colspan', (colspan >= 2 and colspan or 1)):wikitext(Num.formatnum(tableData[1].xp) .. (tableData[1].isAbyssal and ' AXP' or ' XP')) | ||
end | end | ||
if not showTime and tableData[1].time ~= nil then | if not showTime and tableData[1].time ~= nil then | ||
Line 464: | Line 591: | ||
local timeHeader = resultTable:tag('th') | local timeHeader = resultTable:tag('th') | ||
timeHeader | timeHeader | ||
:wikitext('Base | :wikitext('Base Time') | ||
:css('text-align', 'right') | :css('text-align', 'right') | ||
local timeData = timeHeader:tag('td') | local timeData = timeHeader:tag('td'):attr('colspan', (colspan >= 2 and colspan or 1)) | ||
timeData:wikitext(Shared.timeString(tableData[1].time, true)) | timeData:wikitext(Shared.timeString(tableData[1].time, true)) | ||
Line 477: | Line 604: | ||
resultTable:tag('tr') | resultTable:tag('tr') | ||
:tag('th') | :tag('th') | ||
:wikitext('Base | :wikitext('Base Chance') | ||
:css('text-align', 'right') | :css('text-align', 'right') | ||
:tag('td'):wikitext(tableData[1].chance) | :tag('td'):attr('colspan', (colspan >= 2 and colspan or 1)):wikitext(tableData[1].chance) | ||
end | end | ||