Is it possible to read the ComputerCraft.cfg file found in %AppData%\Roaming\.minecraft\config\ directly within CC?
I want to check the settings in that file before continuing with a script.
Reading CC Config file
Started by Inksaver, May 28 2014 08:15 PM
7 replies to this topic
#1
Posted 28 May 2014 - 08:15 PM
#2
Posted 28 May 2014 - 08:24 PM
No it is not. You can however pretty easily determine what most of the settings are using internal code. What do you need to know?
Edited by CometWolf, 28 May 2014 - 08:24 PM.
#3
Posted 28 May 2014 - 09:03 PM
2 things:
# The disk space limit for computers and turtles, in bytes
# The disk space limit for floppy disks, in bytes
# The disk space limit for computers and turtles, in bytes
# The disk space limit for floppy disks, in bytes
#5
Posted 28 May 2014 - 09:36 PM
You could get the total size aswell, but there's really no point and doing so would be pretty demanding.
#6
Posted 28 May 2014 - 09:45 PM
Thanks for the tips
I think I can achieve want I want by attempting to copy my script twice and checking for errors. The script is 400kB in size, so if copied twice, it will fail with the default 1MB turtle disk size. I can assume if the player has altered the settings to 10MB as requested, that they have also altered the floppy disk size to 1MB. I will work on this and see what I can come up with.
I think I can achieve want I want by attempting to copy my script twice and checking for errors. The script is 400kB in size, so if copied twice, it will fail with the default 1MB turtle disk size. I can assume if the player has altered the settings to 10MB as requested, that they have also altered the floppy disk size to 1MB. I will work on this and see what I can come up with.
#7
Posted 28 May 2014 - 09:47 PM
Inksaver, on 28 May 2014 - 09:45 PM, said:
Thanks for the tips
I think I can achieve want I want by attempting to copy my script twice and checking for errors. The script is 400kB in size, so if copied twice, it will fail with the default 1MB turtle disk size. I can assume if the player has altered the settings to 10MB as requested, that they have also altered the floppy disk size to 1MB. I will work on this and see what I can come up with.
I think I can achieve want I want by attempting to copy my script twice and checking for errors. The script is 400kB in size, so if copied twice, it will fail with the default 1MB turtle disk size. I can assume if the player has altered the settings to 10MB as requested, that they have also altered the floppy disk size to 1MB. I will work on this and see what I can come up with.
Just use fs.getFreeSpace("") to check if there's enough remaining space for the files. (Keep in mind it's returned in bytes)
3 user(s) are reading this topic
0 members, 3 guests, 0 anonymous users











