Studio fix
* Fix a crash affecting developer build
This commit is contained in:
parent
f02b655c8c
commit
e23ebf59ce
@ -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,29 +19,32 @@ 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 renpy.loadable(blink_path):
|
||||
normal = Fixed(eyes_path, AlphaMask(pupils_path, mask_path))
|
||||
sprites.append( (doll_blink(normal, blink_path), self.face["eyes"][1]) )
|
||||
else:
|
||||
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]) )
|
||||
else:
|
||||
sprites.append((eyes_path, self.face["eyes"][1]))
|
||||
|
||||
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, pupils)
|
||||
sprites.append((AlphaMask(pupils_path, mask_path), self.face["pupils"][1]))
|
||||
else:
|
||||
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])
|
||||
sprites.append((AlphaMask(pupils_path, mask_path), self.face["pupils"][1]))
|
||||
|
||||
sprites.sort(key=itemgetter(1))
|
||||
sprites = tuple(x[0] for x in sprites)
|
||||
|
Loading…
Reference in New Issue
Block a user