Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

All Activity

This stream auto-updates     

  1. Today
  2. Shout out to ba7888b72413a16a for their PR that significantly improves network performance on larger networks with routers, check out the before and after videos. Other stuff is coming soon(TM), so watch this space I guess.
  3. Last week
  4. I am using the latest build from the CI server (ci.cil.li), which has this fix.
  5. It is the only thing that allowed my screens to update without being right clicked on. I removed and reinstalled OpenComputers and the issue was not resolved. I updated OpenOS on an existing computer that was already set up but it crashed the (in-game) computer. I had to update a fresh install of OpenOS on an empty drive and then reinstall BRGC. That the OpenOS that ships with the current version of OpenComputers must not be the latest OpenOS is the only thing I can think to explain the resolution and that the updated version of OpenOS that the updater installs fixes the issue. But you cannot update your existing install of BRGC or the (in-game) computer will crash. So... 1) Install OpenOS on a fresh or erased drive. 2) Download and run the Updater on that link I shared. 3) Download and run the BRGC installer. 4) Profit. Maybe I just like doing things the hard way or I didn't do something right but this method worked for me. I am only sharing my findings. :-)
  6. Hi I ran into the problem showing up here: I made a issue suggestion report here explaining the problem. But due to the mod being focused more to later versions of Minecraft it might be better to make an addon instead. I haven't modded Minecraft that much and simply only made a few mods to create items and items in use with Baubles API. But I kind of got stuck right away when adding a new module: ModuleFacade.java package net.simon.tiscovers.items; import li.cil.tis3d.api.machine.Casing; import li.cil.tis3d.api.machine.Face; import li.cil.tis3d.api.machine.Port; import li.cil.tis3d.api.util.RenderUtil; import li.cil.tis3d.client.renderer.TextureLoader; import li.cil.tis3d.common.module.ModuleDisplay; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumHand; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class ModuleCover extends ModuleDisplay { private Casing casing; private Face face; public ModuleCover(Casing casing, Face face) { super(casing, face); } @Override public Casing getCasing() { return this.casing; } @Override public Face getFace() { return this.face; } @Override public void onInstalled(ItemStack itemStack) { } @Override public void onUninstalled(ItemStack itemStack) { } @Override public void onEnabled() { } @Override public void onDisabled() { } @Override public void onDisposed() { } @Override public boolean onActivate(EntityPlayer player, EnumHand hand, float x,float y,float z) { if (player.isSneaking()) { return false; } // Reasoning: don't remove module from casing while activating the // module while the casing is disabled. Could be frustrating. if (!getCasing().isEnabled()) { return true; } return true; } @Override public void step() { } @Override public void onBeforeWriteComplete(final Port port) { // No need to clear other writing pipes because we're outputting random // values anyway, so yey. // Start writing again right away to write as fast as possible. } @Override public void onWriteComplete(final Port port) { // No need to clear other writing pipes because we're outputting random // values anyway, so yey. // Start writing again right away to write as fast as possible. } @SideOnly(Side.CLIENT) @Override public void render(final boolean enabled, final float partialTicks) { if (!enabled) { return; } RenderUtil.ignoreLighting(); GlStateManager.enableBlend(); RenderUtil.drawQuad(RenderUtil.getSprite(TextureLoader.LOCATION_OVERLAY_MODULE_RANDOM)); GlStateManager.disableBlend(); } } Some help is greatly appreciated. For the time being, I simply want the mod to compile and adding the new module.
  7. So, if I understand correctly, the tool applies a hotfix to the recursion issue? One that is not covered in the current version of OpenComputers?
  8. No you have to run that tool. The tool downloads the latest openOS files from github. Installing your pc with the floppy disk again just updates you to the files the currenly installed mod-version ships, which still contains the regression.
  9. @BattyCynris When you update OpenComputers (the mod), It doesn't change what is on the computers, it only changes the contents of the OpenOS floppy disk. So updating the in-game computer after the mod update only requires you to insert the OpenOS floppy disk and running "install" again. The tool you linked is basically just for those who can't update their mod (playing on a server with outdated version but need features of a newer version) so don't use it if normal updating is available.
  10. This fixed it for me. I guess when I updated OpenComputers that OpenOS didn't update. EDIT: Be certain to run this BEFORE installing BRGC or it will crash your (In-game) computer. @XyFreak BTW, I love this program. Immensely!
  11. You can also use event timers. Then you need a function to check and send your stuff. local event = require "event" local function dostuff() -- this is ur function that is doing stuff end local interval = 20 -- time in seconds between the runs of the function event.timer(interval, dostuff, math.huge) -- math.huge for infinite repeats Or if you want to keep Skript as it is, you can use Molinko's approach with os.execute Then your code would be: event.timer(interval, function() os.execute("/path"), math.huge)
  12. One way is to convert your script to run as an rc program. The other is to use threads from the thread library, see https://ocdoc.cil.li/api:thread. Here's a simple example.. local thread = require "thread" local proc = thread.create(os.execute, "/path/to/program") proc:detach() -- # detach from current process
  13. I have a little lua script that checks time and sends a network package to turn off other computers. Is there a way I can run the script in background and continue using the computer as normal?
  14. I didn't finished the installer. However i added a VERY IMPORTANT FEATURE, before events were handled by programs and blocking. Now events are handled by the task manager. Meaning A process can pull event while another does something else. Which is very close to multi-tasking. However this feature is buggy and some events are skipped, this should be fixed by optimizing. Alongside this i might make a GUI soon to show the benefits of multi-tasking V.S. single-tasking (used by MineOS and tactiOS). Which would allow programs to be active (doing something without blocking GUI) rather than passive (waiting for GUI event)!
  15. Ok, I forgot the program doesn‘t always run in the executor thread. Too bad there are only ways to have blocking high precision sleeps and timers and no non-blocking alternatives... But anyways, thanks alot
  16. @BattyCynris Sorry for the delay i JUST got the email notification that you posted something. You are running into an OpenOS issue that should be fixed by now (see posts a bit "earlier" on this page). Please update OpenComputers and then reinstall OpenOS.
  17. Should be fixed now, thanks for reporting it to us
  18. for a polite server load, we let the minecraft server runtime decide when to pick back up our threads, and thus we cannot give lower precision that we currently have.
  19. Right on, thanks.
  20. Yeah it would.. I missed that. Perhaps a nil check would be better. function m.addTrustedUser(user, level) if db.users[user] ~= nil then error "Cannot add an existing user!" end db.users[user] = level db.hasChanges = true end
  21. I agree with all of your points, thanks! One question, in the above quote would this not be undesirable? As I store my users in a table where they are the key and a boolean is the value. So if the user was false, aka trusted but not admin, would the above code not function properly?
  22. Overall the program looks pretty solid. Personally I like to write things with more descriptive names for when I have to revisit programs after a while. One place where things become unclear is using 'k' or 'v' in your pairs loops. If the keys and values are really arbitrary then this makes sense however several places in your code could be clarified by using better variable names. Here's an example.. --- Distribute Json -- Disseminates the settings from the database to all turrets. function m.distribJson() -- # also db.turrets is an array so maybe ipairs would help a reader infer that. _ lets me see the index/key is irrelevant in this loop but perhaps some loop abstraction would be nice? for _,v in pairs(db.turrets) do -- # what exactly is v? maybe this chould be compId or turret_id? for _,player in pairs(toRemove) do component.invoke(v, "removeTrustedPlayer", player) -- # seems v is a uuid(component address)? end for user,priv in pairs(db.users) do -- # like this! this is more clear component.invoke(v, "addTrustedPlayer", user, priv) end for meth,bool in pairs(db.targets) do -- # bool could be more clear. perhaps should_engage or something that describes the variable purpose component.invoke(v, meth, bool) end end toRemove= {} end local privs = { [1] = true, -- # equal to admin [2] = false, -- # generic trusted priv admin = true, -- # named privs are nice to have trusted = false --# maybe 'user' is too generic? perhaps 'basic' or 'trusted'? } function m.addTrustedUser(user, level) if db.users[user] then error "Cannot add an existing user!" end db.users[user] = level db.hasChanges = true end m.addTrustedUser('molinko', privs[2]) -- # or privs.trusted this is nice and readable. m.addTrustedUser('Brodur', privs.admin) -- # I dont have to look at the privs table to see whats happening... Overall your program looks fine. Personally I would just clarify(imply) whats happening a bit more with your variable names and change some to do the same. Nice program though
  23. Earlier
  24. Asking honestly, what can I do better in this program? I am not overly familiar with lua and would love some pointers on how I could make this program better. Also, pointers on getting event listening working would be great! https://pastebin.com/rChVHKss https://github.com/Brodur/Turret-Control
  25. @payonel Hey, I was wondering if there is any chance to see a high precision computer.pull function in OpenComputers, allowing to have timeouts below one tick (I believe the currently used computer.uptime only returns time with .05 s precision). With that in hand, non-blocking sleeps and timers for small time intervals should be realizable. I was trying to implement this in openOS by adding a computer.pull function using os.clock instead of computer.uptime and changing some other libs accordingly, but it didn't work out. So I'm asking if there is any reason against adding a higher precision version of computer.pull to "machine"? Thanks:)
  26. I have gotten quite a bit of groundwork done. I am currently working on the first implementation of the page drawing code. I have decided not to use any sort double-buffering, as I don't like the high memory overhead. Instead, only portions of the page which change will be re-drawn. An early look at what I have done so far. Just a few nested frames. This already supports occlusion culling (portions of controls which are outside of their parent viewport are removed), so controls like the ListView and ScrollFrame can be implemented easily. Pages can either be loaded from XML, or created programmatically. This is the XML file used in the above image: <documentname>TestDocument</documentname> <page tier="3"> <!-- This is the root of the page DOM --> <frame id="f1" pos="1,1" size="40,10" text="High-resolution page" fcolor="00FF00" textcolor = "FFFF00"/> <frame id="f2" pos="1,11" size="40,10" text="With text"/> <frame id="f3" pos="50,2" size="40,10" text="With colored text" textcolor = "00FF00" fcolor="FF0000"/> <frame id="f4" text="Nesting" pos="10,29" size="60,20" textcolor = "BBBBBB"> <frame id="f4" pos="2,2" size="40,10" text="Nested" textcolor="00FF00"> <frame pos="2,2" size="5,5"/> </frame> </frame> </page> <!-- If multiple pages exist, the one closest to the current resolution will be used --> <page tier="2"> <frame id="f1" pos="1,1" size="30,30" text="Low-resolution page" textcolor="FF0000" fcolor="AAAAAA"/> </page> This is a very barebones XML implementation, only meant to provide a structure for pages.
  27. I've poked @Sangar on discord but i'm also gonna poke him here too (I'm not sure if the forums emails when people get pinged...) Hopefully it's just a case of adjusting the cert request.
  28. OHML being complete, it just needed something next so the OHML specification is complete. And this thing is what is here: OHTP Definitions: Host - Any computer or machine with a OC-compatible modem attached to it Server - Host sending OHTP-valid data when an user attemps to connect Client - Host receiving OHTP-valid data from a Server OHTP - Open Hyper Text Protocol - Protocol used to transmit OHML - Open Hypertext Markup Language between Hosts. Specifications: The OHTP protocol doesn't take care of what is transporting it. Either it is using a socket API, going through modem, minitel or GERT. It assumes the API or transport layer you utilize supports sockets. Arguments in URLs: To put arguments inside URL, the url must end like normal, but have "?" at end, followed by "property=value" entry. If wanting to add more entries, add "&" after last entry Example: ohtp://1001.1002:1003.1004/index.html?username=admin&password=admin Client-Side: Once the socket is opened, the Client can ask data to Server The Client will send first a Request Header looking like it: OHML/MAJOR.MINOR REQUEST PAGE Example, if the REQUEST is GET, and the version 1.0, with a request page equals to /index.html (the PAGE entry CANNOT BE EMPTY, if wanting to access default file of server, use /): OHML/1.0 GET /index.html Currently the valid REQUEST values are: GET (just receive the file) There are also request bodies, which just include "Property: Value" entries. For now, request body is unused, however, there can be non-standard properties, but they must start with "X-" So a request is constructed like that: Request Header( + Request Body) The client, even after having received the Response from Server can still send new requests. All that until socket is closed. Server-Side: Once the Server receives a Request from a client. It must replies with a Response. A Response is contructed like this: Response Header + Response Content The Response Header is constructed like this: ERRORCODE Yep, i know it's really small, making it simple to implement. Currently there are thoses error codes: 200: OK 201: Moved permanently + new URL after ERRORCODE 300: Temporaly moved + new URL after ERRORCODE 301: Switch protocol + approved protocol name after ERRORCODE 404: Page not found 500: Server error 501: Internal error sending the the fetched page (e.g. file found but not accessible from server). 502: Server-side language is errored (Detailled version of 500, optional) 503: Service temporaly down The Response Content is just the content of the fetched file (if found).
  1. Load more activity
  • Newsletter

    Want to keep up to date with all our latest news and information?

    Sign Up
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.