remove sumorobot object replacement

This commit is contained in:
Silver Kuusik 2018-01-11 19:34:04 +01:00
parent 13d9a967d9
commit 4361448951

View File

@ -410,16 +410,12 @@ window.onload = function() {
sumostart = true;
/* if we are in Python mode */
if (pythonEnabled) {
/* add the an empty block ID to the functions */
var code = $("#blocklyCode").val().replace(/sumorobot./g, "").replace(/\)/g, ", \"\")");
/* is_enemy doesn't need the , */
code = code.replace(/\(, ""\)/g, "(\"\")");
/* send the code to the SumoRobot */
sumorobot.send("start:" + code);
/* send the code from the textarea to the SumoRobot */
sumorobot.send("start:" + $("#blocklyCode").val());
/* otherwise when we are in blockly mode */
} else {
/* send the code to the SumoRobot */
sumorobot.send("start:" + sumocode.replace(/sumorobot./g, ""));
/* send the code from the blocks to the SumoRobot */
sumorobot.send("start:" + sumocode);
}
});