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

[1.4] Floppy Disk Library

Started by virtualstorm, 02 August 2012 - 05:45 PM
virtualstorm #1
Posted 02 August 2012 - 07:45 PM
I have played with this mod for like 2 days by now, and i think it really misses an equivalent of the Buildcraft Blueprint Library for Floppy Disks. The problem: Moving programs and files between worlds. Inside a single world, Floppy Disks serve this purpose. Between worlds, the following things are possible (i think that are all, not sure though):

1. Insert them by hand - not a real solution and kind of impossible with binary data files.
2. Put them into the rom of the mod folder, but then they are on every computer and this doesn't work for multiplayer.
3. Copy them in the world save file. Works in singleplayer but again not in multiplayer.
4. Download them with the HTTP API from somewhere. Kinda -.-' in singleplayer and in multiplayer the HTTP API will prob. be disabled by lots of admins for obvious reasons

So this is kinda missing, so i suggest something like this:

1 new placeable block: Floppy Disk Library
Right-clicking opens a GUI with 2 slots for Floppy Disks, one for copying into the library and one for copying out of the library, a list of stored Floppy Disk copies where an entry can be selected, and maybe a Delete button to delete a copy from the library.
Only labled Floppy Disks are a valid input into the library, to distinguish different Floppy Disks.
If a copy is written to a Floppy Disk, the Floppy Disk data will be erased and the label will be set acordingly
The library content is saved a little bit like in Buildcraft, i.e. "minecraft folder"\computercraft\library\, then one subfolder with the label as name per saved Floppy Disk, and then the filesystem as on the Floppy Disk.

So if a player accesses the library, the list of images are not saved in the world at all, but loaded from the local file system. So each user in multiplayer would only have access to their own images, and the server admin wouldn't need to change files in the mod or allow the HTTP API.

As with files in the mod folder for singleplayer, users can use some external editor to code lua programs directly in the library, and there is an ingame way to get them into the world without having them on all computers.

To go with the 'cheap' recipes of ComputerCraft, i would use something like this for the recipe:

S S S
S R S
S P S

S = Stone
R = Redstone
P = Paper

Implementing this should be not that hard for singleplayer, as the Floppy Disks are saved in the world in a similar format, so the ingame copy is just a copy in the real file system. I'm not sure how ComputerCraft handles "uploads"/"downloads" in multiplayer, but one thing that would definatly work is to just emulate a Console with a Hard Drive with the Floppy Disk inside it, and just send all the shell commands to build the filesystem (mkdir) and write the files (edit - insert - save) for "uploading" to the server, and reading the filesystem (ls) and opening files (edit - exit) for "downloading" from the server.

Any love or hate for my idea?
Alex_hawks #2
Posted 04 August 2012 - 12:32 PM
Make the recipe involve a computer and 2 floppy drives, as well the redstone, a glass pane at the centre, and fill with stone, and then it'll be as balanced as the rest of ComputerCraft.
Pharap #3
Posted 06 August 2012 - 06:36 AM
I think it's fair enough for the http point. Transferring code between worlds without http access or file access is damn near impossible aside from the dreaded handtyped method. I've had this issue a lot.
cyberzwerg #4
Posted 06 August 2012 - 10:56 AM
awsome idea .. Loving it allready :P/>/>