Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Sign in to follow this  
PixelClef

Smeltery Fluids

Recommended Posts

I've been experimenting with the mod OpenComputers Drivers for Tinkers Construct lately.

In the absence of coding examples, it's taken me a couple of hours to thrash through the basics, relearn Lua again, up to the point where I can write code that is not utterly ridiculous - and I wanted to share with you peeps. So with no further ado, here's an example for reading the fluids in your smeltery:

local component = require("component")
local smeltery = component.smeltery
local fluids = {smeltery.getContainedFluids()}

for _, fluid in ipairs(fluids) do
  print(fluid.label)
end

 

Share this post


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...
Sign in to follow this  

×
×
  • Create New...

Important Information

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