Skip to content

Commit

Permalink
Halloween Update
Browse files Browse the repository at this point in the history
  • Loading branch information
keyraven committed Nov 1, 2023
1 parent 01fd2f7 commit a30617e
Show file tree
Hide file tree
Showing 9 changed files with 291 additions and 270 deletions.
1 change: 1 addition & 0 deletions scripts/cat/pelts.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Pelt():
'Sokoke': 'sokoke',
'Agouti': 'agouti',
'Singlestripe': 'singlestripe',
'Masked': "masked",
'Tortie': None,
'Calico': None,
}
Expand Down
531 changes: 270 additions & 261 deletions scripts/cat/sprites.py

Large diffs are not rendered by default.

21 changes: 16 additions & 5 deletions scripts/global_vars.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import pygame
import pygame_gui
from bidict import bidict

# Start PyGame
pygame.init()
screen_x, screen_y = 800, 700
SCREEN = pygame.display.set_mode((screen_x, screen_y))
Expand Down Expand Up @@ -33,7 +35,7 @@ def sort_bidict(d: bidict, first_element=None):
pelt_options = bidict({"SingleColour": "Plain", "Smoke": "Smoke", 'Singlestripe': "Single Stripe", 'Tabby': "Tabby",
'Ticked': "Ticked Tabby", 'Mackerel': "Mackerel Tabby", 'Classic': "Classic Tabby",
'Sokoke': 'Sokoke', 'Agouti': "Agouti", "Speckled": "Speckled Tabby", "Rosette": "Rosette",
"Bengal": "Bengal", "Marbled": "Marbled Tabby"})
"Bengal": "Bengal", "Marbled": "Marbled Tabby", "Masked": "Masked Tabby"})
pelt_options = sort_bidict(pelt_options)

tortie_patches_patterns = bidict({"single": "Plain", "tabby": "Tabby", "bengal": "Bengal", "marbled": "Marbled Tabby",
Expand All @@ -50,13 +52,15 @@ def sort_bidict(d: bidict, first_element=None):
'ORIOLE': "Oriole", 'ROBIN': "Robin", 'BRINDLE': "Brindle", 'PAIGE': "Paige",
"ROSETAIL": "Rosetail", "SAFI": "Safi", "HALF": "Half", "CHIMERA": "Chimera",
"SMUDGED": "Smudged", "DAUB": "Daub", "DAPPLENIGHT": "Dapplenight", "STREAK": "Streak",
"MASK": "Mask", "CHEST": "Chest", "ARMTAIL": "Armtail", "EMBER": "Ember"})
"MASK": "Mask", "CHEST": "Chest", "ARMTAIL": "Armtail", "EMBER": "Ember", "SMOKE": "Smoke",
"GRUMPYFACE": "Grumpy Face", "BRIE": "Brie", "BELOVED": "Beloved", "SHILOH" : "Shiloh",
"BODY" : "Body"})
tortie_patches_shapes = sort_bidict(tortie_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",
'EMERALD': "Emerald", 'PALEBLUE': "Pale Blue", 'PALEYELLOW': "Pale Yellow", 'GOLD': "Gold",
'HEATHERBLUE': "Heather Blue", 'COPPER': "Copper", 'SAGE': "Sage", 'COBALT': "Cobalt",
'HEATHERBLUE': "Heather Blue", 'SAGE': "Sage", 'COBALT': "Cobalt",
'SUNLITICE': "Sunlit Ice", "GREENYELLOW": "Green-Yellow", 'COPPER': 'Copper', 'BRONZE': 'Bronze',
'SILVER': 'Silver'})
eye_colors = sort_bidict(eye_colors)
Expand Down Expand Up @@ -100,15 +104,22 @@ def sort_bidict(d: bidict, first_element=None):
"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"})
"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"})
white_patches = sort_bidict(white_patches, None)

points = bidict({None: 'None', 'COLOURPOINT': 'Colorpoint', 'RAGDOLL': 'Ragdoll', 'SEPIAPOINT': 'Sepiapoint', 'MINKPOINT': 'Minkpoint',
'SEALPOINT': 'Sealpoint',})
points = sort_bidict(points, None)

vit = bidict({None: 'None', 'VITILIGO': 'Vitiligo 1', 'VITILIGOTWO': 'Vitiligo 2', 'KARPATI': 'Karpati',
'MOON': 'Moon', 'PHANTOM': 'Phantom', 'POWDER': 'Powder', 'BLEACHED': 'Bleached'})
'MOON': 'Moon', 'PHANTOM': 'Phantom', 'POWDER': 'Powder', 'BLEACHED': 'Bleached', "SMOKEY": "Smokey"})
vit = sort_bidict(vit, None)

scars = bidict({None: "None", "ONE": "Chest", "TWO": "Shoulder", "THREE": "Over Eye", "TAILSCAR": "Tail",
Expand Down
8 changes: 4 additions & 4 deletions scripts/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def generate_sprite(cat, life_state=None, scars_hidden=False, acc_hidden=False,
else:
cat_sprite = str(15)
else:
if age == 'elder' and not game.config['fun']['all_cats_are_newborn']:
if age == 'elder':
age = 'senior'

cat_sprite = str(cat.pelt.cat_sprites[age])
Expand Down Expand Up @@ -88,7 +88,7 @@ def generate_sprite(cat, life_state=None, scars_hidden=False, acc_hidden=False,
# Multiply with alpha does not work as you would expect - it just lowers the alpha of the
# entire surface. To get around this, we first blit the tint onto a white background to dull it,
# then blit the surface onto the sprite with pygame.BLEND_RGB_MULT
tint = pygame.Surface((spriteSize, spriteSize)).convert_alpha()
tint = pygame.Surface((sprites.size, sprites.size)).convert_alpha()
tint.fill(tuple(Sprites.cat_tints["tint_colours"][cat.pelt.tint]))
new_sprite.blit(tint, (0, 0), special_flags=pygame.BLEND_RGB_MULT)

Expand All @@ -99,7 +99,7 @@ def generate_sprite(cat, life_state=None, scars_hidden=False, acc_hidden=False,
# Apply tint to white patches.
if cat.pelt.white_patches_tint != "none" and cat.pelt.white_patches_tint in Sprites.white_patches_tints[
"tint_colours"]:
tint = pygame.Surface((spriteSize, spriteSize)).convert_alpha()
tint = pygame.Surface((sprites.size, sprites.size)).convert_alpha()
tint.fill(tuple(Sprites.white_patches_tints["tint_colours"][cat.pelt.white_patches_tint]))
white_patches.blit(tint, (0, 0), special_flags=pygame.BLEND_RGB_MULT)

Expand All @@ -111,7 +111,7 @@ def generate_sprite(cat, life_state=None, scars_hidden=False, acc_hidden=False,
points = sprites.sprites['white' + cat.pelt.points + cat_sprite].copy()
if cat.pelt.white_patches_tint != "none" and cat.pelt.white_patches_tint in Sprites.white_patches_tints[
"tint_colours"]:
tint = pygame.Surface((spriteSize, spriteSize)).convert_alpha()
tint = pygame.Surface((sprites.size, sprites.size)).convert_alpha()
tint.fill(tuple(Sprites.white_patches_tints["tint_colours"][cat.pelt.white_patches_tint]))
points.blit(tint, (0, 0), special_flags=pygame.BLEND_RGB_MULT)
new_sprite.blit(points, (0, 0))
Expand Down
Binary file modified sprites/agouticolours.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added sprites/maskedcolours.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sprites/rosettecolours.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sprites/tortiepatchesmasks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified sprites/whitepatches.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a30617e

Please sign in to comment.