- 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
Line 301:
Line 301:
− +
Line 376:
Line 376:
− +
Line 1,024:
Line 1,024:
− +
− if compatibility_table then+
− local compatibility = compatibility_table[self:type()]+
− if type(compatibility) ~= "table" then+
− return compatibility+
− else+
− return compatibility.value, compatibility.note+
+
+
+
+
+
+
+
+
+
no edit summary
[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,
[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,
function EquipmentData:equippable(ship_type)
function EquipmentData:equippable(ship_type)
local compatibility_table = self._equipment_compatibility[ship_type]
local equipment_type = self:type()
if not ship_type then
local result = {}
for ship_type, compatibility_table in pairs(self._equipment_compatibility) do
result[ship_type] = compatibility_table[equipment_type]
end
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