Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinch-Bug committed Dec 12, 2023
1 parent 7148dc8 commit df16ebb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion scripts/cat/phenotype.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def SetPoints(self, input):
elif value == 'mocha':
gene = ['cm', 'cm']
elif value == 'mocha-albino':
gene = ['cm', 'cs']
gene = ['cm', 'c']

self.genotype.pointgene = gene

Expand Down
9 changes: 7 additions & 2 deletions scripts/screens/creation_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def handle_event(self, event):
if event.ui_element == self.dropdown_menus["color_select"]:
global_vars.CREATED_CAT.phenotype.SetBaseColour(event.text.lower())

if global_vars.CREATED_CAT.genotype.pinkdilute[0] == 'dp' or global_vars.CREATED_CAT.genotype.pointgene[0] == 'c':
if global_vars.CREATED_CAT.genotype.pinkdilute[0] == 'dp' or global_vars.CREATED_CAT.genotype.pointgene[0] == 'c' or (global_vars.CREATED_CAT.genotype.pointgene[0] != 'C' and global_vars.CREATED_CAT.genotype.pointgene[1] == 'c'):
global_vars.CREATED_CAT.phenotype.pigone = 'albino'
global_vars.CREATED_CAT.phenotype.pigtwo = 'albino'
global_vars.CREATED_CAT.phenotype.pigext = 'albino'
Expand Down Expand Up @@ -987,7 +987,7 @@ def build_dropdown_menus(self):
pygame.Rect((450, 180), (75, 30)),
container=self.pattern_tab)
self.dropdown_menus["sectype_select"] = pygame_gui.elements.UIDropDownMenu(['N/A', '1', '2', '3', '4', '5', '6'],
global_vars.CREATED_CAT.genotype.extraeye if global_vars.CREATED_CAT.genotype.extraeye else 'N/A',
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)
#self.dropdown_menus["vit_select"] = pygame_gui.elements.UIDropDownMenu(global_vars.vit.values(),
Expand Down Expand Up @@ -1312,6 +1312,11 @@ def update_checkboxes_and_disable_dropdowns(self):
object_id="#unchecked_checkbox",
container=self.pattern_tab)

if global_vars.CREATED_CAT.phenotype.tortie:
self.checkboxes["brindled_bicolour"].enable()
else:
self.checkboxes["brindled_bicolour"].disable()

# Bleaching

if global_vars.CREATED_CAT.genotype.bleach[0] == 'lb':
Expand Down
16 changes: 9 additions & 7 deletions scripts/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,13 +982,15 @@ def MakeCat(whichmain, whichcolour, whichbase, special=None):
nose2.blit(nose, (0, 0), special_flags=pygame.BLEND_RGBA_MIN)

whitesprite.blit(nose2, (0, 0))
gensprite.blit(whitesprite, (0, 0))
if(genotype.white_pattern and 'dorsal1' in genotype.white_pattern):
gensprite.blit(sprites.sprites['dorsal1' + cat_sprite], (0, 0))
if(genotype.white_pattern and 'dorsal2' in genotype.white_pattern):
gensprite.blit(sprites.sprites['dorsal2' + cat_sprite], (0, 0))
if(genotype.white_pattern and genotype.white_pattern[0] in vitiligo):
gensprite.blit(sprites.sprites[genotype.white_pattern[0] + cat_sprite], (0, 0))

if phenotype.maincolour != 'white' and phenotype.maincolour != 'albino':
gensprite.blit(whitesprite, (0, 0))
if(genotype.white_pattern and 'dorsal1' in genotype.white_pattern):
gensprite.blit(sprites.sprites['dorsal1' + cat_sprite], (0, 0))
if(genotype.white_pattern and 'dorsal2' in genotype.white_pattern):
gensprite.blit(sprites.sprites['dorsal2' + cat_sprite], (0, 0))
if(genotype.white_pattern and genotype.white_pattern[0] in vitiligo):
gensprite.blit(sprites.sprites[genotype.white_pattern[0] + cat_sprite], (0, 0))


if(genotype.fold[0] != 'Fd' or genotype.curl[0] == 'Cu'):
Expand Down

0 comments on commit df16ebb

Please sign in to comment.