Skip to content

Commit

Permalink
Explicitly reject multiple W-pop sophont codes
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberiaResurrection committed Nov 14, 2023
1 parent 42e891a commit abd6673
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions PyRoute/TradeCodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,13 @@ def is_well_formed(self):
msg = "Sophont codes must be 5 chars each - got at least " + bad_sophonts[0]
return False, msg

# explicitly exclude multiple W-pop (ie, 95+%) sophonts
big_sophs = [code for code in self.sophont_list if code.endswith('W')]
if 1 < len(big_sophs):
sophs = ' '.join(big_sophs)
msg = "Can have at most one W-pop sophont. Have " + sophs
return False, msg

return result, msg

def trim_ill_formed_residual_codes(self):
Expand Down

0 comments on commit abd6673

Please sign in to comment.