Working on the bee dungeon, I've added an import button to the map editor so it can import the data from JSON. so starting on a fresh map I can import it either by choosing a file or pasting the JSON. It's very crude and could be made prettier, but it works.
Pressing the import button shows this modal
When you load the json the map will be replaced. Remember to press save to persist it in the database
Early on in my develop environment I lost my database every time I made code changes, so this works nicely, it also allows to supply a map in a json file for easy import when the server boots up.
It does this by looking in design/maps/[keyname].json for a json file with the contents you get from pressing the JSON button in the map editor. This allows for us to easily make a PR containing a map that will be loaded when the server restarts.
This PR is temporarily marked as draft untill Drippy has verified it works on their local environment.
Working on the bee dungeon, I've added an import button to the map editor so it can import the data from JSON. so starting on a fresh map I can import it either by choosing a file or pasting the JSON. It's very crude and could be made prettier, but it works.
Pressing the import button shows this modal
When you load the json the map will be replaced. Remember to press save to persist it in the database Early on in my develop environment I lost my database every time I made code changes, so this works nicely, it also allows to supply a map in a json file for easy import when the server boots up.
It does this by looking in
design/maps/[keyname].json
for a json file with the contents you get from pressing the JSON button in the map editor. This allows for us to easily make a PR containing a map that will be loaded when the server restarts.This PR is temporarily marked as draft untill Drippy has verified it works on their local environment.