(text)
| 995 | |
| 996 | |
| 997 | def isValidDroneImport(text): |
| 998 | lines = list(lineIter(text)) |
| 999 | mutaData = importGetMutationData(lines) |
| 1000 | text = '\n'.join(lines) |
| 1001 | pattern = r'x\d+(\s*\[\d+\])?$' |
| 1002 | for line in lineIter(text): |
| 1003 | if not re.search(pattern, line): |
| 1004 | return False, () |
| 1005 | itemData = parseAdditions(text, mutaData=mutaData) |
| 1006 | if not itemData: |
| 1007 | return False, () |
| 1008 | for item, amount, mutation in itemData: |
| 1009 | if not item.isDrone: |
| 1010 | return False, () |
| 1011 | return True, itemData |
| 1012 | |
| 1013 | |
| 1014 | def isValidFighterImport(text): |
no test coverage detected