Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New idle mode exps + fixes #7576

Merged
merged 15 commits into from Feb 20, 2022
38 changes: 23 additions & 15 deletions Monika After Story/game/event-handler.rpy
Expand Up @@ -2574,9 +2574,7 @@ label call_next_event:
$ mas_rebuildEventLists()

if "idle" in ret_items:
$ store.mas_globals.in_idle_mode = True
$ persistent._mas_in_idle_mode = True
$ renpy.save_persistent()
$ mas_setupIdleMode(brb_label=event_label)

if "love" in ret_items:
$ mas_ILY()
Expand Down Expand Up @@ -2656,20 +2654,28 @@ label prompt_menu:
# This also prevents the end-of-idle label from being saved and
# restored on a relaunch, which would make no sense lol.

# only call label if it exists
if cb_label is not None:
# Only call the label if it exists
if cb_label is not None and renpy.has_label(cb_label):
call expression cb_label
Booplicate marked this conversation as resolved.
Show resolved Hide resolved

#Show idle exp here so we dissolve like other topics
show monika idle with dissolve_monika
# Otherwise reset rv
else:
$ _return = None

# clean up idle stuff
$ persistent._mas_greeting_type = None
$ store.mas_globals.in_idle_mode = False
# If we want to resume idle mode, we don't reset
if _return != "idle":
$ mas_resetIdleMode()
# NOTE: Clear this here because closing during idle
# or idle callback could launch a specific greeting
$ persistent._mas_greeting_type = None

# this event will cleanup the remaining idle vars
$ pushEvent("mas_idle_mode_greeting_cleanup")
$ mas_idle_mailbox.send_skipmidloopeval()
# Otherwise we have to send the callback label again
elif cb_label is not None:
$ mas_idle_mailbox.send_idle_cb(cb_label)

#Show idle exp here so we dissolve like other topics
if not renpy.showing("monika idle"):
show monika idle at t11 zorder MAS_MONIKA_Z with dissolve_monika

# NOTE: we only need to enable music hotkey since we are in dlg mode
#$ mas_DropShield_idle()
Expand Down Expand Up @@ -2775,9 +2781,11 @@ label prompt_menu:
jump prompt_menu

label prompt_menu_end:

show monika at t11
$ mas_DropShield_dlg()
if store.mas_globals.in_idle_mode:
$ mas_dlgToIdleShield()
else:
$ mas_DropShield_dlg()
jump ch30_visual_skip

label show_prompt_list(sorted_event_labels):
Expand Down