From 09af431344eff3a8150406886333c7dbeeb28fe9 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Wed, 29 Jun 2022 19:46:19 +0100 Subject: [PATCH] Bug fixes * Fixed a rare crash during init caused by monkey-patched loadable function * Fixed stats screen character scaling * Fixed non-functional alpha slider * Fixed missing Genie sprite inside stats screen --- game/scripts/characters/genie/wardrobe.rpy | 23 ++++++++++++++++++ game/scripts/interface/color_picker.rpy | 2 +- game/scripts/interface/stats.rpy | 28 +++++++++++----------- game/scripts/utility/engine.rpy | 4 +--- 4 files changed, 39 insertions(+), 18 deletions(-) diff --git a/game/scripts/characters/genie/wardrobe.rpy b/game/scripts/characters/genie/wardrobe.rpy index b4c99b2d..beb78f20 100644 --- a/game/scripts/characters/genie/wardrobe.rpy +++ b/game/scripts/characters/genie/wardrobe.rpy @@ -7,6 +7,29 @@ init python: trans.offset = genie_offset return 0 +layeredimage genie_stats: + anchor (0.0, 1.0) + + group hair: + attribute nude "characters/genie/hair.webp" + + group fixes: + attribute robes "characters/genie/robes_fix.webp" + + always "characters/genie/base.webp" + + group face: + attribute base Null() + attribute grin "characters/genie/grin.webp" + attribute angry "characters/genie/angry.webp" + attribute smile "characters/genie/smile.webp" + attribute open "characters/genie/open.webp" + + group outfit: + + attribute nude Null() + attribute robes default "characters/genie/robes.webp" + layeredimage genie: anchor (0.0, 1.0) diff --git a/game/scripts/interface/color_picker.rpy b/game/scripts/interface/color_picker.rpy index 684529b9..083deef1 100644 --- a/game/scripts/interface/color_picker.rpy +++ b/game/scripts/interface/color_picker.rpy @@ -216,7 +216,7 @@ screen color_picker(color, alpha, title, pos_xy, color_default): Transform(alpha_gradient_image, matrixcolor=ColorizeMatrix(rgba, rgba))) bar: xysize (255, 30) - value ScreenVariableValue("_alpha", range=1.0, action=NullAction()) # Function(color_picker_update_rgba) + value ScreenVariableValue("_alpha", range=1.0, action=Function(color_picker_update_rgba)) base_bar icon_frame thumb Image(gui.format("interface/color_picker/{}/cursor_v.webp"), xalign=0.5) thumb_offset 0 diff --git a/game/scripts/interface/stats.rpy b/game/scripts/interface/stats.rpy index 219b2f69..65ab724e 100644 --- a/game/scripts/interface/stats.rpy +++ b/game/scripts/interface/stats.rpy @@ -240,42 +240,42 @@ screen stats_menuitem(xx, yy): offset (-10, -4) if current_category == "Genie": - add "genie" zoom 0.2 align (1.0, 1.0) xzoom -1 + add "genie_stats" zoom 0.175 align (1.0, 1.0) xzoom -1 elif current_category == "Snape": if current_item["flag"]: - add "characters/snape/main/snape_09.webp" zoom 0.34 align (0.9, 1.0) xzoom 1 + add "characters/snape/main/snape_09.webp" zoom 0.35 align (0.9, 1.0) xzoom 1 else: - add "interface/characters/snape_locked.webp" zoom 0.34 align (0.9, 1.0) xzoom 1 + add "interface/characters/snape_locked.webp" zoom 0.35 align (0.9, 1.0) xzoom 1 elif current_category == "Tonks": if current_item["flag"]: - add tonks.get_image() zoom 0.4 align (0.7, 1.0) xzoom 1 + add tonks.get_image() zoom 0.41 align (0.7, 1.0) xzoom 1 else: - add "interface/characters/tonks_locked.webp" zoom 0.4 align (0.7, 1.0) xzoom 1 + add "interface/characters/tonks_locked.webp" zoom 0.41 align (0.7, 1.0) xzoom 1 elif current_category == "Hermione": if current_item["flag"]: - add hermione.get_image() zoom 0.4 align (0.7, 1.0) xzoom 1 + add hermione.get_image() zoom 0.39 align (0.7, 1.0) xzoom 1 else: - add "interface/characters/hermione_locked.webp" zoom 0.38 align (0.65, 1.0) xzoom 1 + add "interface/characters/hermione_locked.webp" zoom 0.39 align (0.65, 1.0) xzoom 1 elif current_category == "Cho": if current_item["flag"]: - add cho.get_image() zoom 0.4 align (0.65, 1.0) xzoom 1 + add cho.get_image() zoom 0.42 align (0.65, 1.0) xzoom 1 else: - add "interface/characters/cho_locked.webp" zoom 0.4 align (0.65, 1.0) xzoom 1 + add "interface/characters/cho_locked.webp" zoom 0.42 align (0.65, 1.0) xzoom 1 elif current_category == "Luna": if current_item["flag"]: - add luna.get_image() zoom 0.38 align (0.75, 1.0) xzoom 1 + add luna.get_image() zoom 0.39 align (0.75, 1.0) xzoom 1 else: - add "interface/characters/luna_locked.webp" zoom 0.38 align (0.75, 1.0) xzoom 1 + add "interface/characters/luna_locked.webp" zoom 0.39 align (0.75, 1.0) xzoom 1 elif current_category == "Astoria": if current_item["flag"]: add astoria.get_image() zoom 0.4 align (0.7, 1.0) xzoom 1 else: - add "interface/characters/astoria_locked.webp" zoom 0.38 align (0.7, 1.0) xzoom 1 + add "interface/characters/astoria_locked.webp" zoom 0.4 align (0.7, 1.0) xzoom 1 elif current_category == "Susan": if current_item["flag"]: - add susan.get_image() zoom 0.385 align (0.65, 1.0) xzoom 1 + add susan.get_image() zoom 0.4 align (0.65, 1.0) xzoom 1 else: - add "interface/characters/susan_locked.webp" zoom 0.385 align (0.65, 1.0) xzoom 1 + add "interface/characters/susan_locked.webp" zoom 0.4 align (0.65, 1.0) xzoom 1 frame: style "empty" diff --git a/game/scripts/utility/engine.rpy b/game/scripts/utility/engine.rpy index 5e898fc3..963ba6e8 100644 --- a/game/scripts/utility/engine.rpy +++ b/game/scripts/utility/engine.rpy @@ -51,12 +51,10 @@ init -10 python: # we require to monkey patch those functions in order # to remain compatible with all platforms without losing functionality. - _renpy_loadable = renpy.loadable - @renpy.pure def _loadable(filename): filename = filename.replace("\\", "/") - return _renpy_loadable(filename) + return renpy.loader.loadable(filename) renpy.loadable = _loadable