• Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Welcome to OpenComputers

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more!

This message will be removed once you have signed in.

  • Announcements

    • Lizzy Trickster

      Latest Stable OpenComputers Version   11/26/16

      The latest released version of OpenComputers is version 1.6.1 for MC 1.7.10, 1.8.9, 1.9.4 & 1.10.2. See more information here! Beta/Dev builds can be found at the Jenkins Build Server (ci.cil.li)
    • Lizzy Trickster

      README: FORUM DOWNTIME!   04/19/17

      These forums will be down from 2017-04-29 @ 1200 GMT for up-to 1 hour (1300 GMT). This is due to the host box needing a reboot to apply Kernel updates. I don't expect the update to take the full hour specified but I have allocated this timeframe in the event that stuff breaks.   Apologies for any inconvenience this causes

Elijahlorden

Members
  • Content count

    6
  • Joined

  • Last visited

About Elijahlorden

  • Rank
    Junior Member

Contact Methods

  • Minecraft
    spector19
  1. operating system

    The simplicity is intentional, I prefer to be rather utilitarian with my code. The system IS very network-oriented. The goal is to be able to access any device on the network from any other device on the network. The eventual point of this project is a system which will allow me to control various aspects of my base from anywhere (this is accomplished by using linked cards in the control tablets). Currently I am going to be focusing mostly on utility. The first useful function the system will perform is SGCraft related. I know there are already plenty of gate control systems out there, but mine will have a few additional functions. All saved addresses are stored on the server, the tablets only keep a cache of this kind of information. Any change to the registered gates will automatically be replicated to other tablets. This means large groups of players won't have to manually share any newly created gates. The gates directly connected to the network will of course have Iris automation. Long story short, this project aims to centralize things that you would normally create isolated systems for.
  2. https://github.com/elijahlorden/StattenOS This is a very early implementation of StattenOS, a networked base control system I am developing. A more detailed explanation will be available eventually.
  3. I see that linked cards can be put in relays, but I'm not sure what port messages relayed by linked cards are sent on.
  4. Is this still being worked on? This is a fantastic concept, and I would love to see it in-game!
  5. Nevermind! It appears that other Lua variants handle concurrent tasks differently than OC Lua. For anybody who is interested, you can use the following to run a function repeatedly even while event.pull() is holding up the thread: event.timer(0.05, function() print("stuff") , math.huge) --interval between runs, callback function, number of times to be run
  6. I am attempting to write my own operating system. So far everything is going perfectly fine, except for this extremely annoying issue I am having. (I am not writing my own core libraries, I copied those from the OpenOS files on GitHub) For my Shell, I would like tasks running in the background to be able to print to the screen without messing up the user input prompt. My attempt at doing this: local Shell = {} Shell.ShellBacklog = {{Type = "print", Text = "- Init Shell -"}} -- {Type = "print", Text = " "} Shell.promptOpen = false Shell.prompt = ">>> " Shell.history = {} Shell.step = function() if (#Shell.ShellBacklog > 0) and (not Shell.promptOpen) then repeat local p = Shell.ShellBacklog[1] if (p.Type == "print") then print(p.Text) end table.remove(Shell.ShellBacklog, 1) until (#Shell.ShellBacklog == 0) or (Shell.promptOpen) end end Shell.keyDownEventListener = function(event, address, key, code, plr) if (Shell.promptOpen) then return end Shell.promptOpen = true term.write(Shell.prompt) local strIn = term.read(Shell.history):gsub("\n", "") table.insert(Shell.ShellBacklog, {Type = "print", Text = strIn}) Shell.promptOpen = false end Shell.start = function() event.listen("key_down", Shell.keyDownEventListener) end Shell.print = function(...) table.insert(Shell.ShellBacklog, {Type = "print", Text = ...}) end The step function is called in the main loop. My issue is that term.read() pauses everything, including the main loop. Is there any way around this? I attempted to use coroutines, but could not get them to function correctly.