Storage Logic with factories

    Joined
    Jul 26, 2013
    Messages
    144
    Reaction score
    48
    • Legacy Citizen 2
    • Purchased!
    Ive noticed that if a factory pulls from a storage block the storage may not update connected logic. In my case the storage became empty after the factory consumed its contents but the connected OR signal remained on. Is this a bug or an intended design?

    It seems to only happen when the factory is the one pulling. When pulling items from a factory the storage continues to send expected logic signals.
     
    Joined
    Sep 11, 2015
    Messages
    59
    Reaction score
    19
    • Purchased!
    I'm not 100% sure, but I think a storage only updates it's logic signal at a pull tick, only when it has block pulling on.
     
    Joined
    Jun 27, 2013
    Messages
    896
    Reaction score
    166
    I'm not 100% sure, but I think a storage only updates it's logic signal at a pull tick, only when it has block pulling on.
    In addition, it needs some blocks to pull in its "feeder storage" to recognize it can not pull anything because it is full. That is, if your pulling storage becomes exactly full with its last tick, and there is nothing left to pull in the other storage, it will not signal that it's "full".

    If both storages have the same capacity, say 100 items, and you pull exactly 50 items per tick, "full" detection will fail (as will "empty" detection on the source storage, since it is not actively pulling).

    It seems this is intended behaviour (thus "not a bug"), but in my opinion, the rationale behind that intention seems... odd at least.
     

    AndyP

    Customer Experience Manager
    Joined
    Aug 15, 2013
    Messages
    1,199
    Reaction score
    264
    • Schine
    • Wired for Logic
    Its a known bug, and not a wanted behaviour.

    See this issue for reference:
    T84

    The whole set around factories and OR gates is broken.

    Current state:
    upload_2016-6-30_21-29-13.png

    However this is a snapshot and may change, check the issue itself to get the latest state on this.

    - Andy
     
    Joined
    Jun 27, 2013
    Messages
    896
    Reaction score
    166
    Its a known bug, and not a wanted behaviour.
    Not alerting when the chest is full/empty but there are no items to pull is intended behaviour, according to your words at ⚓ T914 cargo area - does not detect full state anymore for storage modules - only the "empty" detection is marked as broken and only when you modify the contents manually.
    AndyP said:
    Fix confirmed:

    New intended behavior:
    Send a false to linked activators (link from chest, to activator) on every tick when:

    • a pull could not be filled AND
    • there were items to pull present
    Send a true to linked activators (link from chest, to activator) on every tick when:

    • a pull could be filled OR
    • there were no items to pull present
    Notes:

    • this way the "false" is only sent when the cargo space really prevents the chest from doing its job to pull stuff. If there is nothing to do, there is no reason to alert a "full state"
    • empty source chest, disables full detection,
    • NO connected chest to pull from, also makes the test always succeed and send a "true"

    If a storage is full, I want to know the moment it is full, not when I think it might still have capacity available and send some more stuff its way only to find it was full to the brim but had nothing to trigger "overflow".
    What was previously one condition ("full") now needs two separate conditions ("full" AND "more items in queue") to trigger.
    The side effect is that the storage it is pulling from can not get emptied if I want to reliably detect a full state of the storage doing the pull.

    Another thing is that pulling across docked entities, say from a salvage beam buffer into a docked container, fails to detect a full state, even if there are still items in the buffer. While this may be a different issue from a bugtracker point of view, it compounds the perceived brokenness of storage logic.
     

    AndyP

    Customer Experience Manager
    Joined
    Aug 15, 2013
    Messages
    1,199
    Reaction score
    264
    • Schine
    • Wired for Logic
    If the storage could complete all pulls, why alert?
    It shall notify when it could not pull the contents over to it.

    The full detection was previously made by counting the inventory slots, so full meant all slots occupied.
    This does not work anymore for unlimited slots, and as the the current storage used is a floating point value, we had issues when for example an item with volume 1.0 shall be pulled into a storage with 0.9 left.
    We took 1.0 as guideline then, however there were servers and items that were made bigger and had more volume.
    Next idea was 90% filled as warning level.
    Again, there were modded/custom blocks on servers where only like 4-5 are needed to fill a storage.
    So under the line the only way to detect a full state with "free storage vs item size" was to trigger exactly on the moment when you want to pull an item and it does not fit in the storage.
    (And this would then also fit for any other use.
    You want to know when a factory cannot pull anything in because its full, a shipyard refinery and so on.)

    Pulling over docked entities, is a bit problematic too, indeed.
    They work around the system a bit, and the pull request gets handled separately, and thus the detection if the pull worked may not properly work, as it cannot see the item size it pulls directly.

    - Andy