Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Operators

From Aeronautica Official Wiki
Revision as of 15:49, 27 April 2025 by Polderbaan (talk | contribs) (Removing livery-specific information for the lore airline operators infobox)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Operators/doc

-- Module:Operators
local p = {}

function p.render(frame)
  local args = frame:getParent().args
  local rows = {}

  for i = 1, 50 do
    local name = args['AirlineName' .. i]
    if not (name and name:match('%S')) then break end

    -- force ImageX to 200px
    local raw = args['Image' .. i] or ''
    local noSize = raw:gsub('|%d+px', '')
    local imgCell = noSize:gsub('%[%[File:(.-)%]%]', '[[File:%1|200px]]')

    rows[#rows+1] = '|-'
    rows[#rows+1] = ("| '''%s'''"):format(name)
    rows[#rows+1] = ("| %s"):format(imgCell)
    --rows[#rows+1] = ("| %s"):format(args['Type' .. i]          or '')
    --rows[#rows+1] = ("| %s"):format(args['Price' .. i]         or '')
    rows[#rows+1] = ("| %s"):format(args['Logo' .. i]          or '')
    rows[#rows+1] = ("| %s"):format(args['Description' .. i]   or '')
    --rows[#rows+1] = ("| %s"):format(args['SpecialLivery' .. i] or '')
    rows[#rows+1] = ("| colspan=\"3\" | %s")
      :format(args['YearsofService' .. i] or '')
  end

  return table.concat(rows, '\n')
end

return p
Cookies help us deliver our services. By using our services, you agree to our use of cookies.