Refined Storage

Refined Storage

115M Downloads

Interfaces with External Storages are stealing from each other

raoulvdberge opened this issue ยท 1 comments

commented

There are multiple solutions to this problem.
I went with solution 2 for now as the amount of questions coming from solution 2 will be way less than solution 1 ("what does this priority button do?!")

Solution 1: Interface priority

  • Interfaces need a priority setting to avoid stealing from each other if a External Storage is connected.
    • Behavior in RS 1
      • Interfaces with an External Storage connected to it, can't steal from other Interfaces.
      • Lone Interfaces can steal from other Interfaces.
    • Behavior in RS 2
      • Interfaces with an External Storage connected to it, CAN steal from other Interfaces if the priority is higher.
      • Lone Interfaces CAN steal from other Interfaces if the priority is higher.
    • This changes the default behavior (= without modifying priority) slightly in comparison with RS 1
      • Interfaces with an External Storage connected to it, can't steal from other Interfaces (same in RS 1 & RS 2)
      • Lone Interfaces can't steal from other Interfaces (different in RS 2)

Solution 2: Block Interface extractions from Interfaces with an External Storage attached to it (like in RS 1)

Ensure that an Interface that is acting as an External Storage can't extract from other Interfaces acting as External Storage, to avoid I/O loops.

Lone interfaces can extract from anywhere, as they have no side-effects.

In any case... this has to happen:

  • Write test for interfaces stealing from each other
  • Write test for external storage on interface
  • Ensure that an Interface can still extract from itself (to realign slots if the Interface is the lone storage source in the network)
  • Ensure that an Interface can't insert into itself. This is to avoid double-counting momentarily and to avoid slots reshuffling when clearing unmatched exported resources and the Interface is the only storage source.
commented

Ref: #74