Anonymous

Module:Shop: Difference between revisions

From Melvor Idle
Set size to 25 for all shop related icons
(Update for v1.3)
(Set size to 25 for all shop related icons)
Line 219: Line 219:
local GPVal = item.sellsFor * itemQty
local GPVal = item.sellsFor * itemQty
GPTotal = GPTotal + GPVal
GPTotal = GPTotal + GPVal
table.insert(containArray, '|-\r\n| class="table-img"| ' .. Icons.Icon({item.name, type='item', notext=true, size='25'}))
table.insert(containArray, '|-\r\n| class="table-img"| ' .. Icons.Icon({item.name, type='item', notext=true}))
table.insert(containArray, '|data-sort-value="'..item.name..'"|'.. Icons.getExpansionIcon(item.id) .. Icons.Icon({item.name, type='item', noicon=true}) .. '\r\n| data-sort-value="' .. itemQty .. '" style="text-align:right" | ' .. Shared.formatnum(itemQty))
table.insert(containArray, '|data-sort-value="'..item.name..'"|'.. Icons.getExpansionIcon(item.id) .. Icons.Icon({item.name, type='item', noicon=true}) .. '\r\n| data-sort-value="' .. itemQty .. '" style="text-align:right" | ' .. Shared.formatnum(itemQty))
table.insert(containArray, '| data-sort-value="' .. GPVal .. '"| ' .. Icons.GP(GPVal))
table.insert(containArray, '| data-sort-value="' .. GPVal .. '"| ' .. Icons.GP(GPVal))
Line 232: Line 232:
table.insert(containArray, '+'..Shared.formatnum(chargeQty)..' '..Icons.Icon({gloveItem.name, type='item'})..' Charges')
table.insert(containArray, '+'..Shared.formatnum(chargeQty)..' '..Icons.Icon({gloveItem.name, type='item'})..' Charges')
else
else
table.insert(containArray, '|-\r\n| class="table-img"| ' .. Icons.Icon({gloveItem.name, type='item', notext=true, size='25'}))
table.insert(containArray, '|-\r\n| class="table-img"| ' .. Icons.Icon({gloveItem.name, type='item', notext=true}))
table.insert(containArray, '| ' .. Icons.Icon({gloveItem.name, type='item', noicon=true}) .. ' Charges\r\n| data-sort-value="' .. chargeQty .. '" style="text-align:right" | ' .. Shared.formatnum(chargeQty))
table.insert(containArray, '| ' .. Icons.Icon({gloveItem.name, type='item', noicon=true}) .. ' Charges\r\n| data-sort-value="' .. chargeQty .. '" style="text-align:right" | ' .. Shared.formatnum(chargeQty))
table.insert(containArray, '| data-sort-value="0"| ' .. Icons.GP(0))
table.insert(containArray, '| data-sort-value="0"| ' .. Icons.GP(0))
Line 412: Line 412:
for j, column in ipairs(usedColumns) do
for j, column in ipairs(usedColumns) do
if column == 'Purchase' then
if column == 'Purchase' then
table.insert(resultPart, '|class="table-img"|' .. Common.getPurchaseIcon({purchase, notext=true, size='50'}))
table.insert(resultPart, '|class="table-img"|' .. Common.getPurchaseIcon({purchase, notext=true}))
table.insert(resultPart, '| data-sort-value="'..purchName..'"|'..purchExpIcon .. Common.getPurchaseIcon({purchase, noicon=true}))
table.insert(resultPart, '| data-sort-value="'..purchName..'"|'..purchExpIcon .. Common.getPurchaseIcon({purchase, noicon=true}))
elseif column == 'Type' then
elseif column == 'Type' then
Line 679: Line 679:
local capeItem = Items.getItemByID(cape.contains.items[1].id)
local capeItem = Items.getItemByID(cape.contains.items[1].id)
if capeItem ~= nil then
if capeItem ~= nil then
table.insert(resultPart, '\n|-\n| ' .. Icons.Icon({capeItem.name, type='item', size='60', notext=true}))
table.insert(resultPart, '\n|-\n| ' .. Icons.Icon({capeItem.name, type='item', notext=true}))
table.insert(resultPart, '\n| data-sort-value="'..capeItem.name..'"|'..Icons.getExpansionIcon(capeItem.id) .. Icons.Icon({capeItem.name, type='item', noicon=true}))
table.insert(resultPart, '\n| data-sort-value="'..capeItem.name..'"|'..Icons.getExpansionIcon(capeItem.id) .. Icons.Icon({capeItem.name, type='item', noicon=true}))
table.insert(resultPart, '\n| ' .. Common.getRequirementString(cape.purchaseRequirements, 'None'))
table.insert(resultPart, '\n| ' .. Common.getRequirementString(cape.purchaseRequirements, 'None'))
Line 710: Line 710:
end
end


