2024-04-06 20:38:06 +00:00
|
|
|
import importlib.resources as impr
|
|
|
|
import sys
|
|
|
|
import json
|
2024-04-07 18:42:27 +00:00
|
|
|
import serialize
|
|
|
|
from engineevents import EngineEvent
|
2024-04-06 20:38:06 +00:00
|
|
|
|
2024-04-07 18:42:27 +00:00
|
|
|
def init(aoEngineEvents):
|
2024-04-06 20:38:06 +00:00
|
|
|
curm = sys.modules[__name__]
|
|
|
|
files = impr.files(curm)
|
|
|
|
level = None
|
|
|
|
with files.joinpath("squareroom.json").open('r') as leveldir:
|
|
|
|
level = json.loads(leveldir.read(), object_hook=serialize.object_hook)
|
2024-04-07 11:50:37 +00:00
|
|
|
aoEngineEvents.append(EngineEvent(
|
|
|
|
'level',
|
|
|
|
lambda _: level,
|
|
|
|
tsArguments=()
|
|
|
|
))
|