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
This commit is contained in:
LoafyLemon 2022-06-29 19:46:19 +01:00
parent c4758d97e2
commit 09af431344
4 changed files with 39 additions and 18 deletions

View File

@ -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)

View File

@ -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

View File

@ -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"

View File

@ -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