diff --git a/scripts/cat/cats.py b/scripts/cat/cats.py index 4f00933..bbb1581 100644 --- a/scripts/cat/cats.py +++ b/scripts/cat/cats.py @@ -74,7 +74,9 @@ def randomize_looks(self, just_pattern=False): def SubRandomize(genotype, phenotype): phenotype.SetPoints(choice(['Normal', 'Colourpoint', 'Mink', 'Sepia', 'Point-Albino', 'Sepia-Albino', 'Siamocha', 'Burmocha', 'Mocha', 'Mocha-Albino'])) - genotype.tortiepattern = choice(list(tortie_patches_shapes.keys())) + genotype.tortiepattern = [choice(list(tortie_patches_shapes.keys()))] + if random() < 0.1: + genotype.merlepattern = [choice(list(tortie_patches_shapes.keys()))] genotype.chimerapattern = choice(list(tortie_patches_shapes.keys())) if genotype.sexgene is not ['O', 'O']: genotype.sexgene = choice([['o', 'o'], ['o', 'o'], ['O', 'o']]) @@ -84,15 +86,21 @@ def SubRandomize(genotype, phenotype): phenotype.tortie = False phenotype.SetBaseColour(choice(['Black', 'Blue', 'Red', 'Cream', 'White', 'Albino', 'Chocolate', 'Lilac', 'Cinnamon', 'Fawn', 'Dove', 'Platinum', 'Honey', 'Ivory', 'Champagne', 'Lavender', 'Buff', 'Beige']).lower()) + + if random() < 0.1: + genotype.specialred = choice(['cameo', 'cameo', 'cameo', 'cameo', 'cameo', 'cameo', 'cameo', 'pseudo-cinnamon', 'blue-red', 'blue-tipped', 'blue-tipped']) + else: + genotype.specialred = "none" + genotype.dilutemd[0] = choice(['dm', 'dm', 'dm', 'dm', 'dm', 'Dm']) genotype.bleach[0] = choice(['Lb', 'Lb', 'Lb', 'Lb', 'Lb', 'lb']) genotype.ghosting[0] = choice(['gh', 'gh', 'gh', 'gh', 'gh', 'Gh']) genotype.satin[0] = choice(['St', 'St', 'St', 'St', 'St', 'st']) genotype.brindledbi = (random.random() < 0.1) if (random.random() < 0.1 and genotype.tortiepattern): - genotype.tortiepattern = 'rev' + genotype.tortiepattern + genotype.tortiepattern[0] = 'rev' + genotype.tortiepattern elif genotype.tortiepattern: - genotype.tortiepattern = genotype.tortiepattern.replace('rev', '') + genotype.tortiepattern[0] = genotype.tortiepattern.replace('rev', '') genotype.karp = choice([['k', 'k'], ['k', 'k'], ['k', 'k'], ['k', 'k'], ['k', 'k'], ['k', 'k'], ['K', 'k'], ['K', 'k'], ['K', 'k'], ['K', 'K']]) if global_vars.CREATED_CAT.genotype.karp == ['k', 'k']: @@ -137,6 +145,7 @@ def SubRandomize(genotype, phenotype): genotype.soktype = choice(['normal markings', 'normal markings', 'normal markings', 'normal markings','normal markings' , 'full sokoke', 'mild fading', 'mild fading']) + genotype.fevercoat = random() < 0.1 genotype.silver[0] = choice(['I', 'i', 'i']) genotype.wbtype = choice(['low', 'medium', 'high', 'shaded', 'chinchilla']) genotype.ruftype = choice(['low', 'medium', 'rufoused']) diff --git a/scripts/cat/genotype.py b/scripts/cat/genotype.py index a95d6cb..2a93135 100644 --- a/scripts/cat/genotype.py +++ b/scripts/cat/genotype.py @@ -9,7 +9,7 @@ def __init__(self, spec=None): self.eumelanin = ["B", "B"] self.sexgene = ["o", "o"] self.specialred = "none" - self.tortiepattern = None + self.tortiepattern = [] self.brindledbi = False self.chimera = False if spec: @@ -17,6 +17,8 @@ def __init__(self, spec=None): else: self.chimerageno = Genotype('chimera') self.chimerapattern = None + self.pseudomerle = False + self.merlepattern = [] self.gender = "" self.dilute = ["D", "D"] self.white = ["w", "w"] @@ -24,6 +26,7 @@ def __init__(self, spec=None): self.white_pattern = [None] self.vitiligo = False self.deaf = False + self.fevercoat = False self.pointgene = ["C", "C"] self.silver = ["i", "i"] self.agouti = ["a", "a"] @@ -64,7 +67,7 @@ def __init__(self, spec=None): self.ring = ["Rt", "Rt"] self.munch = ["mk", "mk"] self.poly = ["pd", "pd"] - self.altai = ["al", "al"] + self.pax3 = ["NoDBE", "NoDBE"] self.wideband = "" self.wbtype = "medium" diff --git a/scripts/cat/phenotype.py b/scripts/cat/phenotype.py index 74e9934..1d33733 100644 --- a/scripts/cat/phenotype.py +++ b/scripts/cat/phenotype.py @@ -11,6 +11,7 @@ def __init__(self, genotype): self.colour = "black" self.tortie = False self.silvergold = '' + self.tabby = "" self.tabtype = "Solid" self.point = "Normal" @@ -40,9 +41,6 @@ def __init__(self, genotype): "MASK": "Mask", "CHEST": "Chest", "ARMTAIL": "Armtail", "EMBER": "Ember", "SMOKE": "Smoke", "GRUMPYFACE": "Grumpy Face", "BRIE": "Brie", "BELOVED": "Beloved", "SHILOH" : "Shiloh", "BODY" : "Body"} - - if not self.genotype.tortiepattern: - self.genotype.tortiepattern = choice(list(tortie_patches_shapes.keys())) if not self.genotype.chimerapattern: self.genotype.chimerapattern = choice(list(tortie_patches_shapes.keys())) @@ -135,58 +133,95 @@ def GetTabbySprite(self, special = None): return pattern def ChooseTortiePattern(self, spec = None): - tortie_low_patterns = ['DELILAH', 'MOTTLED', 'EYEDOT', 'BANDANA', 'SMUDGED', 'EMBER', 'BRINDLE', 'SAFI', 'BELOVED', 'BODY', - 'SHILOH', 'FRECKLED'] - tortie_mid_patterns = ['ONE', 'TWO', 'SMOKE', 'MINIMALONE', 'MINIMALTWO', 'MINIMALTHREE', 'MINIMALFOUR', 'OREO', 'CHIMERA', + def_tortie_low_patterns = ['DELILAH', 'MOTTLED', 'EYEDOT', 'BANDANA', 'SMUDGED', 'EMBER', 'BRINDLE', 'SAFI', 'BELOVED', 'BODY', + 'SHILOH', 'FRECKLED'] + def_tortie_mid_patterns = ['ONE', 'TWO', 'SMOKE', 'MINIMALONE', 'MINIMALTWO', 'MINIMALTHREE', 'MINIMALFOUR', 'OREO', 'CHIMERA', 'CHEST', 'GRUMPYFACE', 'SIDEMASK', 'PACMAN', 'BRIE' ,'ORIOLE', 'ROBIN', 'PAIGE', 'HEARTBEAT'] - tortie_high_patterns = ['THREE', 'FOUR', 'REDTAIL', 'HALF', 'STREAK', 'MASK', 'SWOOP', 'ARMTAIL', 'STREAMSTRIKE', 'DAUB', + def_tortie_high_patterns = ['THREE', 'FOUR', 'REDTAIL', 'HALF', 'STREAK', 'MASK', 'SWOOP', 'ARMTAIL', 'STREAMSTRIKE', 'DAUB', 'ROSETAIL', 'DAPPLENIGHT', 'BLANKET'] + tortie_low_patterns = def_tortie_low_patterns + tortie_mid_patterns = def_tortie_mid_patterns + tortie_high_patterns = def_tortie_high_patterns + tiny_patches = ["BACKSPOT", "BEARD", "BELLY", "BIB", "revBLACKSTAR", "BLAZE", "BLAZEMASK", "revBOOTS", "revCHESTSPECK", "ESTRELLA", + "EYEBAGS", "revEYESPOT", "revHEART", "HONEY", "LEFTEAR", "LITTLE", "PAWS", "REVERSEEYE", "REVERSEHEART", "RIGHTEAR", + "SCOURGE", "SPARKLE", "revTAIL", 'revTAILTWO', "TAILTIP", "TEARS", "TIP", "TOES", "TOESTAIL", "VEE"] - chosen = "" + + chosen = [] - if spec: - chosen = choice([choice(tortie_high_patterns), choice(tortie_high_patterns), choice(tortie_mid_patterns), choice(tortie_mid_patterns), choice(tortie_low_patterns)]) + if spec == 'merle': + chosen.append(choice([choice(tortie_low_patterns), choice(tortie_low_patterns), choice(tortie_mid_patterns), choice(tortie_mid_patterns), choice(tiny_patches), choice(tiny_patches), choice(tiny_patches), choice(tiny_patches), choice(tiny_patches), choice(tiny_patches)])) - elif(self.genotype.white[1] == "ws" or self.genotype.white[1] == "wt"): - if self.genotype.whitegrade > 2: - if(randint(1, 10) == 1): - chosen = choice(tortie_low_patterns) - elif(randint(1, 5) == 1): - chosen = choice(tortie_mid_patterns) - else: - chosen = choice(tortie_high_patterns) - else: - if(randint(1, 7) == 1): - chosen = choice(tortie_low_patterns) - elif(randint(1, 3) == 1): - chosen = choice(tortie_mid_patterns) - else: - chosen = choice(tortie_high_patterns) - elif(self.genotype.white[0] == 'ws' or self.genotype.white[0] == 'wt'): - if self.genotype.whitegrade > 3: - if(randint(1, 7) == 1): - chosen = choice(tortie_high_patterns) - elif(randint(1, 3) == 1): - chosen = choice(tortie_mid_patterns) - else: - chosen = choice(tortie_low_patterns) - else: - if(randint(1, 10) == 1): - chosen = choice(tortie_high_patterns) - elif(randint(1, 5) == 1): - chosen = choice(tortie_mid_patterns) - else: - chosen = choice(tortie_low_patterns) - else: - if(randint(1, 15) == 1): - chosen = choice(tortie_high_patterns) - elif(randint(1, 7) == 1): - chosen = choice(tortie_mid_patterns) - else: - chosen = choice(tortie_low_patterns) + elif spec: + chosen.append(choice([choice(tortie_high_patterns), choice(tortie_high_patterns), choice(tortie_mid_patterns), choice(tortie_mid_patterns), choice(tortie_low_patterns)])) - return chosen + elif randint(1, 10) == 1: + chosen.append('CRYPTIC') + + else: + for i in range(choice([1, 1, 1, 1, 1, 2, 2, 3])): + tortie_low_patterns = def_tortie_low_patterns + tortie_mid_patterns = def_tortie_mid_patterns + tortie_high_patterns = def_tortie_high_patterns + + if randint(1, 15) == 1 or (i > 0 and randint(1, 10) == 1): + tortie_low_patterns = ["BOWTIE", "BROKENBLAZE", "BUZZARDFANG", "revCOWTWO", "FADEBELLY", "FADESPOTS", "revLOVEBUG", "MITAINE", + "revPEBBLESHINE", "revPIEBALD", "SAVANNAH", + choice(tiny_patches)] + tortie_mid_patterns = ["revAPPALOOSA", "BLOSSOMSTEP", "BOWTIE", "revBROKEN", "revBUB", "BULLSEYE", "revBUSTER", "BUZZARDFANG", + "revCOW", "revCOWTWO", "DAMIEN", "DAPPLEPAW", "DIVA", "FCTWO", "revFINN", "FRECKLES", "revGLASS", "HAWKBLAZE", + "revLOVEBUG", "MITAINE", "PAINTED", "PANTSTWO", "revPEBBLE", "revPIEBALD", "ROSINA", "revSHOOTINGSTAR", "SPARROW", + "WOODPECKER", + choice(tiny_patches)] + tortie_high_patterns = ["revANY", "revANYTWO", "BLOSSOMSTEP", "revBUB", "revBUDDY", "revBUSTER", "revCAKE", "revCOW", "revCURVED", + "DAPPLEPAW", "FCTWO", "FAROFA", "revGOATEE", "revHALFFACE", "HAWKBLAZE", "LILTWO", "MISS", "MISTER", "revMOORISH", + "OWL", "PANTS", "revPRINCE", "REVERSEPANTS", "RINGTAIL", "SAMMY", "SKUNK", "SPARROW", "TOPCOVER", "VEST", "WINGS", + choice(tiny_patches)] + elif i > 0 and randint(1, 3) == 1: + tortie_low_patterns = tiny_patches + tortie_mid_patterns = tiny_patches + tortie_high_patterns = tiny_patches + + if(self.genotype.white[1] == "ws" or self.genotype.white[1] == "wt"): + if self.genotype.whitegrade > 2: + if(randint(1, 10) == 1): + chosen.append(choice(tortie_low_patterns)) + elif(randint(1, 5) == 1): + chosen.append(choice(tortie_mid_patterns)) + else: + chosen.append(choice(tortie_high_patterns)) + else: + if(randint(1, 7) == 1): + chosen.append(choice(tortie_low_patterns)) + elif(randint(1, 3) == 1): + chosen.append(choice(tortie_mid_patterns)) + else: + chosen.append(choice(tortie_high_patterns)) + elif(self.genotype.white[0] == 'ws' or self.genotype.white[0] == 'wt'): + if self.genotype.whitegrade > 3: + if(randint(1, 7) == 1): + chosen.append(choice(tortie_high_patterns)) + elif(randint(1, 3) == 1): + chosen.append(choice(tortie_mid_patterns)) + else: + chosen.append(choice(tortie_low_patterns)) + else: + if(randint(1, 10) == 1): + chosen.append(choice(tortie_high_patterns)) + elif(randint(1, 5) == 1): + chosen.append(choice(tortie_mid_patterns)) + else: + chosen.append(choice(tortie_low_patterns)) + else: + if(randint(1, 15) == 1): + chosen.append(choice(tortie_high_patterns)) + elif(randint(1, 7) == 1): + chosen.append(choice(tortie_mid_patterns)) + else: + chosen.append(choice(tortie_low_patterns)) + return chosen + def SetFurLength(self, type): if 'long' in type or 'lh' in type: self.genotype.furLength = ['l', 'l'] @@ -332,6 +367,73 @@ def SetPoints(self, input): self.genotype.pointgene = gene + def TabbyFinder(self): + self.tabby = "" + + def FindPattern(): + if(self.genotype.ticked[0] != 'ta' or self.genotype.wbsum > 13): + if(self.genotype.wbsum > 13): + self.tabby = 'chinchilla' + elif(self.genotype.ticked[1] == 'Ta' or not self.genotype.breakthrough): + if (self.genotype.wbsum > 11): + self.tabby = 'shaded' + elif(self.genotype.ticksum > 7): + self.tabby = 'agouti' + else: + self.tabby = 'ticked' + else: + if(self.genotype.mack[0] == 'mc'): + self.tabby = 'ghost-patterned' + elif(self.genotype.spotsum > 5): + self.tabby = 'servaline' + else: + if(self.genotype.spotsum > 2): + self.tabby = 'broken ' + self.tabby += 'pinstripe' + elif(self.genotype.mack[0] == 'mc'): + self.tabby = 'blotched' + elif(self.genotype.spotsum > 5): + self.tabby = 'spotted' + else: + if(self.genotype.spotsum > 2): + self.tabby = 'broken ' + self.tabby += 'mackerel' + + if(self.tabby != "" and (self.genotype.bengsum > 3 or self.genotype.soksum > 5)): + if(self.genotype.bengsum > 3): + if(self.tabby == "spotted"): + self.tabby = "rosetted" + elif(self.tabby == "broken mackerel"): + self.tabby = "broken braided" + elif(self.tabby == "mackerel"): + self.tabby = "braided" + elif(self.tabby == "blotched"): + self.tabby = "marbled" + + elif(self.tabby == "servaline"): + self.tabby += "-rosetted" + elif('pinstripe' in self.tabby): + self.tabby += "-braided" + elif(self.tabby == "ghost-patterned"): + self.tabby = "ghost marble" + elif(self.tabby == 'blotched'): + self.tabby = 'sokoke' + + if('o' not in self.genotype.sexgene or self.genotype.agouti[0] != 'a' or self.tabtype != '' or ('smoke' in self.silvergold and self.length == 'shorthaired') or self.genotype.ext[0] not in ['Eg', 'E']): + FindPattern() + + if(self.tortie != '' and self.tabby != '' and self.tortie != "brindled bicolour "): + self.tortie = ' torbie ' + elif(self.tabby != '' and self.point not in ['point ', 'mink ', 'siamocha ']): + self.tabby += ' tabby ' + elif(self.tabby != '' and self.point in ['point ', 'mink ', 'siamocha ']): + if(self.colour == 'seal' or self.colour == 'chocolate'): + self.tabby += ' lynx ' + elif('o' not in self.genotype.sexgene): + self.tabby = '' + else: + self.tabby = ' lynx ' + def SetTabbyPattern(self, input): """{"agouti" : "Agouti", "redbarc" : "Reduced Ticked (Classic)", "redbar" : "Reduced Ticked", "fullbarc" : "Ticked (Classic)", "fullbar" : "Ticked", "brokenpins" : "Broken Pinstripe", "pinstripe" : "Pinstripe", "servaline" : "Servaline", @@ -373,6 +475,8 @@ def SetTabbyPattern(self, input): else: self.genotype.bengtype = 'normal markings' + self.TabbyFinder() + def SetTabbyType(self, input): self.tabtype = input @@ -390,42 +494,19 @@ def SpriteInfo(self, moons): self.mainunders = [] self.spritecolour = "" self.caramel = "" - self.tortpattern = "" self.patchmain = "" self.patchunders = [] self.patchcolour = "" - if self.genotype.pointgene[0] == "c": - self.spritecolour = "albino" - self.maincolour = self.spritecolour - elif self.genotype.white[0] == "W" or (self.genotype.brindledbi and (('o' not in self.genotype.sexgene) or (self.genotype.ext[0] == 'ea' and ((moons > 11 and self.genotype.agouti[0] != 'a') or (moons > 23))) or (self.genotype.ext[0] == 'er' and moons > 23 and 'O' not in self.genotype.sexgene) or (self.genotype.ext[0] == 'ec' and (self.genotype.agouti[0] != 'a' or moons > 5)))): + if(self.genotype.silver[0] == 'I' and self.genotype.pseudomerle): + if not self.genotype.merlepattern: + self.genotype.merlepattern = self.ChooseTortiePattern(spec = 'merle') + + if self.genotype.white[0] == "W" or self.genotype.pointgene[0] == "c" or ('DBEalt' not in self.genotype.pax3 and 'NoDBE' not in self.genotype.pax3) or (self.genotype.brindledbi and (('o' not in self.genotype.sexgene) or (self.genotype.ext[0] == 'ea' and ((moons > 11 and self.genotype.agouti[0] != 'a') or (moons > 23))) or (self.genotype.ext[0] == 'er' and moons > 23) or (self.genotype.ext[0] == 'ec' and (self.genotype.agouti[0] != 'a' or moons > 5)))): self.spritecolour = "white" self.maincolour = self.spritecolour - elif('o' not in self.genotype.sexgene and self.genotype.silver[0] == 'I' and self.genotype.specialred == 'merle'): - if self.genotype.tortiepattern is not None: - self.tortpattern = self.genotype.tortiepattern - main = self.FindRed(self.genotype, moons, 'merle') - self.maincolour = main[0] - self.spritecolour = main[1] - self.mainunders = [main[2], main[3]] - main = self.FindRed(self.genotype, moons) - self.patchmain = main[0] - self.patchcolour = main[1] - self.patchunders = [main[2], main[3]] - else: - self.tortpattern = self.ChooseTortiePattern() - main = self.FindRed(self.genotype, moons, 'merle') - self.maincolour = main[0] - self.spritecolour = main[1] - self.mainunders = [main[2], main[3]] - main = self.FindRed(self.genotype, moons) - self.patchmain = main[0] - self.patchcolour = main[1] - self.patchunders = [main[2], main[3]] - - self.genotype.tortiepattern = self.tortpattern elif('o' not in self.genotype.sexgene and self.genotype.specialred == 'blue-tipped'): - self.tortpattern = 'BLUE-TIPPED' + self.genotype.tortiepattern = ['BLUE-TIPPED'] main = self.FindRed(self.genotype, moons) self.maincolour = main[0] self.spritecolour = main[1] @@ -434,9 +515,7 @@ def SpriteInfo(self, moons): self.patchmain = main[0] self.patchcolour = main[1] self.patchunders = [main[2], main[3]] - - self.genotype.tortiepattern = self.tortpattern - elif ('o' not in self.genotype.sexgene) or (self.genotype.ext[0] == 'ea' and ((moons > 11 and self.genotype.agouti[0] != 'a') or (moons > 23))) or (self.genotype.ext[0] == 'er' and moons > 23 and 'O' not in self.genotype.sexgene) or (self.genotype.ext[0] == 'ec' and moons > 0 and (self.genotype.agouti[0] != 'a' or moons > 5)): + elif ('o' not in self.genotype.sexgene) or (self.genotype.ext[0] == 'ea' and ((moons > 11 and self.genotype.agouti[0] != 'a') or (moons > 23))) or (self.genotype.ext[0] == 'er' and moons > 23) or (self.genotype.ext[0] == 'ec' and moons > 0 and (self.genotype.agouti[0] != 'a' or moons > 5)): main = self.FindRed(self.genotype, moons, special=self.genotype.ext[0]) self.maincolour = main[0] self.spritecolour = main[1] @@ -447,42 +526,27 @@ def SpriteInfo(self, moons): self.spritecolour = main[1] self.mainunders = [main[2], main[3]] else: - if self.genotype.tortiepattern is not None: - self.tortpattern = self.genotype.tortiepattern - else: - self.tortpattern = self.ChooseTortiePattern() - if randint(1, 10) == 1: - self.tortpattern = 'rev'+self.tortpattern - - self.genotype.tortiepattern = self.tortpattern + if not self.genotype.tortiepattern: + self.genotype.tortiepattern = self.ChooseTortiePattern() + for i in range(len(self.genotype.tortiepattern)): + if randint(1, round(10/((i+1)*2))) == 1: + if 'rev' in self.genotype.tortiepattern[i]: + self.genotype.tortiepattern[i] = self.genotype.tortiepattern[i].replace('rev', '') + else: + self.genotype.tortiepattern[i] = 'rev' + self.genotype.tortiepattern[i] - if 'rev' in self.tortpattern: - if(self.genotype.brindledbi): - self.maincolour = "white" - self.spritecolour = "white" - else: - main = self.FindRed(self.genotype, moons) - self.maincolour = main[0] - self.spritecolour = main[1] - self.mainunders = [main[2], main[3]] - main = self.FindBlack(self.genotype, moons, self.genotype.ext[0]) + main = self.FindBlack(self.genotype, moons) + self.maincolour = main[0] + self.spritecolour = main[1] + self.mainunders = [main[2], main[3]] + if(self.genotype.brindledbi): + self.patchmain = "white" + self.patchcolour = "white" + else: + main = self.FindRed(self.genotype, moons) self.patchmain = main[0] self.patchcolour = main[1] self.patchunders = [main[2], main[3]] - else: - main = self.FindBlack(self.genotype, moons) - self.maincolour = main[0] - self.spritecolour = main[1] - self.mainunders = [main[2], main[3]] - if(self.genotype.brindledbi): - self.patchmain = "white" - self.patchcolour = "white" - else: - main = self.FindRed(self.genotype, moons) - self.patchmain = main[0] - self.patchcolour = main[1] - self.patchunders = [main[2], main[3]] - def FindEumUnders(self, genes, wideband, rufousing): if(genes.dilute[0] == "d"): if(genes.pinkdilute[0] == "dp"): @@ -504,7 +568,6 @@ def FindEumUnders(self, genes, wideband, rufousing): colour = colour + "medium" + wideband + "0" return colour - def GetSilverUnders(self, wideband): if wideband == "low": return 20 @@ -624,14 +687,14 @@ def FindRed(self, genes, moons, special = None): maincolour = 'medium' else: maincolour = 'low' - if(genes.dilute[0] == "d" or (genes.specialred == 'cameo' and genes.silver[0] == 'I') or special == 'merle'): + if(genes.dilute[0] == "d" or (genes.specialred == 'cameo' and genes.silver[0] == 'I') or self.genotype.merlepattern): if(genes.pinkdilute[0] == "dp"): if genes.dilutemd[0] == "Dm": colour = "ivory-apricot" else: colour = "ivory" else: - if genes.dilutemd[0] == "Dm" and not(genes.specialred == 'cameo' or special == 'merle'): + if genes.dilutemd[0] == "Dm" and not(genes.specialred == 'cameo' or self.genotype.merlepattern): colour = "apricot" else: colour = "cream" @@ -644,7 +707,7 @@ def FindRed(self, genes, moons, special = None): else: colour = "red" - maincolour += colour + '0' + maincolour += colour + str(self.genotype.saturation) rufousing = "" banding = "" diff --git a/scripts/cat/sprites.py b/scripts/cat/sprites.py index f2aa6c5..22e66f0 100644 --- a/scripts/cat/sprites.py +++ b/scripts/cat/sprites.py @@ -174,11 +174,11 @@ def load_all(self): "dove", "champagne", "buff", "platinum", "lavender", "beige"]): self.make_group('base/eumelanin', (0, i), f'{x}', sprites_x=7, sprites_y=1) - for i, x in enumerate(["lowred", "mediumred", "rufousedred", - "lowcream", "mediumcream", "rufousedcream", - "lowhoney", "mediumhoney", "rufousedhoney", - "lowivory", "mediumivory", "rufousedivory"]): - self.make_group('base/pheomelanin', (int(i%3), int(i/3)), f'{x}', sprites_x=1, sprites_y=1) + for i, x in enumerate(["rufousedred", "mediumred", "lowred", + "rufousedcream", "mediumcream", "lowcream", + "rufousedhoney", "mediumhoney", "lowhoney", + "rufousedivory", "mediumivory", "lowivory"]): + self.make_group('base/pheomelanin', (0, i), f'{x}', sprites_x=7, sprites_y=1) self.make_group('base/lightbases', (0, 0), 'lightbasecolours', sprites_x=4, sprites_y=1) @@ -318,7 +318,7 @@ def load_all(self): self.make_group('tortiepatchesmasks', (a, 2), f"{i}") for a, i in enumerate(['ORIOLE', 'ROBIN', 'BRINDLE', 'PAIGE', 'ROSETAIL', 'SAFI', 'DAPPLENIGHT', 'BLANKET', 'BELOVED', 'BODY']): self.make_group('tortiepatchesmasks', (a, 3), f"{i}") - for a, i in enumerate(['SHILOH', 'FRECKLED', 'HEARTBEAT']): + for a, i in enumerate(['SHILOH', 'FRECKLED', 'HEARTBEAT', "CRYPTIC"]): self.make_group('tortiepatchesmasks', (a, 4), f"{i}") self.make_group('Other/blue-tipped', (0, 0), 'BLUE-TIPPED') diff --git a/scripts/global_vars.py b/scripts/global_vars.py index 1887a41..d3204ab 100644 --- a/scripts/global_vars.py +++ b/scripts/global_vars.py @@ -44,6 +44,34 @@ def sort_bidict(d: bidict, first_element=None): extention = bidict({"E": "Normal", "ea": "Amber", "er": "Russet", "ec": "Carnelian", "Eg": "Chausie Grizzle", 'ecc': 'Carnelian Carrier'}) + +white_patches = bidict({None: 'None', 'MAO': 'Mao', 'LUNA': 'Luna', 'CHESTSPECK': 'Chest Speck', 'WINGS': 'Wings', + 'PAINTED': 'Painted', 'BLACKSTAR': 'Blackstar', 'LITTLE': 'Little', 'TUXEDO': 'Tuxedo', + 'LIGHTTUXEDO': 'Light Tuxedo', 'BUZZARDFANG': 'Buzzardfang', 'TIP': 'Tip', 'BLAZE': 'Blaze', + 'BIB': 'Bib', 'VEE': 'Vee', 'PAWS': 'Paws', 'BELLY': 'Belly', 'TAILTIP': 'Tail Tip', + 'TOES': 'Toes', 'BROKENBLAZE': 'Broken Blaze', 'LILTWO': 'Lil Two', 'SCOURGE': 'Scourge', + 'TOESTAIL': 'Toes Tail', 'RAVENPAW': 'Ravenpaw', 'HONEY': 'Honey', 'FANCY': 'Fancy', + 'UNDERS': 'Unders', 'DAMIEN': 'Damien', 'SKUNK': 'Skunk', 'MITAINE': 'Mitaine', + 'SQUEAKS': 'Squeaks', 'STAR': 'Star', 'ANY': 'Any', 'ANYTWO': 'Any Two', 'BROKEN': 'Broken', + 'FRECKLES': 'Freckles', 'RINGTAIL': 'Ringtail', 'HALFFACE': 'Half Face', 'PANTSTWO': 'Pants 2', + 'GOATEE': 'Goatee', 'PRINCE': 'Prince', 'FAROFA': 'Farofa', 'MISTER': 'Mister', + 'PANTS': 'Pants', 'REVERSEPANTS': 'Reverse Pants', 'HALFWHITE': 'Half White', + 'APPALOOSA': 'Appaloosa', 'PIEBALD': 'Piebald', 'CURVED': 'Curved', 'GLASS': 'Glass', + 'MASKMANTLE': 'Mask Mantle', 'VAN': 'Van', 'ONEEAR': 'One Ear', 'LIGHTSONG': 'Lightsong', + 'TAIL': 'Tail', 'HEART': 'Heart', 'HEARTTWO': 'Heart 2', 'MOORISH': 'Moorish', 'APRON': 'Apron', + 'CAPSADDLE': 'Cap Saddle', 'FULLWHITE': 'Full White', "EXTRA": "Extra", 'PETAL': 'Petal', + "DIVA": "Diva", "SAVANNAH": "Savannah", "FADESPOTS": "Fadespots", "SHIBAINU": "Shiba Inu", + "TOPCOVER": "Top Cover", "DAPPLEPAW": "Dapplepaw", "BEARD": "Beard", "PEBBLESHINE": "Pebbleshine", + "OWL": "Owl", "WOODPECKER": "Woodpecker", "MISS": "Miss", "BOOTS": "Boots", "COW": "Cow", + "COWTWO": "Cow 2", "BUB": "Bub", "BOWTIE": "Bowtie", "MUSTACHE" : "Mustache", "REVERSEHEART": "Reverse Heart", + "SPARROW": "Sparrow", "VEST": "Vest", "LOVEBUG" : "Lovebug", "TRIXIE": "Trixie", "SPARKLE": "Sparkle", + "RIGHTEAR" : "Right Ear", "LEFTEAR": "Left Ear", "ESTRELLA": "Estrella", "REVERSEEYE" : "Reverse Eye", + "BACKSPOT": "Back spot", "EYEBAGS": "Eye Bags", "FADEBELLY": "Fade Belly", "SAMMY": "Sammy", "FRONT" : "Front", + "BLOSSOMSTEP": "Blossomstep", "BULLSEYE": "Bullseye", "SHOOTINGSTAR" : "Shooting Star", "EYESPOT" : "Eye Spot", + "PEBBLE": "Pebble", "TAILTWO": "Tail Two", "BUDDY": "Buddy", "FCONE": "FC One", "FCTWO": "FC Two", + "MIA": "Mia", "DIGIT": "Digit", "SCAR": "Scar", "BUSTER": "Buster", "FINN": "Finn", "KROPKA": "Kropka", + "HAWKBLAZE": "Hawkblaze", "LOCKET": "Locket", "PRINCESS": "Princess", "ROSINA" : "Rosina", "CAKE" : "Cake", "BLAZEMASK" : 'Blazemask', "TEARS" : "Tears", "DOUGIE" : 'Dougie'}) +white_patches = sort_bidict(white_patches, None) tortie_patches_shapes = bidict({"ONE": "One", "TWO": "Two", "THREE": "Three", "FOUR": "Four", 'REDTAIL': "Redtail", 'DELILAH': "Delilah", 'MINIMALONE': "Minimal 1", 'MINIMALTWO': "Minimal 2", 'MINIMALTHREE': "Minimal 3", 'MINIMALFOUR': "Minimal 4", 'OREO': "Oreo", 'SWOOP': "Swoop", @@ -56,6 +84,22 @@ def sort_bidict(d: bidict, first_element=None): "GRUMPYFACE": "Grumpy Face", "BRIE": "Brie", "BELOVED": "Beloved", "SHILOH" : "Shiloh", "BODY" : "Body"}) tortie_patches_shapes = sort_bidict(tortie_patches_shapes) +tortie_patches_shapes.update(white_patches) + +merle_patches_shapes = bidict({None: 'None', 'DELILAH' : "Delilah", 'MOTTLED' : "Mottled", 'EYEDOT' : "Eye dot", 'BANDANA' : "Bandana", + 'SMUDGED' : "Smudged", 'EMBER' : "Ember", 'BRINDLE' : "Brindle", 'SAFI' : "Safi", 'BELOVED' : "Beloved", + 'BODY' : "Body", 'SHILOH' : "Shiloh", 'FRECKLED' : "Freckled", "BACKSPOT" : "Backspot", "BEARD" : "Beard", + "BELLY" : "Belly", "BIB" : "Bib", "revBLACKSTAR" : "Blackstar", "BLAZE" : "Blaze", "BLAZEMASK" : "Blaze mask", + "revBOOTS" : "Boots", "revCHESTSPECK" : "Chest speck", "ESTRELLA" : "Estrelle", 'ONE' : "One", 'TWO' : "Two", + 'SMOKE' : "Smoke", 'MINIMALONE': "Minimal 1", 'MINIMALTWO': "Minimal 2", 'MINIMALTHREE': "Minimal 3", + 'MINIMALFOUR': "Minimal 4", 'OREO' : "Oreo", 'CHIMERA' : "Chimera", 'CHEST' : "Chest", 'GRUMPYFACE' : "Grumpyface", + 'SIDEMASK' : "Sidemask", 'PACMAN' : "Pacman", 'BRIE' : "Brie" ,'ORIOLE' : "Oriole", 'ROBIN' : "Robin", + 'PAIGE' : "Paige", 'HEARTBEAT' : "Heartbeat", "EYEBAGS" : "Eyebags", "revEYESPOT": "Eye spot", + "revHEART": "Heart", "HONEY" : "Honey", "LEFTEAR": "Left ear", "LITTLE" : "Little", "PAWS" : "Paws", + "REVERSEEYE" : "Reverse eye", "REVERSEHEART" : "Reverse heart", "RIGHTEAR" : "Right ear", "SCOURGE" : "Scourge", + "SPARKLE" : "Sparkle", "revTAIL" : "Tail", 'revTAILTWO': "Tail 2", "TAILTIP": "Tailtip", "TEARS": "Tears", + "TIP": "Tip", "TOES": "Toes", "TOESTAIL": "Toes & Tail", "VEE" : "Vee"}) +merle_patches_shapes = sort_bidict(merle_patches_shapes) eye_colors = bidict( {'YELLOW': "Yellow", 'AMBER': "Amber", 'HAZEL': "Hazel", 'PALEGREEN': "Pale Green", 'GREEN': "Green", 'BLUE': "Blue", 'DARKBLUE': "Dark Blue", 'GREY': "Grey", 'CYAN': "Cyan", @@ -82,34 +126,6 @@ def sort_bidict(d: bidict, first_element=None): colors = ['Black', 'Blue', 'Red', 'Cream', 'White', 'Albino', 'Chocolate', 'Lilac', 'Cinnamon', 'Fawn', 'Dove', 'Platinum', 'Honey', 'Ivory', 'Champagne', 'Lavender', 'Buff', 'Beige'] -white_patches = bidict({None: 'None', 'MAO': 'Mao', 'LUNA': 'Luna', 'CHESTSPECK': 'Chest Speck', 'WINGS': 'Wings', - 'PAINTED': 'Painted', 'BLACKSTAR': 'Blackstar', 'LITTLE': 'Little', 'TUXEDO': 'Tuxedo', - 'LIGHTTUXEDO': 'Light Tuxedo', 'BUZZARDFANG': 'Buzzardfang', 'TIP': 'Tip', 'BLAZE': 'Blaze', - 'BIB': 'Bib', 'VEE': 'Vee', 'PAWS': 'Paws', 'BELLY': 'Belly', 'TAILTIP': 'Tail Tip', - 'TOES': 'Toes', 'BROKENBLAZE': 'Broken Blaze', 'LILTWO': 'Lil Two', 'SCOURGE': 'Scourge', - 'TOESTAIL': 'Toes Tail', 'RAVENPAW': 'Ravenpaw', 'HONEY': 'Honey', 'FANCY': 'Fancy', - 'UNDERS': 'Unders', 'DAMIEN': 'Damien', 'SKUNK': 'Skunk', 'MITAINE': 'Mitaine', - 'SQUEAKS': 'Squeaks', 'STAR': 'Star', 'ANY': 'Any', 'ANYTWO': 'Any Two', 'BROKEN': 'Broken', - 'FRECKLES': 'Freckles', 'RINGTAIL': 'Ringtail', 'HALFFACE': 'Half Face', 'PANTSTWO': 'Pants 2', - 'GOATEE': 'Goatee', 'PRINCE': 'Prince', 'FAROFA': 'Farofa', 'MISTER': 'Mister', - 'PANTS': 'Pants', 'REVERSEPANTS': 'Reverse Pants', 'HALFWHITE': 'Half White', - 'APPALOOSA': 'Appaloosa', 'PIEBALD': 'Piebald', 'CURVED': 'Curved', 'GLASS': 'Glass', - 'MASKMANTLE': 'Mask Mantle', 'VAN': 'Van', 'ONEEAR': 'One Ear', 'LIGHTSONG': 'Lightsong', - 'TAIL': 'Tail', 'HEART': 'Heart', 'HEARTTWO': 'Heart 2', 'MOORISH': 'Moorish', 'APRON': 'Apron', - 'CAPSADDLE': 'Cap Saddle', 'FULLWHITE': 'Full White', "EXTRA": "Extra", 'PETAL': 'Petal', - "DIVA": "Diva", "SAVANNAH": "Savannah", "FADESPOTS": "Fadespots", "SHIBAINU": "Shiba Inu", - "TOPCOVER": "Top Cover", "DAPPLEPAW": "Dapplepaw", "BEARD": "Beard", "PEBBLESHINE": "Pebbleshine", - "OWL": "Owl", "WOODPECKER": "Woodpecker", "MISS": "Miss", "BOOTS": "Boots", "COW": "Cow", - "COWTWO": "Cow 2", "BUB": "Bub", "BOWTIE": "Bowtie", "MUSTACHE" : "Mustache", "REVERSEHEART": "Reverse Heart", - "SPARROW": "Sparrow", "VEST": "Vest", "LOVEBUG" : "Lovebug", "TRIXIE": "Trixie", "SPARKLE": "Sparkle", - "RIGHTEAR" : "Right Ear", "LEFTEAR": "Left Ear", "ESTRELLA": "Estrella", "REVERSEEYE" : "Reverse Eye", - "BACKSPOT": "Back spot", "EYEBAGS": "Eye Bags", "FADEBELLY": "Fade Belly", "SAMMY": "Sammy", "FRONT" : "Front", - "BLOSSOMSTEP": "Blossomstep", "BULLSEYE": "Bullseye", "SHOOTINGSTAR" : "Shooting Star", "EYESPOT" : "Eye Spot", - "PEBBLE": "Pebble", "TAILTWO": "Tail Two", "BUDDY": "Buddy", "FCONE": "FC One", "FCTWO": "FC Two", - "MIA": "Mia", "DIGIT": "Digit", "SCAR": "Scar", "BUSTER": "Buster", "FINN": "Finn", "KROPKA": "Kropka", - "HAWKBLAZE": "Hawkblaze", "LOCKET": "Locket", "PRINCESS": "Princess", "ROSINA" : "Rosina", "CAKE" : "Cake", "BLAZEMASK" : 'Blazemask', "TEARS" : "Tears", "DOUGIE" : 'Dougie'}) -white_patches = sort_bidict(white_patches, None) - genemod_white = bidict({None: 'None', 'None1': '-Right Front Leg-', 'right front toes' : 'RF Toes', 'right front mitten' : 'RF Mitten', 'right front low sock' : 'RF Low Sock', 'right front high sock' : 'RF High Sock', 'right front bicolour1' : 'RF Bicolour1', 'right front bicolour2' : 'RF Bicolour2', 'break/right front mitten' : 'RF No Mitten', 'break/bracelet right' : 'RF Dark Band', diff --git a/scripts/screens/creation_screen.py b/scripts/screens/creation_screen.py index aaf28cc..1cdac3d 100644 --- a/scripts/screens/creation_screen.py +++ b/scripts/screens/creation_screen.py @@ -13,7 +13,7 @@ class CreationScreen(base_screens.Screens): def __init__(self, name): self.general_tab = None - self.pattern_tab = None + self.main_colour_tab = None self.extras_tab = None self.cat_image = None self.back = None @@ -23,7 +23,7 @@ def __init__(self, name): self.tab_background = None self.fur_length_select = None self.general_tab_button = None - self.pattern_tab_button = None + self.main_colour_tab_button = None self.extras_tab_button = None self.color_select = None self.white_patches_select = None @@ -34,12 +34,23 @@ def __init__(self, name): self.dropdown_menus = {} self.checkboxes = {} self.labels = {} + self.selectedtortie = None + self.selectedmerle = None + self.selectedtortiechim = None + self.selectedmerlechim = None + self.selectedtortierem = 'None' + self.selectedtortieremchim = 'None' + self.selectedmerlerem = 'None' + self.selectedmerleremchim = 'None' + self.selectedbasegame = None self.selectedgenemod = None self.selectedbasegamechim = None self.selectedgenemodchim = None self.selectedwhite = 'None' self.selectedwhitechim = 'None' + self.tortierev = "" + self.chimtortierev = "" super().__init__(name) @@ -48,8 +59,8 @@ def handle_event(self, event): if event.ui_element == self.general_tab_button: self.show_tab(self.general_tab) self.handle_page_switching(0) - elif event.ui_element == self.pattern_tab_button: - self.show_tab(self.pattern_tab) + elif event.ui_element == self.main_colour_tab_button: + self.show_tab(self.main_colour_tab) self.handle_page_switching(0) elif event.ui_element == self.extras_tab_button: self.show_tab(self.extras_tab) @@ -122,6 +133,14 @@ def handle_event(self, event): global_vars.CREATED_CAT.genotype.dilutemd[0] = 'Dm' self.update_checkboxes_and_disable_dropdowns() self.update_cat_image() + elif event.ui_element == self.checkboxes["chimera"]: + if global_vars.CREATED_CAT.genotype.chimera: + global_vars.CREATED_CAT.genotype.chimera = False + else: + global_vars.CREATED_CAT.genotype.chimera = True + self.update_checkboxes_and_disable_dropdowns() + self.update_cat_image() + elif event.ui_element == self.checkboxes["tortie"]: if global_vars.CREATED_CAT.genotype.sexgene == ['O', 'o']: global_vars.CREATED_CAT.genotype.sexgene = ['o', 'o'] @@ -131,25 +150,30 @@ def handle_event(self, event): global_vars.CREATED_CAT.phenotype.tortie = True self.update_checkboxes_and_disable_dropdowns() self.update_cat_image() - elif event.ui_element == self.checkboxes["chimera"]: - if global_vars.CREATED_CAT.genotype.chimera: - global_vars.CREATED_CAT.genotype.chimera = False - else: - global_vars.CREATED_CAT.genotype.chimera = True - self.update_checkboxes_and_disable_dropdowns() - self.update_cat_image() + global_vars.CREATED_CAT.genotype.tortiepattern = global_vars.CREATED_CAT.phenotype.genotype.tortiepattern + self.build_dropdown_menus() elif event.ui_element == self.checkboxes["revtortie"]: - if global_vars.CREATED_CAT.genotype.tortiepattern and 'rev' in global_vars.CREATED_CAT.genotype.tortiepattern: - global_vars.CREATED_CAT.genotype.tortiepattern = global_vars.CREATED_CAT.genotype.tortiepattern.replace('rev', '') + if self.tortierev == "rev": + self.tortierev = "" else: - global_vars.CREATED_CAT.genotype.tortiepattern = 'rev' + global_vars.CREATED_CAT.genotype.tortiepattern + self.tortierev = "rev" self.update_checkboxes_and_disable_dropdowns() - self.update_cat_image() elif event.ui_element == self.checkboxes["brindled_bicolour"]: global_vars.CREATED_CAT.genotype.brindledbi = not \ global_vars.CREATED_CAT.genotype.brindledbi self.update_checkboxes_and_disable_dropdowns() self.update_cat_image() + elif event.ui_element == self.checkboxes["merle"]: + global_vars.CREATED_CAT.genotype.pseudomerle = not \ + global_vars.CREATED_CAT.genotype.pseudomerle + self.update_checkboxes_and_disable_dropdowns() + self.update_cat_image() + self.build_dropdown_menus() + elif event.ui_element == self.checkboxes["fever"]: + global_vars.CREATED_CAT.genotype.fevercoat = not \ + global_vars.CREATED_CAT.genotype.fevercoat + self.update_checkboxes_and_disable_dropdowns() + self.update_cat_image() elif event.ui_element == self.checkboxes["bleaching"]: if global_vars.CREATED_CAT.genotype.bleach[0] == 'lb': global_vars.CREATED_CAT.genotype.bleach[0] = 'Lb' @@ -181,6 +205,19 @@ def handle_event(self, event): global_vars.CREATED_CAT.phenotype.SilverGoldFinder() self.update_checkboxes_and_disable_dropdowns() self.update_cat_image() + self.build_dropdown_menus() + elif event.ui_element == self.dropdown_menus["add_tortie"]: + + global_vars.CREATED_CAT.genotype.tortiepattern.append(self.tortierev + self.selectedtortie) + + self.build_dropdown_menus() + self.update_cat_image() + elif event.ui_element == self.dropdown_menus["add_merle"]: + + global_vars.CREATED_CAT.genotype.merlepattern.append(self.selectedmerle) + + self.build_dropdown_menus() + self.update_cat_image() elif event.ui_element == self.dropdown_menus["add_basegame"]: global_vars.CREATED_CAT.genotype.white_pattern.append(self.selectedbasegame) @@ -194,6 +231,24 @@ def handle_event(self, event): self.build_dropdown_menus() self.update_cat_image() + elif event.ui_element == self.dropdown_menus["remove_tortie"]: + + while self.selectedtortierem in global_vars.CREATED_CAT.genotype.tortiepattern: + global_vars.CREATED_CAT.genotype.tortiepattern.remove(self.selectedtortierem) + + self.selectedtortierem = 'None' + + self.update_cat_image() + self.build_dropdown_menus() + elif event.ui_element == self.dropdown_menus["remove_merle"]: + + while self.selectedmerlerem in global_vars.CREATED_CAT.genotype.merlepattern: + global_vars.CREATED_CAT.genotype.merlepattern.remove(self.selectedmerlerem) + + self.selectedmerlerem = 'None' + + self.update_cat_image() + self.build_dropdown_menus() elif event.ui_element == self.dropdown_menus["remove_white"]: while self.selectedwhite in global_vars.CREATED_CAT.genotype.white_pattern: @@ -203,6 +258,22 @@ def handle_event(self, event): self.build_dropdown_menus() self.update_cat_image() + elif event.ui_element == self.dropdown_menus["clear_tortie"]: + + global_vars.CREATED_CAT.genotype.tortiepattern = [] + + self.selectedtortierem = 'None' + + self.update_cat_image() + self.build_dropdown_menus() + elif event.ui_element == self.dropdown_menus["clear_merle"]: + + global_vars.CREATED_CAT.genotype.merlepattern = [] + + self.selectedmerlerem = 'None' + + self.update_cat_image() + self.build_dropdown_menus() elif event.ui_element == self.dropdown_menus["clear_white"]: global_vars.CREATED_CAT.genotype.white_pattern = [global_vars.CREATED_CAT.genotype.white_pattern[0]] @@ -211,8 +282,6 @@ def handle_event(self, event): self.build_dropdown_menus() self.update_cat_image() - - elif event.ui_element == self.checkboxes["carameltogglec"]: if global_vars.CREATED_CAT.genotype.chimerageno.dilutemd[0] == 'Dm': global_vars.CREATED_CAT.genotype.chimerageno.dilutemd[0] = 'dm' @@ -220,6 +289,7 @@ def handle_event(self, event): global_vars.CREATED_CAT.genotype.chimerageno.dilutemd[0] = 'Dm' self.update_checkboxes_and_disable_dropdowns() self.update_cat_image() + elif event.ui_element == self.checkboxes["tortiec"]: if global_vars.CREATED_CAT.genotype.chimerageno.sexgene == ['O', 'o']: global_vars.CREATED_CAT.genotype.chimerageno.sexgene = ['o', 'o'] @@ -229,18 +299,25 @@ def handle_event(self, event): global_vars.CREATED_CAT.chimpheno.tortie = True self.update_checkboxes_and_disable_dropdowns() self.update_cat_image() + global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern = global_vars.CREATED_CAT.chimpheno.genotype.tortiepattern + self.build_dropdown_menus() elif event.ui_element == self.checkboxes["revtortiec"]: - if global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern and 'rev' in global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern: - global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern = global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern.replace('rev', '') + if self.chimtortierev == "rev": + self.chimtortierev = "" else: - global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern = 'rev' + global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern + self.chimtortierev = "rev" self.update_checkboxes_and_disable_dropdowns() - self.update_cat_image() elif event.ui_element == self.checkboxes["brindled_bicolourc"]: global_vars.CREATED_CAT.genotype.chimerageno.brindledbi = not \ global_vars.CREATED_CAT.genotype.chimerageno.brindledbi self.update_checkboxes_and_disable_dropdowns() self.update_cat_image() + elif event.ui_element == self.checkboxes["merlec"]: + global_vars.CREATED_CAT.genotype.chimerageno.pseudomerle = not \ + global_vars.CREATED_CAT.genotype.chimerageno.pseudomerle + self.update_checkboxes_and_disable_dropdowns() + self.update_cat_image() + self.build_dropdown_menus() elif event.ui_element == self.checkboxes["bleachingc"]: if global_vars.CREATED_CAT.genotype.chimerageno.bleach[0] == 'lb': global_vars.CREATED_CAT.genotype.chimerageno.bleach[0] = 'Lb' @@ -272,6 +349,7 @@ def handle_event(self, event): global_vars.CREATED_CAT.chimpheno.SilverGoldFinder() self.update_checkboxes_and_disable_dropdowns() self.update_cat_image() + self.build_dropdown_menus() elif event.ui_element == self.checkboxes["salmiak"]: if global_vars.CREATED_CAT.genotype.white[0] == 'wsal': global_vars.CREATED_CAT.genotype.white[0] = 'w' @@ -288,6 +366,18 @@ def handle_event(self, event): self.update_checkboxes_and_disable_dropdowns() self.update_cat_image() + elif event.ui_element == self.dropdown_menus["add_tortiec"]: + + global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern.append(self.chimtortierev + self.selectedtortiechim) + + self.build_dropdown_menus() + self.update_cat_image() + elif event.ui_element == self.dropdown_menus["add_merlec"]: + + global_vars.CREATED_CAT.genotype.chimerageno.merlepattern.append(self.selectedmerlechim) + + self.build_dropdown_menus() + self.update_cat_image() elif event.ui_element == self.dropdown_menus["add_basegamec"]: global_vars.CREATED_CAT.genotype.chimerageno.white_pattern.append(self.selectedbasegamechim) @@ -301,6 +391,24 @@ def handle_event(self, event): self.build_dropdown_menus() self.update_cat_image() + elif event.ui_element == self.dropdown_menus["remove_tortiec"]: + + while self.selectedtortieremchim in global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern: + global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern.remove(self.selectedtortieremchim) + + self.selectedtortieremchim = 'None' + + self.update_cat_image() + self.build_dropdown_menus() + elif event.ui_element == self.dropdown_menus["remove_merlec"]: + + while self.selectedmerleremchim in global_vars.CREATED_CAT.genotype.chimerageno.merlepattern: + global_vars.CREATED_CAT.genotype.chimerageno.merlepattern.remove(self.selectedmerleremchim) + + self.selectedmerleremchim = 'None' + + self.update_cat_image() + self.build_dropdown_menus() elif event.ui_element == self.dropdown_menus["remove_whitec"]: while self.selectedwhitechim in global_vars.CREATED_CAT.genotype.chimerageno.white_pattern: @@ -310,6 +418,22 @@ def handle_event(self, event): self.build_dropdown_menus() self.update_cat_image() + elif event.ui_element == self.dropdown_menus["clear_tortiec"]: + + global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern = [] + + self.selectedtortieremchim = 'None' + + self.update_cat_image() + self.build_dropdown_menus() + elif event.ui_element == self.dropdown_menus["clear_merlec"]: + + global_vars.CREATED_CAT.genotype.chimerageno.merlepattern = [] + + self.selectedmerleremchim = 'None' + + self.update_cat_image() + self.build_dropdown_menus() elif event.ui_element == self.dropdown_menus["clear_whitec"]: global_vars.CREATED_CAT.genotype.chimerageno.white_pattern = [global_vars.CREATED_CAT.genotype.chimerageno.white_pattern[0]] @@ -437,6 +561,18 @@ def handle_event(self, event): global_vars.CREATED_CAT.genotype.white_pattern[0] = global_vars.vit.inverse[event.text] self.update_cat_image() + elif event.ui_element == self.dropdown_menus["tortie_select"]: + + self.selectedtortie = global_vars.tortie_patches_shapes.inverse[event.text] + elif event.ui_element == self.dropdown_menus["tortie_remove"]: + + self.selectedtortierem = event.text + elif event.ui_element == self.dropdown_menus["merle_select"]: + + self.selectedmerle = global_vars.merle_patches_shapes.inverse[event.text] + elif event.ui_element == self.dropdown_menus["merle_remove"]: + + self.selectedmerlerem = event.text elif event.ui_element == self.dropdown_menus["basegame_select"]: self.selectedbasegame = global_vars.white_patches.inverse[event.text] @@ -450,18 +586,6 @@ def handle_event(self, event): global_vars.CREATED_CAT.genotype.chimerapattern = global_vars.tortie_patches_shapes.inverse[event.text] - self.update_cat_image() - elif event.ui_element == self.dropdown_menus["torte_patches_shape"]: - - global_vars.CREATED_CAT.genotype.tortiepattern = global_vars.tortie_patches_shapes.inverse[event.text] - if global_vars.CREATED_CAT.genotype.sexgene == ['o', 'o'] and event.text != 'None': - global_vars.CREATED_CAT.genotype.sexgene = ['O', 'o'] - elif event.text == 'None': - global_vars.CREATED_CAT.genotype.tortiepattern = None - if global_vars.CREATED_CAT.genotype.sexgene == ['O', 'o']: - global_vars.CREATED_CAT.genotype.sexgene = ['o', 'o'] - - self.update_checkboxes_and_disable_dropdowns() self.update_cat_image() elif event.ui_element == self.dropdown_menus["tabby_pattern_selectc"]: @@ -529,18 +653,6 @@ def handle_event(self, event): elif event.ui_element == self.dropdown_menus["white_selectc"]: self.selectedwhitechim = event.text - elif event.ui_element == self.dropdown_menus["torte_patches_shapec"]: - - global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern = global_vars.tortie_patches_shapes.inverse[event.text] - if global_vars.CREATED_CAT.genotype.chimerageno.sexgene == ['o', 'o'] and event.text != 'None': - global_vars.CREATED_CAT.genotype.chimerageno.sexgene = ['O', 'o'] - elif event.text == 'None': - global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern = None - if global_vars.CREATED_CAT.genotype.chimerageno.sexgene == ['O', 'o']: - global_vars.CREATED_CAT.genotype.chimerageno.sexgene = ['o', 'o'] - - self.update_checkboxes_and_disable_dropdowns() - self.update_cat_image() elif event.ui_element == self.dropdown_menus["scar_1"]: global_vars.CREATED_CAT.pelt.scar_slot_list[0] = global_vars.scars.inverse[event.text] @@ -802,14 +914,14 @@ def handle_event(self, event): self.update_cat_image() def show_tab(self, container): - for x in [self.pattern_tab, self.pattern_tab2, self.pattern_tab3, self.pattern_tab4, self.pattern_tab5, self.pattern_tab6, self.general_tab, self.extras_tab]: + for x in [self.main_colour_tab, self.tortie_tab, self.tabby_pattern_tab, self.white_pattern_tab, self.chim_main_colour_tab, self.chim_tortie_tab, self.chim_tabby_pattern_tab, self.chim_white_pattern_tab, self.general_tab, self.extras_tab]: if x == container: x.show() self.visable_tab = x else: x.hide() - tab_buttons = [((self.pattern_tab, self.pattern_tab2, self.pattern_tab3, self.pattern_tab4, self.pattern_tab5, self.pattern_tab6), self.pattern_tab_button), + tab_buttons = [((self.main_colour_tab, self.tortie_tab, self.tabby_pattern_tab, self.white_pattern_tab, self.chim_main_colour_tab, self.chim_tortie_tab, self.chim_tabby_pattern_tab, self.chim_white_pattern_tab), self.main_colour_tab_button), ([self.general_tab], self.general_tab_button), ([self.extras_tab], self.extras_tab_button)] @@ -825,12 +937,12 @@ def handle_page_switching(self, direction: 1): return pages = [ - [self.pattern_tab, self.pattern_tab2, self.pattern_tab3] + [self.main_colour_tab, self.tortie_tab, self.tabby_pattern_tab, self.white_pattern_tab] ] if global_vars.CREATED_CAT and global_vars.CREATED_CAT.genotype.chimera: pages = [ - [self.pattern_tab, self.pattern_tab2, self.pattern_tab3, self.pattern_tab4, self.pattern_tab5, self.pattern_tab6] + [self.main_colour_tab, self.tortie_tab, self.tabby_pattern_tab, self.white_pattern_tab, self.chim_main_colour_tab, self.chim_tortie_tab, self.chim_tabby_pattern_tab, self.chim_white_pattern_tab] ] for x in pages: @@ -906,7 +1018,7 @@ def screen_switches(self): object_id="#general_tab_button") self.general_tab_button.disable() - self.pattern_tab_button = custom_buttons.UIImageButton(pygame.Rect((50, 456), (100, 88)), "", + self.main_colour_tab_button = custom_buttons.UIImageButton(pygame.Rect((50, 456), (100, 88)), "", object_id="#pattern_tab_button") self.extras_tab_button = custom_buttons.UIImageButton(pygame.Rect((50, 547), (100, 88)), "", @@ -923,37 +1035,49 @@ def screen_switches(self): allow_scroll_x=False, allow_scroll_y=False) - self.pattern_tab = pygame_gui.elements.UIScrollingContainer(pygame.Rect((150, 350), (600, 300)), + self.main_colour_tab = pygame_gui.elements.UIScrollingContainer(pygame.Rect((150, 350), (600, 300)), + global_vars.MANAGER, + allow_scroll_x=False, + allow_scroll_y=False, + visible=False) + + self.tortie_tab = pygame_gui.elements.UIScrollingContainer(pygame.Rect((150, 350), (600, 300)), global_vars.MANAGER, allow_scroll_x=False, allow_scroll_y=False, visible=False) - self.pattern_tab2 = pygame_gui.elements.UIScrollingContainer(pygame.Rect((150, 350), (600, 300)), + self.tabby_pattern_tab = pygame_gui.elements.UIScrollingContainer(pygame.Rect((150, 350), (600, 300)), global_vars.MANAGER, allow_scroll_x=False, allow_scroll_y=False, visible=False) - self.pattern_tab3 = pygame_gui.elements.UIScrollingContainer(pygame.Rect((150, 350), (600, 300)), + self.white_pattern_tab = pygame_gui.elements.UIScrollingContainer(pygame.Rect((150, 350), (600, 300)), global_vars.MANAGER, allow_scroll_x=False, allow_scroll_y=False, visible=False) - self.pattern_tab4 = pygame_gui.elements.UIScrollingContainer(pygame.Rect((150, 350), (600, 300)), + self.chim_main_colour_tab = pygame_gui.elements.UIScrollingContainer(pygame.Rect((150, 350), (600, 300)), global_vars.MANAGER, allow_scroll_x=False, allow_scroll_y=False, visible=False) - self.pattern_tab5 = pygame_gui.elements.UIScrollingContainer(pygame.Rect((150, 350), (600, 300)), + self.chim_tortie_tab = pygame_gui.elements.UIScrollingContainer(pygame.Rect((150, 350), (600, 300)), global_vars.MANAGER, allow_scroll_x=False, allow_scroll_y=False, visible=False) - self.pattern_tab6 = pygame_gui.elements.UIScrollingContainer(pygame.Rect((150, 350), (600, 300)), + self.chim_tabby_pattern_tab = pygame_gui.elements.UIScrollingContainer(pygame.Rect((150, 350), (600, 300)), + global_vars.MANAGER, + allow_scroll_x=False, + allow_scroll_y=False, + visible=False) + + self.chim_white_pattern_tab = pygame_gui.elements.UIScrollingContainer(pygame.Rect((150, 350), (600, 300)), global_vars.MANAGER, allow_scroll_x=False, allow_scroll_y=False, @@ -1005,15 +1129,20 @@ def screen_switches(self): container=self.general_tab, object_id="#dropdown_label") - self.labels["lykoi"] = pygame_gui.elements.UILabel(pygame.Rect((55, 139), (-1, 25)), "Lykoi", + self.labels["lykoi"] = pygame_gui.elements.UILabel(pygame.Rect((55, 140), (-1, 25)), "Lykoi", container=self.general_tab, object_id="#dropdown_label") - self.labels["reversed"] = pygame_gui.elements.UILabel(pygame.Rect((55, 184), (-1, 25)), "Reversed", + self.labels["reversed"] = pygame_gui.elements.UILabel(pygame.Rect((55, 185), (-1, 25)), "Reversed", container=self.general_tab, object_id="#dropdown_label") + + + self.labels["fever"] = pygame_gui.elements.UILabel(pygame.Rect((226, 140), (150, 25)), "Fever Coat", + container=self.general_tab, + object_id="#dropdown_label") - self.labels["shading"] = pygame_gui.elements.UILabel(pygame.Rect((226, 164), (-1, 25)), "Shading", + self.labels["shading"] = pygame_gui.elements.UILabel(pygame.Rect((226, 185), (-1, 25)), "Shading", container=self.general_tab, object_id="#dropdown_label") @@ -1042,57 +1171,48 @@ def screen_switches(self): # ------------------------------------------------------------------------------------------------------------- self.labels["color"] = pygame_gui.elements.UILabel(pygame.Rect((20, 15), (150, 25)), "Base Color:", - container=self.pattern_tab, + container=self.main_colour_tab, object_id="#dropdown_label") - self.labels["Tortie Patches shape"] = pygame_gui.elements.UILabel(pygame.Rect((185, 15), (165, 25)), - "Tortie Patches Pattern:", - container=self.pattern_tab, - object_id="#dropdown_label") - - self.labels["points"] = pygame_gui.elements.UILabel(pygame.Rect((375, 15), (-1, 25)), "Colour Restriction:", - container=self.pattern_tab, + self.labels["points"] = pygame_gui.elements.UILabel(pygame.Rect((400, 15), (-1, 25)), "Colour Restriction:", + container=self.main_colour_tab, object_id="#dropdown_label") + + self.labels["extention"] = pygame_gui.elements.UILabel(pygame.Rect((210, 70), (150, 25)), "Extention:", + container=self.main_colour_tab, + object_id="#dropdown_label") + self.labels["specred"] = pygame_gui.elements.UILabel(pygame.Rect((400, 70), (150, 25)), "Special Red:", + container=self.main_colour_tab, + object_id="#dropdown_label") + self.labels["sat"] = pygame_gui.elements.UILabel(pygame.Rect((210, 15), (150, 25)), "Saturation:", + container=self.main_colour_tab, + object_id="#dropdown_label") - self.labels["caramel"] = pygame_gui.elements.UILabel(pygame.Rect((54, 80), (150, 25)), "Caramel", - container=self.pattern_tab, - object_id="#dropdown_label") - - self.labels["revtort"] = pygame_gui.elements.UILabel(pygame.Rect((159, 80), (150, 25)), "Reverse Tortie", - container=self.pattern_tab, - object_id="#dropdown_label") - - self.labels["brindlebi"] = pygame_gui.elements.UILabel(pygame.Rect((304, 80), (150, 25)), "Brindled Bicolour", - container=self.pattern_tab, + self.labels["caramel"] = pygame_gui.elements.UILabel(pygame.Rect((54, 90), (150, 25)), "Caramel", + container=self.main_colour_tab, object_id="#dropdown_label") - self.labels["bleach"] = pygame_gui.elements.UILabel(pygame.Rect((54, 125), (150, 25)), "Bleaching", - container=self.pattern_tab, + self.labels["bleach"] = pygame_gui.elements.UILabel(pygame.Rect((164, 200), (150, 25)), "Bleaching", + container=self.main_colour_tab, object_id="#dropdown_label") - self.labels["ghost"] = pygame_gui.elements.UILabel(pygame.Rect((159, 125), (150, 25)), "Ghosting", - container=self.pattern_tab, + self.labels["ghost"] = pygame_gui.elements.UILabel(pygame.Rect((269, 200), (150, 25)), "Ghosting", + container=self.main_colour_tab, object_id="#dropdown_label") - self.labels["sat"] = pygame_gui.elements.UILabel(pygame.Rect((304, 125), (150, 25)), "Satin", - container=self.pattern_tab, - object_id="#dropdown_label") - self.labels["karp"] = pygame_gui.elements.UILabel(pygame.Rect((375, 100), (150, 25)), "Karpati:", - container=self.pattern_tab, - object_id="#dropdown_label") - self.labels["tortie"] = pygame_gui.elements.UILabel(pygame.Rect((500, 80), (150, 25)), "Tortie", - container=self.pattern_tab, + self.labels["satin"] = pygame_gui.elements.UILabel(pygame.Rect((374, 200), (150, 25)), "Satin", + container=self.main_colour_tab, object_id="#dropdown_label") - self.labels["left"] = pygame_gui.elements.UILabel(pygame.Rect((20, 160), (150, 25)), "Left Eye:", - container=self.pattern_tab, + self.labels["left"] = pygame_gui.elements.UILabel(pygame.Rect((20, 125), (150, 25)), "Left Eye:", + container=self.main_colour_tab, object_id="#dropdown_label") - self.labels["right"] = pygame_gui.elements.UILabel(pygame.Rect((185, 160), (150, 25)), "Right Eye:", - container=self.pattern_tab, + self.labels["right"] = pygame_gui.elements.UILabel(pygame.Rect((185, 125), (150, 25)), "Right Eye:", + container=self.main_colour_tab, object_id="#dropdown_label") - self.labels["sec"] = pygame_gui.elements.UILabel(pygame.Rect((375, 160), (150, 25)), "Sectoral:", - container=self.pattern_tab, + self.labels["sec"] = pygame_gui.elements.UILabel(pygame.Rect((375, 125), (150, 25)), "Sectoral:", + container=self.main_colour_tab, object_id="#dropdown_label") @@ -1100,58 +1220,49 @@ def screen_switches(self): # Pattern Tab Labels CHIMERA ------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------- - self.labels["colorc"] = pygame_gui.elements.UILabel(pygame.Rect((20, 15), (150, 25)), "Base Color:", - container=self.pattern_tab4, + self.labels["colorc"] = pygame_gui.elements.UILabel(pygame.Rect((20, 15), (175, 25)), "Base Color:", + container=self.chim_main_colour_tab, object_id="#dropdown_label") - self.labels["Tortie Patches shapec"] = pygame_gui.elements.UILabel(pygame.Rect((185, 15), (165, 25)), - "Tortie Patches Pattern:", - container=self.pattern_tab4, - object_id="#dropdown_label") - - self.labels["pointsc"] = pygame_gui.elements.UILabel(pygame.Rect((375, 15), (-1, 25)), "Colour Restriction:", - container=self.pattern_tab4, + self.labels["pointsc"] = pygame_gui.elements.UILabel(pygame.Rect((400, 15), (-1, 25)), "Colour Restriction:", + container=self.chim_main_colour_tab, object_id="#dropdown_label") - self.labels["caramelc"] = pygame_gui.elements.UILabel(pygame.Rect((54, 80), (150, 25)), "Caramel", - container=self.pattern_tab4, - object_id="#dropdown_label") - - self.labels["revtortc"] = pygame_gui.elements.UILabel(pygame.Rect((159, 80), (150, 25)), "Reverse Tortie", - container=self.pattern_tab4, - object_id="#dropdown_label") + self.labels["extentionc"] = pygame_gui.elements.UILabel(pygame.Rect((210, 70), (150, 25)), "Extention:", + container=self.chim_main_colour_tab, + object_id="#dropdown_label") + self.labels["specredc"] = pygame_gui.elements.UILabel(pygame.Rect((400, 70), (150, 25)), "Special Red:", + container=self.chim_main_colour_tab, + object_id="#dropdown_label") + self.labels["satc"] = pygame_gui.elements.UILabel(pygame.Rect((210, 15), (150, 25)), "Saturation:", + container=self.chim_main_colour_tab, + object_id="#dropdown_label") - self.labels["brindlebic"] = pygame_gui.elements.UILabel(pygame.Rect((304, 80), (150, 25)), "Brindled Bicolour", - container=self.pattern_tab4, + self.labels["caramelc"] = pygame_gui.elements.UILabel(pygame.Rect((54, 90), (150, 25)), "Caramel", + container=self.chim_main_colour_tab, object_id="#dropdown_label") - self.labels["bleachc"] = pygame_gui.elements.UILabel(pygame.Rect((54, 125), (150, 25)), "Bleaching", - container=self.pattern_tab4, + self.labels["bleachc"] = pygame_gui.elements.UILabel(pygame.Rect((164, 200), (150, 25)), "Bleaching", + container=self.chim_main_colour_tab, object_id="#dropdown_label") - self.labels["ghostc"] = pygame_gui.elements.UILabel(pygame.Rect((159, 125), (150, 25)), "Ghosting", - container=self.pattern_tab4, + self.labels["ghostc"] = pygame_gui.elements.UILabel(pygame.Rect((269, 200), (150, 25)), "Ghosting", + container=self.chim_main_colour_tab, object_id="#dropdown_label") - self.labels["satc"] = pygame_gui.elements.UILabel(pygame.Rect((304, 125), (150, 25)), "Satin", - container=self.pattern_tab4, - object_id="#dropdown_label") - self.labels["karpc"] = pygame_gui.elements.UILabel(pygame.Rect((375, 100), (150, 25)), "Karpati:", - container=self.pattern_tab4, - object_id="#dropdown_label") - self.labels["tortiec"] = pygame_gui.elements.UILabel(pygame.Rect((500, 80), (150, 25)), "Tortie", - container=self.pattern_tab4, + self.labels["satinc"] = pygame_gui.elements.UILabel(pygame.Rect((374, 200), (150, 25)), "Satin", + container=self.chim_main_colour_tab, object_id="#dropdown_label") - self.labels["leftc"] = pygame_gui.elements.UILabel(pygame.Rect((20, 160), (150, 25)), "Left Eye:", - container=self.pattern_tab4, + self.labels["leftc"] = pygame_gui.elements.UILabel(pygame.Rect((20, 125), (150, 25)), "Left Eye:", + container=self.chim_main_colour_tab, object_id="#dropdown_label") - self.labels["rightc"] = pygame_gui.elements.UILabel(pygame.Rect((185, 160), (150, 25)), "Right Eye:", - container=self.pattern_tab4, + self.labels["rightc"] = pygame_gui.elements.UILabel(pygame.Rect((185, 125), (150, 25)), "Right Eye:", + container=self.chim_main_colour_tab, object_id="#dropdown_label") - self.labels["secc"] = pygame_gui.elements.UILabel(pygame.Rect((375, 160), (150, 25)), "Sectoral:", - container=self.pattern_tab4, + self.labels["secc"] = pygame_gui.elements.UILabel(pygame.Rect((375, 125), (150, 25)), "Sectoral:", + container=self.chim_main_colour_tab, object_id="#dropdown_label") @@ -1159,109 +1270,166 @@ def screen_switches(self): # Pattern 2 Tab Labels ---------------------------------------------------------------------------------------- # ------------------------------------------------------------------------------------------------------------- - self.labels["tabby"] = pygame_gui.elements.UILabel(pygame.Rect((20, 15), (150, 25)), "Tabby Pattern:", - container=self.pattern_tab2, + self.labels["tabby"] = pygame_gui.elements.UILabel(pygame.Rect((20, 15), (175, 25)), "Tabby Pattern:", + container=self.tabby_pattern_tab, object_id="#dropdown_label") self.labels["agouti"] = pygame_gui.elements.UILabel(pygame.Rect((210, 15), (150, 25)), "Agouti:", - container=self.pattern_tab2, + container=self.tabby_pattern_tab, object_id="#dropdown_label") self.labels["sokoke"] = pygame_gui.elements.UILabel(pygame.Rect((400, 15), (150, 25)), "Sokoke:", - container=self.pattern_tab2, + container=self.tabby_pattern_tab, object_id="#dropdown_label") self.labels["wideband"] = pygame_gui.elements.UILabel(pygame.Rect((210, 70), (150, 25)), "Wideband:", - container=self.pattern_tab2, + container=self.tabby_pattern_tab, object_id="#dropdown_label") self.labels["rufous"] = pygame_gui.elements.UILabel(pygame.Rect((400, 70), (150, 25)), "Rufousing:", - container=self.pattern_tab2, - object_id="#dropdown_label") - self.labels["silver"] = pygame_gui.elements.UILabel(pygame.Rect((54, 80), (150, 25)), "Silver", - container=self.pattern_tab2, - object_id="#dropdown_label") - self.labels["corin"] = pygame_gui.elements.UILabel(pygame.Rect((20, 125), (150, 25)), "CORIN gold:", - container=self.pattern_tab2, + container=self.tabby_pattern_tab, object_id="#dropdown_label") - self.labels["extention"] = pygame_gui.elements.UILabel(pygame.Rect((210, 125), (150, 25)), "Extention:", - container=self.pattern_tab2, + self.labels["silver"] = pygame_gui.elements.UILabel(pygame.Rect((54, 130), (150, 25)), "Silver", + container=self.tabby_pattern_tab, object_id="#dropdown_label") - self.labels["specred"] = pygame_gui.elements.UILabel(pygame.Rect((400, 125), (150, 25)), "Special Red:", - container=self.pattern_tab2, - object_id="#dropdown_label") - self.labels["sat"] = pygame_gui.elements.UILabel(pygame.Rect((20, 180), (150, 25)), "Saturation:", - container=self.pattern_tab2, + self.labels["corin"] = pygame_gui.elements.UILabel(pygame.Rect((20, 70), (150, 25)), "CORIN gold:", + container=self.tabby_pattern_tab, object_id="#dropdown_label") # ------------------------------------------------------------------------------------------------------------- # Pattern 2 Tab Labels CHIMERA ---------------------------------------------------------------------------------------- # ------------------------------------------------------------------------------------------------------------- self.labels["tabbyc"] = pygame_gui.elements.UILabel(pygame.Rect((20, 15), (150, 25)), "Tabby Pattern:", - container=self.pattern_tab5, + container=self.chim_tabby_pattern_tab, object_id="#dropdown_label") self.labels["agoutic"] = pygame_gui.elements.UILabel(pygame.Rect((210, 15), (150, 25)), "Agouti:", - container=self.pattern_tab5, + container=self.chim_tabby_pattern_tab, object_id="#dropdown_label") self.labels["sokokec"] = pygame_gui.elements.UILabel(pygame.Rect((400, 15), (150, 25)), "Sokoke:", - container=self.pattern_tab5, + container=self.chim_tabby_pattern_tab, object_id="#dropdown_label") self.labels["widebandc"] = pygame_gui.elements.UILabel(pygame.Rect((210, 70), (150, 25)), "Wideband:", - container=self.pattern_tab5, + container=self.chim_tabby_pattern_tab, object_id="#dropdown_label") self.labels["rufousc"] = pygame_gui.elements.UILabel(pygame.Rect((400, 70), (150, 25)), "Rufousing:", - container=self.pattern_tab5, + container=self.chim_tabby_pattern_tab, + object_id="#dropdown_label") + self.labels["silverc"] = pygame_gui.elements.UILabel(pygame.Rect((54, 130), (150, 25)), "Silver", + container=self.chim_tabby_pattern_tab, object_id="#dropdown_label") - self.labels["silverc"] = pygame_gui.elements.UILabel(pygame.Rect((54, 80), (150, 25)), "Silver", - container=self.pattern_tab5, + self.labels["corinc"] = pygame_gui.elements.UILabel(pygame.Rect((20, 70), (150, 25)), "CORIN gold:", + container=self.chim_tabby_pattern_tab, object_id="#dropdown_label") - self.labels["corinc"] = pygame_gui.elements.UILabel(pygame.Rect((20, 125), (150, 25)), "CORIN gold:", - container=self.pattern_tab5, + + # ------------------------------------------------------------------------------------------------------------- + # Tortie Tab Labels ---------------------------------------------------------------------------------------- + # ------------------------------------------------------------------------------------------------------------- + + self.labels["Tortie Patches"] = pygame_gui.elements.UILabel(pygame.Rect((20, 15), (-1, 25)), "Tortie Patches Pattern:", + container=self.tortie_tab, object_id="#dropdown_label") - self.labels["extentionc"] = pygame_gui.elements.UILabel(pygame.Rect((210, 120), (150, 25)), "Extention:", - container=self.pattern_tab5, + self.labels["remTortie"] = pygame_gui.elements.UILabel(pygame.Rect((240, 15), (-1, 25)), "Remove Tortie Patches:", + container=self.tortie_tab, object_id="#dropdown_label") - self.labels["specredc"] = pygame_gui.elements.UILabel(pygame.Rect((400, 120), (150, 25)), "Special Red:", - container=self.pattern_tab5, + self.labels["Merle Patches"] = pygame_gui.elements.UILabel(pygame.Rect((20, 110), (-1, 25)), "Pseudo-Merle Pattern:", + container=self.tortie_tab, object_id="#dropdown_label") - self.labels["satc"] = pygame_gui.elements.UILabel(pygame.Rect((20, 180), (150, 25)), "Saturation:", - container=self.pattern_tab5, + self.labels["remMerle"] = pygame_gui.elements.UILabel(pygame.Rect((240, 110), (-1, 25)), "Remove Pseudo-Merle Patches:", + container=self.tortie_tab, object_id="#dropdown_label") + + self.labels["revtort"] = pygame_gui.elements.UILabel(pygame.Rect((57, 75), (-1, 25)), "Reverse Patch", + container=self.tortie_tab, + object_id="#dropdown_label") + self.labels["tortie"] = pygame_gui.elements.UILabel(pygame.Rect((287, 75), (-1, 25)), "Tortie", + container=self.tortie_tab, + object_id="#dropdown_label") + self.labels["brindlebi"] = pygame_gui.elements.UILabel(pygame.Rect((387, 75), (-1, 25)), "Brindled Bicolour", + container=self.tortie_tab, + object_id="#dropdown_label") + + # self.labels["revmerle"] = pygame_gui.elements.UILabel(pygame.Rect((57, 170), (-1, 25)), "Reverse Patch", + # container=self.tortie_tab, + # object_id="#dropdown_label") + self.labels["merle"] = pygame_gui.elements.UILabel(pygame.Rect((287, 170), (-1, 25)), "Pseudo-Merle", + container=self.tortie_tab, + object_id="#dropdown_label") + #37 px between checkbox and label + # ------------------------------------------------------------------------------------------------------------- + # Chimera Tortie Tab Labels ---------------------------------------------------------------------------------------- + # ------------------------------------------------------------------------------------------------------------- + + self.labels["Tortie Patchesc"] = pygame_gui.elements.UILabel(pygame.Rect((20, 15), (-1, 25)), "Tortie Patches Pattern:", + container=self.chim_tortie_tab, + object_id="#dropdown_label") + self.labels["remTortiec"] = pygame_gui.elements.UILabel(pygame.Rect((240, 15), (-1, 25)), "Remove Tortie Patches:", + container=self.chim_tortie_tab, + object_id="#dropdown_label") + self.labels["Merle Patchesc"] = pygame_gui.elements.UILabel(pygame.Rect((20, 110), (-1, 25)), "Pseudo-Merle Pattern:", + container=self.chim_tortie_tab, + object_id="#dropdown_label") + self.labels["remMerlec"] = pygame_gui.elements.UILabel(pygame.Rect((240, 110), (-1, 25)), "Remove Pseudo-Merle Patches:", + container=self.chim_tortie_tab, + object_id="#dropdown_label") + + self.labels["revtortc"] = pygame_gui.elements.UILabel(pygame.Rect((57, 75), (-1, 25)), "Reverse Patch", + container=self.chim_tortie_tab, + object_id="#dropdown_label") + self.labels["tortiec"] = pygame_gui.elements.UILabel(pygame.Rect((287, 75), (-1, 25)), "Tortie", + container=self.chim_tortie_tab, + object_id="#dropdown_label") + self.labels["brindlebic"] = pygame_gui.elements.UILabel(pygame.Rect((387, 75), (-1, 25)), "Brindled Bicolour", + container=self.chim_tortie_tab, + object_id="#dropdown_label") + + # self.labels["revmerlec"] = pygame_gui.elements.UILabel(pygame.Rect((57, 170), (-1, 25)), "Reverse Patch", + # container=self.chim_tortie_tab, + # object_id="#dropdown_label") + self.labels["merlec"] = pygame_gui.elements.UILabel(pygame.Rect((287, 170), (-1, 25)), "Pseudo-Merle", + container=self.chim_tortie_tab, + object_id="#dropdown_label") # ------------------------------------------------------------------------------------------------------------- # Pattern 3 Tab Labels ---------------------------------------------------------------------------------------- # ------------------------------------------------------------------------------------------------------------- self.labels["basegame"] = pygame_gui.elements.UILabel(pygame.Rect((20, 15), (150, 25)), "Basegame White:", - container=self.pattern_tab3, + container=self.white_pattern_tab, object_id="#dropdown_label") self.labels["remwhite"] = pygame_gui.elements.UILabel(pygame.Rect((240, 15), (150, 25)), "Remove White:", - container=self.pattern_tab3, + container=self.white_pattern_tab, object_id="#dropdown_label") self.labels["genemod"] = pygame_gui.elements.UILabel(pygame.Rect((20, 70), (150, 25)), "Added White:", - container=self.pattern_tab3, + container=self.white_pattern_tab, object_id="#dropdown_label") self.labels["vitiligo"] = pygame_gui.elements.UILabel(pygame.Rect((20, 125), (150, 25)), "Vitiligo:", - container=self.pattern_tab3, + container=self.white_pattern_tab, object_id="#dropdown_label") self.labels["salmiak"] = pygame_gui.elements.UILabel(pygame.Rect((55, 184), (-1, 25)), "Salmiak", - container=self.pattern_tab3, + container=self.white_pattern_tab, object_id="#dropdown_label") + + self.labels["karp"] = pygame_gui.elements.UILabel(pygame.Rect((240, 125), (150, 25)), "Karpati:", + container=self.white_pattern_tab, + object_id="#dropdown_label") # ------------------------------------------------------------------------------------------------------------- # Pattern 3 Tab Labels CHIMERA ---------------------------------------------------------------------------------------- # ------------------------------------------------------------------------------------------------------------- self.labels["basegamec"] = pygame_gui.elements.UILabel(pygame.Rect((20, 15), (150, 25)), "Basegame White:", - container=self.pattern_tab6, + container=self.chim_white_pattern_tab, object_id="#dropdown_label") self.labels["remwhitec"] = pygame_gui.elements.UILabel(pygame.Rect((240, 15), (150, 25)), "Remove White:", - container=self.pattern_tab6, + container=self.chim_white_pattern_tab, object_id="#dropdown_label") self.labels["genemodc"] = pygame_gui.elements.UILabel(pygame.Rect((20, 70), (150, 25)), "Added White:", - container=self.pattern_tab6, + container=self.chim_white_pattern_tab, object_id="#dropdown_label") self.labels["vitiligoc"] = pygame_gui.elements.UILabel(pygame.Rect((20, 125), (150, 25)), "Vitiligo:", - container=self.pattern_tab6, + container=self.chim_white_pattern_tab, object_id="#dropdown_label") + self.labels["karpc"] = pygame_gui.elements.UILabel(pygame.Rect((240, 125), (150, 25)), "Karpati:", + container=self.chim_white_pattern_tab, + object_id="#dropdown_label") self.labels["salmiakc"] = pygame_gui.elements.UILabel(pygame.Rect((55, 184), (-1, 25)), "Salmiak", - container=self.pattern_tab6, + container=self.chim_white_pattern_tab, object_id="#dropdown_label") # ------------------------------------------------------------------------------------------------------------- @@ -1368,26 +1536,12 @@ def build_dropdown_menus(self): self.dropdown_menus["color_selectc"] = pygame_gui.elements.UIDropDownMenu(global_vars.colors, global_vars.CREATED_CAT.chimpheno.colour.capitalize(), pygame.Rect((20, 35), (155, 30)), - container=self.pattern_tab4) - - - self.dropdown_menus["torte_patches_shapec"] = \ - pygame_gui.elements.UIDropDownMenu(global_vars.tortie_patches_shapes.values(), - global_vars.tortie_patches_shapes.get( - global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern.replace('rev', '') - ), - pygame.Rect((185, 35), (180, 30)), - container=self.pattern_tab4) + container=self.chim_main_colour_tab) self.dropdown_menus["points_selectc"] = pygame_gui.elements.UIDropDownMenu(global_vars.points, global_vars.CREATED_CAT.chimpheno.point, - pygame.Rect((375, 35), (190, 30)), - container=self.pattern_tab4) - - self.dropdown_menus["karpati_selectc"] = pygame_gui.elements.UIDropDownMenu(['None', 'Heterozygous', 'Homozygous'], - global_vars.CREATED_CAT.chimpheno.fade, - pygame.Rect((375, 120), (190, 30)), - container=self.pattern_tab4) + pygame.Rect((400, 35), (175, 30)), + container=self.chim_main_colour_tab) if 'c' in global_vars.CREATED_CAT.genotype.chimerageno.pointgene: global_vars.CREATED_CAT.chimpheno.pigone = 'albino' @@ -1412,34 +1566,52 @@ def build_dropdown_menus(self): if global_vars.CREATED_CAT.chimpheno.pigext == 'albino': global_vars.CREATED_CAT.chimpheno.pigext = 'P1' global_vars.CREATED_CAT.chimpheno.UpdateEyes() + + + self.dropdown_menus["extention_selectc"] = \ + pygame_gui.elements.UIDropDownMenu(global_vars.extention.values(), + global_vars.extention[global_vars.CREATED_CAT.genotype.chimerageno.ext[0]], + pygame.Rect((210, 90), (175, 30)), + container=self.chim_main_colour_tab) + self.dropdown_menus["specred_selectc"] = \ + pygame_gui.elements.UIDropDownMenu(['None', 'Cameo', 'Pseudo-cinnamon', 'Blue-red', 'Blue-tipped'], + global_vars.CREATED_CAT.genotype.chimerageno.specialred.capitalize(), + pygame.Rect((400, 90), (175, 30)), + container=self.chim_main_colour_tab) + self.dropdown_menus["saturation_selectc"] = \ + pygame_gui.elements.UIDropDownMenu(['0', '1', '2', '3', '4', '5', '6'], + str(global_vars.CREATED_CAT.genotype.chimerageno.saturation), + pygame.Rect((210, 35), (175, 30)), + container=self.chim_main_colour_tab) + self.dropdown_menus["ref1_selectc"] = pygame_gui.elements.UIDropDownMenu(['R11', 'R10', 'R9', 'R8', 'R7', 'R6', 'R5', 'R4', 'R3', 'R2', 'R1'], global_vars.CREATED_CAT.chimpheno.refone, - pygame.Rect((20, 180), (75, 30)), - container=self.pattern_tab4) + pygame.Rect((20, 155), (75, 30)), + container=self.chim_main_colour_tab) self.dropdown_menus["ref2_selectc"] = pygame_gui.elements.UIDropDownMenu(['R11', 'R10', 'R9', 'R8', 'R7', 'R6', 'R5', 'R4', 'R3', 'R2', 'R1'], global_vars.CREATED_CAT.chimpheno.reftwo, - pygame.Rect((185, 180), (75, 30)), - container=self.pattern_tab4) + pygame.Rect((185, 155), (75, 30)), + container=self.chim_main_colour_tab) self.dropdown_menus["ref3_selectc"] = pygame_gui.elements.UIDropDownMenu(['R11', 'R10', 'R9', 'R8', 'R7', 'R6', 'R5', 'R4', 'R3', 'R2', 'R1'], global_vars.CREATED_CAT.chimpheno.refext, - pygame.Rect((375, 180), (75, 30)), - container=self.pattern_tab4) + pygame.Rect((375, 155), (75, 30)), + container=self.chim_main_colour_tab) self.dropdown_menus["pig1_selectc"] = pygame_gui.elements.UIDropDownMenu(['P11', 'P10', 'P9', 'P8', 'P7', 'P6', 'P5', 'P4', 'P3', 'P2', 'P1', 'blue'], global_vars.CREATED_CAT.chimpheno.pigone, - pygame.Rect((95, 180), (75, 30)), - container=self.pattern_tab4) + pygame.Rect((95, 155), (75, 30)), + container=self.chim_main_colour_tab) self.dropdown_menus["pig2_selectc"] = pygame_gui.elements.UIDropDownMenu(['P11', 'P10', 'P9', 'P8', 'P7', 'P6', 'P5', 'P4', 'P3', 'P2', 'P1', 'blue'], global_vars.CREATED_CAT.chimpheno.pigtwo, - pygame.Rect((260, 180), (75, 30)), - container=self.pattern_tab4) + pygame.Rect((260, 155), (75, 30)), + container=self.chim_main_colour_tab) self.dropdown_menus["pig3_selectc"] = pygame_gui.elements.UIDropDownMenu(['P11', 'P10', 'P9', 'P8', 'P7', 'P6', 'P5', 'P4', 'P3', 'P2', 'P1', 'blue'], global_vars.CREATED_CAT.chimpheno.pigext, - pygame.Rect((450, 180), (75, 30)), - container=self.pattern_tab4) + pygame.Rect((450, 155), (75, 30)), + container=self.chim_main_colour_tab) self.dropdown_menus["sectype_selectc"] = pygame_gui.elements.UIDropDownMenu(['N/A', '1', '2', '3', '4', '5', '6'], global_vars.CREATED_CAT.genotype.chimerageno.extraeye.replace('sectoral', '') if global_vars.CREATED_CAT.genotype.chimerageno.extraeye else 'N/A', - pygame.Rect((450, 155), (100, 25)), - container=self.pattern_tab4) + pygame.Rect((450, 125), (100, 25)), + container=self.chim_main_colour_tab) # ------------------------------------------------------------------------------------------------------------- # Pattern Tab Contents ---------------------------------------------------------------------------------------- @@ -1447,27 +1619,13 @@ def build_dropdown_menus(self): self.dropdown_menus["color_select"] = pygame_gui.elements.UIDropDownMenu(global_vars.colors, global_vars.CREATED_CAT.phenotype.colour.capitalize(), - pygame.Rect((20, 35), (155, 30)), - container=self.pattern_tab) - - - self.dropdown_menus["torte_patches_shape"] = \ - pygame_gui.elements.UIDropDownMenu(global_vars.tortie_patches_shapes.values(), - global_vars.tortie_patches_shapes.get( - global_vars.CREATED_CAT.genotype.tortiepattern.replace('rev', '') - ), - pygame.Rect((185, 35), (180, 30)), - container=self.pattern_tab) + pygame.Rect((20, 35), (175, 30)), + container=self.main_colour_tab) self.dropdown_menus["points_select"] = pygame_gui.elements.UIDropDownMenu(global_vars.points, global_vars.CREATED_CAT.phenotype.point, - pygame.Rect((375, 35), (190, 30)), - container=self.pattern_tab) - - self.dropdown_menus["karpati_select"] = pygame_gui.elements.UIDropDownMenu(['None', 'Heterozygous', 'Homozygous'], - global_vars.CREATED_CAT.phenotype.fade, - pygame.Rect((375, 120), (190, 30)), - container=self.pattern_tab) + pygame.Rect((400, 35), (175, 30)), + container=self.main_colour_tab) if 'c' in global_vars.CREATED_CAT.genotype.pointgene: global_vars.CREATED_CAT.phenotype.pigone = 'albino' @@ -1492,34 +1650,52 @@ def build_dropdown_menus(self): if global_vars.CREATED_CAT.phenotype.pigext == 'albino': global_vars.CREATED_CAT.phenotype.pigext = 'P1' global_vars.CREATED_CAT.phenotype.UpdateEyes() + + + self.dropdown_menus["extention_select"] = \ + pygame_gui.elements.UIDropDownMenu(global_vars.extention.values(), + global_vars.extention[global_vars.CREATED_CAT.genotype.ext[0]], + pygame.Rect((210, 90), (175, 30)), + container=self.main_colour_tab) + self.dropdown_menus["specred_select"] = \ + pygame_gui.elements.UIDropDownMenu(['None', 'Cameo', 'Pseudo-cinnamon', 'Blue-red', 'Blue-tipped'], + global_vars.CREATED_CAT.genotype.specialred.capitalize(), + pygame.Rect((400, 90), (175, 30)), + container=self.main_colour_tab) + self.dropdown_menus["saturation_select"] = \ + pygame_gui.elements.UIDropDownMenu(['0', '1', '2', '3', '4', '5', '6'], + str(global_vars.CREATED_CAT.genotype.saturation), + pygame.Rect((210, 35), (175, 30)), + container=self.main_colour_tab) + self.dropdown_menus["ref1_select"] = pygame_gui.elements.UIDropDownMenu(['R11', 'R10', 'R9', 'R8', 'R7', 'R6', 'R5', 'R4', 'R3', 'R2', 'R1'], global_vars.CREATED_CAT.phenotype.refone, - pygame.Rect((20, 180), (75, 30)), - container=self.pattern_tab) + pygame.Rect((20, 155), (75, 30)), + container=self.main_colour_tab) self.dropdown_menus["ref2_select"] = pygame_gui.elements.UIDropDownMenu(['R11', 'R10', 'R9', 'R8', 'R7', 'R6', 'R5', 'R4', 'R3', 'R2', 'R1'], global_vars.CREATED_CAT.phenotype.reftwo, - pygame.Rect((185, 180), (75, 30)), - container=self.pattern_tab) + pygame.Rect((185, 155), (75, 30)), + container=self.main_colour_tab) self.dropdown_menus["ref3_select"] = pygame_gui.elements.UIDropDownMenu(['R11', 'R10', 'R9', 'R8', 'R7', 'R6', 'R5', 'R4', 'R3', 'R2', 'R1'], global_vars.CREATED_CAT.phenotype.refext, - pygame.Rect((375, 180), (75, 30)), - container=self.pattern_tab) + pygame.Rect((375, 155), (75, 30)), + container=self.main_colour_tab) self.dropdown_menus["pig1_select"] = pygame_gui.elements.UIDropDownMenu(['P11', 'P10', 'P9', 'P8', 'P7', 'P6', 'P5', 'P4', 'P3', 'P2', 'P1', 'blue'], global_vars.CREATED_CAT.phenotype.pigone, - pygame.Rect((95, 180), (75, 30)), - container=self.pattern_tab) + pygame.Rect((95, 155), (75, 30)), + container=self.main_colour_tab) self.dropdown_menus["pig2_select"] = pygame_gui.elements.UIDropDownMenu(['P11', 'P10', 'P9', 'P8', 'P7', 'P6', 'P5', 'P4', 'P3', 'P2', 'P1', 'blue'], global_vars.CREATED_CAT.phenotype.pigtwo, - pygame.Rect((260, 180), (75, 30)), - container=self.pattern_tab) + pygame.Rect((260, 155), (75, 30)), + container=self.main_colour_tab) self.dropdown_menus["pig3_select"] = pygame_gui.elements.UIDropDownMenu(['P11', 'P10', 'P9', 'P8', 'P7', 'P6', 'P5', 'P4', 'P3', 'P2', 'P1', 'blue'], global_vars.CREATED_CAT.phenotype.pigext, - pygame.Rect((450, 180), (75, 30)), - container=self.pattern_tab) + pygame.Rect((450, 155), (75, 30)), + container=self.main_colour_tab) self.dropdown_menus["sectype_select"] = pygame_gui.elements.UIDropDownMenu(['N/A', '1', '2', '3', '4', '5', '6'], global_vars.CREATED_CAT.genotype.extraeye.replace('sectoral', '') if global_vars.CREATED_CAT.genotype.extraeye else 'N/A', - pygame.Rect((450, 155), (100, 25)), - container=self.pattern_tab) + pygame.Rect((450, 125), (100, 25)), + container=self.main_colour_tab) #------------------------------------------------------------------------------------------------------------ # PATTERN TAB CONTENTS Page 2 ------------------------------------------------------------------------------- @@ -1530,47 +1706,32 @@ def build_dropdown_menus(self): pygame_gui.elements.UIDropDownMenu(global_vars.tabbies.values(), global_vars.tabbies[global_vars.CREATED_CAT.phenotype.GetTabbySprite()], pygame.Rect((20, 35), (175, 30)), - container=self.pattern_tab2) + container=self.tabby_pattern_tab) self.dropdown_menus["agouti_select"] = \ pygame_gui.elements.UIDropDownMenu(['Solid', 'Agouti', 'Midnight Charcoal', 'Twilight Charcoal'], global_vars.CREATED_CAT.phenotype.tabtype, pygame.Rect((210, 35), (175, 30)), - container=self.pattern_tab2) + container=self.tabby_pattern_tab) self.dropdown_menus["sokoke_select"] = \ pygame_gui.elements.UIDropDownMenu(['Normal markings', 'Mild fading', 'Full sokoke'], global_vars.CREATED_CAT.genotype.soktype.capitalize(), pygame.Rect((400, 35), (175, 30)), - container=self.pattern_tab2) + container=self.tabby_pattern_tab) self.dropdown_menus["wideband_select"] = \ pygame_gui.elements.UIDropDownMenu(['Low', 'Medium', 'High', 'Shaded', 'Chinchilla'], global_vars.CREATED_CAT.genotype.wbtype.capitalize(), pygame.Rect((210, 90), (175, 30)), - container=self.pattern_tab2) + container=self.tabby_pattern_tab) self.dropdown_menus["rufousing_select"] = \ pygame_gui.elements.UIDropDownMenu(['Low', 'Medium', 'Rufoused'], global_vars.CREATED_CAT.genotype.ruftype.capitalize(), pygame.Rect((400, 90), (175, 30)), - container=self.pattern_tab2) + container=self.tabby_pattern_tab) self.dropdown_menus["corin_select"] = \ pygame_gui.elements.UIDropDownMenu(global_vars.corin.values(), global_vars.corin[global_vars.CREATED_CAT.genotype.corin[0]], - pygame.Rect((20, 145), (175, 30)), - container=self.pattern_tab2) - self.dropdown_menus["extention_select"] = \ - pygame_gui.elements.UIDropDownMenu(global_vars.extention.values(), - global_vars.extention[global_vars.CREATED_CAT.genotype.ext[0]], - pygame.Rect((210, 145), (175, 30)), - container=self.pattern_tab2) - self.dropdown_menus["specred_select"] = \ - pygame_gui.elements.UIDropDownMenu(['None', 'Merle', 'Cameo', 'Pseudo-cinnamon', 'Blue-red', 'Blue-tipped'], - global_vars.CREATED_CAT.genotype.specialred.capitalize(), - pygame.Rect((400, 145), (175, 30)), - container=self.pattern_tab2) - self.dropdown_menus["saturation_select"] = \ - pygame_gui.elements.UIDropDownMenu(['0', '1', '2', '3', '4', '5', '6'], - str(global_vars.CREATED_CAT.genotype.saturation), - pygame.Rect((20, 200), (175, 30)), - container=self.pattern_tab2) + pygame.Rect((20, 90), (175, 30)), + container=self.tabby_pattern_tab) #------------------------------------------------------------------------------------------------------------ # PATTERN TAB CONTENTS Page 2 CHIMERA ------------------------------------------------------------------------------- @@ -1581,48 +1742,127 @@ def build_dropdown_menus(self): pygame_gui.elements.UIDropDownMenu(global_vars.tabbies.values(), global_vars.tabbies[global_vars.CREATED_CAT.chimpheno.GetTabbySprite()], pygame.Rect((20, 35), (175, 30)), - container=self.pattern_tab5) + container=self.chim_tabby_pattern_tab) self.dropdown_menus["agouti_selectc"] = \ pygame_gui.elements.UIDropDownMenu(['Solid', 'Agouti', 'Midnight Charcoal', 'Twilight Charcoal'], global_vars.CREATED_CAT.chimpheno.tabtype, pygame.Rect((210, 35), (175, 30)), - container=self.pattern_tab5) + container=self.chim_tabby_pattern_tab) self.dropdown_menus["sokoke_selectc"] = \ pygame_gui.elements.UIDropDownMenu(['Normal markings', 'Mild fading', 'Full sokoke'], global_vars.CREATED_CAT.genotype.chimerageno.soktype.capitalize(), pygame.Rect((400, 35), (175, 30)), - container=self.pattern_tab5) + container=self.chim_tabby_pattern_tab) self.dropdown_menus["wideband_selectc"] = \ pygame_gui.elements.UIDropDownMenu(['Low', 'Medium', 'High', 'Shaded', 'Chinchilla'], global_vars.CREATED_CAT.genotype.chimerageno.wbtype.capitalize(), pygame.Rect((210, 90), (175, 30)), - container=self.pattern_tab5) + container=self.chim_tabby_pattern_tab) self.dropdown_menus["rufousing_selectc"] = \ pygame_gui.elements.UIDropDownMenu(['Low', 'Medium', 'Rufoused'], global_vars.CREATED_CAT.genotype.chimerageno.ruftype.capitalize(), pygame.Rect((400, 90), (175, 30)), - container=self.pattern_tab5) + container=self.chim_tabby_pattern_tab) self.dropdown_menus["corin_selectc"] = \ pygame_gui.elements.UIDropDownMenu(global_vars.corin.values(), global_vars.corin[global_vars.CREATED_CAT.genotype.chimerageno.corin[0]], - pygame.Rect((20, 145), (175, 30)), - container=self.pattern_tab5) - self.dropdown_menus["extention_selectc"] = \ - pygame_gui.elements.UIDropDownMenu(global_vars.extention.values(), - global_vars.extention[global_vars.CREATED_CAT.genotype.chimerageno.ext[0]], - pygame.Rect((210, 145), (175, 30)), - container=self.pattern_tab5) - self.dropdown_menus["specred_selectc"] = \ - pygame_gui.elements.UIDropDownMenu(['None', 'Merle', 'Cameo', 'Pseudo-cinnamon', 'Blue-red', 'Blue-tipped'], - global_vars.CREATED_CAT.genotype.chimerageno.specialred.capitalize(), - pygame.Rect((400, 145), (175, 30)), - container=self.pattern_tab5) - self.dropdown_menus["saturation_selectc"] = \ - pygame_gui.elements.UIDropDownMenu(['0', '1', '2', '3', '4', '5', '6'], - str(global_vars.CREATED_CAT.genotype.chimerageno.saturation), - pygame.Rect((20, 200), (175, 30)), - container=self.pattern_tab5) + pygame.Rect((20, 90), (175, 30)), + container=self.chim_tabby_pattern_tab) + #------------------------------------------------------------------------------------------------------------ + # TORTIE TAB CONTENTS ------------------------------------------------------------------------------- + #------------------------------------------------------------------------------------------------------------ + + self.dropdown_menus["tortie_select"] = \ + pygame_gui.elements.UIDropDownMenu(global_vars.tortie_patches_shapes.values(), + global_vars.tortie_patches_shapes[self.selectedtortie.replace("rev", "") if self.selectedtortie else None], + pygame.Rect((20, 35), (175, 30)), + container=self.tortie_tab) + + self.dropdown_menus['add_tortie'] = custom_buttons.UIImageButton(pygame.Rect((200, 35), (30, 30)), "", + object_id="#add_button", + container=self.tortie_tab) + + self.dropdown_menus["merle_select"] = \ + pygame_gui.elements.UIDropDownMenu(global_vars.merle_patches_shapes.values(), + global_vars.tortie_patches_shapes[self.selectedmerle], + pygame.Rect((20, 130), (175, 30)), + container=self.tortie_tab) + + self.dropdown_menus['add_merle'] = custom_buttons.UIImageButton(pygame.Rect((200, 130), (30, 30)), "", + object_id="#add_button", + container=self.tortie_tab) + self.dropdown_menus["tortie_remove"] = \ + pygame_gui.elements.UIDropDownMenu(['None'] + global_vars.CREATED_CAT.genotype.tortiepattern, + self.selectedtortierem, + pygame.Rect((240, 35), (175, 30)), + container=self.tortie_tab) + self.dropdown_menus['remove_tortie'] = custom_buttons.UIImageButton(pygame.Rect((420, 35), (30, 30)), "", + object_id="#minus_button", + container=self.tortie_tab) + self.dropdown_menus['clear_tortie'] = custom_buttons.UIImageButton(pygame.Rect((450, 35), (30, 30)), "", + object_id="#clear_button", + container=self.tortie_tab) + + self.dropdown_menus["merle_remove"] = \ + pygame_gui.elements.UIDropDownMenu(['None'] + global_vars.CREATED_CAT.genotype.merlepattern, + self.selectedmerlerem, + pygame.Rect((240, 130), (175, 30)), + container=self.tortie_tab) + self.dropdown_menus['remove_merle'] = custom_buttons.UIImageButton(pygame.Rect((420, 130), (30, 30)), "", + object_id="#minus_button", + container=self.tortie_tab) + self.dropdown_menus['clear_merle'] = custom_buttons.UIImageButton(pygame.Rect((450, 130), (30, 30)), "", + object_id="#clear_button", + container=self.tortie_tab) + + #------------------------------------------------------------------------------------------------------------ + # Chimera TORTIE TAB CONTENTS ------------------------------------------------------------------------------- + #------------------------------------------------------------------------------------------------------------ + + self.dropdown_menus["tortie_selectc"] = \ + pygame_gui.elements.UIDropDownMenu(global_vars.tortie_patches_shapes.values(), + global_vars.tortie_patches_shapes[self.selectedtortiechim.replace("rev", "") if self.selectedtortiechim else None], + pygame.Rect((20, 35), (175, 30)), + container=self.chim_tortie_tab) + + self.dropdown_menus['add_tortiec'] = custom_buttons.UIImageButton(pygame.Rect((200, 35), (30, 30)), "", + object_id="#add_button", + container=self.chim_tortie_tab) + + self.dropdown_menus["merle_selectc"] = \ + pygame_gui.elements.UIDropDownMenu(global_vars.tortie_patches_shapes.values(), + global_vars.tortie_patches_shapes[self.selectedmerle], + pygame.Rect((20, 130), (175, 30)), + container=self.chim_tortie_tab) + + self.dropdown_menus['add_merlec'] = custom_buttons.UIImageButton(pygame.Rect((200, 130), (30, 30)), "", + object_id="#add_button", + container=self.chim_tortie_tab) + self.dropdown_menus["tortie_selectc"] = \ + pygame_gui.elements.UIDropDownMenu(['None'] + global_vars.CREATED_CAT.genotype.tortiepattern, + self.selectedtortierem, + pygame.Rect((240, 35), (175, 30)), + container=self.chim_tortie_tab) + self.dropdown_menus['remove_tortiec'] = custom_buttons.UIImageButton(pygame.Rect((420, 35), (30, 30)), "", + object_id="#minus_button", + container=self.chim_tortie_tab) + self.dropdown_menus['clear_tortiec'] = custom_buttons.UIImageButton(pygame.Rect((450, 35), (30, 30)), "", + object_id="#clear_button", + container=self.chim_tortie_tab) + + self.dropdown_menus["merle_selectc"] = \ + pygame_gui.elements.UIDropDownMenu(['None'] + global_vars.CREATED_CAT.genotype.merlepattern, + self.selectedmerlerem, + pygame.Rect((240, 130), (175, 30)), + container=self.chim_tortie_tab) + self.dropdown_menus['remove_merlec'] = custom_buttons.UIImageButton(pygame.Rect((420, 130), (30, 30)), "", + object_id="#minus_button", + container=self.chim_tortie_tab) + self.dropdown_menus['clear_merlec'] = custom_buttons.UIImageButton(pygame.Rect((450, 130), (30, 30)), "", + object_id="#clear_button", + container=self.chim_tortie_tab) + #------------------------------------------------------------------------------------------------------------ # PATTERN TAB CONTENTS Page 3 ------------------------------------------------------------------------------- #------------------------------------------------------------------------------------------------------------ @@ -1631,38 +1871,43 @@ def build_dropdown_menus(self): pygame_gui.elements.UIDropDownMenu(global_vars.white_patches.values(), global_vars.white_patches[self.selectedbasegame], pygame.Rect((20, 35), (175, 30)), - container=self.pattern_tab3) + container=self.white_pattern_tab) self.dropdown_menus['add_basegame'] = custom_buttons.UIImageButton(pygame.Rect((200, 35), (30, 30)), "", object_id="#add_button", - container=self.pattern_tab3) + container=self.white_pattern_tab) self.dropdown_menus["genemod_select"] = \ pygame_gui.elements.UIDropDownMenu(global_vars.genemod_white.values(), global_vars.genemod_white[self.selectedgenemod], pygame.Rect((20, 90), (175, 30)), - container=self.pattern_tab3) + container=self.white_pattern_tab) self.dropdown_menus['add_genemod'] = custom_buttons.UIImageButton(pygame.Rect((200, 90), (30, 30)), "", object_id="#add_button", - container=self.pattern_tab3) + container=self.white_pattern_tab) self.dropdown_menus["white_select"] = \ pygame_gui.elements.UIDropDownMenu(['None'] + global_vars.CREATED_CAT.genotype.white_pattern[1:] if len(global_vars.CREATED_CAT.genotype.white_pattern) > 1 else ['None'], self.selectedwhite, pygame.Rect((240, 35), (175, 30)), - container=self.pattern_tab3) + container=self.white_pattern_tab) self.dropdown_menus['remove_white'] = custom_buttons.UIImageButton(pygame.Rect((420, 35), (30, 30)), "", object_id="#minus_button", - container=self.pattern_tab3) + container=self.white_pattern_tab) self.dropdown_menus['clear_white'] = custom_buttons.UIImageButton(pygame.Rect((450, 35), (30, 30)), "", object_id="#clear_button", - container=self.pattern_tab3) + container=self.white_pattern_tab) self.dropdown_menus["vitiligo_select"] = \ pygame_gui.elements.UIDropDownMenu(global_vars.vit.values(), global_vars.vit[global_vars.CREATED_CAT.genotype.white_pattern[0]], pygame.Rect((20, 145), (175, 30)), - container=self.pattern_tab3) + container=self.white_pattern_tab) + + self.dropdown_menus["karpati_select"] = pygame_gui.elements.UIDropDownMenu(['None', 'Heterozygous', 'Homozygous'], + global_vars.CREATED_CAT.phenotype.fade, + pygame.Rect((240, 145), (190, 30)), + container=self.white_pattern_tab) #------------------------------------------------------------------------------------------------------------ # PATTERN TAB CONTENTS Page 3 CHIMERA ------------------------------------------------------------------------------- @@ -1672,38 +1917,43 @@ def build_dropdown_menus(self): pygame_gui.elements.UIDropDownMenu(global_vars.white_patches.values(), global_vars.white_patches[self.selectedbasegamechim], pygame.Rect((20, 35), (175, 30)), - container=self.pattern_tab6) + container=self.chim_white_pattern_tab) self.dropdown_menus['add_basegamec'] = custom_buttons.UIImageButton(pygame.Rect((200, 35), (30, 30)), "", object_id="#add_button", - container=self.pattern_tab6) + container=self.chim_white_pattern_tab) self.dropdown_menus["genemod_selectc"] = \ pygame_gui.elements.UIDropDownMenu(global_vars.genemod_white.values(), global_vars.genemod_white[self.selectedgenemodchim], pygame.Rect((20, 90), (175, 30)), - container=self.pattern_tab6) + container=self.chim_white_pattern_tab) self.dropdown_menus['add_genemodc'] = custom_buttons.UIImageButton(pygame.Rect((200, 90), (30, 30)), "", object_id="#add_button", - container=self.pattern_tab6) + container=self.chim_white_pattern_tab) self.dropdown_menus["white_selectc"] = \ pygame_gui.elements.UIDropDownMenu(['None'] + global_vars.CREATED_CAT.genotype.chimerageno.white_pattern[1:] if len(global_vars.CREATED_CAT.genotype.chimerageno.white_pattern) > 1 else ['None'], self.selectedwhitechim, pygame.Rect((240, 35), (175, 30)), - container=self.pattern_tab6) + container=self.chim_white_pattern_tab) self.dropdown_menus['remove_whitec'] = custom_buttons.UIImageButton(pygame.Rect((420, 35), (30, 30)), "", object_id="#minus_button", - container=self.pattern_tab6) + container=self.chim_white_pattern_tab) self.dropdown_menus['clear_whitec'] = custom_buttons.UIImageButton(pygame.Rect((450, 35), (30, 30)), "", object_id="#clear_button", - container=self.pattern_tab6) + container=self.chim_white_pattern_tab) self.dropdown_menus["vitiligo_selectc"] = \ pygame_gui.elements.UIDropDownMenu(global_vars.vit.values(), global_vars.vit[global_vars.CREATED_CAT.genotype.chimerageno.white_pattern[0]], pygame.Rect((20, 145), (175, 30)), - container=self.pattern_tab6) + container=self.chim_white_pattern_tab) + + self.dropdown_menus["karpati_selectc"] = pygame_gui.elements.UIDropDownMenu(['None', 'Heterozygous', 'Homozygous'], + global_vars.CREATED_CAT.chimpheno.fade, + pygame.Rect((240, 145), (190, 30)), + container=self.chim_white_pattern_tab) #------------------------------------------------------------------------------------------------------------ # EXTRAS TAB CONTENTS --------------------------------------------------------------------------------------- @@ -1768,12 +2018,12 @@ def update_checkboxes_and_disable_dropdowns(self): #Shading if global_vars.CREATED_CAT.shading: - self.checkboxes["shading"] = custom_buttons.UIImageButton(pygame.Rect((190, 160), (34, 34)), + self.checkboxes["shading"] = custom_buttons.UIImageButton(pygame.Rect((190, 180), (34, 34)), "", object_id="#checked_checkbox", container=self.general_tab) else: - self.checkboxes["shading"] = custom_buttons.UIImageButton(pygame.Rect((190, 160), (34, 34)), + self.checkboxes["shading"] = custom_buttons.UIImageButton(pygame.Rect((190, 180), (34, 34)), "", object_id="#unchecked_checkbox", container=self.general_tab) @@ -1843,196 +2093,266 @@ def update_checkboxes_and_disable_dropdowns(self): # Caramel if global_vars.CREATED_CAT.genotype.dilutemd[0] == 'Dm': - self.checkboxes["carameltoggle"] = custom_buttons.UIImageButton(pygame.Rect((20, 75), (34, 34)), + self.checkboxes["carameltoggle"] = custom_buttons.UIImageButton(pygame.Rect((20, 85), (34, 34)), "", object_id="#checked_checkbox", - container=self.pattern_tab) + container=self.main_colour_tab) else: - self.checkboxes["carameltoggle"] = custom_buttons.UIImageButton(pygame.Rect((20, 75), (34, 34)), + self.checkboxes["carameltoggle"] = custom_buttons.UIImageButton(pygame.Rect((20, 85), (34, 34)), "", object_id="#unchecked_checkbox", - container=self.pattern_tab) - - # Tortie - if global_vars.CREATED_CAT.genotype.sexgene == ['O', 'o']: - self.checkboxes["tortie"] = custom_buttons.UIImageButton(pygame.Rect((466, 75), (34, 34)), - "", - object_id="#checked_checkbox", - container=self.pattern_tab) + container=self.main_colour_tab) + + + # Fever Coat + + if global_vars.CREATED_CAT.genotype.fevercoat: + self.checkboxes["fever"] = custom_buttons.UIImageButton(pygame.Rect((190, 134), (34, 34)), + "", + object_id="#checked_checkbox", + container=self.general_tab) else: - self.checkboxes["tortie"] = custom_buttons.UIImageButton(pygame.Rect((466, 75), (34, 34)), - "", - object_id="#unchecked_checkbox", - container=self.pattern_tab) - if global_vars.CREATED_CAT.genotype.sexgene[1] == 'O': - self.checkboxes['tortie'].disable() + self.checkboxes["fever"] = custom_buttons.UIImageButton(pygame.Rect((190, 134), (34, 34)), + "", + object_id="#unchecked_checkbox", + container=self.general_tab) + # Bleaching + + if global_vars.CREATED_CAT.genotype.bleach[0] == 'lb': + self.checkboxes["bleaching"] = custom_buttons.UIImageButton(pygame.Rect((130, 195), (34, 34)), + "", + object_id="#checked_checkbox", + container=self.main_colour_tab) else: - self.checkboxes['tortie'].enable() - - # Reverse tortie - if global_vars.CREATED_CAT.genotype.tortiepattern and 'rev' in global_vars.CREATED_CAT.genotype.tortiepattern: - self.checkboxes["revtortie"] = custom_buttons.UIImageButton(pygame.Rect((125, 75), (34, 34)), + self.checkboxes["bleaching"] = custom_buttons.UIImageButton(pygame.Rect((130, 195), (34, 34)), + "", + object_id="#unchecked_checkbox", + container=self.main_colour_tab) + + # Ghosting + if global_vars.CREATED_CAT.genotype.ghosting[0] == 'Gh': + self.checkboxes["ghosting"] = custom_buttons.UIImageButton(pygame.Rect((235, 195), (34, 34)), "", object_id="#checked_checkbox", - container=self.pattern_tab) + container=self.main_colour_tab) else: - self.checkboxes["revtortie"] = custom_buttons.UIImageButton(pygame.Rect((125, 75), (34, 34)), + self.checkboxes["ghosting"] = custom_buttons.UIImageButton(pygame.Rect((235, 195), (34, 34)), "", object_id="#unchecked_checkbox", - container=self.pattern_tab) + container=self.main_colour_tab) - # Brindled Bicolour - if global_vars.CREATED_CAT.genotype.brindledbi: - self.checkboxes["brindled_bicolour"] = custom_buttons.UIImageButton(pygame.Rect((270, 75), (34, 34)), + # Satin/glitter + if global_vars.CREATED_CAT.genotype.satin[0] == 'st': + self.checkboxes["satin"] = custom_buttons.UIImageButton(pygame.Rect((340, 195), (34, 34)), "", object_id="#checked_checkbox", - container=self.pattern_tab) + container=self.main_colour_tab) else: - self.checkboxes["brindled_bicolour"] = custom_buttons.UIImageButton(pygame.Rect((270, 75), (34, 34)), + self.checkboxes["satin"] = custom_buttons.UIImageButton(pygame.Rect((340, 195), (34, 34)), "", object_id="#unchecked_checkbox", - container=self.pattern_tab) + container=self.main_colour_tab) + + # ------------------------------------------------------------------------------------------------------------- + # Pattern Tab CHIMERA ------------------------------------------------------------------------------------------------- + # ------------------------------------------------------------------------------------------------------------- - if global_vars.CREATED_CAT.phenotype.tortie: - self.checkboxes["brindled_bicolour"].enable() + # Caramel + + if global_vars.CREATED_CAT.genotype.chimerageno.dilutemd[0] == 'Dm': + self.checkboxes["carameltogglec"] = custom_buttons.UIImageButton(pygame.Rect((20, 85), (34, 34)), + "", + object_id="#checked_checkbox", + container=self.chim_main_colour_tab) else: - self.checkboxes["brindled_bicolour"].disable() - + self.checkboxes["carameltogglec"] = custom_buttons.UIImageButton(pygame.Rect((20, 85), (34, 34)), + "", + object_id="#unchecked_checkbox", + container=self.chim_main_colour_tab) # Bleaching - if global_vars.CREATED_CAT.genotype.bleach[0] == 'lb': - self.checkboxes["bleaching"] = custom_buttons.UIImageButton(pygame.Rect((20, 120), (34, 34)), + if global_vars.CREATED_CAT.genotype.chimerageno.bleach[0] == 'lb': + self.checkboxes["bleachingc"] = custom_buttons.UIImageButton(pygame.Rect((130, 195), (34, 34)), "", object_id="#checked_checkbox", - container=self.pattern_tab) + container=self.chim_main_colour_tab) else: - self.checkboxes["bleaching"] = custom_buttons.UIImageButton(pygame.Rect((20, 120), (34, 34)), + self.checkboxes["bleachingc"] = custom_buttons.UIImageButton(pygame.Rect((130, 195), (34, 34)), "", object_id="#unchecked_checkbox", - container=self.pattern_tab) + container=self.chim_main_colour_tab) # Ghosting - if global_vars.CREATED_CAT.genotype.ghosting[0] == 'Gh': - self.checkboxes["ghosting"] = custom_buttons.UIImageButton(pygame.Rect((125, 120), (34, 34)), + if global_vars.CREATED_CAT.genotype.chimerageno.ghosting[0] == 'Gh': + self.checkboxes["ghostingc"] = custom_buttons.UIImageButton(pygame.Rect((235, 195), (34, 34)), "", object_id="#checked_checkbox", - container=self.pattern_tab) + container=self.chim_main_colour_tab) else: - self.checkboxes["ghosting"] = custom_buttons.UIImageButton(pygame.Rect((125, 120), (34, 34)), + self.checkboxes["ghostingc"] = custom_buttons.UIImageButton(pygame.Rect((235, 195), (34, 34)), "", object_id="#unchecked_checkbox", - container=self.pattern_tab) + container=self.chim_main_colour_tab) # Satin/glitter - if global_vars.CREATED_CAT.genotype.satin[0] == 'st': - self.checkboxes["satin"] = custom_buttons.UIImageButton(pygame.Rect((270, 120), (34, 34)), + if global_vars.CREATED_CAT.genotype.chimerageno.satin[0] == 'st': + self.checkboxes["satinc"] = custom_buttons.UIImageButton(pygame.Rect((340, 195), (34, 34)), "", object_id="#checked_checkbox", - container=self.pattern_tab) + container=self.chim_main_colour_tab) else: - self.checkboxes["satin"] = custom_buttons.UIImageButton(pygame.Rect((270, 120), (34, 34)), + self.checkboxes["satinc"] = custom_buttons.UIImageButton(pygame.Rect((340, 195), (34, 34)), "", object_id="#unchecked_checkbox", - container=self.pattern_tab) + container=self.chim_main_colour_tab) + + # ------------------------------------------------------------------------------------------------------------- - # Pattern Tab CHIMERA ------------------------------------------------------------------------------------------------- + # Tortie Tab ----------------------------------------------------------------------------------------------- # ------------------------------------------------------------------------------------------------------------- - # Caramel - - if global_vars.CREATED_CAT.genotype.chimerageno.dilutemd[0] == 'Dm': - self.checkboxes["carameltogglec"] = custom_buttons.UIImageButton(pygame.Rect((20, 75), (34, 34)), - "", - object_id="#checked_checkbox", - container=self.pattern_tab4) + # Tortie + if global_vars.CREATED_CAT.genotype.sexgene == ['O', 'o']: + self.checkboxes["tortie"] = custom_buttons.UIImageButton(pygame.Rect((250, 70), (34, 34)), + "", + object_id="#checked_checkbox", + container=self.tortie_tab) else: - self.checkboxes["carameltogglec"] = custom_buttons.UIImageButton(pygame.Rect((20, 75), (34, 34)), - "", - object_id="#unchecked_checkbox", - container=self.pattern_tab4) + self.checkboxes["tortie"] = custom_buttons.UIImageButton(pygame.Rect((250, 70), (34, 34)), + "", + object_id="#unchecked_checkbox", + container=self.tortie_tab) + if global_vars.CREATED_CAT.genotype.sexgene[1] == 'O': + self.checkboxes['tortie'].disable() + else: + self.checkboxes['tortie'].enable() + + # Reverse tortie + if self.tortierev == "rev": + self.checkboxes["revtortie"] = custom_buttons.UIImageButton(pygame.Rect((20, 70), (34, 34)), + "", + object_id="#checked_checkbox", + container=self.tortie_tab) + else: + self.checkboxes["revtortie"] = custom_buttons.UIImageButton(pygame.Rect((20, 70), (34, 34)), + "", + object_id="#unchecked_checkbox", + container=self.tortie_tab) + + # Brindled Bicolour + if global_vars.CREATED_CAT.genotype.brindledbi: + self.checkboxes["brindled_bicolour"] = custom_buttons.UIImageButton(pygame.Rect((350, 70), (34, 34)), + "", + object_id="#checked_checkbox", + container=self.tortie_tab) + else: + self.checkboxes["brindled_bicolour"] = custom_buttons.UIImageButton(pygame.Rect((350, 70), (34, 34)), + "", + object_id="#unchecked_checkbox", + container=self.tortie_tab) + + if global_vars.CREATED_CAT.phenotype.tortie: + self.checkboxes["brindled_bicolour"].enable() + else: + self.checkboxes["brindled_bicolour"].disable() + + # # Reverse merle + # if self.selectedmerle and 'rev' in self.selectedmerle: + # self.checkboxes["revmerle"] = custom_buttons.UIImageButton(pygame.Rect((20, 165), (34, 34)), + # "", + # object_id="#checked_checkbox", + # container=self.tortie_tab) + # else: + # self.checkboxes["revmerle"] = custom_buttons.UIImageButton(pygame.Rect((20, 165), (34, 34)), + # "", + # object_id="#unchecked_checkbox", + # container=self.tortie_tab) + + # Pseudo-merle + if global_vars.CREATED_CAT.genotype.pseudomerle: + self.checkboxes["merle"] = custom_buttons.UIImageButton(pygame.Rect((250, 165), (34, 34)), + "", + object_id="#checked_checkbox", + container=self.tortie_tab) + else: + self.checkboxes["merle"] = custom_buttons.UIImageButton(pygame.Rect((250, 165), (34, 34)), + "", + object_id="#unchecked_checkbox", + container=self.tortie_tab) + # ------------------------------------------------------------------------------------------------------------- + # Tortie Tab Chimera ----------------------------------------------------------------------------------------------- + # ------------------------------------------------------------------------------------------------------------- + # Tortie if global_vars.CREATED_CAT.genotype.chimerageno.sexgene == ['O', 'o']: - self.checkboxes["tortiec"] = custom_buttons.UIImageButton(pygame.Rect((466, 75), (34, 34)), + self.checkboxes["tortiec"] = custom_buttons.UIImageButton(pygame.Rect((250, 70), (34, 34)), "", object_id="#checked_checkbox", - container=self.pattern_tab4) + container=self.chim_tortie_tab) else: - self.checkboxes["tortiec"] = custom_buttons.UIImageButton(pygame.Rect((466, 75), (34, 34)), + self.checkboxes["tortiec"] = custom_buttons.UIImageButton(pygame.Rect((250, 70), (34, 34)), "", object_id="#unchecked_checkbox", - container=self.pattern_tab4) + container=self.chim_tortie_tab) if global_vars.CREATED_CAT.genotype.chimerageno.sexgene[1] == 'O': self.checkboxes['tortiec'].disable() else: self.checkboxes['tortiec'].enable() # Reverse tortie - if global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern and 'rev' in global_vars.CREATED_CAT.genotype.chimerageno.tortiepattern: - self.checkboxes["revtortiec"] = custom_buttons.UIImageButton(pygame.Rect((125, 75), (34, 34)), + if self.chimtortierev: + self.checkboxes["revtortiec"] = custom_buttons.UIImageButton(pygame.Rect((20, 70), (34, 34)), "", object_id="#checked_checkbox", - container=self.pattern_tab4) + container=self.chim_tortie_tab) else: - self.checkboxes["revtortiec"] = custom_buttons.UIImageButton(pygame.Rect((125, 75), (34, 34)), + self.checkboxes["revtortiec"] = custom_buttons.UIImageButton(pygame.Rect((20, 70), (34, 34)), "", object_id="#unchecked_checkbox", - container=self.pattern_tab4) + container=self.chim_tortie_tab) # Brindled Bicolour if global_vars.CREATED_CAT.genotype.chimerageno.brindledbi: - self.checkboxes["brindled_bicolourc"] = custom_buttons.UIImageButton(pygame.Rect((270, 75), (34, 34)), + self.checkboxes["brindled_bicolourc"] = custom_buttons.UIImageButton(pygame.Rect((350, 70), (34, 34)), "", object_id="#checked_checkbox", - container=self.pattern_tab4) + container=self.chim_tortie_tab) else: - self.checkboxes["brindled_bicolourc"] = custom_buttons.UIImageButton(pygame.Rect((270, 75), (34, 34)), + self.checkboxes["brindled_bicolourc"] = custom_buttons.UIImageButton(pygame.Rect((350, 70), (34, 34)), "", object_id="#unchecked_checkbox", - container=self.pattern_tab4) + container=self.chim_tortie_tab) if global_vars.CREATED_CAT.chimpheno.tortie: self.checkboxes["brindled_bicolourc"].enable() else: self.checkboxes["brindled_bicolourc"].disable() - # Bleaching - - if global_vars.CREATED_CAT.genotype.chimerageno.bleach[0] == 'lb': - self.checkboxes["bleachingc"] = custom_buttons.UIImageButton(pygame.Rect((20, 120), (34, 34)), - "", - object_id="#checked_checkbox", - container=self.pattern_tab4) - else: - self.checkboxes["bleachingc"] = custom_buttons.UIImageButton(pygame.Rect((20, 120), (34, 34)), - "", - object_id="#unchecked_checkbox", - container=self.pattern_tab4) - - # Ghosting - if global_vars.CREATED_CAT.genotype.chimerageno.ghosting[0] == 'Gh': - self.checkboxes["ghostingc"] = custom_buttons.UIImageButton(pygame.Rect((125, 120), (34, 34)), - "", - object_id="#checked_checkbox", - container=self.pattern_tab4) - else: - self.checkboxes["ghostingc"] = custom_buttons.UIImageButton(pygame.Rect((125, 120), (34, 34)), - "", - object_id="#unchecked_checkbox", - container=self.pattern_tab4) - - # Satin/glitter - if global_vars.CREATED_CAT.genotype.chimerageno.satin[0] == 'st': - self.checkboxes["satinc"] = custom_buttons.UIImageButton(pygame.Rect((270, 120), (34, 34)), + # # Reverse merle + # if self.selectedmerlechim and 'rev' in self.selectedmerlechim: + # self.checkboxes["revmerlec"] = custom_buttons.UIImageButton(pygame.Rect((20, 165), (34, 34)), + # "", + # object_id="#checked_checkbox", + # container=self.chim_tortie_tab) + # else: + # self.checkboxes["revmerlec"] = custom_buttons.UIImageButton(pygame.Rect((20, 165), (34, 34)), + # "", + # object_id="#unchecked_checkbox", + # container=self.chim_tortie_tab) + + # Pseudo-merle + if global_vars.CREATED_CAT.genotype.chimerageno.pseudomerle: + self.checkboxes["merlec"] = custom_buttons.UIImageButton(pygame.Rect((250, 165), (34, 34)), "", object_id="#checked_checkbox", - container=self.pattern_tab4) + container=self.chim_tortie_tab) else: - self.checkboxes["satinc"] = custom_buttons.UIImageButton(pygame.Rect((270, 120), (34, 34)), + self.checkboxes["merlec"] = custom_buttons.UIImageButton(pygame.Rect((250, 165), (34, 34)), "", object_id="#unchecked_checkbox", - container=self.pattern_tab4) + container=self.chim_tortie_tab) # ------------------------------------------------------------------------------------------------------------- # Pattern 2 Tab ----------------------------------------------------------------------------------------------- @@ -2040,15 +2360,15 @@ def update_checkboxes_and_disable_dropdowns(self): # Silver Checkbox if global_vars.CREATED_CAT.genotype.silver[0] == 'I': - self.checkboxes["silver_checkbox"] = custom_buttons.UIImageButton(pygame.Rect((20, 75), (34, 34)), + self.checkboxes["silver_checkbox"] = custom_buttons.UIImageButton(pygame.Rect((20, 125), (34, 34)), "", object_id="#checked_checkbox", - container=self.pattern_tab2) + container=self.tabby_pattern_tab) else: - self.checkboxes["silver_checkbox"] = custom_buttons.UIImageButton(pygame.Rect((20, 75), (34, 34)), + self.checkboxes["silver_checkbox"] = custom_buttons.UIImageButton(pygame.Rect((20, 125), (34, 34)), "", object_id="#unchecked_checkbox", - container=self.pattern_tab2) + container=self.tabby_pattern_tab) # ------------------------------------------------------------------------------------------------------------- # Pattern 2 Tab CHIMERA ----------------------------------------------------------------------------------------------- @@ -2056,15 +2376,15 @@ def update_checkboxes_and_disable_dropdowns(self): # Silver Checkbox if global_vars.CREATED_CAT.genotype.chimerageno.silver[0] == 'I': - self.checkboxes["silver_checkboxc"] = custom_buttons.UIImageButton(pygame.Rect((20, 75), (34, 34)), + self.checkboxes["silver_checkboxc"] = custom_buttons.UIImageButton(pygame.Rect((20, 125), (34, 34)), "", object_id="#checked_checkbox", - container=self.pattern_tab5) + container=self.chim_tabby_pattern_tab) else: - self.checkboxes["silver_checkboxc"] = custom_buttons.UIImageButton(pygame.Rect((20, 75), (34, 34)), + self.checkboxes["silver_checkboxc"] = custom_buttons.UIImageButton(pygame.Rect((20, 125), (34, 34)), "", object_id="#unchecked_checkbox", - container=self.pattern_tab5) + container=self.chim_tabby_pattern_tab) # ------------------------------------------------------------------------------------------------------------- # Patter 3 Tab ------------------------------------------------------------------------------------------------ @@ -2075,23 +2395,24 @@ def update_checkboxes_and_disable_dropdowns(self): self.checkboxes["salmiak"] = custom_buttons.UIImageButton(pygame.Rect((20, 180), (34, 34)), "", object_id="#checked_checkbox", - container=self.pattern_tab3) + container=self.white_pattern_tab) else: self.checkboxes["salmiak"] = custom_buttons.UIImageButton(pygame.Rect((20, 180), (34, 34)), "", object_id="#unchecked_checkbox", - container=self.pattern_tab3) + container=self.white_pattern_tab) # Salmiak if global_vars.CREATED_CAT.genotype.chimerageno.white[0] == 'wsal': self.checkboxes["salmiakc"] = custom_buttons.UIImageButton(pygame.Rect((20, 180), (34, 34)), "", object_id="#checked_checkbox", - container=self.pattern_tab6) + container=self.chim_white_pattern_tab) else: self.checkboxes["salmiakc"] = custom_buttons.UIImageButton(pygame.Rect((20, 180), (34, 34)), "", object_id="#unchecked_checkbox", - container=self.pattern_tab6) + container=self.chim_white_pattern_tab) + # ------------------------------------------------------------------------------------------------------------- # Extras Tab -------------------------------------------------------------------------------------------------- @@ -2128,11 +2449,11 @@ def exit_screen(self): self.general_tab_button.kill() self.general_tab_button = None - self.pattern_tab_button.kill() - self.pattern_tab_button = None + self.main_colour_tab_button.kill() + self.main_colour_tab_button = None self.extras_tab_button.kill() - self.pattern_tab_button = None + self.main_colour_tab_button = None self.tab_background.kill() self.tab_background = None @@ -2141,23 +2462,29 @@ def exit_screen(self): self.general_tab.kill() self.general_tab = None - self.pattern_tab.kill() - self.pattern_tab = None + self.main_colour_tab.kill() + self.main_colour_tab = None + + self.tortie_tab.kill() + self.tortie_tab = None - self.pattern_tab2.kill() - self.pattern_tab2 = None + self.tabby_pattern_tab.kill() + self.tabby_pattern_tab = None - self.pattern_tab3.kill() - self.pattern_tab3 = None + self.white_pattern_tab.kill() + self.white_pattern_tab = None - self.pattern_tab4.kill() - self.pattern_tab4 = None + self.chim_main_colour_tab.kill() + self.chim_main_colour_tab = None + + self.chim_tortie_tab.kill() + self.chim_tortie_tab = None - self.pattern_tab5.kill() - self.pattern_tab5 = None + self.chim_tabby_pattern_tab.kill() + self.chim_tabby_pattern_tab = None - self.pattern_tab6.kill() - self.pattern_tab6 = None + self.chim_white_pattern_tab.kill() + self.chim_white_pattern_tab = None self.extras_tab.kill() self.extras_tab = None diff --git a/scripts/utility.py b/scripts/utility.py index 2be56b5..f12962e 100644 --- a/scripts/utility.py +++ b/scripts/utility.py @@ -103,9 +103,17 @@ def generate_sprite(cat, life_state=None, scars_hidden=False, acc_hidden=False, } gensprite = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) - def GenSprite(genotype, phenotype, sprite_age): - phenotype.SpriteInfo(sprite_age) + def get_current_season(): + return cat.season + def GenSprite(genotype, phenotype, sprite_age, merle=False): + phenotype.SpriteInfo(sprite_age) + if(genotype.pseudomerle and genotype.merlepattern and not merle and 'rev' in genotype.merlepattern[0]): + old_silver = genotype.silver + phenotype.genotype.silver = ['i', 'i'] + phenotype.SpriteInfo(sprite_age) + phenotype.genotype.silver = old_silver + def CreateStripes(stripecolour, whichbase, coloursurface=None, pattern=None, special = None): stripebase = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) @@ -119,7 +127,7 @@ def CreateStripes(stripecolour, whichbase, coloursurface=None, pattern=None, spe if pattern: stripebase.blit(sprites.sprites[pattern + cat_sprite], (0, 0)) - elif genotype.ticked == ['Ta', 'ta'] and genotype.breakthrough and genotype.mack[0] == 'mc': + elif 'ghost' in phenotype.tabby: ghoststripes = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) ghoststripes.blit(sprites.sprites[phenotype.GetTabbySprite() + cat_sprite], (0, 0)) ghoststripes.set_alpha(25) @@ -142,21 +150,21 @@ def CreateStripes(stripecolour, whichbase, coloursurface=None, pattern=None, spe stripebase.blit(sprites.sprites[stripecolour], (0, 0), special_flags=pygame.BLEND_RGBA_MULT) else: surf = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) - surf.blit(sprites.sprites[stripecolourdict.get(stripecolour, stripecolour)], (0, 0)) + surf.blit(sprites.sprites[stripecolourdict.get(stripecolour[:-1], stripecolour[:-1])+stripecolour[-1]], (0, 0)) if phenotype.caramel == 'caramel' and not ('red' in stripecolour or 'cream' in stripecolour or 'honey' in stripecolour or 'ivory' in stripecolour or 'apricot' in stripecolour): surf.blit(sprites.sprites['caramel0'], (0, 0)) stripebase.blit(surf, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) middle = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) - if(genotype.soktype == "full sokoke" and not pattern and not (genotype.ticked[0] == 'Ta' and genotype.ticktype == 'agouti')): + if(genotype.soktype == "full sokoke" and not pattern and 'agouti' not in phenotype.tabby): middle.blit(stripebase, (0, 0)) stripebase = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) middle.set_alpha(150) stripebase.blit(middle, (0, 0)) middle = CreateStripes(stripecolour, whichbase, coloursurface, pattern=phenotype.GetTabbySprite(special='redbar')) stripebase.blit(middle, (0, 0)) - elif(genotype.soktype == "mild fading" and not pattern and not (genotype.ticked[0] == 'Ta' and genotype.ticktype == 'agouti')): + elif(genotype.soktype == "mild fading" and not pattern and 'agouti' not in phenotype.tabby): middle.blit(stripebase, (0, 0)) stripebase = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) middle.set_alpha(204) @@ -185,7 +193,7 @@ def TabbyBase(whichcolour, whichbase, cat_unders, special = None): whichmain.blit(overlay, (0, 0)) else: whichmain.blit(sprites.sprites[whichbase], (0, 0)) - if special !='copper' and sprite_age > 12 and (genotype.silver[0] == 'I' and genotype.corin[0] == 'fg' and (cat.season == 'Leaf-fall' or cat.season == 'Leaf-bare' or 'infertility' in cat.permanent_condition)): + if special !='copper' and sprite_age > 12 and (genotype.silver[0] == 'I' and genotype.corin[0] == 'fg' and (get_current_season() == 'Leaf-fall' or get_current_season() == 'Leaf-bare' or 'infertility' in cat.permanent_condition)): sunshine = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) colours = phenotype.FindRed(genotype, sprite_age, special='low') @@ -247,7 +255,7 @@ def ApplySmokeEffects(whichmain): if(sprite_age < 4): ghostingbase.set_alpha(150) - #whichmain.blit(ghostingbase, (0, 0)) + whichmain.blit(ghostingbase, (0, 0)) if (genotype.silver[0] == 'I' and cat.pelt.length == 'long'): ghostingbase = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) ghostingbase.blit(sprites.sprites['ghost' + cat_sprite], (0, 0)) @@ -294,9 +302,9 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): else: colourbase = TabbyBase(whichcolour, whichbase, cat_unders, special) - if((genotype.pointgene == ["cb", "cb"] and 'cinnamon' not in whichcolour and cat_sprite != "20") or (((("cb" in genotype.pointgene or genotype.pointgene[0] == "cm") and cat_sprite != "20") or genotype.pointgene == ["cb", "cb"]) and cat.season == 'Leaf-bare')): + if((genotype.pointgene == ["cb", "cb"] and cat_sprite != "20") or (((("cb" in genotype.pointgene or genotype.pointgene[0] == "cm") and cat_sprite != "20") or genotype.pointgene == ["cb", "cb"]) and get_current_season() == 'Leaf-bare')): colourbase.set_alpha(100) - elif((("cb" in genotype.pointgene or genotype.pointgene[0] == "cm") and cat_sprite != "20") or genotype.pointgene == ["cb", "cb"] or ((cat_sprite != "20" or ("cb" in genotype.pointgene or genotype.pointgene[0] == "cm")) and cat.season == 'Leaf-bare')): + elif((("cb" in genotype.pointgene or genotype.pointgene[0] == "cm") and cat_sprite != "20") or genotype.pointgene == ["cb", "cb"] or ((cat_sprite != "20" or ("cb" in genotype.pointgene or genotype.pointgene[0] == "cm")) and get_current_season() == 'Leaf-bare')): colourbase.set_alpha(50) elif(("cb" in genotype.pointgene or genotype.pointgene[0] == "cm")): colourbase.set_alpha(15) @@ -314,13 +322,13 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): if("cb" in genotype.pointgene or genotype.pointgene[0] == "cm"): if("black" in whichcolour and cat_sprite != "20"): whichmain = AddStripes(whichmain, 'lightbasecolours2', whichbase) - elif((("chocolate" in whichcolour or "cinnamon" in whichcolour) and cat_sprite != "20") or "black" in whichcolour): + elif(("chocolate" in whichcolour and cat_sprite != "20") or "black" in whichcolour): whichmain = AddStripes(whichmain, 'lightbasecolours1', whichbase) elif("cinnamon" in whichcolour or "chocolate" in whichcolour): whichmain = AddStripes(whichmain, 'lightbasecolours0', whichbase) else: pointbase = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) - pointbase.blit(sprites.sprites[stripecolourdict.get(whichcolour, whichcolour)], (0, 0)) + pointbase.blit(sprites.sprites[stripecolourdict.get(whichcolour[:-1], whichcolour[:-1])+whichcolour[-1]], (0, 0)) if phenotype.caramel == 'caramel' and not is_red: pointbase.blit(sprites.sprites['caramel0'], (0, 0)) pointbase.set_alpha(102) @@ -347,7 +355,7 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): elif(genotype.pointgene == ["cb", "cb"]) and cat_sprite != "20": pointbase = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) - pointbase.blit(sprites.sprites[stripecolourdict.get(whichcolour, whichcolour)], (0, 0)) + pointbase.blit(sprites.sprites[stripecolourdict.get(whichcolour[:-1], whichcolour[:-1])+whichcolour[-1]], (0, 0)) if phenotype.caramel == 'caramel' and not is_red: pointbase.blit(sprites.sprites['caramel0'], (0, 0)) pointbase.set_alpha(204) @@ -357,7 +365,7 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): whichmain = AddStripes(whichmain, whichcolour, whichbase, coloursurface=pointbase2) elif("cb" in genotype.pointgene) and (cat_sprite != "20" or genotype.pointgene == ["cb", "cb"]): pointbase = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) - pointbase.blit(sprites.sprites[stripecolourdict.get(whichcolour, whichcolour)], (0, 0)) + pointbase.blit(sprites.sprites[stripecolourdict.get(whichcolour[:-1], whichcolour[:-1])+whichcolour[-1]], (0, 0)) if phenotype.caramel == 'caramel' and not is_red: pointbase.blit(sprites.sprites['caramel0'], (0, 0)) if(genotype.eumelanin[0] == "bl"): @@ -388,7 +396,7 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): if("black" in whichcolour and genotype.pointgene[0] == "cm"): pointbase.blit(colourbase, (0, 0)) else: - if((("cb" in genotype.pointgene or genotype.pointgene[0] == "cm") and cat_sprite != "20") or ((cat_sprite != "20" or ("cb" in genotype.pointgene or genotype.pointgene[0] == "cm")) and cat.season == "Leaf-bare")): + if((("cb" in genotype.pointgene or genotype.pointgene[0] == "cm") and cat_sprite != "20") or ((cat_sprite != "20" or ("cb" in genotype.pointgene or genotype.pointgene[0] == "cm")) and get_current_season() == "Leaf-bare")): colourbase.set_alpha(180) elif(cat_sprite != "20" or ("cb" in genotype.pointgene or genotype.pointgene[0] == "cm")): colourbase.set_alpha(50) @@ -397,11 +405,11 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): pointbase2.blit(colourbase, (0, 0)) - if(cat.season == "Greenleaf"): + if(get_current_season() == "Greenleaf"): pointbase.blit(sprites.sprites['mochal' + cat_sprite], (0, 0)) pointbase.blit(pointbase2, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) - elif(cat.season == "Leaf-bare"): + elif(get_current_season() == "Leaf-bare"): pointbase.blit(sprites.sprites['mochad' + cat_sprite], (0, 0)) pointbase.blit(pointbase2, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) @@ -412,9 +420,9 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): else: - if((genotype.pointgene == ["cb", "cb"] and cat_sprite != "20") or ("cb" in genotype.pointgene and cat_sprite != "20" and cat.season == 'Leaf-bare')): + if((genotype.pointgene == ["cb", "cb"] and cat_sprite != "20") or ("cb" in genotype.pointgene and cat_sprite != "20" and get_current_season() == 'Leaf-bare')): colourbase.set_alpha(180) - elif(("cb" in genotype.pointgene and cat_sprite != "20") or genotype.pointgene == ["cb", "cb"] or ((cat_sprite != "20" or "cb" in genotype.pointgene) and cat.season == 'Leaf-bare')): + elif(("cb" in genotype.pointgene and cat_sprite != "20") or genotype.pointgene == ["cb", "cb"] or ((cat_sprite != "20" or "cb" in genotype.pointgene) and get_current_season() == 'Leaf-bare')): colourbase.set_alpha(120) elif(cat_sprite != "20" or "cb" in genotype.pointgene): colourbase.set_alpha(50) @@ -423,11 +431,11 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): pointbase2.blit(colourbase, (0, 0)) - if(cat.season == "Greenleaf"): + if(get_current_season() == "Greenleaf"): pointbase.blit(sprites.sprites['pointsl' + cat_sprite], (0, 0)) pointbase.blit(pointbase2, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) - elif(cat.season == "Leaf-bare"): + elif(get_current_season() == "Leaf-bare"): pointbase.blit(sprites.sprites['pointsd' + cat_sprite], (0, 0)) pointbase.blit(pointbase2, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) @@ -450,11 +458,11 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): stripebase.blit(CreateStripes(colour, whichbase), (0, 0)) - if(cat.season == "Greenleaf"): + if(get_current_season() == "Greenleaf"): stripebase2.blit(sprites.sprites['mochal' + cat_sprite], (0, 0)) stripebase2.blit(stripebase, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) - elif(cat.season == "Leaf-bare"): + elif(get_current_season() == "Leaf-bare"): stripebase2.blit(sprites.sprites['mochad' + cat_sprite], (0, 0)) stripebase2.blit(stripebase, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) @@ -469,7 +477,7 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): else: if(genotype.pointgene[0] == "C"): - whichmain.blit(sprites.sprites[stripecolourdict.get(whichcolour, whichcolour)], (0, 0)) + whichmain.blit(sprites.sprites[stripecolourdict.get(whichcolour[:-1], whichcolour[:-1])+whichcolour[-1]], (0, 0)) if phenotype.caramel == 'caramel' and not is_red: whichmain.blit(sprites.sprites['caramel0'], (0, 0)) @@ -484,6 +492,10 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): coloursurface = None if("black" in whichcolour and genotype.pointgene[0] == "cm"): whichmain.blit(sprites.sprites['lightbasecolours2'], (0, 0)) + overlay = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) + overlay.blit(sprites.sprites['cinnamon3'], (0, 0)) + overlay.set_alpha(150) + whichmain.blit(overlay, (0, 0)) whichmain = ApplySmokeEffects(whichmain) if phenotype.length != "longhaired": @@ -506,7 +518,7 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): whichmain.blit(sprites.sprites['lightbasecolours1'], (0, 0)) colour = 'lightbasecolours1' whichmain = ApplySmokeEffects(whichmain) - elif("cinnamon" in whichcolour or "chocolate" in whichcolour): + elif("chocolate" in whichcolour or "chocolate" in whichcolour): whichmain.blit(sprites.sprites['lightbasecolours0'], (0, 0)) colour = 'lightbasecolours0' else: @@ -518,7 +530,17 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): pointbase.set_alpha(102) if 'fawn' in whichcolour: pointbase.set_alpha(0) - whichmain.blit(sprites.sprites['lightbasecolours0'], (0, 0)) + + if 'blue' in whichcolour: + if genotype.pointgene[0] == "cm": + whichmain.blit(sprites.sprites[whichcolour.replace('blue', 'fawn')], (0, 0)) + whichmain.blit(pointbase, (0, 0)) + pointbase.blit(sprites.sprites['lightbasecolours2'], (0, 0)) + pointbase.set_alpha(50) + else: + whichmain.blit(sprites.sprites['lightbasecolours1'], (0, 0)) + else: + whichmain.blit(sprites.sprites['lightbasecolours0'], (0, 0)) whichmain.blit(pointbase, (0, 0)) pointbase.blit(whichmain, (0, 0)) coloursurface = pointbase @@ -555,11 +577,11 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): pointbase2.blit(stripebase, (0, 0)) - if(cat.season == "Greenleaf"): + if(get_current_season() == "Greenleaf"): pointbase.blit(sprites.sprites['mochal' + cat_sprite], (0, 0)) pointbase.blit(pointbase2, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) - elif(cat.season == "Leaf-bare"): + elif(get_current_season() == "Leaf-bare"): pointbase.blit(sprites.sprites['mochad' + cat_sprite], (0, 0)) pointbase.blit(pointbase2, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) @@ -568,6 +590,9 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): pointbase.blit(pointbase2, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) + if genotype.pointgene[0] == "cm" and 'blue' in whichcolour: + pointbase.set_alpha(102) + whichmain.blit(pointbase, (0, 0)) else: @@ -582,7 +607,7 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): whichmain.blit(sprites.sprites['lightbasecolours2'], (0, 0)) colour = 'lightbasecolours2' whichmain = ApplySmokeEffects(whichmain) - elif((("cinnamon" in whichcolour and genotype.pointgene == ["cb", "cb"]) or ("chocolate" in whichcolour and "cb" in genotype.pointgene) or ("black" in whichcolour and genotype.pointgene == ["cs", "cs"])) and cat_sprite != "20") or (("chocolate" in whichcolour and genotype.pointgene == ["cb", "cb"]) or ("black" in whichcolour and "cb" in genotype.pointgene)): + elif((("chocolate" in whichcolour and genotype.pointgene == ["cb", "cb"]) or ("chocolate" in whichcolour and "cb" in genotype.pointgene) or ("black" in whichcolour and genotype.pointgene == ["cs", "cs"])) and cat_sprite != "20") or (("chocolate" in whichcolour and genotype.pointgene == ["cb", "cb"]) or ("black" in whichcolour and "cb" in genotype.pointgene)): whichmain.blit(sprites.sprites['lightbasecolours1'], (0, 0)) colour = 'lightbasecolours1' whichmain = ApplySmokeEffects(whichmain) @@ -597,7 +622,11 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): pointbase.set_alpha(140) if 'fawn' in whichcolour: pointbase.set_alpha(50) - whichmain.blit(sprites.sprites['lightbasecolours0'], (0, 0)) + + if 'blue' in whichcolour: + whichmain.blit(sprites.sprites['lightbasecolours1'], (0, 0)) + else: + whichmain.blit(sprites.sprites['lightbasecolours0'], (0, 0)) whichmain.blit(pointbase, (0, 0)) pointbase.blit(whichmain, (0, 0)) coloursurface = pointbase @@ -612,7 +641,11 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): pointbase.set_alpha(25) else: pointbase.set_alpha(102) - whichmain.blit(sprites.sprites['lightbasecolours0'], (0, 0)) + + if 'blue' in whichcolour: + whichmain.blit(sprites.sprites['lightbasecolours1'], (0, 0)) + else: + whichmain.blit(sprites.sprites['lightbasecolours0'], (0, 0)) whichmain.blit(pointbase, (0, 0)) coloursurface = whichmain whichmain = ApplySmokeEffects(whichmain) @@ -640,11 +673,11 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): pointbase2.blit(stripebase, (0, 0)) - if(cat.season == "Greenleaf"): + if(get_current_season() == "Greenleaf"): pointbase.blit(sprites.sprites['pointsl' + cat_sprite], (0, 0)) pointbase.blit(pointbase2, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) - elif(cat.season == "Leaf-bare"): + elif(get_current_season() == "Leaf-bare"): pointbase.blit(sprites.sprites['pointsd' + cat_sprite], (0, 0)) pointbase.blit(pointbase2, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) @@ -663,9 +696,9 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): if(genotype.karp[0] == 'K'): if(genotype.karp[1] == 'K'): - whichmain.blit(sprites.sprites['homokarpati'+ seasondict.get(cat.season, "spring") + cat_sprite], (0, 0)) + whichmain.blit(sprites.sprites['homokarpati'+ seasondict.get(get_current_season(), "spring") + cat_sprite], (0, 0)) else: - whichmain.blit(sprites.sprites['hetkarpati'+ seasondict.get(cat.season, "spring") + cat_sprite], (0, 0)) + whichmain.blit(sprites.sprites['hetkarpati'+ seasondict.get(get_current_season(), "spring") + cat_sprite], (0, 0)) if(genotype.white[0] == 'wsal'): whichmain.blit(sprites.sprites['salmiak' + cat_sprite], (0, 0)) @@ -709,7 +742,10 @@ def MakeCat(whichmain, whichcolour, whichbase, cat_unders, special=None): return whichmain gensprite = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) - gensprite = MakeCat(gensprite, phenotype.maincolour, phenotype.spritecolour, phenotype.mainunders) + if(phenotype.patchmain != "" and 'rev' in genotype.tortiepattern[0]): + gensprite = MakeCat(gensprite, phenotype.patchmain, phenotype.patchcolour, phenotype.patchunders) + else: + gensprite = MakeCat(gensprite, phenotype.maincolour, phenotype.spritecolour, phenotype.mainunders) if('masked' in phenotype.silvergold): masked = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) @@ -741,7 +777,6 @@ def ApplyPatchEffects(sprite): underbelly = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) underbelly = MakeCat(underbelly, colours[0], colours[1], [colours[2], colours[3]], special='nounders') sunshine.blit(underbelly, (0, 0), special_flags=pygame.BLEND_RGBA_MIN) - sunshine.set_alpha(75) sprite.blit(sunshine, (0, 0)) return sprite @@ -749,40 +784,76 @@ def ApplyPatchEffects(sprite): if(phenotype.patchmain != ""): - tortpatches = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) - tortpatches = MakeCat(tortpatches, phenotype.patchmain, phenotype.patchcolour, phenotype.patchunders) - if('masked' in phenotype.silvergold): - masked = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) - masked = MakeCat(masked, phenotype.patchmain, phenotype.patchcolour, phenotype.patchunders, special="masked silver") - masked2 = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) - masked2.blit(sprites.sprites["BLUE-TIPPED" + cat_sprite], (0, 0)) - masked2.blit(masked, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) - masked2.set_alpha(120) - tortpatches.blit(masked2, (0, 0)) + for pattern in genotype.tortiepattern: + tortpatches = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) + if 'rev' in pattern: + isred = not ('red' in phenotype.maincolour or 'cream' in phenotype.maincolour or 'honey' in phenotype.maincolour or 'ivory' in phenotype.maincolour or 'apricot' in phenotype.maincolour) + tortpatches = MakeCat(tortpatches, phenotype.maincolour, phenotype.spritecolour, phenotype.mainunders) + else: + isred = not ('red' in phenotype.patchmain or 'cream' in phenotype.patchmain or 'honey' in phenotype.patchmain or 'ivory' in phenotype.patchmain or 'apricot' in phenotype.patchmain) + tortpatches = MakeCat(tortpatches, phenotype.patchmain, phenotype.patchcolour, phenotype.patchunders) + if('masked' in phenotype.silvergold): + masked = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) + masked = MakeCat(masked, phenotype.patchmain, phenotype.patchcolour, phenotype.patchunders, special="masked silver") + masked2 = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) + masked2.blit(sprites.sprites["BLUE-TIPPED" + cat_sprite], (0, 0)) + masked2.blit(masked, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) + masked2.set_alpha(120) + tortpatches.blit(masked2, (0, 0)) + - - if phenotype.caramel == 'caramel' and not ('red' in phenotype.patchmain or 'cream' in phenotype.patchmain or 'honey' in phenotype.patchmain or 'ivory' in phenotype.patchmain or 'apricot' in phenotype.patchmain): - tortpatches.blit(sprites.sprites['caramel0'], (0, 0)) - tortpatches = ApplyPatchEffects(tortpatches) - - tortpatches2 = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) - tortpatches2.blit(sprites.sprites[phenotype.tortpattern.replace('rev', "") + cat_sprite], (0, 0)) - tortpatches2.blit(tortpatches, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) - gensprite.blit(tortpatches2, (0, 0)) + if phenotype.caramel == 'caramel' and isred: + tortpatches.blit(sprites.sprites['caramel0'], (0, 0)) + tortpatches = ApplyPatchEffects(tortpatches) + + tortpatches2 = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) + tortpatches2.blit(sprites.sprites[pattern.replace('rev', "") + cat_sprite], (0, 0)) + tortpatches2.blit(tortpatches, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) + gensprite.blit(tortpatches2, (0, 0)) + + if(genotype.pseudomerle and genotype.merlepattern and not merle): + for pattern in genotype.merlepattern: + if 'rev' in pattern: + phenotype.SpriteInfo(sprite_age) + merlepatches = GenSprite(genotype, phenotype, sprite_age, merle=True) + else: + old_silver = genotype.silver + phenotype.genotype.silver = ['i', 'i'] + phenotype.SpriteInfo(sprite_age) + merlepatches = GenSprite(genotype, phenotype, sprite_age, merle=True) + phenotype.genotype.silver = old_silver + phenotype.SpriteInfo(sprite_age) + + merlepatches2 = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) + merlepatches2.blit(sprites.sprites[pattern.replace('rev', "") + cat_sprite], (0, 0)) + merlepatches2.blit(merlepatches, (0, 0), special_flags=pygame.BLEND_RGBA_MULT) + gensprite.blit(merlepatches2, (0, 0)) if genotype.satin[0] == "st" or genotype.tenn[0] == 'tr': gensprite.blit(sprites.sprites['satin0'], (0, 0)) - if (genotype.bleach[0] == "lb" and sprite_age > 3) or 'masked' in phenotype.silvergold: + if (genotype.fevercoat and sprite_age < 5): + fevercoat = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) + fevercoat.blit(sprites.sprites['bleach' + cat_sprite], (0, 0)) + fevercoat.blit(sprites.sprites['bleach' + cat_sprite], (0, 0)) + fevercoat.blit(sprites.sprites['bleach' + cat_sprite], (0, 0)) + fevercoat.blit(sprites.sprites['bleach' + cat_sprite], (0, 0)) + fevercoat.blit(sprites.sprites['bleach' + cat_sprite], (0, 0)) + fevercoat.blit(sprites.sprites['lightbasecolours0'], (0, 0), special_flags=pygame.BLEND_RGBA_MULT) + if (sprite_age > 2): + fevercoat.set_alpha(150) + gensprite.blit(fevercoat, (0, 0)) + + elif (genotype.bleach[0] == "lb" and sprite_age > 3) or 'masked' in phenotype.silvergold: gensprite.blit(sprites.sprites['bleach' + cat_sprite], (0, 0)) - nose = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) nose.blit(sprites.sprites['nose' + cat_sprite], (0, 0)) nose_dict = { 'red' : 0, 'whit' : 1, + 'albin' : 1, 'tabby' : 2, 'black' : 3, 'chocolate' : 4, @@ -798,7 +869,7 @@ def ApplyPatchEffects(sprite): 'beige' : 14 } - if genotype.white[0] == 'W' or genotype.pointgene[0] == 'c': + if phenotype.maincolour == "white": nose.blit(sprites.sprites['nosecolours1'], (0, 0), special_flags=pygame.BLEND_RGBA_MULT) elif ('amber' not in phenotype.colour or genotype.agouti[0] != 'a') and ('red' in phenotype.maincolour or 'cream' in phenotype.maincolour or 'honey' in phenotype.maincolour or 'ivory' in phenotype.maincolour or 'apricot' in phenotype.maincolour): nose.blit(sprites.sprites['nosecolours0'], (0, 0), special_flags=pygame.BLEND_RGBA_MULT) @@ -815,7 +886,6 @@ def ApplyPatchEffects(sprite): gensprite.blit(nose, (0, 0)) whitesprite = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) - tintedwhitesprite = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) if(genotype.white_pattern != 'No' and genotype.white_pattern): for x in genotype.white_pattern: @@ -825,7 +895,6 @@ def ApplyPatchEffects(sprite): for x in genotype.white_pattern: if(x and 'break/' in x): whitesprite.blit(sprites.sprites[x + cat_sprite], (0, 0), special_flags=pygame.BLEND_RGBA_SUB) - tintedwhitesprite.blit(whitesprite, (0, 0)) nose.blit(sprites.sprites['pads' + cat_sprite], (0, 0)) nose.blit(sprites.sprites['nose' + cat_sprite], (0, 0)) @@ -842,15 +911,14 @@ def ApplyPatchEffects(sprite): if(genotype.vitiligo): for x in vitiligo: if x in genotype.white_pattern: - tintedwhitesprite.blit(sprites.sprites[x + cat_sprite], (0, 0)) + whitesprite.blit(sprites.sprites[x + cat_sprite], (0, 0)) if genotype.white_pattern: if 'dorsal1' in genotype.white_pattern: - tintedwhitesprite.blit(sprites.sprites['dorsal1' + cat_sprite], (0, 0)) + whitesprite.blit(sprites.sprites['dorsal1' + cat_sprite], (0, 0)) elif 'dorsal2' in genotype.white_pattern: - tintedwhitesprite.blit(sprites.sprites['dorsal2' + cat_sprite], (0, 0)) + whitesprite.blit(sprites.sprites['dorsal2' + cat_sprite], (0, 0)) - - gensprite.blit(tintedwhitesprite, (0, 0)) + gensprite.blit(whitesprite, (0, 0)) if cat.genotype.sedesp == ['hr', 're'] or (cat.genotype.sedesp[0] == 're' and sprite_age < 12) or (cat.genotype.laperm[0] == 'Lp' and sprite_age < 4): @@ -887,16 +955,35 @@ def ApplyPatchEffects(sprite): gensprite.blit(lefteye, (0, 0)) gensprite.blit(righteye, (0, 0)) + + if sprite_age == 1: + lefteye.blit(sprites.sprites['left' + cat_sprite], (0, 0)) + righteye.blit(sprites.sprites['right' + cat_sprite], (0, 0)) + lefteye.blit(sprites.sprites[genotype.lefteyetype.split(' ; ')[0] + ' ; blue' + "/" + cat_sprite], (0, 0), special_flags=pygame.BLEND_RGBA_MULT) + righteye.blit(sprites.sprites[genotype.righteyetype.split(' ; ')[0] + ' ; blue' + "/" + cat_sprite], (0, 0), special_flags=pygame.BLEND_RGBA_MULT) + lefteye.set_alpha(200) + righteye.set_alpha(200) + gensprite.blit(lefteye, (0, 0)) + gensprite.blit(righteye, (0, 0)) + + if(genotype.extraeye): special.blit(sprites.sprites[genotype.extraeye + cat_sprite], (0, 0)) special.blit(sprites.sprites[genotype.extraeyetype + "/" + cat_sprite], (0, 0), special_flags=pygame.BLEND_RGBA_MULT) gensprite.blit(special, (0, 0)) + if sprite_age == 1: + special.blit(sprites.sprites[genotype.extraeye + cat_sprite], (0, 0)) + special.blit(sprites.sprites[genotype.extraeyetype.split(' ; ')[0] + ' ; blue' + "/" + cat_sprite], (0, 0), special_flags=pygame.BLEND_RGBA_MULT) + special.set_alpha(150) + gensprite.blit(special, (0, 0)) if(genotype.pinkdilute[0] == 'dp'): - gensprite.blit(sprites.sprites['redpupils' + cat_sprite], (0, 0)) + pupils = pygame.Surface((sprites.size, sprites.size), pygame.HWSURFACE | pygame.SRCALPHA) + pupils.blit(sprites.sprites['redpupils' + cat_sprite], (0, 0)) + pupils.set_alpha(100) + gensprite.blit(pupils, (0, 0)) return gensprite - gensprite.blit(GenSprite(cat.genotype, cat.phenotype, cat.moons), (0, 0)) if(cat.genotype.chimera): diff --git a/sprites/genemod/Base Colours/lightbases.png b/sprites/genemod/Base Colours/lightbases.png index 9ab0911..fb5b51f 100644 Binary files a/sprites/genemod/Base Colours/lightbases.png and b/sprites/genemod/Base Colours/lightbases.png differ diff --git a/sprites/genemod/Base Colours/pheomelanin.png b/sprites/genemod/Base Colours/pheomelanin.png index 1dd5948..7a5a311 100644 Binary files a/sprites/genemod/Base Colours/pheomelanin.png and b/sprites/genemod/Base Colours/pheomelanin.png differ diff --git a/sprites/genemod/New Tabbies/blue.png b/sprites/genemod/New Tabbies/blue.png index 1758205..32ffeb3 100644 Binary files a/sprites/genemod/New Tabbies/blue.png and b/sprites/genemod/New Tabbies/blue.png differ diff --git a/sprites/genemod/borders/bobtails.png b/sprites/genemod/borders/bobtails.png index c8d069c..04d5b70 100644 Binary files a/sprites/genemod/borders/bobtails.png and b/sprites/genemod/borders/bobtails.png differ diff --git a/sprites/genemod/borders/foldborder.png b/sprites/genemod/borders/foldborder.png index 60adf1b..7c935c2 100644 Binary files a/sprites/genemod/borders/foldborder.png and b/sprites/genemod/borders/foldborder.png differ diff --git a/sprites/genemod/borders/normal border.png b/sprites/genemod/borders/normal border.png index 8aaab68..a965513 100644 Binary files a/sprites/genemod/borders/normal border.png and b/sprites/genemod/borders/normal border.png differ diff --git a/sprites/genemod/borders/rexborder.png b/sprites/genemod/borders/rexborder.png index 3420490..890a9d3 100644 Binary files a/sprites/genemod/borders/rexborder.png and b/sprites/genemod/borders/rexborder.png differ diff --git a/sprites/genemod/effects/bleach.png b/sprites/genemod/effects/bleach.png index 14b7df5..c688422 100644 Binary files a/sprites/genemod/effects/bleach.png and b/sprites/genemod/effects/bleach.png differ diff --git a/sprites/genemod/medibang/New Tabbies/beige.mdp b/sprites/genemod/medibang/New Tabbies/beige.mdp new file mode 100644 index 0000000..f2c4a45 Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/beige.mdp differ diff --git a/sprites/genemod/medibang/New Tabbies/black.mdp b/sprites/genemod/medibang/New Tabbies/black.mdp new file mode 100644 index 0000000..a563275 Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/black.mdp differ diff --git a/sprites/genemod/medibang/New Tabbies/blue.mdp b/sprites/genemod/medibang/New Tabbies/blue.mdp new file mode 100644 index 0000000..35d7f2d Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/blue.mdp differ diff --git a/sprites/genemod/medibang/New Tabbies/buff.mdp b/sprites/genemod/medibang/New Tabbies/buff.mdp new file mode 100644 index 0000000..d890732 Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/buff.mdp differ diff --git a/sprites/genemod/medibang/New Tabbies/champagne.mdp b/sprites/genemod/medibang/New Tabbies/champagne.mdp new file mode 100644 index 0000000..f72f1a9 Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/champagne.mdp differ diff --git a/sprites/genemod/medibang/New Tabbies/cinnamon.mdp b/sprites/genemod/medibang/New Tabbies/cinnamon.mdp new file mode 100644 index 0000000..02b62c1 Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/cinnamon.mdp differ diff --git a/sprites/genemod/medibang/New Tabbies/dove.mdp b/sprites/genemod/medibang/New Tabbies/dove.mdp new file mode 100644 index 0000000..ca94b87 Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/dove.mdp differ diff --git a/sprites/genemod/medibang/New Tabbies/fawn.mdp b/sprites/genemod/medibang/New Tabbies/fawn.mdp new file mode 100644 index 0000000..9ec2e38 Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/fawn.mdp differ diff --git a/sprites/genemod/medibang/New Tabbies/honey.mdp b/sprites/genemod/medibang/New Tabbies/honey.mdp new file mode 100644 index 0000000..693e698 Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/honey.mdp differ diff --git a/sprites/genemod/medibang/New Tabbies/ivory.mdp b/sprites/genemod/medibang/New Tabbies/ivory.mdp new file mode 100644 index 0000000..70b5784 Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/ivory.mdp differ diff --git a/sprites/genemod/medibang/New Tabbies/lavender.mdp b/sprites/genemod/medibang/New Tabbies/lavender.mdp new file mode 100644 index 0000000..c4d7fd3 Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/lavender.mdp differ diff --git a/sprites/genemod/medibang/New Tabbies/lilac.mdp b/sprites/genemod/medibang/New Tabbies/lilac.mdp new file mode 100644 index 0000000..77e9be3 Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/lilac.mdp differ diff --git a/sprites/genemod/medibang/New Tabbies/platinum.mdp b/sprites/genemod/medibang/New Tabbies/platinum.mdp new file mode 100644 index 0000000..4c6e04c Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/platinum.mdp differ diff --git a/sprites/genemod/medibang/New Tabbies/red.mdp b/sprites/genemod/medibang/New Tabbies/red.mdp new file mode 100644 index 0000000..194318c Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/red.mdp differ diff --git a/sprites/genemod/medibang/New Tabbies/unders.mdp b/sprites/genemod/medibang/New Tabbies/unders.mdp new file mode 100644 index 0000000..10d6e1b Binary files /dev/null and b/sprites/genemod/medibang/New Tabbies/unders.mdp differ diff --git a/sprites/genemod/medibang/New eumelanin/beige.mdp b/sprites/genemod/medibang/New eumelanin/beige.mdp new file mode 100644 index 0000000..ec58ca3 Binary files /dev/null and b/sprites/genemod/medibang/New eumelanin/beige.mdp differ diff --git a/sprites/genemod/medibang/New eumelanin/black.mdp b/sprites/genemod/medibang/New eumelanin/black.mdp new file mode 100644 index 0000000..8f83fb8 Binary files /dev/null and b/sprites/genemod/medibang/New eumelanin/black.mdp differ diff --git a/sprites/genemod/medibang/New eumelanin/blue.mdp b/sprites/genemod/medibang/New eumelanin/blue.mdp new file mode 100644 index 0000000..80d23f7 Binary files /dev/null and b/sprites/genemod/medibang/New eumelanin/blue.mdp differ diff --git a/sprites/genemod/medibang/New eumelanin/buff.mdp b/sprites/genemod/medibang/New eumelanin/buff.mdp new file mode 100644 index 0000000..aea8b13 Binary files /dev/null and b/sprites/genemod/medibang/New eumelanin/buff.mdp differ diff --git a/sprites/genemod/medibang/New eumelanin/champagne.mdp b/sprites/genemod/medibang/New eumelanin/champagne.mdp new file mode 100644 index 0000000..df5ef7c Binary files /dev/null and b/sprites/genemod/medibang/New eumelanin/champagne.mdp differ diff --git a/sprites/genemod/medibang/New eumelanin/chocolate.mdp b/sprites/genemod/medibang/New eumelanin/chocolate.mdp new file mode 100644 index 0000000..eff8aed Binary files /dev/null and b/sprites/genemod/medibang/New eumelanin/chocolate.mdp differ diff --git a/sprites/genemod/medibang/New eumelanin/cinnamon.mdp b/sprites/genemod/medibang/New eumelanin/cinnamon.mdp new file mode 100644 index 0000000..91938ad Binary files /dev/null and b/sprites/genemod/medibang/New eumelanin/cinnamon.mdp differ diff --git a/sprites/genemod/medibang/New eumelanin/combined.mdp b/sprites/genemod/medibang/New eumelanin/combined.mdp new file mode 100644 index 0000000..7891d39 Binary files /dev/null and b/sprites/genemod/medibang/New eumelanin/combined.mdp differ diff --git a/sprites/genemod/medibang/New eumelanin/dove.mdp b/sprites/genemod/medibang/New eumelanin/dove.mdp new file mode 100644 index 0000000..253d232 Binary files /dev/null and b/sprites/genemod/medibang/New eumelanin/dove.mdp differ diff --git a/sprites/genemod/medibang/New eumelanin/fawn.mdp b/sprites/genemod/medibang/New eumelanin/fawn.mdp new file mode 100644 index 0000000..0cc852a Binary files /dev/null and b/sprites/genemod/medibang/New eumelanin/fawn.mdp differ diff --git a/sprites/genemod/medibang/New eumelanin/lavender.mdp b/sprites/genemod/medibang/New eumelanin/lavender.mdp new file mode 100644 index 0000000..239105a Binary files /dev/null and b/sprites/genemod/medibang/New eumelanin/lavender.mdp differ diff --git a/sprites/genemod/medibang/New eumelanin/lilac.mdp b/sprites/genemod/medibang/New eumelanin/lilac.mdp new file mode 100644 index 0000000..d26a5a6 Binary files /dev/null and b/sprites/genemod/medibang/New eumelanin/lilac.mdp differ diff --git a/sprites/genemod/medibang/New eumelanin/pheomelanin.mdp b/sprites/genemod/medibang/New eumelanin/pheomelanin.mdp new file mode 100644 index 0000000..d39962e Binary files /dev/null and b/sprites/genemod/medibang/New eumelanin/pheomelanin.mdp differ diff --git a/sprites/genemod/medibang/New eumelanin/platinum.mdp b/sprites/genemod/medibang/New eumelanin/platinum.mdp new file mode 100644 index 0000000..91af2e3 Binary files /dev/null and b/sprites/genemod/medibang/New eumelanin/platinum.mdp differ diff --git a/sprites/genemod/medibang/albino_skin.mdp b/sprites/genemod/medibang/albino_skin.mdp new file mode 100644 index 0000000..a97bcc8 Binary files /dev/null and b/sprites/genemod/medibang/albino_skin.mdp differ diff --git a/sprites/genemod/medibang/bases.mdp b/sprites/genemod/medibang/bases.mdp new file mode 100644 index 0000000..1387415 Binary files /dev/null and b/sprites/genemod/medibang/bases.mdp differ diff --git a/sprites/genemod/medibang/bases_archive.mdp b/sprites/genemod/medibang/bases_archive.mdp new file mode 100644 index 0000000..49f8bd9 Binary files /dev/null and b/sprites/genemod/medibang/bases_archive.mdp differ diff --git a/sprites/genemod/medibang/bimetal.mdp b/sprites/genemod/medibang/bimetal.mdp new file mode 100644 index 0000000..d1970c8 Binary files /dev/null and b/sprites/genemod/medibang/bimetal.mdp differ diff --git a/sprites/genemod/medibang/bobtails.mdp b/sprites/genemod/medibang/bobtails.mdp new file mode 100644 index 0000000..f59cd62 Binary files /dev/null and b/sprites/genemod/medibang/bobtails.mdp differ diff --git a/sprites/genemod/medibang/curllineart.mdp b/sprites/genemod/medibang/curllineart.mdp new file mode 100644 index 0000000..af1454a Binary files /dev/null and b/sprites/genemod/medibang/curllineart.mdp differ diff --git a/sprites/genemod/medibang/ears.mdp b/sprites/genemod/medibang/ears.mdp new file mode 100644 index 0000000..99ad32a Binary files /dev/null and b/sprites/genemod/medibang/ears.mdp differ diff --git a/sprites/genemod/medibang/effects.mdp b/sprites/genemod/medibang/effects.mdp new file mode 100644 index 0000000..9b04dfe Binary files /dev/null and b/sprites/genemod/medibang/effects.mdp differ diff --git a/sprites/genemod/medibang/eyebases.mdp b/sprites/genemod/medibang/eyebases.mdp new file mode 100644 index 0000000..8bf0752 Binary files /dev/null and b/sprites/genemod/medibang/eyebases.mdp differ diff --git a/sprites/genemod/medibang/eyes.mdp b/sprites/genemod/medibang/eyes.mdp new file mode 100644 index 0000000..8140b12 Binary files /dev/null and b/sprites/genemod/medibang/eyes.mdp differ diff --git a/sprites/genemod/medibang/eyes2.mdp b/sprites/genemod/medibang/eyes2.mdp new file mode 100644 index 0000000..692ce0d Binary files /dev/null and b/sprites/genemod/medibang/eyes2.mdp differ diff --git a/sprites/genemod/medibang/eyes3.mdp b/sprites/genemod/medibang/eyes3.mdp new file mode 100644 index 0000000..ae64b03 Binary files /dev/null and b/sprites/genemod/medibang/eyes3.mdp differ diff --git a/sprites/genemod/medibang/eyes4.mdp b/sprites/genemod/medibang/eyes4.mdp new file mode 100644 index 0000000..6e37df4 Binary files /dev/null and b/sprites/genemod/medibang/eyes4.mdp differ diff --git a/sprites/genemod/medibang/eyes5.mdp b/sprites/genemod/medibang/eyes5.mdp new file mode 100644 index 0000000..4663d78 Binary files /dev/null and b/sprites/genemod/medibang/eyes5.mdp differ diff --git a/sprites/genemod/medibang/folded_ears.mdp b/sprites/genemod/medibang/folded_ears.mdp new file mode 100644 index 0000000..a0e1f2a Binary files /dev/null and b/sprites/genemod/medibang/folded_ears.mdp differ diff --git a/sprites/genemod/medibang/hairless.mdp b/sprites/genemod/medibang/hairless.mdp new file mode 100644 index 0000000..94cdfaf Binary files /dev/null and b/sprites/genemod/medibang/hairless.mdp differ diff --git a/sprites/genemod/medibang/karpati.mdp b/sprites/genemod/medibang/karpati.mdp new file mode 100644 index 0000000..45279ed Binary files /dev/null and b/sprites/genemod/medibang/karpati.mdp differ diff --git a/sprites/genemod/medibang/lightbases.mdp b/sprites/genemod/medibang/lightbases.mdp new file mode 100644 index 0000000..e6468f8 Binary files /dev/null and b/sprites/genemod/medibang/lightbases.mdp differ diff --git a/sprites/genemod/medibang/mocha_spring.mdp b/sprites/genemod/medibang/mocha_spring.mdp new file mode 100644 index 0000000..45f24f9 Binary files /dev/null and b/sprites/genemod/medibang/mocha_spring.mdp differ diff --git a/sprites/genemod/medibang/mocha_summer.mdp b/sprites/genemod/medibang/mocha_summer.mdp new file mode 100644 index 0000000..65c8e36 Binary files /dev/null and b/sprites/genemod/medibang/mocha_summer.mdp differ diff --git a/sprites/genemod/medibang/mocha_winter.mdp b/sprites/genemod/medibang/mocha_winter.mdp new file mode 100644 index 0000000..7f5e4c8 Binary files /dev/null and b/sprites/genemod/medibang/mocha_winter.mdp differ diff --git a/sprites/genemod/medibang/nose_colours.mdp b/sprites/genemod/medibang/nose_colours.mdp new file mode 100644 index 0000000..6978371 Binary files /dev/null and b/sprites/genemod/medibang/nose_colours.mdp differ diff --git a/sprites/genemod/medibang/noses.mdp b/sprites/genemod/medibang/noses.mdp new file mode 100644 index 0000000..0d54d0a Binary files /dev/null and b/sprites/genemod/medibang/noses.mdp differ diff --git a/sprites/genemod/medibang/paw_pads.mdp b/sprites/genemod/medibang/paw_pads.mdp new file mode 100644 index 0000000..4b8f7bc Binary files /dev/null and b/sprites/genemod/medibang/paw_pads.mdp differ diff --git a/sprites/genemod/medibang/points_spring.mdp b/sprites/genemod/medibang/points_spring.mdp new file mode 100644 index 0000000..7bdd04c Binary files /dev/null and b/sprites/genemod/medibang/points_spring.mdp differ diff --git a/sprites/genemod/medibang/points_summer.mdp b/sprites/genemod/medibang/points_summer.mdp new file mode 100644 index 0000000..06b4eeb Binary files /dev/null and b/sprites/genemod/medibang/points_summer.mdp differ diff --git a/sprites/genemod/medibang/points_winter.mdp b/sprites/genemod/medibang/points_winter.mdp new file mode 100644 index 0000000..6afec96 Binary files /dev/null and b/sprites/genemod/medibang/points_winter.mdp differ diff --git a/sprites/genemod/medibang/rex.mdp b/sprites/genemod/medibang/rex.mdp new file mode 100644 index 0000000..ce2f630 Binary files /dev/null and b/sprites/genemod/medibang/rex.mdp differ diff --git a/sprites/genemod/medibang/salmiak.mdp b/sprites/genemod/medibang/salmiak.mdp new file mode 100644 index 0000000..e672fd9 Binary files /dev/null and b/sprites/genemod/medibang/salmiak.mdp differ diff --git a/sprites/genemod/medibang/somatic.mdp b/sprites/genemod/medibang/somatic.mdp new file mode 100644 index 0000000..3a616fa Binary files /dev/null and b/sprites/genemod/medibang/somatic.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/beige.mdp b/sprites/genemod/medibang/tabby bases/beige.mdp new file mode 100644 index 0000000..6004ef0 Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/beige.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/black.mdp b/sprites/genemod/medibang/tabby bases/black.mdp new file mode 100644 index 0000000..5c67d22 Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/black.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/blue.mdp b/sprites/genemod/medibang/tabby bases/blue.mdp new file mode 100644 index 0000000..02d562d Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/blue.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/buff.mdp b/sprites/genemod/medibang/tabby bases/buff.mdp new file mode 100644 index 0000000..d30783a Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/buff.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/champagne.mdp b/sprites/genemod/medibang/tabby bases/champagne.mdp new file mode 100644 index 0000000..f454e15 Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/champagne.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/chocolate.mdp b/sprites/genemod/medibang/tabby bases/chocolate.mdp new file mode 100644 index 0000000..6a6371d Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/chocolate.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/cinnamon.mdp b/sprites/genemod/medibang/tabby bases/cinnamon.mdp new file mode 100644 index 0000000..bb5b7f0 Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/cinnamon.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/cream.mdp b/sprites/genemod/medibang/tabby bases/cream.mdp new file mode 100644 index 0000000..ce3d711 Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/cream.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/dove.mdp b/sprites/genemod/medibang/tabby bases/dove.mdp new file mode 100644 index 0000000..c652375 Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/dove.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/fawn.mdp b/sprites/genemod/medibang/tabby bases/fawn.mdp new file mode 100644 index 0000000..90cf482 Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/fawn.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/honey.mdp b/sprites/genemod/medibang/tabby bases/honey.mdp new file mode 100644 index 0000000..b85693f Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/honey.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/ivory.mdp b/sprites/genemod/medibang/tabby bases/ivory.mdp new file mode 100644 index 0000000..002e8a3 Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/ivory.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/lavender.mdp b/sprites/genemod/medibang/tabby bases/lavender.mdp new file mode 100644 index 0000000..b53ffb3 Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/lavender.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/lilac.mdp b/sprites/genemod/medibang/tabby bases/lilac.mdp new file mode 100644 index 0000000..b0fd6e7 Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/lilac.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/platinum.mdp b/sprites/genemod/medibang/tabby bases/platinum.mdp new file mode 100644 index 0000000..2e0056c Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/platinum.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/red.mdp b/sprites/genemod/medibang/tabby bases/red.mdp new file mode 100644 index 0000000..2a32db2 Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/red.mdp differ diff --git a/sprites/genemod/medibang/tabby bases/shading.mdp b/sprites/genemod/medibang/tabby bases/shading.mdp new file mode 100644 index 0000000..7a5c7a1 Binary files /dev/null and b/sprites/genemod/medibang/tabby bases/shading.mdp differ diff --git a/sprites/genemod/medibang/tabbypatterns.mdp b/sprites/genemod/medibang/tabbypatterns.mdp new file mode 100644 index 0000000..a91b2d2 Binary files /dev/null and b/sprites/genemod/medibang/tabbypatterns.mdp differ diff --git a/sprites/genemod/medibang/tnr scar.mdp b/sprites/genemod/medibang/tnr scar.mdp new file mode 100644 index 0000000..9cc5f4b Binary files /dev/null and b/sprites/genemod/medibang/tnr scar.mdp differ diff --git a/sprites/genemod/medibang/white_patterns.mdp b/sprites/genemod/medibang/white_patterns.mdp new file mode 100644 index 0000000..4b3cbd5 Binary files /dev/null and b/sprites/genemod/medibang/white_patterns.mdp differ