noel-friedrich / terminal

Terminal-style Personal Homepage
https://noel-friedrich.de/terminal
MIT License
44 stars 7 forks source link

self made minigolf courses can't be played #12

Closed noel-friedrich closed 1 year ago

noel-friedrich commented 1 year ago

I tried playing an edited version of track 8, but didn't work:

[info] [1684302173688] Inputted Text: "minigolf --edit 8"
// saved in files as root/new8.mniglf
[info] [1684302249715] Inputted Text: "minigolf -f root/new8.mniglf"
[error] [1684302249722] Cannot read properties of null (reading 'type')

Probably has to do with the gravity boxes all exporting to null in the json file:

[in] cat root/new8.mniglf
[out] {"name":"new8","shapePoints":[{"x":0,"y":0},{"x":25,"y":0},{"x":25,"y":75},{"x":35,"y":75},{"x":35,"y":25},{"x":35,"y":0},{"x":45,"y":0},{"x":45,"y":25},{"x":100,"y":25},{"x":100,"y":100},{"x":0,"y":100}],"ballStartPos":{"x":12.5,"y":12.5},"holePos":{"x":40,"y":5},"boxes":[null,null,null,null]}