table.insert(resultPart, '|-\r\n|class="table-img" data-sort-value="' .. purchaseName .. '"| ' .. Icons.Icon({purchaseName, type='upgrade', size=50, notext=true}))
table.insert(resultPart, '|-\r\n|class="table-img" data-sort-value="' .. purchaseName .. '"| ' .. Icons.Icon({purchaseName, type='upgrade', notext=true}))
table.insert(resultPart, '| ' .. Icons.Icon({purchaseName, type='upgrade', noicon=true}))
table.insert(resultPart, '| ' .. Icons.Icon({purchaseName, type='upgrade', noicon=true}))
table.insert(resultPart, '| style="text-align:right;" data-sort-value="' .. mods.increasedAutoEatThreshold .. '" | ' .. Shared.formatnum(Shared.round(mods.increasedAutoEatThreshold, 0, 0)) .. '%')
table.insert(resultPart, '| style="text-align:right;" data-sort-value="' .. mods.increasedAutoEatThreshold .. '" | ' .. Shared.formatnum(Shared.round(mods.increasedAutoEatThreshold, 0, 0)) .. '%')
Line 755: Line 755:
local dung = GameData.getEntityByID('dungeons', p.getGodUpgradeDungeon(upgrade))
local dung = GameData.getEntityByID('dungeons', p.getGodUpgradeDungeon(upgrade))
local costSortValue = p._getPurchaseSortValue(upgrade)
local costSortValue = p._getPurchaseSortValue(upgrade)
table.insert(resultPart, '|-\r\n|class="table-img" data-sort-value="' .. upgradeName .. '"| ' ..p._getPurchaseExpansionIcon(upgrade).. Icons.Icon({upgradeName, type='upgrade', size=50, notext=true}))
table.insert(resultPart, '|-\r\n|class="table-img" data-sort-value="' .. upgradeName .. '"| ' ..p._getPurchaseExpansionIcon(upgrade).. Icons.Icon({upgradeName, type='upgrade', notext=true}))
table.insert(resultPart, '| ' .. Icons.Icon({upgradeName, type='upgrade', noicon=true}))
table.insert(resultPart, '| ' .. Icons.Icon({upgradeName, type='upgrade', noicon=true}))
table.insert(resultPart, '| ' .. p._getPurchaseDescription(upgrade))
table.insert(resultPart, '| ' .. p._getPurchaseDescription(upgrade))
Line 822: Line 822:
local toolCostSort = p._getPurchaseSortValue(tool) or 0
local toolCostSort = p._getPurchaseSortValue(tool) or 0
table.insert(resultPart, '\n|-')
table.insert(resultPart, '\n|-')
table.insert(resultPart, '\n|class="table-img" data-sort-value="' .. toolName .. '"| ' .. Icons.Icon({toolName, type='upgrade', size='50', notext=true}))
table.insert(resultPart, '\n|class="table-img" data-sort-value="' .. toolName .. '"| ' .. Icons.Icon({toolName, type='upgrade', notext=true}))
table.insert(resultPart, '\n| data-sort-value="' .. toolName.. '"|' .. Icons.getExpansionIcon(tool.id) .. toolName)
table.insert(resultPart, '\n| data-sort-value="' .. toolName.. '"|' .. Icons.getExpansionIcon(tool.id) .. toolName)
local level, levelStyle = nil, nil
local level, levelStyle = nil, nil
2,875

edits