| Line 88: |
Line 88: |
| | end | | end |
| | | | |
| − | function format_value(key) | + | function format_value(key, ship, target) |
| | local formatting_function = formatting_functions[key] | | local formatting_function = formatting_functions[key] |
| | if formatting_function then | | if formatting_function then |
| Line 177: |
Line 177: |
| | return "|-\n" | | return "|-\n" |
| | elseif prefix == "?" then | | elseif prefix == "?" then |
| − | prefix = string.sub(arg, 2, 2) | + | local prefix2 = string.sub(arg, 1, 2) |
| − | if prefix == "?" then | + | if prefix2 == "??" then |
| | + | local key = string.sub(arg, 3) |
| | + | local value = format_value(key, target, ship) |
| | + | if args.format == "table" then |
| | + | return "|" .. value .. "\n" |
| | + | else |
| | + | return value |
| | + | end |
| | + | elseif prefix2 == "?#" then |
| | local key = string.sub(arg, 3) | | local key = string.sub(arg, 3) |
| | return frame:preprocess(format{ | | return frame:preprocess(format{ |
| Line 187: |
Line 195: |
| | else | | else |
| | local key = string.sub(arg, 2) | | local key = string.sub(arg, 2) |
| − | local value = format_value(key) | + | local value = format_value(key, ship, target) |
| | if args.format == "table" then | | if args.format == "table" then |
| | return "|" .. value .. "\n" | | return "|" .. value .. "\n" |