Studio fix

* Fix a crash affecting developer build
This commit is contained in:
LoafyLemon 2022-06-15 22:34:03 +01:00
parent f02b655c8c
commit e23ebf59ce

View File

@ -1,7 +1,7 @@
init python:
class DollFace(DollMethods):
blacklist_blink = {"closed", "happyCl", "wink"}
blacklist_blink = {None, "closed", "happyCl", "wink"}
def __init__(self, obj, face):
self.char = obj
@ -19,13 +19,15 @@ init python:
sprites.append(("{}{}/{}.webp".format(self.imagepath, k, v[0]), v[1]))
eyes = self.face["eyes"][0]
pupils = self.face["pupils"][0]
if eyes not in self.blacklist_blink:
blink_path = "{}eyes/closed.webp".format(self.imagepath)
eyes_path = "{}eyes/{}.webp".format(self.imagepath, eyes)
mask_path = "{}eyes/{}_mask.webp".format(self.imagepath, eyes)
pupils_path = "{}pupils/{}.webp".format(self.imagepath, self.face["pupils"][0])
pupils_path = "{}pupils/{}.webp".format(self.imagepath, pupils)
if pupils:
if renpy.loadable(blink_path):
normal = Fixed(eyes_path, AlphaMask(pupils_path, mask_path))
sprites.append( (doll_blink(normal, blink_path), self.face["eyes"][1]) )
@ -35,12 +37,13 @@ init python:
if renpy.loadable(mask_path):
sprites.append((AlphaMask(pupils_path, mask_path), self.face["pupils"][1]))
else:
if eyes:
eyes_path = "{}eyes/{}.webp".format(self.imagepath, eyes)
sprites.append((eyes_path, self.face["eyes"][1]))
mask_path = "{}eyes/{}_mask.webp".format(self.imagepath, eyes)
if renpy.loadable(mask_path):
pupils_path = "{}pupils/{}.webp".format(self.imagepath, self.face["pupils"][0])
pupils_path = "{}pupils/{}.webp".format(self.imagepath, pupils)
sprites.append((AlphaMask(pupils_path, mask_path), self.face["pupils"][1]))
sprites.sort(key=itemgetter(1))