- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
Elektron72
-
Content Count
20 -
Joined
-
Last visited
-
Days Won
1
Posts posted by Elektron72
-
-
There is a function called filesystem.exists(), which takes a path string and returns a boolean. You could use this to check whether the file exists.
-
Try rebooting the computer. If that doesn't work, craft an Analyzer (if you don't already have one) and Sneak+Click on the computer case. It should show the error.
-
Can I see a screenshot of the computer case GUI to try and figure out why it isn't booting?
-
Could I see a screenshot of a directory listing of the root directory after the drive is reinserted? I would like to see if the directory is gone.
-
Vanilla mob spawners activate based on player distance instead of chunkloading. You have to be within 16 blocks to get a spawner to activate.
-
You could use filesystem.list(), use the iterator to loop over every file and sub-directory, and add to a counter if filesystem.isDirectory() returns false.
-
Version 0.12 Released:
- Fixed installer
- Added rename
-
Version 0.11 Released:
- Added copy and paste for files
-
Cell is a graphical file manager for OpenComputers that allows you to browse files and open them in other programs, such as the editor or simply running .lua files.
You can also customize what programs can be used to open files through the programs.cfg file.
Tutorials:
-
Browsing files/directories
- Select files/directories by clicking on them in the panel on the right side of the screen
- If a directory contains a large amount of files or sub-directories, use the arrow buttons to scroll through pages
- To go up a sub-directory, click the up arrow
- To change directory to a sub-directory, select the sub-directory, and click on "Open..." in the options panel (bottom left)
-
Using programs
- Select file/directory
- Select an option from the options panel (Run, Edit, Delete, etc.)
-
Creating files/sub-directories
- Navigate to the directory where the file/sub-directory will be created
- Select "New File..."/"New Directory..." from the functions panel (top left)
- A prompt for the name will appear at the bottom of the screen. Enter the name for the file/directory
-
Adding programs
- Open the programs.cfg file in the editor
-
Add a new line for your program
- Warning: The syntax for the programs.cfg is very strict, and will not accept extra spaces/empty lines
-
Enter this info separated by semicolons:
- Program name
- Text for the options menu
- File types (separated by commas, for all files put "all", for directories put "dir", for specific file types, put the extension including the ".")
- Command that runs the program ("?file?" is a wildcard for the selected file/directory)
-
Additional options (separated by commas, does not require semicolon or comma at the end)
- "s" prevents Cell from erasing the screen before running the program
-
For example, the line that add the editor is:
OpenOS Editor;Edit...;all;edit ?file?;
Minimum Requirements:
- Tier 2 Graphics Card
- Tier 2 Screen
- Tier 1 CPU
-
2x Tier 1 Memory
- Internet card only required for installation
To install, run
wget https://raw.githubusercontent.com/Elektron72/Cell/master/installer.lua installer.lua installer.lua
At the prompt, enter the path where Cell should be installed.
Since this is currently in beta, report bugs at https://github.com/Elektron72/Cell
-
Browsing files/directories
-
This operating system is already one of the best OpenComputers operating systems I have seen. When will there be a text editor/file creation?
-
The tint setting is used on line 84 of the example.3dm file that comes with the print3d examples
-
Flat Colored Blocks does not use different textures for every block. Instead, the same texture is recolored by the mod code. To recolor the texture in 3D models, use the tint setting.
-
local component = require("component") local sides = require("sides") local rs = component.redstone local dbg = component.debug local computer = component.computer local x = 0 local input = sides.left local output = sides.right while true do if rs.getInput(input) > 0 then x = #dbg.getPlayers() print("Players Updated!") end if x >= 500 then rs.setOutput(output, 15) os.sleep(5) computer.beep() computer.stop() end print(x) os.sleep(0.1) end
Requires a redstone card and a debug card.
Feel free to change the definitions of the sides input and output.
Download from pastebin with this command:
pastebin get suXkJWnw fireworks.lua
-
This means that the computer/server cannot find an operating system. Try adding a disk drive and inserting an operating system disk, such as the OpenOS floppy disk.
-
Try this command:
/give @p opencomputers:storage 1 1 {"oc:data":{"oc:fs.label":"openos"},"oc:color":2,display:{Name:"OpenOS (Operating System)"},"oc:lootFactory":"opencomputers:openos"}
-
Here is a farm program I wrote that should work with most robots:
local robot = require("robot") function moveToStart() -- modify this if the charger is in a different place end function moveToCharger() robot.turnAround() for i = 1, 25 do robot.forward() end robot.turnRight() for i = 1, 4 do robot.forward() end robot.turnRight() end function plant() robot.forward() robot.swingDown() robot.suckDown() robot.placeDown() end function plantRow() for i = 1, 25 do plant() end end function reverseRight() robot.forward() robot.turnRight() robot.forward() robot.turnRight() end function reverseLeft() robot.forward() robot.turnLeft() robot.forward() robot.turnLeft() end while true do moveToStart() plantRow() reverseRight() plantRow() reverseLeft() plantRow() reverseRight() plantRow() reverseLeft() plantRow() moveToCharger() os.sleep(2400) end
You can also download it from pastebin: https://pastebin.com/RxNB6bjC
Note: For some reason, the robot will only pick up items properly if there is an item in the tool slot. (It can be any item, such as a block of dirt, a stick, etc.)
Video: https://youtu.be/xRiBUSI-1TM
-
Although this approach would work, the debug card is not necessary because the sensors can tell what player triggered them. The player's name is part of the signal that is sent to the connected computer.
-
Changing from io.input() to io.open() fixed the problem.
-
I am making a program where one of the functions is to open the editor. However, I noticed that part of the program's code seems to interfere with the editor. When the editor is opened by my program, it freezes immediately after displaying the file and will not accept any input. What part of the code is responsible for the issue?
Here is a standalone version of the broken code (https://pastebin.com/CppRwXqh) :
local filesystem = require("filesystem") local shell = require("shell") local process = require("process") local cellLocation local i local j local tempchar function createProgramList() cellLocation = shell.resolve(process.info().path) cellLocation = filesystem.canonical(cellLocation .. "/..") print(cellLocation .. "/programs.cfg") io.input(cellLocation .. "/programs.cfg") programs = {} i = 1 while 1 do print("Loading program #" .. tostring(i) .. "...") programs[i] = {} print("Loading name...") while 1 do tempchar = io.read(1) if tempchar == ";" then break elseif programs[i][1] ~= nil then programs[i][1] = programs[i][1] .. tempchar else programs[i][1] = tempchar end end print("Loading option name...") while 1 do tempchar = io.read(1) if tempchar == ";" then break elseif programs[i][2] ~= nil then programs[i][2] = programs[i][2] .. tempchar else programs[i][2] = tempchar end end programs[i][3] = {} j = 1 print("Loading file associations...") while 1 do tempchar = io.read(1) if tempchar == "," then j = j + 1 elseif tempchar == ";" then break elseif programs[i][3][j] ~= nil then programs[i][3][j] = programs[i][3][j] .. tempchar else programs[i][3][j] = tempchar end end print("Loading run syntax...") while 1 do tempchar = io.read(1) if tempchar == nil or tempchar == "\n" then break elseif programs[i][4] ~= nil then programs[i][4] = programs[i][4] .. tempchar else programs[i][4] = tempchar end end if tempchar == nil then break end i = i + 1 end end createProgramList() shell.execute("edit /init.lua")
Also, a file named programs.cfg is necessary in the same directory containing the following text:
;;;
jangotat1138
in Programming
Posted
Looks like it requires this graphics library to work properly: https://github.com/IgorTimofeev/GUI
Also, from reading the installation instructions, it looks like you will need to modify the code so it accesses the correct sides of the computer.