X-Git-Url: https://git.ctpug.org.za/?p=koperkapel.git;a=blobdiff_plain;f=koperkapel%2Fserums.py;fp=koperkapel%2Fserums.py;h=f80163932538b22e83db90ac3875eedd0aed760f;hp=5162180502e36e8c2c126f1da5379f1e5b079049;hb=cc4eaf7d2fcb43531d3c6800d1fe481bb8094a51;hpb=57cda86d1aa60e04e3dd7567439cd79cd95f3e1a diff --git a/koperkapel/serums.py b/koperkapel/serums.py index 5162180..f801639 100644 --- a/koperkapel/serums.py +++ b/koperkapel/serums.py @@ -19,6 +19,7 @@ SERUM_OVERLAY_COLORS = { "smart": (0, 0, 255, 255), # blue "fast": (0, 255, 0, 255), # green "strong": (255, 0, 255, 255), # purple + "health": (255, 0, 0, 255), # red "none": (170, 68, 0, 255), # brown } @@ -41,12 +42,13 @@ class SerumFactory: def __init__(self, suffix): self.suffix = suffix - def assemble_icon(self, name): + def assemble_icon(self, name, color=None): assert name in SERUMS + color = color or name serum_icon = images.load(safepath("serum%s/%s") % ( self.suffix, SERUM_TILENAME_MAP[name],)) frame = serum_icon.copy() - frame.fill(SERUM_OVERLAY_COLORS[name], None, BLEND_RGBA_MULT) + frame.fill(SERUM_OVERLAY_COLORS[color], None, BLEND_RGBA_MULT) return frame def assemble(self, name):