Changes

Refactor
Line 1: Line 1:  
local BaseData = require("Module:BaseData")
 
local BaseData = require("Module:BaseData")
 +
local EquipmentCompatibility --lazily loaded when equippable() is called
 
local Formatting = require('Module:Formatting')
 
local Formatting = require('Module:Formatting')
   Line 7: Line 8:  
_mobile_hide_class = "mobile-hide",
 
_mobile_hide_class = "mobile-hide",
 
_display_none_css = {display = "none"},
 
_display_none_css = {display = "none"},
_equipment_compatibility = {
  −
[1] = {
  −
[1] = 0,
  −
[2] = 0,
  −
[3] = 0,
  −
[4] = 0,
  −
[5] = 0,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 0,
  −
[11] = 0,
  −
[12] = 0,
  −
[13] = 0,
  −
[14] = 0,
  −
[15] = 0,
  −
[16] = 0,
  −
[17] = 0,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 0,
  −
[21] = 0,
  −
[22] = 0,
  −
[23] = 0,
  −
[24] = 0,
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 0,
  −
[28] = 0,
  −
[29] = 0,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 0,
  −
[34] = 0,
  −
[35] = 0,
  −
[36] = 0,
  −
[37] = 0,
  −
[38] = 0,
  −
[39] = 0,
  −
[40] = 0,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 0,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[2] = {
  −
[1] = 1,
  −
[2] = 0,
  −
[3] = 0,
  −
[4] = 0,
  −
[5] = 1,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 0,
  −
[11] = 0,
  −
[12] = 1,
  −
[13] = 0,
  −
[14] = 1,
  −
[15] = 1,
  −
[16] = 0,
  −
[17] = 1,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 0,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 0,
  −
[28] = 0,
  −
[29] = 1,
  −
[30] = 1,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 1,
  −
[34] = 0,
  −
[35] = 0,
  −
[36] = 1,
  −
[37] = 1,
  −
[38] = 0,
  −
[39] = 1,
  −
[40] = 0,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[3] = {
  −
[1] = 1,
  −
[2] = 1,
  −
[3] = 0,
  −
[4] = 1,
  −
[5] = 1,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 1,
  −
[11] = 0,
  −
[12] = 1,
  −
[13] = 1,
  −
[14] = 1,
  −
[15] = 1,
  −
[16] = 0,
  −
[17] = 1,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = {value = 2, note = "Abukuma Kai Ni only", code = "Abukuma Kai Ni"},
  −
[23] = 1,
  −
[24] = {value = 2, note = "Abukuma Kai Ni only", code = "Abukuma Kai Ni"},
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 0,
  −
[28] = 0,
  −
[29] = 1,
  −
[30] = 1,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 1,
  −
[34] = 1,
  −
[35] = 0,
  −
[36] = 1,
  −
[37] = 1,
  −
[38] = 0,
  −
[39] = 1,
  −
[40] = 0,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[4] = {
  −
[1] = 1,
  −
[2] = 1,
  −
[3] = 0,
  −
[4] = 1,
  −
[5] = 1,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 0,
  −
[11] = 0,
  −
[12] = 1,
  −
[13] = 1,
  −
[14] = 1,
  −
[15] = 1,
  −
[16] = 0,
  −
[17] = 1,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 1,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 0,
  −
[28] = 0,
  −
[29] = 0,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 1,
  −
[34] = 1,
  −
[35] = 0,
  −
[36] = 1,
  −
[37] = 0,
  −
[38] = 0,
  −
[39] = 1,
  −
[40] = 0,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[5] = {
  −
[1] = 0,
  −
[2] = 1,
  −
[3] = 0,
  −
[4] = 1,
  −
[5] = 1,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 1,
  −
[11] = 0,
  −
[12] = 1,
  −
[13] = 1,
  −
[14] = 0,
  −
[15] = 0,
  −
[16] = 1,
  −
[17] = 1,
  −
[18] = 1,
  −
[19] = 0,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 0,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 1,
  −
[28] = 0,
  −
[29] = 1,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 1,
  −
[34] = 1,
  −
[35] = 0,
  −
[36] = 1,
  −
[37] = 0,
  −
[38] = 0,
  −
[39] = 1,
  −
[40] = 1,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[6] = {
  −
[1] = 0,
  −
[2] = 1,
  −
[3] = 0,
  −
[4] = 1,
  −
[5] = 1,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 1,
  −
[11] = 1,
  −
[12] = 1,
  −
[13] = 1,
  −
[14] = 0,
  −
[15] = 0,
  −
[16] = 1,
  −
[17] = 1,
  −
[18] = 1,
  −
[19] = 0,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 0,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 1,
  −
[26] = 0,
  −
[27] = 1,
  −
[28] = 0,
  −
[29] = 1,
  −
[30] = 1,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 1,
  −
[34] = 1,
  −
[35] = 1,
  −
[36] = 1,
  −
[37] = 1,
  −
[38] = 0,
  −
[39] = 1,
  −
[40] = 1,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[7] = {
  −
[1] = 0,
  −
[2] = 0,
  −
[3] = 0,
  −
[4] = 1,
  −
[5] = 0,
  −
[6] = 1,
  −
[7] = 1,
  −
[8] = 1,
  −
[9] = 1,
  −
[10] = 0,
  −
[11] = 0,
  −
[12] = 1,
  −
[13] = 1,
  −
[14] = 0,
  −
[15] = 0,
  −
[16] = 1,
  −
[17] = 1,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 0,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 1,
  −
[26] = 1,
  −
[27] = 1,
  −
[28] = 0,
  −
[29] = 0,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 0,
  −
[34] = 1,
  −
[35] = 1,
  −
[36] = 1,
  −
[37] = 0,
  −
[38] = 0,
  −
[39] = 0,
  −
[40] = 1,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[8] = {
  −
[1] = 0,
  −
[2] = 0,
  −
[3] = 1,
  −
[4] = 1,
  −
[5] = {value = 2, note = "Bismarck drei only", code = "Bismarck Drei"},
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 1,
  −
[11] = 0,
  −
[12] = 1,
  −
[13] = 1,
  −
[14] = 0,
  −
[15] = 0,
  −
[16] = 1,
  −
[17] = 1,
  −
[18] = 1,
  −
[19] = 1,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 0,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 0,
  −
[28] = 1,
  −
[29] = 1,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 1,
  −
[34] = 1,
  −
[35] = 0,
  −
[36] = 1,
  −
[37] = 0,
  −
[38] = 0,
  −
[39] = 1,
  −
[40] = 1,
  −
[41] = 0,
  −
[42] = 1,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 1,
  −
},
  −
[9] = {
  −
[1] = 0,
  −
[2] = 1,
  −
[3] = 1,
  −
[4] = 1,
  −
[5] = 0,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 1,
  −
[11] = 0,
  −
[12] = 1,
  −
[13] = 1,
  −
[14] = 0,
  −
[15] = 0,
  −
[16] = 1,
  −
[17] = 1,
  −
[18] = 1,
  −
[19] = 1,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 0,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 0,
  −
[28] = 1,
  −
[29] = 1,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 1,
  −
[34] = 1,
  −
[35] = 0,
  −
[36] = 1,
  −
[37] = 0,
  −
[38] = {value = 2, note = "Yamato-class or remodelled Nagato-class only", code = "Yamato-class, remodelled Nagato-class"},
  −
[39] = 1,
  −
[40] = 1,
  −
[41] = 0,
  −
[42] = 1,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 1,
  −
},
  −
[10] = {
  −
[1] = 0,
  −
[2] = 1,
  −
[3] = 1,
  −
[4] = 1,
  −
[5] = 0,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 1,
  −
[11] = 1,
  −
[12] = 1,
  −
[13] = 1,
  −
[14] = 0,
  −
[15] = 0,
  −
[16] = 1,
  −
[17] = 1,
  −
[18] = 1,
  −
[19] = 1,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 0,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 1,
  −
[26] = 0,
  −
[27] = 0,
  −
[28] = 1,
  −
[29] = 1,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 1,
  −
[34] = 1,
  −
[35] = 1,
  −
[36] = 1,
  −
[37] = 1,
  −
[38] = 0,
  −
[39] = 1,
  −
[40] = 1,
  −
[41] = 0,
  −
[42] = 1,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 1,
  −
},
  −
[11] = {
  −
[1] = 0,
  −
[2] = 0,
  −
[3] = 0,
  −
[4] = 1,
  −
[5] = 0,
  −
[6] = 1,
  −
[7] = 1,
  −
[8] = 1,
  −
[9] = 1,
  −
[10] = 0,
  −
[11] = 0,
  −
[12] = 1,
  −
[13] = 1,
  −
[14] = 0,
  −
[15] = 0,
  −
[16] = 1,
  −
[17] = 1,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 0,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 0,
  −
[28] = 1,
  −
[29] = 0,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 0,
  −
[34] = 1,
  −
[35] = 1,
  −
[36] = 1,
  −
[37] = 0,
  −
[38] = 0,
  −
[39] = 0,
  −
[40] = 1,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[12] = {
  −
[1] = 0,
  −
[2] = 0,
  −
[3] = 0,
  −
[4] = 0,
  −
[5] = 0,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 0,
  −
[11] = 0,
  −
[12] = 0,
  −
[13] = 0,
  −
[14] = 0,
  −
[15] = 0,
  −
[16] = 0,
  −
[17] = 0,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 0,
  −
[21] = 0,
  −
[22] = 0,
  −
[23] = 0,
  −
[24] = 0,
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 0,
  −
[28] = 0,
  −
[29] = 0,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 0,
  −
[34] = 0,
  −
[35] = 0,
  −
[36] = 0,
  −
[37] = 0,
  −
[38] = 0,
  −
[39] = 0,
  −
[40] = 0,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 0,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[13] = {
  −
[1] = 0,
  −
[2] = 0,
  −
[3] = 0,
  −
[4] = 0,
  −
[5] = 1,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 0,
  −
[11] = 0,
  −
[12] = 0,
  −
[13] = 0,
  −
[14] = 1,
  −
[15] = 0,
  −
[16] = 0,
  −
[17] = 1,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 0,
  −
[21] = 0,
  −
[22] = 1,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 0,
  −
[28] = 0,
  −
[29] = 0,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 1,
  −
[33] = 0,
  −
[34] = 0,
  −
[35] = 0,
  −
[36] = 0,
  −
[37] = 1,
  −
[38] = 0,
  −
[39] = 0,
  −
[40] = 0,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[14] = {
  −
[1] = 0,
  −
[2] = 0,
  −
[3] = 0,
  −
[4] = 0,
  −
[5] = 1,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 1,
  −
[11] = 1,
  −
[12] = 0,
  −
[13] = 0,
  −
[14] = 1,
  −
[15] = 0,
  −
[16] = 0,
  −
[17] = 1,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 0,
  −
[21] = 0,
  −
[22] = 1,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 0,
  −
[28] = 0,
  −
[29] = 0,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 1,
  −
[33] = 0,
  −
[34] = 0,
  −
[35] = 0,
  −
[36] = 0,
  −
[37] = 1,
  −
[38] = 0,
  −
[39] = 0,
  −
[40] = 0,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[15] = {
  −
[1] = 0,
  −
[2] = 0,
  −
[3] = 0,
  −
[4] = 0,
  −
[5] = 0,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 0,
  −
[11] = 0,
  −
[12] = 0,
  −
[13] = 0,
  −
[14] = 0,
  −
[15] = 0,
  −
[16] = 0,
  −
[17] = 0,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 0,
  −
[21] = 0,
  −
[22] = 0,
  −
[23] = 0,
  −
[24] = 0,
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 0,
  −
[28] = 0,
  −
[29] = 0,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 0,
  −
[34] = 0,
  −
[35] = 0,
  −
[36] = 0,
  −
[37] = 0,
  −
[38] = 0,
  −
[39] = 0,
  −
[40] = 0,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 0,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[16] = {
  −
[1] = 1,
  −
[2] = 0,
  −
[3] = 0,
  −
[4] = 1,
  −
[5] = 0,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 1,
  −
[11] = 1,
  −
[12] = 1,
  −
[13] = 1,
  −
[14] = {value = 2, note = "Akitsushima Kai only", code = "Akitsushima Kai"},
  −
[15] = 1,
  −
[16] = 1,
  −
[17] = 1,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = {value = 2, note = "Excluding Akitsushima", code = "AV excluding Akitsushima"},
  −
[23] = 1,
  −
[24] = {value = 2, note = "Excluding Akitsushima", code = "AV excluding Akitsushima"},
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 1,
  −
[28] = 0,
  −
[29] = 1,
  −
[30] = 1,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 1,
  −
[34] = 1,
  −
[35] = {value = 2, note = "Akitsushima Kai only", code = "Akitsushima Kai"},
  −
[36] = 1,
  −
[37] = 1,
  −
[38] = 0,
  −
[39] = 1,
  −
[40] = 1,
  −
[41] = {value = 2, note = "Akitsushima only", code = "Akitsushima"},
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[17] = {
  −
[1] = 1,
  −
[2] = 0,
  −
[3] = 0,
  −
[4] = 1,
  −
[5] = 0,
  −
[6] = 1,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 0,
  −
[11] = 0,
  −
[12] = 1,
  −
[13] = 0,
  −
[14] = 0,
  −
[15] = 0,
  −
[16] = 0,
  −
[17] = 1,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 0,
  −
[23] = 1,
  −
[24] = 1,
  −
[25] = 1,
  −
[26] = 1,
  −
[27] = 0,
  −
[28] = 0,
  −
[29] = 0,
  −
[30] = 1,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 0,
  −
[34] = 1,
  −
[35] = 0,
  −
[36] = 1,
  −
[37] = 1,
  −
[38] = 0,
  −
[39] = 0,
  −
[40] = 1,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[18] = {
  −
[1] = 0,
  −
[2] = 0,
  −
[3] = 0,
  −
[4] = 1,
  −
[5] = 0,
  −
[6] = 1,
  −
[7] = 1,
  −
[8] = 1,
  −
[9] = 1,
  −
[10] = 0,
  −
[11] = 0,
  −
[12] = 1,
  −
[13] = 1,
  −
[14] = 0,
  −
[15] = 0,
  −
[16] = 1,
  −
[17] = 1,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 0,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 0,
  −
[28] = 1,
  −
[29] = 0,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 0,
  −
[34] = 1,
  −
[35] = 1,
  −
[36] = 1,
  −
[37] = 0,
  −
[38] = 0,
  −
[39] = 0,
  −
[40] = 1,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[19] = {
  −
[1] = 1,
  −
[2] = 0,
  −
[3] = 0,
  −
[4] = 1,
  −
[5] = 0,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 0,
  −
[11] = 0,
  −
[12] = 1,
  −
[13] = 0,
  −
[14] = 0,
  −
[15] = 0,
  −
[16] = 0,
  −
[17] = 1,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 0,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 1,
  −
[26] = 0,
  −
[27] = 1,
  −
[28] = 0,
  −
[29] = 0,
  −
[30] = 0,
  −
[31] = 1,
  −
[32] = 0,
  −
[33] = 1,
  −
[34] = 0,
  −
[35] = 0,
  −
[36] = 1,
  −
[37] = 0,
  −
[38] = 0,
  −
[39] = 0,
  −
[40] = 0,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[20] = {
  −
[1] = 1,
  −
[2] = 0,
  −
[3] = 0,
  −
[4] = 1,
  −
[5] = 0,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 1,
  −
[11] = 0,
  −
[12] = 1,
  −
[13] = 0,
  −
[14] = 0,
  −
[15] = 0,
  −
[16] = 0,
  −
[17] = 1,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 0,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 1,
  −
[26] = 0,
  −
[27] = 1,
  −
[28] = 0,
  −
[29] = 0,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 1,
  −
[34] = 1,
  −
[35] = 0,
  −
[36] = 1,
  −
[37] = 1,
  −
[38] = 0,
  −
[39] = 1,
  −
[40] = 1,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[21] = {
  −
[1] = 1,
  −
[2] = 1,
  −
[3] = 0,
  −
[4] = 1,
  −
[5] = 1,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = 0,
  −
[9] = 0,
  −
[10] = 1,
  −
[11] = 0,
  −
[12] = 1,
  −
[13] = 1,
  −
[14] = 1,
  −
[15] = 1,
  −
[16] = 0,
  −
[17] = 1,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 0,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 0,
  −
[26] = 0,
  −
[27] = 1,
  −
[28] = 0,
  −
[29] = 0,
  −
[30] = 0,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 0,
  −
[34] = 1,
  −
[35] = 0,
  −
[36] = 1,
  −
[37] = 0,
  −
[38] = 0,
  −
[39] = 1,
  −
[40] = 0,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 0,
  −
[93] = 0,
  −
},
  −
[22] = {
  −
[1] = 1,
  −
[2] = 0,
  −
[3] = 0,
  −
[4] = 0,
  −
[5] = 0,
  −
[6] = 0,
  −
[7] = 0,
  −
[8] = {value = 2, note = "Hayasui Kai only", code = "Hayasui Kai"},
  −
[9] = 0,
  −
[10] = 1,
  −
[11] = 1,
  −
[12] = 1,
  −
[13] = 0,
  −
[14] = {value = 2, note = "Hayasui Kai only", code = "Hayasui Kai"},
  −
[15] = 0,
  −
[16] = 0,
  −
[17] = 1,
  −
[18] = 0,
  −
[19] = 0,
  −
[20] = 1,
  −
[21] = 1,
  −
[22] = 0,
  −
[23] = 1,
  −
[24] = 0,
  −
[25] = 1,
  −
[26] = 0,
  −
[27] = 0,
  −
[28] = 0,
  −
[29] = 0,
  −
[30] = 1,
  −
[31] = 0,
  −
[32] = 0,
  −
[33] = 0,
  −
[34] = 0,
  −
[35] = 1,
  −
[36] = 1,
  −
[37] = 0,
  −
[38] = 0,
  −
[39] = 0,
  −
[40] = 0,
  −
[41] = 0,
  −
[42] = 0,
  −
[43] = 1,
  −
[44] = 1,
  −
[93] = 0,
  −
},
  −
}
   
})
 
})
   Line 1,287: Line 252:     
function EquipmentData:equippable(ship_type)
 
function EquipmentData:equippable(ship_type)
 +
self:_load_compatibility()
 
local equipment_type = self:type()
 
local equipment_type = self:type()
 
if not ship_type then
 
if not ship_type then
 
local result = {}
 
local result = {}
for ship_type, compatibility_table in pairs(self._equipment_compatibility) do
+
for ship_type, compatibility_table in pairs(EquipmentCompatibility) do
 
result[ship_type] = compatibility_table[equipment_type]
 
result[ship_type] = compatibility_table[equipment_type]
 
end
 
end
 
return result
 
return result
 
else
 
else
local compatibility_table = self._equipment_compatibility[ship_type]
+
local compatibility_table = EquipmentCompatibility[ship_type]
 
if compatibility_table then
 
if compatibility_table then
 
local compatibility = compatibility_table[equipment_type]
 
local compatibility = compatibility_table[equipment_type]
Line 1,304: Line 270:  
end
 
end
 
end
 
end
 +
end
 +
end
 +
 +
function EquipmentData:_load_compatibility()
 +
if not EquipmentCompatibility then
 +
EquipmentCompatibility = require('Module:EquipmentCompatibility')
 
end
 
end
 
end
 
end
Anonymous user