Jump to content




Restoring Fs Api


3 replies to this topic

#1 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 05 August 2013 - 12:45 PM

So I'm writing an operating system, and started adding file permissions yesterday. I started replacing functions in FS with my own, but had to go, so I shut down CCDesk. Today I started it up again, but now I cannot use the edit program, or anything else that uses the FS API. I've made a lot of work and don't want to restart. Is it possible to "restore" the FS API back to its original state? Thanks

--Dlcruz

#2 Grim Reaper

  • Members
  • 503 posts
  • LocationSeattle, WA

Posted 05 August 2013 - 01:03 PM

Is your OS overwriting the FS API every time you start a new computer in CC Desk or are you making the changes in the bios.lua file?

Either way, you'll want to hold on to the original FS API by creating a copy of all of the functions in the _G.fs table before overwriting the functions. Using that table, you could either reference it directly in order to keep the overwritten functions and the original functions, and or you could write a function to restore the original FS API.

Copying the functions code example:
Spoiler

Restoration function example:
Spoiler


#3 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 05 August 2013 - 04:10 PM

Go to %appdata%\.minecraft\computer\<computer ID> and rename startup to something else, so it won't run. Then reboot the computer in CCDesk.

#4 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 06 August 2013 - 11:38 AM

View Postimmibis, on 05 August 2013 - 04:10 PM, said:

Go to %appdata%\.minecraft\computer\<computer ID> and rename startup to something else, so it won't run. Then reboot the computer in CCDesk.

Dunno why I didn't think of that. Thanks!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users