Preventing item being put in a chest

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
antichaos
Inserter
Inserter
Posts: 20
Joined: Tue Jul 29, 2014 11:44 am
Contact:

Preventing item being put in a chest

Post 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?

jorgenRe
Filter Inserter
Filter Inserter
Posts: 535
Joined: Wed Apr 09, 2014 3:32 pm
Contact:

Re: Preventing item being put in a chest

Post 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 ;)!
Logo
Noticed the told change in FFF #111 so il continue to use my signature ^_^
Thanks for listening to our suggestions, devs :D!
I would jump of joy if we could specify which tiles spawned in a surfaces

antichaos
Inserter
Inserter
Posts: 20
Joined: Tue Jul 29, 2014 11:44 am
Contact:

Re: Preventing item being put in a chest

Post 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.

judos
Filter Inserter
Filter Inserter
Posts: 266
Joined: Mon Dec 08, 2014 11:17 am
Contact:

Re: Preventing item being put in a chest

Post 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 ^^

Post Reply

Return to “Modding discussion”