So I've been trying to write a program that can find unstackable/limited-stackability items within my AE2 network and export them to a different location. From a lot of playing around with adapter blocks and looking the the documentation when connected to various AE2 components I've found that I can use getItemsInNetwork() function when connecting an Adapter Block to an ME Controller on a network.
local component = require("component")
local ser = require("serialization")
contents = component.proxy(component.list("mekanism")()).getItemsInNetwork()
for _,v in pairs(contents) do
if not tonumber(v) then
if v.hasTag or v.maxSize < 16 then
print(v.name)
end
end
end
file = io.open("contents", "w")
file:write(ser.serialize(contents))
file:close()
The little program above finds items with NBT tags or a stack size of less than 16, and prints out the names of these items. I was writing the table to a file as well just so I could have a better understanding of what information was contained within the item tables.
And yes, for some odd reason the ME Controller is referenced as a Mekanism block when connected to the Adapter block... lol. No idea why.
Now, comes the part I'm stuck at, and which appears may not be possible - but maybe I'm just missing something:
In order to move items I would need to use an adapter block connected to an ME export bus. The function used to set the configuration of the ME export bus needs a database entry containing the item I want the export.
The only way that I can find to write information to a database is by using the Inventory Controller module. And it appears that the store() function needs physical access to the item (whether in a robot slot, or in an inventory slot connected through an adapter/inv. controller when using a computer) in order to be able to create the database entry. Since I'm only able to pull a table with information about the items from the ME network, but not physically access the items to be able to use the store() function on, I can't seem to get anywhere.
Am I missing something or is it just not possible to do what I'm trying to accomplish?
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.
So I've been trying to write a program that can find unstackable/limited-stackability items within my AE2 network and export them to a different location. From a lot of playing around with adapter blocks and looking the the documentation when connected to various AE2 components I've found that I can use getItemsInNetwork() function when connecting an Adapter Block to an ME Controller on a network.
The little program above finds items with NBT tags or a stack size of less than 16, and prints out the names of these items. I was writing the table to a file as well just so I could have a better understanding of what information was contained within the item tables.
And yes, for some odd reason the ME Controller is referenced as a Mekanism block when connected to the Adapter block... lol. No idea why.
Now, comes the part I'm stuck at, and which appears may not be possible - but maybe I'm just missing something:
In order to move items I would need to use an adapter block connected to an ME export bus. The function used to set the configuration of the ME export bus needs a database entry containing the item I want the export.
The only way that I can find to write information to a database is by using the Inventory Controller module. And it appears that the store() function needs physical access to the item (whether in a robot slot, or in an inventory slot connected through an adapter/inv. controller when using a computer) in order to be able to create the database entry. Since I'm only able to pull a table with information about the items from the ME network, but not physically access the items to be able to use the store() function on, I can't seem to get anywhere.
Am I missing something or is it just not possible to do what I'm trying to accomplish?
Link to post
Share on other sites