Default API overwrite method

Started by JustGekto, Mar 28, 2019, 03:25 pm

Previous topic - Next topic
Mar 28, 2019, 03:25 pm Last Edit: Mar 28, 2019, 03:27 pm by JustGekto
Default API overwrite method
Using this method u can change functions in default APIs first u need to get source of
API which u will be overwriting to do that go and open mod jar file with any archiver then go to
"/assets/computercraft/lua/rom/apis/".
You should see list of all apis

after that you can both add or change functions
to add function just create function or like in my case add function to the array

after creating or changing functions
you have to create file with the exact same name as api wich you want to overwrite in my case term.

to overwrite API load it with "os.loadAPI("file name")".

to modify existing function and you cant find it in file just create it

then u can test what you created

I hope you will find this information usefull for creating programs.