Module:Infobox Mount

From Monkey Dynasty
Jump to: navigation, search

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

local p = {}

function p.base(frame)
  local capiunto = require 'capiunto'
  return capiunto.create( {
    top = frame.args.name,
    bottomStyle = frame.args.category_color,
    bottom = frame.args.category
  } )

  :addImage('[[File:' .. frame.args.image .. '|300px|alt=Image Missing]]')
  :addRow('Movement Speed', "+" .. frame.args.speed)
  :addRow('Location', frame.args.location)
end

function p.custom(frame)
  frame.args.category = '[[Custom Mount]]'
  frame.args.category_color = 'background:#ffe9cc'
  if frame.args.location == nil then
    frame.args.location = "[[Custom Mount Vendor]], [[Sunstream]]"
  end
  return p.base(frame)
end

function p.custom_coming_soon(frame)
  frame.args.location = "Coming soon..."
  return p.custom(frame)
end

function p.custom_gm_npc(frame)
  frame.args.location = '[[Samilan]], [[Sunstream]]'
  return p.custom(frame)
end

function p.custom_m(frame)
  frame.args.location = '[[Mount Vendor]], [[Sunstream]]'
  return p.custom(frame)
end

function p.custom_harmony_rune(frame)
  frame.args.location = '[[Harmony Rune Exchange]]'
  return p.custom(frame)
end

function p.custom_auction(frame)
  frame.args.location = '[[Auction]]'
  return p.custom(frame)
end

function p.jaden_shop(frame)
  frame.args.location = '[[Jaden Shop]]'
  return p.custom(frame)
end

function p.lotto(frame)
  frame.args.location = '[[Lotto]]'
  return p.custom(frame)
end

function p.tree_of_wealth(frame)
  frame.args.location = '[[Tree of Wealth]]'
  return p.custom(frame)
end

function p.jade_maiden(frame)
  frame.args.location = '[[Jade Exchnage Maiden]]'
  return p.custom(frame)
end

return p