View source for Module:Data tables/tanks
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reason:
You can view and copy the source of this page.
local p = {}
local _commonCells = require("Module:Data tables/common").commonCells
local _commonHeaders = require("Module:Data tables/common").commonHeaders
local _formatResource = require("Module:Data infobox")._formatResource
-- Builds table formatted for fuel tanks
function p.tankTable(args)
local category = args[1]
local family = args[2]
local json = mw.loadJsonData("Data:Collections/parts")
local cells = ''
local headers = _commonHeaders()
-- build header and cells per resource in the tank
-- per usual, iterate through each part in the family
for k, v in pairs(json[category][family]) do
local partJson = mw.loadJsonData("Data:"..k)
local tempCell = _commonCells(partJson)
-- iterate over each resource in the tank (thanks methalox)
000
1:0
Template used on this page:
Return to Module:Data tables/tanks.