inventory of transport belts?
Posted: Sat Aug 15, 2015 8:18 pm
Currently transport belt entities allow calling get_item_count and has_item_inside, but there's no way to get what types of items these are, short of brute-forcing calls to those functions with different item types. It doesn't seem like a good idea for mod entities to start going around iterating over every type of item in the game to find out what's on a transport belt from moment to moment, though, so not gonna be doing that.
This came up in my attempts to implement a network inserter, which would insert items that have a positive value on the connected circuit network, and if added, I might also be able to implement the often-requested filter inserters - not the old kind, which have been reproduced already, but ones that work with negative instead of positive filtering, grabbing anything NOT in it's filter list.
get_inventory working on them would work, but if that is impractical for some reason (no idea if they really have an inventory like containers, exactly, under the hood) a version of get_contents that is called on the entity directly instead of through an inventory object would also work quite nicely.
This came up in my attempts to implement a network inserter, which would insert items that have a positive value on the connected circuit network, and if added, I might also be able to implement the often-requested filter inserters - not the old kind, which have been reproduced already, but ones that work with negative instead of positive filtering, grabbing anything NOT in it's filter list.
get_inventory working on them would work, but if that is impractical for some reason (no idea if they really have an inventory like containers, exactly, under the hood) a version of get_contents that is called on the entity directly instead of through an inventory object would also work quite nicely.