Module:BlueprintList: Difference between revisions
From Eco - English Wiki
| [checked revision] | [checked revision] |
No edit summary |
No edit summary |
||
| Line 16: | Line 16: | ||
for Bname,Bdata in pairs(BlueprintsList) do | for Bname,Bdata in pairs(BlueprintsList) do | ||
local ItemName = ItemList[Bname].Name[Lang] | local ItemName = ItemList[Bname].Name[Lang] | ||
WikiText = WikiText .. IconUtils.main{ name = | local ItemPrice = Bdata.Price | ||
local ItemQuantity = Bdata.Quantity | |||
local ItemText = ItemName .. '<br>' .. ItemPrice .. '<br>' .. ItemQuantity | |||
WikiText = WikiText .. IconUtils.main{ name = ItemText, id = ItemList[Bname].ID, size = 128, style = 4, link = ItemName } | |||
end | end | ||
Revision as of 11:12, 27 August 2025
Documentation for this module may be created at Module:BlueprintList/doc
local Utils = require('Module:Utils')
local IconUtils = require('Module:IconUtils')
local L = require('Module:Localization')
local Lang = Utils.getLanguageName()
local p = {}
function p.main()
local WikiText = ""
local MarketplaceData = require( "Module:MarketplaceData" )
local BlueprintsList = MarketplaceData.blueprints
local ItemData = require( "Module:ItemData" )
local ItemList = ItemData.items
WikiText = WikiText .. '<div class="row">'
for Bname,Bdata in pairs(BlueprintsList) do
local ItemName = ItemList[Bname].Name[Lang]
local ItemPrice = Bdata.Price
local ItemQuantity = Bdata.Quantity
local ItemText = ItemName .. '<br>' .. ItemPrice .. '<br>' .. ItemQuantity
WikiText = WikiText .. IconUtils.main{ name = ItemText, id = ItemList[Bname].ID, size = 128, style = 4, link = ItemName }
end
WikiText = WikiText .. '</div>'
return WikiText
end
return p