Skip to content

Commit 3a53c8b

Browse files
AWSWCommunityAWSWCommunity
authored andcommitted
Convert byekevin mod to new format, rename core mod
1 parent 53745b7 commit 3a53c8b

File tree

3 files changed

+33
-23
lines changed

3 files changed

+33
-23
lines changed

mods/byekevin/__init__.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import modlib
2+
import renpy
3+
import renpy.ast as ast
4+
from modloader import modlib
5+
from modloader import modinfo
6+
from modlib import sprnt
7+
from modlib import base as ml
8+
from modloader.modclass import Mod, loadable_mod
9+
10+
@loadable_mod
11+
class AWSWMod(Mod):
12+
def mod_info(self):
13+
return ("byekevin", "v0.1", "")
14+
15+
def mod_load(self):
16+
found = ml.searchPostNode(ml.findlabel("c4hatchery"), ast.Scene, 20)
17+
hook = ml.hook_opcode(found, None)
18+
hook.chain(ml.searchPostNode(found, ast.Scene))
19+
20+
mainscr = ml.getsls('main_menu')
21+
ml.nullPyexpr(mainscr, 'persistent.playedkevin')
22+
23+
eHooks = ml.getEndingHooks()
24+
true_search = eHooks.getPostTrueEndingIzumiScene()
25+
26+
def kevinCB(node):
27+
if node.next is not None and isinstance(node.next, renpy.ast.Show) and node.next.imspec[0][0] == 'meetingkevin':
28+
return True
29+
30+
kevin_credits = ml.searchPostNodeCB(true_search, kevinCB, 800)
31+
kevin_credits.chain(ml.searchPostNode(kevin_credits, ast.Scene)) # Show and with are separate instructions.
32+
33+

mods/byekevin/mod.py

Lines changed: 0 additions & 23 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)