From: Simon Cross Date: Sat, 5 Mar 2016 13:29:03 +0000 (+0200) Subject: Add roach_is_serumless helper. X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=960200f15d941b367913f0821d7fac8ac5705707;p=koperkapel.git Add roach_is_serumless helper. --- diff --git a/koperkapel/serums.py b/koperkapel/serums.py index c2a52bb..40ebfba 100644 --- a/koperkapel/serums.py +++ b/koperkapel/serums.py @@ -27,6 +27,13 @@ def roach_serum_color(roach): return SERUM_OVERLAY_COLORS["none"] +def roach_is_serumless(roach): + for serum_name in SERUMS: + if getattr(roach, serum_name): + return False + return True + + class SerumFactory: def __init__(self, suffix): self.suffix = suffix