Bug fixes and improvements

* Fixed wardrobe not initializing in replay context
* Fixed unequip all clothes cheat
* Fixed example mod file structure
* Fixed ability to rollback to the broken past during the game's start
* Simplified initialization
* Simplified mods module importing and parsing, reducing possible number of fail points
* Moved audio channel registration to options (config) file
* Added default zorder for `cg` image tag
* Added rpym format to .editorconfig
This commit is contained in:
LoafyLemon 2023-03-02 23:06:16 +00:00
parent 751575c556
commit e0e9d23d2a
10 changed files with 28 additions and 26 deletions

View File

@ -9,6 +9,6 @@ end_of_line = lf
insert_final_newline = true insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
[*.{py,rpy}] [*.{py,rpy,rpym}]
indent_size = 4 indent_size = 4
indent_style = space indent_style = space

View File

@ -130,7 +130,7 @@ label tonks_summon_setup:
menu: menu:
"-Those clothes stay off!-": "-Those clothes stay off!-":
$ tonks.unequip("all") $ tonks.unequip("clothes")
ton "*Hmm*?" ("soft", "narrow", "raised", "down", hair="horny", cheeks="heavy_blush") ton "*Hmm*?" ("soft", "narrow", "raised", "down", hair="horny", cheeks="heavy_blush")
gen "That's right... If they're so bothersome, why bother wearing them at all?" ("base", xpos="far_left", ypos="head") gen "That's right... If they're so bothersome, why bother wearing them at all?" ("base", xpos="far_left", ypos="head")

View File

@ -13,3 +13,5 @@ init python:
outfit_last = outfit = get_character_outfit(c, type="last") outfit_last = outfit = get_character_outfit(c, type="last")
outfit_last.save() outfit_last.save()
config.start_callbacks.append(wardrobe_init)

View File

@ -327,7 +327,7 @@ label cheats:
"-Unequip all clothes-": "-Unequip all clothes-":
python: python:
for i in CHARACTERS: for i in CHARACTERS:
getattr(renpy.store, i).unequip("all") getattr(renpy.store, i).unequip("clothes")
">All characters are now naked." ">All characters are now naked."

View File

@ -170,8 +170,5 @@ init python:
# define config.exception_handler = exception_handler # define config.exception_handler = exception_handler
init: config.start_callbacks.extend([import_mods, parse_mods])
$ import_mods() config.after_load_callbacks.append(parse_mods)
$ config.after_load_callbacks.append(parse_mods)

View File

@ -21,6 +21,10 @@ init python:
settings.default("animations", True) settings.default("animations", True)
settings.default("updates", True) settings.default("updates", True)
renpy.music.register_channel("background", "sfx", True)
renpy.music.register_channel("bg_sounds", "sfx", True)
renpy.music.register_channel("weather", "weather", True)
# Configuration # Configuration
# https://www.renpy.org/doc/html/config.html # https://www.renpy.org/doc/html/config.html
@ -77,6 +81,7 @@ define config.tag_zorder = {
"xray_child": -1, "xray_child": -1,
"xray_overlay": -1, "xray_overlay": -1,
"xray_mask": -1, "xray_mask": -1,
"cg": 17,
} }
# Saving and loading # Saving and loading

View File

@ -1,11 +1,19 @@
# The game starts here # The game starts here
label start: label start:
call game_init if not renpy.android:
show screen tooltip
python:
version = version_float()
renpy.block_rollback()
jump start_wt jump start_wt
label start_quick: label start_quick:
call game_init if not renpy.android:
show screen tooltip
python: python:
game.difficulty = 2 game.difficulty = 2
@ -14,11 +22,13 @@ label start_quick:
map_unlocked = True map_unlocked = True
game.cheats = True game.cheats = True
renpy.block_rollback()
jump skip_to_hermione jump skip_to_hermione
# Quickstart for developer mode
label start_dev: label start_dev:
call game_init if not renpy.android:
show screen tooltip
python: python:
game.difficulty = 2 game.difficulty = 2
@ -82,18 +92,6 @@ label start_dev:
if not x.hidden: if not x.hidden:
x.unlock() x.unlock()
renpy.block_rollback()
jump skip_to_hermione jump skip_to_hermione
label game_init:
$ version = version_float()
$ wardrobe_init()
$ parse_mods()
if not renpy.android:
show screen tooltip
return
init python:
renpy.music.register_channel("background", "sfx", True)
renpy.music.register_channel("bg_sounds", "sfx", True)
renpy.music.register_channel("weather", "weather", True)