Module:EnemyEquipmentInfoKai

Revision as of 06:10, 22 October 2015 by com>Ckwng

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

local EquipmentGraphicKai = require('Module:EquipmentGraphicKai')
local EquipmentInfoKai = require('Module:EquipmentInfoKai')
local Tabber = require('Module:Tabber')

local EnemyEquipmentInfoKai = EquipmentInfoKai{
	_template = [[{|class="${table_class}" id="${table_id}" style="border: 1px solid darkgray; width: 380px; background-color: #fafafa; float: ${float};"
|-
| colspan="2" style="position: relative; padding: 1px 40px; text-align: center; background-color: ${back};${extra_style};" title="${rarity}" | <div style="position: absolute; right: 5px;">${edit_link}</div>
<p style="font-size: 20px;">'''${name}'''</p>${localized_name}
<p>'''No.${id} ${japanese_name}'''</p>
|-
| colspan="2" style="text-align: center; background-color: whitesmoke;" |
<div>${icon} <b>${eq_type}</b></div>
<p><b>Effects: ${effects}</b></p>
<div>${buildable}</div>${alternative_names}
|- 
| colspan="2" style="text-align: center;" | ${card}
|-
| colspan="2" style="text-align: center; background-color: LightSkyBlue;" | '''Refittable Class'''
${compatibility_details}
|}]],
	_plane_types = {
		[6] = true,
		[7] = true,
		[8] = true,
		[11] = true,
	}
}

function EnemyEquipmentInfoKai:image()
	self._vars.card = EquipmentGraphicKai:get{equip = self._equipment}
	if self._plane_types[self._equipment:type()] then
		local tabber = Tabber()
		tabber:add_tab("Equipment", self._vars.card)
		tabber:add_flying("Flying", EquipmentGraphicKai:get{equip = self._equipment, flying = true})
		self._vars.card = tostring(tabber)
	end
end

return EnemyEquipmentInfoKai