Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 11:52, 27 April 2025 by Mapper (talk | contribs) (Created page with "-- Module:Operators local p = {} function p.render(frame) local args = frame.args local rows = {} -- table start + headers rows[#rows+1] = '{| class="article-table" style="font-size:75%;text-align:center"' rows[#rows+1] = '! colspan="11" style="text-align:center; background-color:#879fcb; color:black; font-size:130%; padding:1.3em"|Current Lore Operators' rows[#rows+1] = '|-' rows[#rows+1] = '! style="background:#1b1b1b" | Airline' rows[#rows+1] = '! st...")
(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.args
  local rows = {}

  -- table start + headers
  rows[#rows+1] = '{| class="article-table" style="font-size:75%;text-align:center"'
  rows[#rows+1] = '! colspan="11" style="text-align:center; background-color:#879fcb; color:black; font-size:130%; padding:1.3em"|Current Lore Operators'
  rows[#rows+1] = '|-'
  rows[#rows+1] = '! style="background:#1b1b1b" | Airline'
  rows[#rows+1] = '! style="background:#1b1b1b" | Image'
  -- … repeat for your other headers …

  -- loop through numbered rows until we hit an empty AirlineName
  for i = 1, 50 do
    local name = args['AirlineName' .. i]
    if not (name and name:match('%S')) then
      break
    end

    rows[#rows+1] = '|-'
    -- note the double quotes around the Lua string, so the ''' inside are literal
    rows[#rows+1] = ("| '''%s'''"):format(name)
    rows[#rows+1] = ("| %s"):format(args['Image' .. i] or '')
    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

  rows[#rows+1] = '|}'
  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.