Closed marsh0lion closed 12 years ago
get list of levels owned by the user - use the get_user_levels API call
save new robot script/save existing script - use the save_script API call
get List of robots on the current level use the robots.getLevelRobots() function call. This returns a list of id's that can be feed to load script to get the actual script (Let me know if you'd like this padded out a little).
To give the robot editor something to preload into its panel, load the robot editor with this URL:
/roboteditor/?initialScript=
and use something like JavaScript's encodeURIComponent() function to encode a complete Robot JSON object.
If you wish me to load an existing robot in the database, load this URL:
/roboteditor/?robotID=1234
I will parseInt(robotID,10)
it for security.
If as part of the above you pass an item_id=abcd
(string or number) I will pass it back to whatever 'updatedRobot' JS callback the level editor provides.
@marsh0lion Some of these API commands might need _NOT_LOGGEDIN as a response - if the robot editor tries to request levels owned by a user not logged in.
To get the list of available music use bgMusic.getAvailableBackgroundMusic()
Moving on hold API calls to new ticket. closing this one.
The following calls are needed for Robot editor:
done
in progress
todo