View source for Module:Data tables/engines
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 cells").commonCells
-- Builds table formatted for engines
function p.engineTable(args)
local category = args[1]
local family = args[2]
local json = mw.loadJsonData("Data:Collections/parts")
local cells = ''
-- adds engine headers
local header =
"!Max Thrust: 1 atm (kN)\n" ..
"!Max Thrust: Vac. (kN)\n" ..
"!ISP: 1 atm (s)\n" ..
"!ISP: Vac. (s)\n"
-- populates common cells and engine cells
for k, v in pairs(json[category][family]) do
local partJson = mw.loadJsonData("Data:"..k)
local tempCell = _commonCells(partJson) ..
"|"..partJson["modules"]["engine"]["max_thrust"]["atm"].."\n" ..
000
1:0
Template used on this page:
Return to Module:Data tables/engines.