• 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
trying Ship module
Line 1: Line 1:     
local getArgs = require('Module:GetArgs')
 
local getArgs = require('Module:GetArgs')
 +
 +
local Ship = require('Module:Ship')
    
local DropList = {}
 
local DropList = {}
Line 41: Line 43:  
local ship, nodes = arg:match(args_grammar.ship_and_nodes)
 
local ship, nodes = arg:match(args_grammar.ship_and_nodes)
 
-- TODO: check ship existence?
 
-- TODO: check ship existence?
 +
local ship_table = Ship:get_table(ship, "")
 
table.insert(tbl.rows, {})
 
table.insert(tbl.rows, {})
 
local row = tbl.rows[#tbl.rows]
 
local row = tbl.rows[#tbl.rows]
 
row.id = arg_name
 
row.id = arg_name
 
row.ship = ship
 
row.ship = ship
row.type = ''
+
row.type = ship_table and ship_table._name or '?'
 
row.nodes = {}
 
row.nodes = {}
 
for _, node in pairs(tbl.nodes) do
 
for _, node in pairs(tbl.nodes) do
cssedit, gkautomate
7,060

edits

Navigation menu