Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:NodeInfo
(view source)
Revision as of 21:41, 15 April 2015
154 bytes added
,
9 years ago
m
no edit summary
Line 124:
Line 124:
--Fleets are of variable size, so we append onto a string until we hit the next node declaration
--Fleets are of variable size, so we append onto a string until we hit the next node declaration
local split = mw.ustring.find(item_key, '/')
local split = mw.ustring.find(item_key, '/')
−
local ship_name = mw.ustring.sub(item_key, 1, split - 1)
+
local
ship_name, ship_suffix
−
local
ship_suffix = mw.ustring.sub(item_key, split + 1)
+
if split then
+
ship_name = mw.ustring.sub(item_key, 1, split - 1)
+
ship_suffix = mw.ustring.sub(item_key, split + 1)
+
else
+
ship_name = item_key
+
ship_suffix = ""
+
end
local ship = EnemyShip(ship_name, ship_suffix)
local ship = EnemyShip(ship_name, ship_suffix)
Nanamin
48
edits