This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
WarriorDB's profile picture

I want to see the code for the dance program.

Started by WarriorDB, 22 June 2014 - 10:03 AM
WarriorDB #1
Posted 22 June 2014 - 12:03 PM
How do I edit programs that are in the default computer/turtle?
RoD #2
Posted 22 June 2014 - 12:30 PM
you can use edit <path> to see the code, but you can't actually change the code. For that you need to drag and drop a program in to the .minecraft/mods/computercraft.<version>.zip/jar and open that file with winrar, once in there go to the assets/computercraft/lua/rom/programs and paste it in here or in the turtle folder (if you edited the dance program, name it dance and replace it with the original file.
If you are having trouble opening the jar file, you can right click it and choose open with>and select winrar.
Hope it helps
WarriorDB #3
Posted 22 June 2014 - 12:32 PM
I don't want to see the code I want to just view it. I know about edit I just don't know the path to get to the programs.
theoriginalbit #4
Posted 22 June 2014 - 12:38 PM
I don't want to see the code I want to just view it.
see and view are synonyms.

the path for programs on a computer is rom/programs, turtle programs are under rom/programs/turtle, so these are the paths (plus add the filename to the end) that you supply to the edit program.

a person on the forums has also made a GitHub repository with all of the Lua code for ComputerCraft's (fairly) recent version, this can be found here.
Bomb Bloke #5
Posted 22 June 2014 - 12:40 PM
Should you wish to look it up on an actual turtle:

cd rom\programs\turtle
edit dance

Want an editable copy? No need to open the archive.

cp rom\programs\turtle\dance newDance
Edited on 22 June 2014 - 10:42 AM
WarriorDB #6
Posted 22 June 2014 - 12:46 PM
Thanks, that's what I wanted. Can't even remember what for :P/>