- Jul 2, 2017
- 295
- 806
Firstly, because it literally hijack Ren'Py mid-process.
Withconfig.label_overrides
, Ren'Py is told to branch to a label, and before doing this it will look if there's a redirection defined. But here, Ren'Py will be already entering into the label when you'll order him to go to another label. It will break nothing, but it's not clean at all.
config.label_overrides
happens before config.label_callback
.So it's redirected before, and with
renpy.jump
inside callback, it's redirected after as well.Never mind, abnormal argument was blocking jump.What "jump" ? The statement or the python equivalent ? And what don't works with it ?
That was just me making things up, since I didn't look into code.And that's all. There's no "pre_label" or whatever.
Taking above into account, this makes
config.label_overrides
to work with labels without explicit jump.
Python:
init 1699 python hide:
def new_label_callback(label, abnormal):
if not abnormal:
renpy.jump(label)
if config.label_callback:
old_label_callback = config.label_callback
def chained_label_callback(label, abnormal):
old_label_callback(label, abnormal)
new_label_callback(label, abnormal)
config.label_callback = chained_label_callback
else:
config.label_callback = new_label_callback
Last edited: