inventory of transport belts?

Post Reply
GopherAtl
Fast Inserter
Fast Inserter
Posts: 177
Joined: Sat Jan 31, 2015 7:54 pm
Contact:

inventory of transport belts?

Post by GopherAtl »

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.
My Mods:
Nixie Tubes - numeric displays for your circuit networks!
Logistic Combinators - use logistics values in circuit logic! -
Autowire - automate red/green wire connections

Rseding91
Factorio Staff
Factorio Staff
Posts: 13225
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: inventory of transport belts?

Post by Rseding91 »

Good point. Added for 0.12.5.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Implemented mod requests”