1. Welcome to our bug report and feature request forum.
    • For game exploits, post in the Private Issues forum. Please provide details in your message.
    • For all other suggestions and reports:
      • Apply the appropriate prefix to your post
      • Please include every detail (such as how a mechanic works or how to reproduce a bug)
      • Remember that new features need to be balanced and fair.

Will we being seeing OpenComputers FTP?

Discussion in 'Suggest + Report Bugs + Get Help' started by gknova61, Oct 19, 2014.

  1. gknova61

    gknova61 Farbes Lover

    Joined:
    Mar 17, 2012
    Messages:
    1,238
    Likes Received:
    350
  2. sk89q

    sk89q Administrator
    Staff Member

    Joined:
    Dec 1, 2011
    Messages:
    2,490
    Likes Received:
    1,504
    Maybe... I'd have to look into how OC structures its files.
     
  3. gknova61

    gknova61 Farbes Lover

    Joined:
    Mar 17, 2012
    Messages:
    1,238
    Likes Received:
    350
    Instead of numbered IDs, It's really long alphanumeric 36character addresses in [typed]world\opencomputers[/typed]. Once you get into the folders, It's more/less the same. If you're talking about implementing skcraft-authorize into OpenOS, extract the OC JAR, navigate to [typed]assets\opencomputers\loot\OpenOS\bin\[/typed] and put it in there. As for the script itself, It just needs different methods is all. Just running replace on a few things like 'ye olde FS API and maybe the GUI outta get ya a nice port to OC.

    Had a quick look at the skcraft-authorize script. This is some stuff that needs to be adjusted (untested). Hopefully, It'll be a time-saver:
    Put this at the top of the script [typed]fs = require("filesystem")[/typed]
    Also goes at the top [typed]term = require("term")[/typed]
    [typed]fs.makeDir[/typed] --> [typed]fs.makeDirectory[/typed]
    [typed]f.readAll()[/typed] --> [typed]f:read(10000000000)[/typed] --Make ridiculous number because there's no readAll and this is the amount of bytes it reads
    [typed]f.write[/typed] --> [typed]f:write[/typed]
    [typed]f.close[/typed] --> [typed]f:close[/typed]
    [typed]term.getCursorPos[/typed] --> [typed]term.getCursor[/typed]
    [typed]term.setCursorPos[/typed] --> [typed]term.setCursor[/typed]
    [typed]f.readLine()[/typed] will need to be converted to [typed]f:read()[/typed]
    [typed]f.writeLine()[/typed] will need to be converted to [typed]f:write()[/typed]
    Take away anything paintutils and terminal colors. getSize aswell
     
  4. Pathaleon

    Pathaleon Forum & Server Administrator
    Staff Member

    Joined:
    Jul 3, 2012
    Messages:
    1,014
    Likes Received:
    670
    It stores via drive address. Should be fairly easy, not sure about mutiple drives though. Maybe have it like installing the os where there is a selection for which drive.
     
  5. LordRedstone

    LordRedstone Best Coder 2k15

    Joined:
    Jun 14, 2012
    Messages:
    391
    Likes Received:
    73
    Can be done in the same way that you can install the os to a certain drive.
     
  6. sk89q

    sk89q Administrator
    Staff Member

    Joined:
    Dec 1, 2011
    Messages:
    2,490
    Likes Received:
    1,504
    If the content of these folders contain .skcraft, then I don't even need to change anything.
     
  7. SomeEnderpenguin

    SomeEnderpenguin Not a Penguin

    Joined:
    Mar 28, 2014
    Messages:
    301
    Likes Received:
    66
    Any idea whether or not this will be a goal in the future? (Apologies for the thread necro)