diff --git a/game/src/cg_gallery.rpy b/game/src/cg_gallery.rpy index 41e4575..4d5f9d1 100644 --- a/game/src/cg_gallery.rpy +++ b/game/src/cg_gallery.rpy @@ -28,7 +28,7 @@ init python: # Global function to unlock a cg # fname should be a key used in galleryItems - # (fname: string): None + # (fname: string) -> None def unlockCg(fname): unlocked = fname in persistent.cggallery if unlocked: @@ -43,7 +43,7 @@ init python: # Rebuild the gallery for i in range(0, len(galleryItems) - 1): - if fname != str(galleryItems[i]["item"]): + if fname == str(galleryItems[i]["item"]): loadGallery() return @@ -57,7 +57,7 @@ init python: return im.FactorScale("images/cgs/" + fname + "." + ext, scaleFactor["x"], scaleFactor["y"]) # Create an object in g:Gallery, add to galleryItems - # (imageName: string; ext: string; w: float; h: float; unlocked?: boolean): None + # (imageName: string; ext: string; w: float; h: float; unlocked?: boolean) -> None def addGalleryItem(imageName, ext, w, h, unlocked = False): g.button(imageName) g.image(imageName) @@ -81,7 +81,7 @@ init python: # Reads /images/cgs dir for all image files # Populates g:Gallery and galleryItems # Appends extra spaces at the end - # (): None + # () -> None def loadGallery(): from os import listdir, getcwd from os.path import isfile, join