Skip to content

Commit

Permalink
Add path check, set PM variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamscached committed Nov 28, 2024
1 parent 9ef78a1 commit 4557c1a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Monika After Story/game/zz_music_selector.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ init -1 python in songs:
title text.
NOTE: Does not perform loop/metadata prefix scan. Path will be added as-is.
NOTE: Checks if the path exists (loop prefix is ignored for this check.)
IN:
path - path to the music file
Expand All @@ -227,9 +228,16 @@ init -1 python in songs:
(sets the corresponding PM variable)
"""

filepath = path.split(">")[:-1]
if not os.path.exists(filepath):
raise ValueError("{0} does not exist.".format(filepath))

music_choices.append((cleanGUIText(display_name), path))
music_pages = __paginate(music_choices)

if by_user:
store.persistent._mas_pm_added_custom_bgm = True


def _sanitizeVolume(value):
"""
Expand Down

0 comments on commit 4557c1a

Please sign in to comment.