Open main menu
Home
Random
Nearby
Log in
Settings
About Kancolle Wiki
Disclaimers
Kancolle Wiki
Search
Changes
← Older edit
Newer edit →
Module:NanaminFleet
(view source)
Revision as of 03:59, 6 April 2015
416 bytes removed
,
9 years ago
m
Remove some hard-coding.
Line 70:
Line 70:
function NanaminFleet:Infobox(args)
function NanaminFleet:Infobox(args)
−
local ships = {
+
local ships = {
}
−
--When you have no idea how to do dynamic variable naming...hard-coding.
+
for i
=
1
,
6 do
−
ship1
=
Ship(args.ships.ship1.name, args.ships.ship1.remodel)
,
+
ships
[i]
= Ship(args.ships
[i]
.name, args.ships
[i]
.remodel)
−
ship2 = Ship(args.ships.ship2.name, args.
ships
.ship2.remodel),
+
end
−
ship3
= Ship(args.ships
.ship3
.name, args.ships
.ship3.remodel),
−
ship4 = Ship(args.ships.ship4.name, args.ships.ship4.remodel),
−
ship5 = Ship(args.ships.ship5.name, args.ships.ship5.remodel),
−
ship6 = Ship(args.ships.ship6.name, args.ships.ship6
.remodel)
−
}
return format(self._template)
return format(self._template)
end
end
return NanaminFleet
return NanaminFleet
Nanamin
48
edits