OpenMods / OpenPeripheral

https://openmods.info
MIT License
67 stars 25 forks source link

Add github and twitter code to pocket computers #188

Closed rnorris7756 closed 9 years ago

rnorris7756 commented 9 years ago

I know a lot of stuff in OpenPeripheral isn't particularly useful on pocket computers, but it would be really nice to be able to use Github to load scripts onto pocket computers. I know that I can copy these programs to the ROM folder or the folder of individual computers that need it, but it would be nice to have this be the default.

theoriginalbit commented 9 years ago

The ComputerCraft API does not allow for peripherals, or file System mounting on Pocket Computers.

rnorris7756 commented 9 years ago

I'm aware of that. I wasn't suggesting adding all code to pocket computers; I was simply suggesting adding the github/twitter functionality. Looking through the code, I see that the twitter code uses the peripheral API (I had not actually used it before). However, the code for openp/github only relies on the HTTP API, which a pocket computer can handle (and I've tested it by copying the script to a pocket computer and running the code). It would certainly be a useful default for any users who use both pocket computers and prefer github to pastebin.

theoriginalbit commented 9 years ago

I don't think you're understanding... There are no ways to mount a file system (a.k.a. GitHub/Twitter programs) onto the pocket computers, this is because ComputerCraft never gives us a reference to the pocket computer. therefore we cannot do it. if you wish to have these programs on all your pocket computers just make a resource pack, placing the programs in rom/programs/pocket and they'll appear on all pocket computers.