Place Filtered

by Shemp

Tired of inserters and chests stealing items when you place them? Press N before placing a building to switch to a version with the filters turned on. You can also switch to alternate starting modes of some other items.

Utilities
3 days ago
2.0
179
Logistics Storage Blueprints

b [Fixed] Crash when using on requester chests (and others)

3 days ago

This is great, I've always wanted a feature like this. I think this mod is going to be one of my default QoL mods from now on! :)

I did find a bug, though: Pressing N while holding a Requester, Buffer or Active provider chest will result in a crash:

Error while running event place-filtered::place-filtered (ID 333)
__place-filtered__/script/blueprint.lua:214: attempt to index global 'FilterSucess' (a nil value)
stack traceback:
    __place-filtered__/script/blueprint.lua:214: in function 'createFilter'
    __place-filtered__/script/blueprint.lua:309: in function 'makeBlueprint'
    __place-filtered__/control.lua:91: in function <__place-filtered__/control.lua:33>

(There is a typo in "FilterSucess" (missing a C), although I don't know if that's the cause of the crash.)

Initially I also had a feature request (I found this bug by trying N on a request chest to find out what the mod does with them) for a common use case I have. However I just realized that this feature can't actually be implemented using the mechanism of this mod, so, nevermind. 😅

(But just in case you're curious: I sometimes want to set requester chest requests by shift-right-clicking a crafting machine and shift-left-clicking the requester chest, but without immediately requesting items. So I want the logistic group to be disabled from the start and then manually enable it. But of course that's completely out of scope for this mod, as I realized, because it's not a filter or anything that can be set while placing the chest, it requires a hook when shift-left-clicking an existing requester chest. ^^' Anyway, being able to place inserters and chests with filters to disable them is still super helpful!)

3 days ago

Thanks for the report, yes it was indeed just a typo.

The correct behaviour used to be for requester chests to do nothing. My logic was, if you don't want the requester to do anything, then you just don't make requests.

I've now changed all logistic system chests to block their input slots, to be consistent with the other containers in the game.

New response