285
edits
ByteFoolish (talk | contribs) m (dots...) |
ByteFoolish (talk | contribs) (getFishingAreasTable) |
||
Line 260: | Line 260: | ||
end | end | ||
result = result..'\r\n| style="text-align:right"|'..cookStr | result = result..'\r\n| style="text-align:right"|'..cookStr | ||
end | |||
result = result..'\r\n|}' | |||
return result | |||
end | |||
function p.getFishingAreasTable(frame) | |||
local result = '{| class="wikitable sortable stickyHeader"' | |||
result = result..'\r\n|- class="headerRow-0"' | |||
result = result..'\r\n!Name\r\n!Fish\r\n!Fish Chance' | |||
result = result..'\r\n!Junk Chance\r\n!Special Chance' | |||
for i, area in Shared.skpairs(SkillData.Fishing.Areas) do | |||
result = result..'\r\n|-' | |||
result = result..'\r\n| style ="text-align: left;" |'..area.name | |||
local fishArray = {} | |||
for j, fish in Shared.skpairs(area.fish) do | |||
local fishTable = Items.getItems(function(item) return item.fishingID == fish end) | |||
local fishItem = fishTable[0] or fishTable[1] | |||
table.insert(fishArray, Icons.Icon({fishItem.name, type='item'})) | |||
end | |||
result = result..'\r\n|'..table.concat(fishArray, '\r\n') | |||
result = result..'\r\n| style="text-align:right"|'..area.fishChance..'%' | |||
result = result..'\r\n| style="text-align:right"|'..area.junkChance..'%' | |||
result = result..'\r\n| style="text-align:right"|'..area.specialChance..'%' | |||
end | end | ||
edits