From 9b771d1a77b45ed5bfbb3584e895506a435225a1 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Sat, 4 Mar 2023 20:59:39 +0000 Subject: [PATCH] Bug fix * Fixed character calls breaking when the supplied number of expressions was less than 4, from now on expressions must be supplied as keyword arguments (this is already internally enforced) --- game/scripts/characters/astoria/common.rpy | 2 +- game/scripts/characters/cho/common.rpy | 2 +- game/scripts/characters/hermione/common.rpy | 2 +- game/scripts/characters/hooch/common.rpy | 2 +- game/scripts/characters/luna/common.rpy | 2 +- game/scripts/characters/susan/common.rpy | 2 +- game/scripts/characters/tonks/common.rpy | 2 +- game/scripts/doll/face.rpy | 7 ++----- game/scripts/doll/main.rpy | 4 ++-- 9 files changed, 11 insertions(+), 14 deletions(-) diff --git a/game/scripts/characters/astoria/common.rpy b/game/scripts/characters/astoria/common.rpy index 5b66fabf..0e01b326 100644 --- a/game/scripts/characters/astoria/common.rpy +++ b/game/scripts/characters/astoria/common.rpy @@ -76,7 +76,7 @@ label end_astoria_event: define character.astoria_say = Character("name_astoria_genie", show_icon="astoria", dynamic=True) init python: - def ast(what, mouth=False, eyes=False, eyebrows=False, pupils=False, cheeks=None, tears=None, + def ast(what, mouth=None, eyes=None, eyebrows=None, pupils=None, cheeks=None, tears=None, emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): redraw = False diff --git a/game/scripts/characters/cho/common.rpy b/game/scripts/characters/cho/common.rpy index d6048221..0a4acdf0 100644 --- a/game/scripts/characters/cho/common.rpy +++ b/game/scripts/characters/cho/common.rpy @@ -71,7 +71,7 @@ define character.cho_say = Character("name_cho_genie", show_icon="cho", dynamic= init python in character: # Cho's name is short, therefore it needs to be initialised in character scope, # otherwise we won't be able to use the same name for both Doll and Character calls. - def cho(what, mouth=False, eyes=False, eyebrows=False, pupils=False, cheeks=None, tears=None, + def cho(what, mouth=None, eyes=None, eyebrows=None, pupils=None, cheeks=None, tears=None, emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): redraw = False diff --git a/game/scripts/characters/hermione/common.rpy b/game/scripts/characters/hermione/common.rpy index 6acf0552..3af4b650 100644 --- a/game/scripts/characters/hermione/common.rpy +++ b/game/scripts/characters/hermione/common.rpy @@ -66,7 +66,7 @@ label end_hermione_event: define character.hermione_say = Character("name_hermione_genie", show_icon="hermione", dynamic=True) init python: - def her(what, mouth=False, eyes=False, eyebrows=False, pupils=False, cheeks=None, tears=None, + def her(what, mouth=None, eyes=None, eyebrows=None, pupils=None, cheeks=None, tears=None, emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): redraw = False diff --git a/game/scripts/characters/hooch/common.rpy b/game/scripts/characters/hooch/common.rpy index eade842d..0e5c0ddf 100644 --- a/game/scripts/characters/hooch/common.rpy +++ b/game/scripts/characters/hooch/common.rpy @@ -16,7 +16,7 @@ label end_hooch_event: define character.hooch_say = Character("name_hooch_genie", show_icon="hooch", dynamic=True) init python: - def hoo(what, mouth=False, eyes=False, eyebrows=False, pupils=False, cheeks=None, tears=None, + def hoo(what, mouth=None, eyes=None, eyebrows=None, pupils=None, cheeks=None, tears=None, emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): redraw = False diff --git a/game/scripts/characters/luna/common.rpy b/game/scripts/characters/luna/common.rpy index 22d642b7..eae69294 100644 --- a/game/scripts/characters/luna/common.rpy +++ b/game/scripts/characters/luna/common.rpy @@ -70,7 +70,7 @@ label update_luna: define character.luna_say = Character("name_luna_genie", show_icon="luna", dynamic=True) init python: - def lun(what, mouth=False, eyes=False, eyebrows=False, pupils=False, cheeks=None, tears=None, + def lun(what, mouth=None, eyes=None, eyebrows=None, pupils=None, cheeks=None, tears=None, emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): redraw = False diff --git a/game/scripts/characters/susan/common.rpy b/game/scripts/characters/susan/common.rpy index 6fc70574..442b89aa 100644 --- a/game/scripts/characters/susan/common.rpy +++ b/game/scripts/characters/susan/common.rpy @@ -68,7 +68,7 @@ label update_susan: define character.susan_say = Character("name_susan_genie", show_icon="susan", dynamic=True) init python: - def sus(what, mouth=False, eyes=False, eyebrows=False, pupils=False, cheeks=None, tears=None, + def sus(what, mouth=None, eyes=None, eyebrows=None, pupils=None, cheeks=None, tears=None, emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, **kwargs): redraw = False diff --git a/game/scripts/characters/tonks/common.rpy b/game/scripts/characters/tonks/common.rpy index 53202fa0..5609345a 100644 --- a/game/scripts/characters/tonks/common.rpy +++ b/game/scripts/characters/tonks/common.rpy @@ -70,7 +70,7 @@ label end_tonks_event: define character.tonks_say = Character("name_tonks_genie", show_icon="tonks", dynamic=True) init python: - def ton(what, mouth=False, eyes=False, eyebrows=False, pupils=False, cheeks=None, tears=None, + def ton(what, mouth=None, eyes=None, eyebrows=None, pupils=None, cheeks=None, tears=None, emote=None, face=None, xpos=None, ypos=None, pos=None, flip=None, trans=None, animation=False, hair=None, **kwargs): redraw = False diff --git a/game/scripts/doll/face.rpy b/game/scripts/doll/face.rpy index 8c84b3cb..3ad71b9c 100644 --- a/game/scripts/doll/face.rpy +++ b/game/scripts/doll/face.rpy @@ -15,11 +15,8 @@ init python: self._face = {k: None for k in self.char.face_layers.keys()} self._hash = None - def set_face(self, *args, **kwargs): - if args: - self._face = {k: args[0] for k in self._face} - - self._face.update(kwargs) + def set_face(self, **kwargs): + self._face.update((k, v) for k, v in kwargs.items() if not v is None) self.is_stale() def generate_hash(self): diff --git a/game/scripts/doll/main.rpy b/game/scripts/doll/main.rpy index 925d67f3..fca5f50f 100644 --- a/game/scripts/doll/main.rpy +++ b/game/scripts/doll/main.rpy @@ -428,8 +428,8 @@ init python: return state - def set_face(self, *args, **kwargs): - self.face.set_face(*args, **kwargs) + def set_face(self, **kwargs): + self.face.set_face(**kwargs) for i in self.states.values(): if istype(i[0], DollMakeup):