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

Changes

Jump to navigation Jump to search
no edit summary
Line 301: Line 301:  
[3] = 1,
 
[3] = 1,
 
[4] = 1,
 
[4] = 1,
[5] = {value = 2, note = "Bismarck drei only"},
+
[5] = {value = 2, note = "Bismarck drei only", code = "Bismarck Drei"},
 
[6] = 0,
 
[6] = 0,
 
[7] = 0,
 
[7] = 0,
Line 376: Line 376:  
[36] = 1,
 
[36] = 1,
 
[37] = 0,
 
[37] = 0,
[38] = {value = 2, note = "Yamato-class or remodelled Nagato-class only"},
+
[38] = {value = 2, note = "Yamato-class or remodelled Nagato-class only", code = "Yamato-class, remodelled Nagato-class"},
 
[39] = 1,
 
[39] = 1,
 
[40] = 1,
 
[40] = 1,
Line 1,024: Line 1,024:     
function EquipmentData:equippable(ship_type)
 
function EquipmentData:equippable(ship_type)
local compatibility_table = self._equipment_compatibility[ship_type]
+
local equipment_type = self:type()
if compatibility_table then
+
if not ship_type then
local compatibility = compatibility_table[self:type()]
+
local result = {}
if type(compatibility) ~= "table" then
+
for ship_type, compatibility_table in pairs(self._equipment_compatibility) do
return compatibility
+
result[ship_type] = compatibility_table[equipment_type]
else
+
end
return compatibility.value, compatibility.note
+
return result
 +
else
 +
local compatibility_table = self._equipment_compatibility[ship_type]
 +
if compatibility_table then
 +
local compatibility = compatibility_table[equipment_type]
 +
if type(compatibility) ~= "table" then
 +
return compatibility
 +
else
 +
return compatibility.value, compatibility.note
 +
end
 
end
 
end
 
end
 
end
Anonymous user

Navigation menu