not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
5.5 KiB

  1. {
  2. "BLOCKPLUGINS": [
  3. [
  4. "xturtle",
  5. "var getxTurtleBlock = new ProtoBlock('xturtle');getxTurtleBlock.palette = palettes.dict['extras'];blocks.protoBlockDict['xturtle'] = getxTurtleBlock;getxTurtleBlock.staticLabels.push(_('turtle x'));getxTurtleBlock.adjustWidthToLabel();getxTurtleBlock.oneArgBlock();getxTurtleBlock.dockTypes[1] = 'anyin';getxTurtleBlock.defaults.push('0');"
  6. ],
  7. [
  8. "yturtle",
  9. "var getyTurtleBlock = new ProtoBlock('yturtle');getyTurtleBlock.palette = palettes.dict['extras'];blocks.protoBlockDict['yturtle'] = getyTurtleBlock;getyTurtleBlock.staticLabels.push(_('turtle y'));getyTurtleBlock.adjustWidthToLabel();getyTurtleBlock.oneArgBlock();getyTurtleBlock.dockTypes[1] = 'anyin';getyTurtleBlock.defaults.push('0');"
  10. ],
  11. [
  12. "startTurtle",
  13. "var startTurtleBlock = new ProtoBlock('startTurtle');startTurtleBlock.palette = palettes.dict['extras'];blocks.protoBlockDict['startTurtle'] = startTurtleBlock;startTurtleBlock.staticLabels.push(_('start turtle'));startTurtleBlock.adjustWidthToLabel();startTurtleBlock.oneArgBlock();startTurtleBlock.dockTypes[1] = 'anyin';startTurtleBlock.defaults.push('0');"
  14. ],
  15. [
  16. "stopTurtle",
  17. "var stopTurtleBlock = new ProtoBlock('stopTurtle');stopTurtleBlock.palette = palettes.dict['extras'];blocks.protoBlockDict['stopTurtle'] = stopTurtleBlock;stopTurtleBlock.staticLabels.push(_('stop turtle'));stopTurtleBlock.adjustWidthToLabel();stopTurtleBlock.oneArgBlock();stopTurtleBlock.dockTypes[1] = 'anyin';stopTurtleBlock.defaults.push('0');"
  18. ],
  19. [
  20. "setturtlename",
  21. "var setTurtleName = new ProtoBlock('setturtlename');setTurtleName.palette = palettes.dict['extras'];blocks.protoBlockDict['setturtlename'] = setTurtleName;setTurtleName.staticLabels.push(_('turtle name'));setTurtleName.staticLabels.push(_('source'));setTurtleName.staticLabels.push(_('target'));setTurtleName.adjustWidthToLabel();setTurtleName.twoArgBlock();setTurtleName.dockTypes[1] = 'anyin';setTurtleName.dockTypes[2] = 'anyin';setTurtleName.defaults.push('0');setTurtleName.defaults.push('Yertle');"
  22. ]
  23. ],
  24. "GLOBALS": "",
  25. "FLOWPLUGINS": [
  26. [
  27. "setturtlename",
  28. "var cblk = logo.blocks.blockList[blk].connections[1];var sourceName = args[0];var targetName = args[1];var thisTurtle = null;var foundTurtle = false;for (var i = 0; i < turtles.turtleList.length; i++) { thisTurtle = turtles.turtleList[i]; if (sourceName == thisTurtle.name) { thisTurtle.name = targetName; foundTurtle = true; break; }}if (!foundTurtle) { logo.errorMsg('Could not find turtle ' + sourceName, blk);}"
  29. ]
  30. ]
  31. }