• 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 14: Line 14:  
})
 
})
    +
--Returns the name of the equipment as !!HTML!! with appropriate classes to show/hide strict/common translation variants.
 +
--Use this for display purposes.
 
function EquipmentData:name()
 
function EquipmentData:name()
 
return self._name
 
return self._name
 
end
 
end
    +
--Returns the equipment's strict name translation as a string.
 
function EquipmentData:strict_name()
 
function EquipmentData:strict_name()
 
return self._strict_name
 
return self._strict_name
 
end
 
end
    +
--Returns the equipment's common name translation as a string.
 
function EquipmentData:common_name()
 
function EquipmentData:common_name()
 
return self._common_name or self:name()
 
return self._common_name or self:name()
 
end
 
end
    +
--Returns the equipment's name used for assets.
 +
--Use this for internal references.
 
function EquipmentData:asset_name()
 
function EquipmentData:asset_name()
 
return self._asset_name or self:common_name()
 
return self._asset_name or self:common_name()
 
end
 
end
    +
--Returns a tuple for use in Formatting:format_link() to generate a link to this equipment's page.
 
function EquipmentData:link()
 
function EquipmentData:link()
 
if self._page then
 
if self._page then
Line 39: Line 46:  
end
 
end
    +
--Returns the equipment's id.
 
function EquipmentData:id()
 
function EquipmentData:id()
 
return self._id
 
return self._id
Line 45: Line 53:  
EquipmentData.api_id = EquipmentData.id
 
EquipmentData.api_id = EquipmentData.id
    +
--Returns the equipment's localized name, for when the equipment name is translated as romaji.
 
function EquipmentData:localized_name()
 
function EquipmentData:localized_name()
 
return self._localized_name
 
return self._localized_name
 
end
 
end
    +
--Returns the reading of the equipment's Japanese name.
 
function EquipmentData:reading()
 
function EquipmentData:reading()
 
return self._reading
 
return self._reading
 
end
 
end
    +
--Returns the equipment's name in the equipment list.
 
function EquipmentData:list_name()
 
function EquipmentData:list_name()
 
return self._list_name
 
return self._list_name
 
end
 
end
    +
--Returns the equipment's Japanese name in the equipment list.
 
function EquipmentData:list_japanese_name()
 
function EquipmentData:list_japanese_name()
 
return self._list_japanese_name
 
return self._list_japanese_name
 
end
 
end
    +
--Returns the equipment's localized name in the equipment list.
 
function EquipmentData:list_localized_name()
 
function EquipmentData:list_localized_name()
 
return self._list_localized_name
 
return self._list_localized_name
 
end
 
end
    +
--Returns the reading of the equipment's Japanese name in the equipment list.
 
function EquipmentData:list_reading()
 
function EquipmentData:list_reading()
 
return self._list_reading
 
return self._list_reading
 
end
 
end
    +
--Returns the equipment's name in the equipment comparison.
 
function EquipmentData:comparison_name()
 
function EquipmentData:comparison_name()
 
return self._comparison_name
 
return self._comparison_name
 
end
 
end
    +
--Returns the equipment's Japanese name in the equipment comparison.
 
function EquipmentData:comparison_japanese_name()
 
function EquipmentData:comparison_japanese_name()
 
return self._comparison_japanese_name
 
return self._comparison_japanese_name
 
end
 
end
    +
--Returns the equipment's localized name in the equipment comparison.
 
function EquipmentData:comparison_localized_name()
 
function EquipmentData:comparison_localized_name()
 
return self._comparison_localized_name
 
return self._comparison_localized_name
 
end
 
end
    +
--Returns the reading of the equipment's Japanese name in the equipment comparison.
 
function EquipmentData:comparison_reading()
 
function EquipmentData:comparison_reading()
 
return self._comparison_reading
 
return self._comparison_reading
 
end
 
end
    +
--Returns the equipment's name in battle.
 
function EquipmentData:battle_name()
 
function EquipmentData:battle_name()
 
return self._battle_name
 
return self._battle_name
 
end
 
end
    +
--Returns the equipment's Japanese name in battle.
 
function EquipmentData:battle_japanese_name()
 
function EquipmentData:battle_japanese_name()
 
return self._battle_japanese_name
 
return self._battle_japanese_name
 
end
 
end
    +
--Returns the equipment's localized name in battle.
 
