CensoredUsername / unrpyc

A ren'py script decompiler
Other
864 stars 157 forks source link

Add support for init label #47

Closed jackmcbarn closed 8 years ago

jackmcbarn commented 8 years ago

Ren'Py supports an "init label" statement. Its own AST block is completely indistinguishable from a regular "label" statement. However, things that normally automatically generate an init block if they're not in one (image, define, default, transform, screen, testcase, translate strings, and style) won't do so inside of an init label. We need to detect if any of those exist outside of an init block inside each label, and if so, generate an init label instead.