Bug fixes

* Fixed cancellation method for events utilising subevents
* Fixed callstack when cancel method is called and the next node is a jump (odd)
* Fixed missing 'ask her to do x' blurbs for fail event variants
* Fixed 'grope her' fail variant repeat dialogue flag
* Removed 'hermione_favor_menu' from ignore labels (superseded)
This commit is contained in:
LoafyLemon 2023-06-28 00:54:14 +01:00
parent 3ce6198359
commit 0f3502de5e
9 changed files with 202 additions and 102 deletions

View File

@ -60,6 +60,8 @@ label end_hg_pf_strip:
### Fail Events ### ### Fail Events ###
label hg_pf_strip_fail: label hg_pf_strip_fail:
call start_hg_pf_strip
$ states.her.ev.dance_for_me.strip_asked = True $ states.her.ev.dance_for_me.strip_asked = True
gen "[name_hermione_genie], I need you to dance for me a little." ("base", xpos="far_left", ypos="head") gen "[name_hermione_genie], I need you to dance for me a little." ("base", xpos="far_left", ypos="head")
her "You want me to..." ("soft", "wide", "base", "stare") her "You want me to..." ("soft", "wide", "base", "stare")

View File

@ -63,6 +63,8 @@ label end_hg_pf_handjob:
### Fail Events ### ### Fail Events ###
label hg_pf_handjob_fail: label hg_pf_handjob_fail:
call start_hg_pf_handjob
her "" ("base", "base", "base", "mid", xpos="mid", ypos="base", trans=fade) her "" ("base", "base", "base", "mid", xpos="mid", ypos="base", trans=fade)
gen "[name_hermione_genie]." ("base", xpos="far_left", ypos="head") gen "[name_hermione_genie]." ("base", xpos="far_left", ypos="head")
her "Yes, [name_genie_hermione]?" ("base", "base", "base", "mid") her "Yes, [name_genie_hermione]?" ("base", "base", "base", "mid")

View File

@ -75,6 +75,8 @@ label end_hg_pf_titjob:
### Fail Events ### ### Fail Events ###
label hg_pf_titjob_fail: label hg_pf_titjob_fail:
call start_hg_pf_titjob
her "" ("base", "base", "base", "mid", xpos="mid", ypos="base", trans=fade) her "" ("base", "base", "base", "mid", xpos="mid", ypos="base", trans=fade)
gen "[name_hermione_genie]..." ("base", xpos="far_left", ypos="head") gen "[name_hermione_genie]..." ("base", xpos="far_left", ypos="head")
her "Yes, [name_genie_hermione]?" ("base", "base", "base", "mid") her "Yes, [name_genie_hermione]?" ("base", "base", "base", "mid")

View File

@ -99,9 +99,11 @@ label end_hg_pf_grope:
# Those events still prgress, but Hermione will run off and get mad. # Those events still prgress, but Hermione will run off and get mad.
# The heart icons for these events are 'black' # The heart icons for these events are 'black'
label hg_pf_grope_T1_fail: label hg_pf_grope_T1_E1:
if not _events_filtered_completed_any: call start_hg_pf_grope
if not _event_completed_failed:
gen "[name_hermione_genie], would you mind if I play with your tits a little?" ("base", xpos="far_left", ypos="head") gen "[name_hermione_genie], would you mind if I play with your tits a little?" ("base", xpos="far_left", ypos="head")
her "Play with...?" ("shock", "wide", "base", "stare") her "Play with...?" ("shock", "wide", "base", "stare")
her "My tits?!" ("angry", "wide", "base", "mid") her "My tits?!" ("angry", "wide", "base", "mid")

View File

@ -77,6 +77,8 @@ label end_hg_pf_sex:
### Fail Events ### ### Fail Events ###
label hg_pf_sex_fail: label hg_pf_sex_fail:
call start_hg_pf_sex
gen "[name_hermione_genie]..." ("base", xpos="far_left", ypos="head") gen "[name_hermione_genie]..." ("base", xpos="far_left", ypos="head")
gen "Why don't you come over here, and then I pound your pussy for a bit..." ("base", xpos="far_left", ypos="head") gen "Why don't you come over here, and then I pound your pussy for a bit..." ("base", xpos="far_left", ypos="head")
gen "With my cock!" ("grin", xpos="far_left", ypos="head") gen "With my cock!" ("grin", xpos="far_left", ypos="head")

View File

@ -16,9 +16,6 @@ label start_hg_pf_admire_breasts:
$ current_payout = 10 $ current_payout = 10
return return
label hg_pf_admire_breasts_fail:
jump end_hermione_event
label end_hg_pf_admire_breasts: label end_hg_pf_admire_breasts:
# Setup # Setup

File diff suppressed because it is too large Load Diff

View File

@ -118,6 +118,7 @@ init -1 python:
class Event(object): class Event(object):
_queue = None _queue = None
_parent = None
def __init__(self, id, wait=0, priority=5, daytime=None, req=None, label=None, func=None, queue="eventqueue", autoenqueue=False, autodequeue=True, def __init__(self, id, wait=0, priority=5, daytime=None, req=None, label=None, func=None, queue="eventqueue", autoenqueue=False, autodequeue=True,
repeat=True, fail_suffixes=("_fail", "too_much", "too_much_public"), ignore_labels=[], subevents=[]): repeat=True, fail_suffixes=("_fail", "too_much", "too_much_public"), ignore_labels=[], subevents=[]):
@ -136,6 +137,9 @@ init -1 python:
self.ignore_labels = ignore_labels self.ignore_labels = ignore_labels
self.subevents = subevents self.subevents = subevents
for ev in subevents:
getattr(store, ev)._parent = self
self.queued = False self.queued = False
self.started = False self.started = False
self.completed = False self.completed = False
@ -241,6 +245,12 @@ init -1 python:
if self._track_completion in event_callbacks: if self._track_completion in event_callbacks:
event_callbacks.remove(self._track_completion) event_callbacks.remove(self._track_completion)
if self._parent:
self._parent.cancel()
if renpy.get_return_stack():
renpy.pop_call()
def _track_completion(self, label, abnormal): def _track_completion(self, label, abnormal):
if renpy.is_init_phase(): if renpy.is_init_phase():
return return
@ -257,15 +267,12 @@ init -1 python:
# Ignore local labels # Ignore local labels
return return
# if _last_label_call == label: # if abnormal: # Irrelevant
# # Ignore calls.
# return
# if abnormal:
# return # return
if renpy.game.context().return_stack: if renpy.game.context().return_stack:
# If return stack exists, ignore, because we're probably in a call label. # If return stack exists, ignore, because we're probably in a call label.
# We only allow room_menu, to pass.
return return
if self.started: # Event cancelled abnormally? if self.started: # Event cancelled abnormally?
@ -285,15 +292,6 @@ init -1 python:
if self._track_completion in event_callbacks: if self._track_completion in event_callbacks:
event_callbacks.remove(self._track_completion) event_callbacks.remove(self._track_completion)
# def catch_label_call(label, args, kwargs):
# if config.developer:
# print(f"Called '{label}' with ARGS: {args} KWARGS: {kwargs}")
# global _last_label_call
# _last_label_call = label
def execute_event_callbacks(label, abnormal): def execute_event_callbacks(label, abnormal):
if renpy.is_init_phase() or not hasattr(store, "event_callbacks"): if renpy.is_init_phase() or not hasattr(store, "event_callbacks"):
return return
@ -306,7 +304,6 @@ init -1 python:
# We need to add these after defaults are finished. # We need to add these after defaults are finished.
renpy.config.label_callbacks.append(execute_event_callbacks) renpy.config.label_callbacks.append(execute_event_callbacks)
# renpy.config.call_callbacks.append(catch_label_call)
def show_events_menu(queues, filter=False, **kwargs): def show_events_menu(queues, filter=False, **kwargs):
def menu_hints(queue, filter): def menu_hints(queue, filter):
@ -349,5 +346,4 @@ init -1 python:
init offset = -5 init offset = -5
default eventqueue = EventQueue("mainloop") default eventqueue = EventQueue("mainloop")
# default _last_label_call = None

File diff suppressed because it is too large Load Diff