Jump to content




Openperipherals ae craft


  • You cannot reply to this topic
4 replies to this topic

#1 flaghacker

  • Members
  • 655 posts

Posted 28 April 2014 - 03:45 PM

I'm trying to make a computer that scans my applied energistics network for stored items and current crafting jobs using openpripherals. I also give it a table like this:
settings = {
name1 = {id1, amount1},
name2 = {id2, amount2},
...
}
Then the program has to determine how much it has to craft, and then do that.
I got all that, but I can't get the "craft" function to work. The only documentation is in-game, via a program called "docs".
> openp/docs left
prints all functions
Spoiler

> openp/docs left requestCrafting
shows how to use that function, it prints
requestCrafting: Request crafting of a specific
item
returns: void
args:
- (table)stack: A table representing the item
stack
I don't understand any of this, but I tried:
This was my guess:
ae.requestCrafting({id, amount})
but no...
https://www.dropbox....estCrafting.PNG

Anyone knows how to use the requestCrafting method?

#2 CometWolf

  • Members
  • 1,283 posts

Posted 28 April 2014 - 07:32 PM

You're on the right track, but i believe the correct index is "qty", not "amount". There's also a third one for meta value, but i forgot what it is at the moment.

#3 flaghacker

  • Members
  • 655 posts

Posted 28 April 2014 - 08:09 PM

Oh you mean
ae.requestCrafting({id = 5, qty = 1})
I just did it without index. I'll try it tomorrow!
If it works, thanks!

#4 CometWolf

  • Members
  • 1,283 posts

Posted 28 April 2014 - 08:20 PM

Ah right, indeed i do. I didn't actually look at the picture :P

#5 flaghacker

  • Members
  • 655 posts

Posted 30 April 2014 - 03:03 PM

Thanks, it works!
ae.requestCrafting({id = <id>, qty = <quantity>, dmg = <metadata>})
Metadata is optional.

Edited by flaghacker, 30 April 2014 - 03:04 PM.






3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users