From bf5710bf103c1b53b02fe013e73ff46fac9a768d Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Fri, 24 Jun 2022 18:32:41 +0100 Subject: [PATCH] Bug fixes * Default renderer to Auto for compatibility reasons * Fixed animation assignments for dolls * Fixed missing side images for non-doll speakers --- game/scripts/characters/astoria/common.rpy | 5 +---- game/scripts/characters/cho/common.rpy | 5 +---- game/scripts/characters/hermione/common.rpy | 5 +---- game/scripts/characters/hooch/common.rpy | 5 +---- game/scripts/characters/luna/common.rpy | 5 +---- game/scripts/characters/snape/common.rpy | 12 +++++++----- game/scripts/characters/susan/common.rpy | 5 +---- game/scripts/characters/tonks/common.rpy | 5 +---- game/scripts/doll/main.rpy | 7 ++----- game/scripts/gui/say.rpy | 4 ++-- game/scripts/options.rpy | 2 +- 11 files changed, 19 insertions(+), 41 deletions(-) diff --git a/game/scripts/characters/astoria/common.rpy b/game/scripts/characters/astoria/common.rpy index 3eace507..80a077bb 100644 --- a/game/scripts/characters/astoria/common.rpy +++ b/game/scripts/characters/astoria/common.rpy @@ -99,10 +99,7 @@ init python: astoria.set_emote(emote) if animation != False: - if isinstance(animation, list): - astoria.animation = animation - else: - astoria.animation = [animation] + astoria.animation = animation redraw = True if flip != None: diff --git a/game/scripts/characters/cho/common.rpy b/game/scripts/characters/cho/common.rpy index 553bb948..3cf453d0 100644 --- a/game/scripts/characters/cho/common.rpy +++ b/game/scripts/characters/cho/common.rpy @@ -97,10 +97,7 @@ init python in character: renpy.store.cho.set_emote(emote) if animation != False: - if isinstance(animation, list): - renpy.store.cho.animation = animation - else: - renpy.store.cho.animation = [animation] + renpy.store.cho.animation = animation redraw = True if flip != None: diff --git a/game/scripts/characters/hermione/common.rpy b/game/scripts/characters/hermione/common.rpy index 17cecc9f..9ad94ce6 100644 --- a/game/scripts/characters/hermione/common.rpy +++ b/game/scripts/characters/hermione/common.rpy @@ -89,10 +89,7 @@ init python: hermione.set_emote(emote) if animation != False: - if isinstance(animation, list): - hermione.animation = animation - else: - hermione.animation = [animation] + hermione.animation = animation redraw = True if flip != None: diff --git a/game/scripts/characters/hooch/common.rpy b/game/scripts/characters/hooch/common.rpy index 52688dff..974024c0 100644 --- a/game/scripts/characters/hooch/common.rpy +++ b/game/scripts/characters/hooch/common.rpy @@ -39,10 +39,7 @@ init python: hooch.set_emote(emote) if animation != False: - if isinstance(animation, list): - hooch.animation = animation - else: - hooch.animation = [animation] + hooch.animation = animation redraw = True if flip != None: diff --git a/game/scripts/characters/luna/common.rpy b/game/scripts/characters/luna/common.rpy index c1a9b70c..c3f1662d 100644 --- a/game/scripts/characters/luna/common.rpy +++ b/game/scripts/characters/luna/common.rpy @@ -96,10 +96,7 @@ init python: luna.set_emote(emote) if animation != False: - if isinstance(animation, list): - luna.animation = animation - else: - luna.animation = [animation] + luna.animation = animation redraw = True if flip != None: diff --git a/game/scripts/characters/snape/common.rpy b/game/scripts/characters/snape/common.rpy index 441769be..c60b2325 100644 --- a/game/scripts/characters/snape/common.rpy +++ b/game/scripts/characters/snape/common.rpy @@ -36,10 +36,7 @@ init python: redraw = True if animation != False: - if isinstance(animation, list): - snape_animation = animation - else: - snape_animation = [animation] + snape_animation = animation redraw = True if flip != None: @@ -53,7 +50,12 @@ init python: if wand: sprite = Fixed(sprite, "characters/snape/main/wand.webp") - renpy.show(name=tag, at_list=[base_transform] + snape_animation, layer=layer, what=sprite, zorder=snape_zorder) + at_list = [base_transform] + + if animation: + at_list.append(snape_animation) + + renpy.show(name=tag, at_list=at_list, layer=layer, what=sprite, zorder=snape_zorder) if not renpy.in_rollback(): if trans: diff --git a/game/scripts/characters/susan/common.rpy b/game/scripts/characters/susan/common.rpy index 396f239b..a0fa4a3e 100644 --- a/game/scripts/characters/susan/common.rpy +++ b/game/scripts/characters/susan/common.rpy @@ -94,10 +94,7 @@ init python: susan.set_emote(emote) if animation != False: - if isinstance(animation, list): - susan.animation = animation - else: - susan.animation = [animation] + susan.animation = animation redraw = True if flip != None: diff --git a/game/scripts/characters/tonks/common.rpy b/game/scripts/characters/tonks/common.rpy index 097e97e4..c5657019 100644 --- a/game/scripts/characters/tonks/common.rpy +++ b/game/scripts/characters/tonks/common.rpy @@ -122,10 +122,7 @@ init python: redraw = True if animation != False: - if isinstance(animation, list): - tonks.animation = animation - else: - tonks.animation = [animation] + tonks.animation = animation redraw = True if flip != None: diff --git a/game/scripts/doll/main.rpy b/game/scripts/doll/main.rpy index 38c45d0a..8daa0feb 100644 --- a/game/scripts/doll/main.rpy +++ b/game/scripts/doll/main.rpy @@ -16,7 +16,7 @@ init python: # Image properties self.zorder = 15 self.layer = "screens" - self.animation = [] + self.animation = None self.tag = get_character_tag(name) # Transform properties @@ -53,10 +53,7 @@ init python: at_list = [base_transform] if animation: - if isinstance(animation, list): - at_list += animation - else: - at_list.append(animation) + at_list.append(animation) renpy.show(name=self.tag, at_list=at_list, layer=self.layer, what=self.get_image(), zorder=self.zorder) diff --git a/game/scripts/gui/say.rpy b/game/scripts/gui/say.rpy index f8472706..eb249774 100644 --- a/game/scripts/gui/say.rpy +++ b/game/scripts/gui/say.rpy @@ -29,8 +29,8 @@ screen say(who, what, side_image=None, icon=None): if not renpy.get_screen("choice"): use invisible_button(action=Function(ui.saybehavior), keysym="dismiss") - #if side_image: - add SideImage() + if side_image: + add side_image yalign 1.0 yanchor 1.0 zoom 0.5 window id "window": style gui.theme("say_window") diff --git a/game/scripts/options.rpy b/game/scripts/options.rpy index 38d7bfd5..fde017d2 100644 --- a/game/scripts/options.rpy +++ b/game/scripts/options.rpy @@ -6,7 +6,7 @@ default preferences.text_cps = 40 default preferences.afm_time = 15 default preferences.pad_enabled = False -default preferences.renderer = "gl2" +default preferences.renderer = "auto" default preferences.gl_powersave = False default preferences.audio_when_minimized = False