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

Greg Tech Power Display

Recommended Posts

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

 

Wb8Zw53.png

Link to post
Share on other sites

Good day.

Can you give some screenshots or explain how you connect GT_battery_buffer to OpenComputers net?

In my case (GT_battery_buffer->adapter->Computer) I have a problem with this:

c = component.batterybuffer_09_tier_03
local inv = c.getAllStacks()

GT_battery_buffer has no method "getAllStacks"

 getAverageElectricInput=function():number -- Returns the amount of Electricity, accepted by this Block the last 5 ticks as Average.
 getAverageElectricOutput=function():number -- Returns the amount of Electricity, outputted by this Block the last 5 ticks as Average.
 getEUCapacity=function():number --  Returns the amount of electricity containable in this Block, in EU units!
 getInputVoltage=function():number -- Gets the maximum Input in EU/p.
 getOutputAmperage=function():number -- Gets the amount of Energy Packets per tick.
 getOutputVoltage=function():number --  Gets the Output in EU/p.
 getSteamCapacity=function():number --  Returns the amount of Steam containable in this Block, in EU units!
 getStoredEU=function():number --  Returns the amount of electricity contained in this Block, in EU units!

Have I use "Inventory Controll Upgrade"?

gt version 5.06.06

oc version 1.4.1.14

UPD

here is my scheme:

ee46be787f.png

Link to post
Share on other sites

Yeah, since 1.4 you'll need to place an inventory controller upgrade into the adapter and use that to access inventories next to it, i.e. `component.inventory_controller.getStackInSlot(sides.west, 1)` for example (where the direction is then absolute, i.e. actual north/east/south/west).

Link to post
Share on other sites

Rewrite of Suterusu's code for new version of GT\OC

 

wirfhg.jpg

 

DISCLAIMER: I am a crap lua coder. This code may be somewhat longhand and inefficient (but it works!). Feel free to refactor and re-post.

 

http://pastebin.com/JmFQh4qi

 

In the new version of GT\OC you need to add up all the cells individually. This code is for a 16 cell buffer, but can be easily modified. (might work as is with a smaller one, I haven't tried)

 

You will need to put an adapter with an inventory controller on top of your GT Battery buffer. You could put the inventory somewhere else and modify the code to the new "side" but this code has the controller on top.

 

The version of OC I am using is part of Beyond Reality and the OC crafting recipies are broken at the moment and I can't craft tier 2 or tier 3 cases so there is no color. Adding color should be relatively easy though.

 

-RW

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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