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

ComputerCraft lua packs

Started by Games_Arsenal96, 18 June 2017 - 02:05 AM
Games_Arsenal96 #1
Posted 18 June 2017 - 04:05 AM
I have been working with CC Lua packs and have noticed something with the autorun folders?
Is there a way to only autorun certain codes on certain devices like putting an autorun code for turning off a CommandComputer on startup or would I have to code it in the program itself?

Like is there a way to do: "packName/assets/computercraft/lua/rom/autorun/deviceName/program"
KingofGamesYami #2
Posted 18 June 2017 - 04:25 AM
I doubt it. It's easy to code into the program though, just check for the commands table.
Exerro #3
Posted 18 June 2017 - 01:56 PM
Alternatively, I'm not sure if programs in sub-folders are run, but if not, you could do exactly what you said and have a single file in /autorun that checks the device type and runs programs in the respective folders.