Page 1 of 1

Preventing item being put in a chest

Posted: Sat Aug 08, 2015 7:56 pm
by antichaos
I'm pondering a mod with some extra limitations to provide some different building challenges. One of the main things I would want to do is have some items which cannot be put in any kind of chest,though can be put into machines. Filter inserters are obviously capable of not loading a chest based on logistic conditions, so it feels like it ought to be possible. Has anyone done anything like this?

Re: Preventing item being put in a chest

Posted: Sat Aug 08, 2015 10:10 pm
by jorgenRe
This is actually pretty difficult to do without making too much extra work for the CPU, but the idea is great it may just be only easily possible by the devs ;)

Neverthe less if I'm right what you are trying to do is make it so that big things actually require big space to be stored. So no more train in a pocket?
if so then I can tell you that it would be way simpler to make it so that your mod checks for the big items in a players inventory, and if it find some it will stop the player from moving. That is possible without using too much processing power ;)!

Re: Preventing item being put in a chest

Posted: Sat Aug 08, 2015 11:16 pm
by antichaos
Actually what I was going for was having machines create scrap as a byproduct, but the only way to get rid of scrap is by feeding it into some kind of reprocessing machine which produces an huge amount of pollution. This forces you to build differently, but gives you the chance to choose where the main source of pollution is. Direct pollution from scrap-producing machines would be greatly reduced.

I suppose a lower load option might be to give scrap a critical mass. Periodically check the contents of chests and if you find a stack of scrap over a certain size, the chest explodes.

Re: Preventing item being put in a chest

Posted: Thu Oct 15, 2015 11:35 am
by judos
Hi there,

Why not just use stackSize = 1 for this scrap item? That would make it easily programmable for you and at the same time it still doesn't really help to fill scrap into chests (if it is produced in large amounts)...

Your idea sounds great for this mod ^^