• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Difference between revisions of "Module:EnemyEquipmentInfoKai"

From Kancolle Wiki
Jump to navigation Jump to search
m (2 revisions imported)
m (Add autogyro plane type)
 
Line 29: Line 29:
 
[10] = true, -- LBAS only
 
[10] = true, -- LBAS only
 
[11] = true,
 
[11] = true,
 +
[25] = true,
 
[41] = true, -- LBAS only
 
[41] = true, -- LBAS only
 
[47] = true,
 
[47] = true,

Latest revision as of 07:37, 9 March 2024

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 Equipment = require('Module:Equipment')

local EnemyEquipmentInfoKai = EquipmentInfoKai{
	_enemy = true,
	_template = [[{|class="${table_class}" id="${table_id}" style="border: 1px solid darkgray; width: 380px; background-color: #fafafa;${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,
		[9] = true, -- LBAS only
		[10] = true, -- LBAS only
		[11] = true,
		[25] = true,
		[41] = true, -- LBAS only
		[47] = true,
	},
	_abyssal_equipment_label = "''Abyssal Equipment''",
}

function EnemyEquipmentInfoKai:get_module()
	self._equipment_data_module = Equipment:get_module(self._args.name or self._args[1], 'EnemyEquipment')
end

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

function EnemyEquipmentInfoKai:crafting()
	self._vars.buildable = self._abyssal_equipment_label
end

return EnemyEquipmentInfoKai