Add a new level.

This commit is contained in:
bʰedoh₂ swé 2024-05-18 18:16:15 +05:00
parent 31e1324fc0
commit 188494bb25
2 changed files with 212 additions and 0 deletions

View File

@ -0,0 +1,17 @@
import importlib.resources as impr
import sys
import json
import serialize
from engineevents import EngineEvent
def init(aoEngineEvents):
curm = sys.modules[__name__]
files = impr.files(curm)
level = None
with files.joinpath("strangeroom.json").open('r') as leveldir:
level = json.loads(leveldir.read(), object_hook=serialize.object_hook)
aoEngineEvents.append(EngineEvent(
'level',
lambda _: level,
tsArguments=()
))

View File

@ -0,0 +1,195 @@
[
{
"__type__": "objSegment",
"isFinite": true,
"pointA": {
"__type__": "complex",
"real": -0.1335,
"imag": -0.145
},
"pointB": {
"__type__": "complex",
"real": -0.2085,
"imag": 0.1675
},
"color": [
128,
128,
128
]
},
{
"__type__": "objSegment",
"isFinite": true,
"pointA": {
"__type__": "complex",
"real": 0.214,
"imag": 0.1875
},
"pointB": {
"__type__": "complex",
"real": -0.208,
"imag": 0.1675
},
"color": [
128,
128,
128
]
},
{
"__type__": "objSegment",
"isFinite": true,
"pointA": {
"__type__": "complex",
"real": 0.214,
"imag": 0.1875
},
"pointB": {
"__type__": "complex",
"real": 0.144,
"imag": -0.185
},
"color": [
128,
128,
128
]
},
{
"__type__": "objSegment",
"isFinite": true,
"pointA": {
"__type__": "complex",
"real": -0.1335,
"imag": -0.145
},
"pointB": {
"__type__": "complex",
"real": 0.144,
"imag": -0.185
},
"color": [
128,
128,
128
]
},
{
"__type__": "objSegment",
"isFinite": true,
"pointA": {
"__type__": "complex",
"real": -0.562,
"imag": -0.555
},
"pointB": {
"__type__": "complex",
"real": -0.682,
"imag": 0.400
},
"color": [
200,
200,
200
]
},
{
"__type__": "objSegment",
"isFinite": true,
"pointA": {
"__type__": "complex",
"real": -0.062,
"imag": 0.790
},
"pointB": {
"__type__": "complex",
"real": -0.682,
"imag": 0.400
},
"color": [
200,
200,
200
]
},
{
"__type__": "objSegment",
"isFinite": true,
"pointA": {
"__type__": "complex",
"real": -0.062,
"imag": 0.790
},
"pointB": {
"__type__": "complex",
"real": 0.583,
"imag": 0.540
},
"color": [
200,
200,
200
]
},
{
"__type__": "objSegment",
"isFinite": true,
"pointA": {
"__type__": "complex",
"real": 0.793,
"imag": -0.085
},
"pointB": {
"__type__": "complex",
"real": 0.583,
"imag": 0.540
},
"color": [
200,
200,
200
]
},
{
"__type__": "objSegment",
"isFinite": true,
"pointA": {
"__type__": "complex",
"real": 0.793,
"imag": -0.085
},
"pointB": {
"__type__": "complex",
"real": 0.333,
"imag": -0.720
},
"color": [
200,
200,
200
]
},
{
"__type__": "objSegment",
"isFinite": true,
"pointA": {
"__type__": "complex",
"real": -0.547,
"imag": -0.550
},
"pointB": {
"__type__": "complex",
"real": -0.562,
"imag": -0.555
},
"color": [
200,
200,
200
]
}
]