Line 31: |
Line 31: |
| local entry = {} | | local entry = {} |
| for _, item in ipairs(args) do | | for _, item in ipairs(args) do |
− | if item == "-" then | + | if item == "-" and #entry > 2 then |
| local ship = Ship(entry[1], entry[2]) | | local ship = Ship(entry[1], entry[2]) |
| local types = { | | local types = { |
Line 61: |
Line 61: |
| while mw.ustring.find(item, '/') do | | while mw.ustring.find(item, '/') do |
| local split = mw.ustring.find(item, '/') | | local split = mw.ustring.find(item, '/') |
− | table.insert(entry, mw.ustring.sub(item, 1, split - 1)) | + | local new_entry = mw.ustring.sub(item, 1, split - 1) |
| + | if new_entry == "-" then new_entry = "" end |
| + | table.insert(entry, new_entry) |
| item = mw.ustring.sub(item, split + 1) | | item = mw.ustring.sub(item, split + 1) |
| end | | end |
| + | if item == "-" then item = "" end |
| table.insert(entry, item) | | table.insert(entry, item) |
| end | | end |