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


  • Content Count

  • Joined

  • Last visited

  • Days Won


Suterusu last won the day on February 16 2016

Suterusu had the most liked content!

About Suterusu

  • Rank
    Junior Member

Profile Information

  • Gender
  • Location
    Wisconsin, USA

Contact Methods

  • Minecraft
  1. Suterusu


    This is not on the wiki
  2. Suterusu


    Can I find documenation anywhere on the IInventory methods presented in OC? I am trying to find how to use "transferStack" and I can't seem to pull any useful information.
  3. Suterusu

    Using Coroutine

    So far I have ~450 lines... I am trying to write a "cell network" program to be able to send messages between nodes on a "tree" structure". I have all the logic for "routing" messages, etc. the part I am trying to deal with is the psudo concurrency of trying to send/recieve. Using event.listen() as a "background" listener has worked, sort of. I've been able to send and echo back messages from computers connected to different cell towers over my network using hop-by-hop of nodes with modem.send(). What I am trying to do with event.listen() is this (calling a function directly instead of an event handler): event.listen("modem_message", listen) function listen(msg, localAddress, remoteAddress, port, distance, data) local payload = serialization.unserialize(data) --more code here end That works fine, I can do other "stuff" in code, and when an event type "modem_message" is received, it calls listen() and passes it all the parameters. What I am stuck on however, is if another function wants to send, "modem.send()" to another host, the listen() function will recieve the reply. I don't want to call event.pull() within the function that used modem.send() in order to "wait" for a reply back because it will block and prevent further code execution. function nameLookup(name) local querry = {["type"] = "querry", ["name"] = name} sendData(querry, nameServer) --more code end function sendData(data, destination) local data = serialization.serialize(data) local payload = {["dstAddress"] = destination, ["srcAddress"] = myAddress, ["data"] = data} m.send(rootPathList[1], 16, serialization.serialize({["msgType"] = "data", ["payload"] = payload})) end So, from within nameLookup() we should be getting the reply data there, the stuff listen() gets when called by event.listen(), so we can parse it and return the function to the calling function.
  4. Suterusu

    Using Coroutine

    Thanks, I doubt I am using this correctly, but the event.listen() working as a "background" process if you will, works for what I need.
  5. Suterusu

    Using Coroutine

    I noticed on the wiki this part here: Important: If you use event handling in driver mode, then event functions will be called from the environment of the OS event handler and variables local to your program will not be visible! Do you have any code examples that use event.listen?
  6. For anyone using GT 5 and wants a decent display for EU.... Dynamically will update total power based on batteries inside a battery buffer + batter buffer stored power. Green text = charging (overall gain in EU), Red = discharging (losing power greater than charge). If you use the code, you need to manually adjust the screen resolution and the variable for the Battery Buffer based on the type you are using. I used a tier2 case with a tier2 graphics card and a tier2 display. http://pastebin.com/TgpMa93Q
  7. Suterusu

    Using Coroutine

    Can anyone provide basic code usage of a Coroutine? I want to be able to call even.pull("modem"), but at the same time, do other stuff.
  8. I want to be able to "listen for" and "transmit" modem messages concurently. Basically, I want to activley be listening for incoming messages, but during that time I may want to send messages as well. Additionally, once a message is received, I want to do something about it, whilst going back to "listening" for messages again. Listener() -> Add incoming message to queue Processor() -> Process message queue Sender() -> Send messages as needed I have the general idea, I am just unsure how to execute this (if even possible) with LUA and OC. Any psudo code or hints/help would be greatly appreciated!
  9. I can't get that code to run, but I manually did 0-6 and got 0 still:
  10. I think the listing of "Power" is in reference to power supported to power the mod itself.
  11. Is there any way to get the amount of power stored in a GT battery buffer (NOT IC2 Batbox)? Here are the exposed methods from using it (small battery buffer) with an Adapter: None seem to yield any relevent data. Furthermore, I found GT has its own tool for getting block data, but it's a player item, not a block:
  12. There is no code for this, I am simply trying to use the Adapater Block to get the amount of power stored in a Capacitor Bank (Ender IO) using the "getEnergyStored" method. It always returns 0 even though that value is not correct.
  13. I am trying to get the Adpater Block to read the RF from an Ender IO capacitor bank. I've been able to read the "max power" (in MJ) but I cannot get the energy stored to work. Has anyone had luck with this? The block had 250,000RF (250 MJ stored).
  • Create New...

Important Information

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