Planned additions:
- More of the ComputerCraft API.
- Support for OpenPeripheral.
- Pastebin integration.
Very nice! Also, could you put the source on Github, as I would also like to work on this project ;)/>
One question… in your code where you're searching for a "sensor" peripheral… why do you look for "peripheral" instead of "sensor"?
How would you add blocks? I've followed the tutorial on the wiki with no avail :(/>
I had a bit of spare time and I was going to finish the OS api for you ;)/>How would you add blocks? I've followed the tutorial on the wiki with no avail :(/>/>
I'll start work on a Lua-specific tutorial. If you tell me what you were trying to do and where it got confusing, that would be helpful.
I had a bit of spare time and I was going to finish the OS api for you ;)/>
Like thisI forgot that I'd left in that code. The reason for it is that I'd always interacted with a sensor by attaching it as a peripheral to a turtle and accessing it through the peripheral interface. How would you recommend that I access it?
Error: Not Found The requested URL /static/apps/code/index.html was not found on this server. …
Also, you may want to somehow disable the default blockly colour blocks from being able to interact with CC logic blocks.
Edit: What would I add to template.soy so that it recognises my block?
Neat. I tried making an IDE type thing sorta like this for a different language, but gave up because I didn't find it particularly useful. Typing is just easier.
Do you think it'll have an impact on beginners?
Also, have you ever used ALICE?
Well our discussions on have been leaning more towards #1, but if you don't want to do that then of the other choices definitely #3.
those combinations could work with the change of [dig/attack/detect/compare] since its [move/compareTo] not [move/compare]
- get [item count/free space] in slot #
- [drop/place/suck] item [in front/up/down]
- either
- [move/compare items] in selected slot to slot #
- compare [front/up/down/slot #] to selected slot
- [dig/attack/detect?] [in front/up/down]
get [item count/free space] in slot #
print(table.concat({'Spiralled down ', #path, ' steps.'}))
definitely not needed, and not very efficient, the following code would produce the same output
print("Spiralled down "..#path.." steps.")
the only time table.concat really needs to come into play is when there is a table that wants to be output. Anything being concatenated to a string with .. is tostring'd except nil and booleans, which of course if you wanted to be on the safe side you could do
print("Spiralled down "..tostring(#path).." steps.")
Also as an extra point, print is a vararg function meaning that this would also work
print("Spiralled down ", tostring(#path), " steps.")
Not to be picky, but it is TheOriginalBIT, theoriginalbit, or BIT. :)/>I've pushed a bunch more updates to Blockly Lua, including peripherals blocks. The Original Bit has been a big help.
One thing I did notice with this latest code is thisdefinitely not needed, and not very efficient, the following code would produce the same outputprint(table.concat({'Spiralled down ', #path, ' steps.'}))
the only time table.concat really needs to come into play is when there is a table that wants to be output. Anything being concatenated to a string with .. is tostring'd except nil and booleans, which of course if you wanted to be on the safe side you could doprint("Spiralled down "..#path.." steps.")
Also as an extra point, print is a vararg function meaning that this would also workprint("Spiralled down "..tostring(#path).." steps.")
print("Spiralled down ", tostring(#path), " steps.")
Not to be picky, but it is TheOriginalBIT, theoriginalbit, or BIT. :)/>I've pushed a bunch more updates to Blockly Lua, including peripherals blocks. The Original Bit has been a big help.