Line 435: |
Line 435: |
| end | | end |
| end | | end |
| + | end |
| + | if args.sort and sequence then |
| + | table.sort(sequence, function(a, b) |
| + | local a = Ship(a) |
| + | local b = Ship(b) |
| + | local x = a[args.sort](a) |
| + | local y = b[args.sort](b) |
| + | if x < y then return true |
| + | elseif x == y then return a:id() < b:id() |
| + | else return false end |
| + | end) |
| end | | end |
| elseif arg == "!@" then | | elseif arg == "!@" then |