Line 112: |
Line 112: |
| or (air_parity .. "/" .. air_superiority .. "/" .. air_supremacy) | | or (air_parity .. "/" .. air_superiority .. "/" .. air_supremacy) |
| --]=] | | --]=] |
− | local air_parity = as_complete and string.format("%.1d", math.ceil((2./3.) * as)) or "?" | + | local air_denial_string = "?" |
− | local air_superiority = as_complete and string.format("%.1d", math.ceil(as * (3 / 2))) or "?"
| + | local air_parity_string = "?" |
− | local air_supremacy = as_complete and tostring(as * 3) or "?"
| + | local air_superiority_string = "?" |
− | local air_denial = as_complete and string.format("%.1d", math.floor(as / 3 + 1)) or "?"
| + | local air_supremacy_string = "?" |
− | local air_string = air_denial .. "/" .. air_parity .. "/" .. air_superiority .. "/" .. air_supremacy | + | if as_complete then |
− |
| + | local air_parity = math.ceil(as * 2 / 3) |
| + | local air_denial = air_parity > 0 and math.floor(as / 3 + 1) or 0 |
| + | local air_superiority = math.ceil(as * 3 / 2) |
| + | local air_supremacy = as * 3 |
| + | air_denial_string = string.format("%.1d", air_denial) |
| + | air_parity_string = string.format("%.1d", air_parity) |
| + | air_superiority_string = string.format("%.1d", air_superiority) |
| + | air_supremacy_string = string.format("%.1d", air_supremacy) |
| + | end |
| + | local air_string = air_denial_string .. "/" .. air_parity_string .. "/" .. air_superiority_string .. "/" .. air_supremacy_string |
| table.insert(self._items, { | | table.insert(self._items, { |
| node = node, | | node = node, |