function EquipmentData:battle_localized_name()
 
function EquipmentData:battle_localized_name()
 
return self._battle_localized_name
 
return self._battle_localized_name
 
end
 
end
    +
--Returns the reading of the equipment's Japanese name in battle.
 
function EquipmentData:battle_reading()
 
function EquipmentData:battle_reading()
 
return self._battle_reading
 
return self._battle_reading
 
end
 
end
    +
--Returns the equipment's name in the library.
 
function EquipmentData:library_name()
 
function EquipmentData:library_name()
 
return self._library_name
 
return self._library_name
 
end
 
end
    +
--Returns the equipment's Japanese name in the library.
 
function EquipmentData:library_japanese_name()
 
function EquipmentData:library_japanese_name()
 
return self._library_japanese_name
 
return self._library_japanese_name
 
end
 
end
    +
--Returns the equipment's localized name in the library.
 
function EquipmentData:library_localized_name()
 
function EquipmentData:library_localized_name()
 
return self._library_localized_name
 
return self._library_localized_name
 
end
 
end
    +
--Returns the reading of the equipment's Japanese name in the library.
 
function EquipmentData:library_reading()
 
function EquipmentData:library_reading()
 
return self._library_reading
 
return self._library_reading
 
end
 
end
    +
--Returns the equipment's name on it's card.
 
function EquipmentData:card_name()
 
function EquipmentData:card_name()
 
return self._card_name
 
return self._card_name
 
end
 
end
    +
--Returns the equipment's Japanese name on it's card.
 
function EquipmentData:card_japanese_name()
 
function EquipmentData:card_japanese_name()
 
return self._card_japanese_name
 
return self._card_japanese_name
 
end
 
end
    +
--Returns the equipment's localized name on it's card.
 
function EquipmentData:card_localized_name()
 
function EquipmentData:card_localized_name()
 
return self._card_localized_name
 
return self._card_localized_name
 
end
 
end
    +
--Returns the reading of the equipment's Japanese name on it's card.
 
function EquipmentData:card_reading()
 
function EquipmentData:card_reading()
 
return self._card_reading
 
return self._card_reading
 
end
 
end
    +
--Returns the equipment's Japanese name as a string.
 
function EquipmentData:japanese_name()
 
function EquipmentData:japanese_name()
 
return self._japanese_name
 
return self._japanese_name
 
end
 
end
    +
--Returns the equipment's type as an integer according to the KanColle API.
 +
--You can use Formatting:format_equipment_type to convert this to the name of the type.
 
function EquipmentData:type()
 
function EquipmentData:type()
 
return self._type
 
return self._type
 
end
 
end
    +
--The level of improvement of the equipment in Akashi's Improvement Arsenal (how many stars it has).
 +
--This is not meant to be defined in equipment data modules.
 +
--Instead, call Equipment("equipment name") to get an EquipmentData object.
 +
--Then, call the equipment data object with _level = n to create an EquipmentData object with that level.
 +
--Example: local equip = Equipment("12.7cm Twin Gun Mount")
 +
--        local improved_equip = equip{_level = 10}
 +
function EquipmentData:level()
 +
    return self._level
 +
end
 +
 +
--The rank of the equipment for aircraft proficiency.
 +
--This should be treated similarly to EquipmentData:level() above.
 +
function EquipmentData:rank()
 +
    return self._rank
 +
end
 +
 +
--The type name shown in the album/library as a string.
 
function EquipmentData:album_type()
 
function EquipmentData:album_type()
 
return self._album_type
 
return self._album_type
 
end
 
end
    +
--The rarity of the equipment as an integer according to the KanColle API.
 
function EquipmentData:rarity()
 
function EquipmentData:rarity()
 
return self._rarity
 
return self._rarity
 
end
 
end
    +
--The amount of stars on the rarity ribbon on the equipment's card as an integer. Defaults to EquipmentData:back().
 
function EquipmentData:stars()
 
function EquipmentData:stars()
 
return self._stars or self:back()
 
return self._stars or self:back()
 
end
 
end
    +
--The rarity of the background of the equipment's card as an integer. Defaults to EquipmentData:rarity().
 
function EquipmentData:back()
 
function EquipmentData:back()
 
return self._back or self:rarity()
 
return self._back or self:rarity()
Anonymous user

Navigation menu