Changes

support ids for names
Line 5: Line 5:  
local Formatting = require('Module:Formatting')
 
local Formatting = require('Module:Formatting')
 
local ShipBattleCardKai = require("Module:ShipBattleCardKai")
 
local ShipBattleCardKai = require("Module:ShipBattleCardKai")
+
local ShipsByApiId = require('Module:Collection/ShipsByApiId')
 +
 
 
local NodeInfo = BaseTable({
 
local NodeInfo = BaseTable({
 
     _item_class = EnemyShip,
 
     _item_class = EnemyShip,
Line 278: Line 279:  
            end
 
            end
 
             
 
             
 +
            local id = tonumber(ship_name)
 +
            if id then
 +
                ship_name = ShipsByApiId[id]
 +
            end
 +
 
            local ship = EnemyShip(ship_name, ship_suffix)
 
            local ship = EnemyShip(ship_name, ship_suffix)
 
            local ship_air_power = ship:air_power(tags.raid)
 
            local ship_air_power = ship:air_power(tags.raid)
cssedit, gkautomate
7,064

edits