Applied Energistics 2

Applied Energistics 2

137M Downloads

Enhance disk partitioning to (optionally) enforce exclusivity

DaveB63 opened this issue ยท 2 comments

commented

Describe the feature

In the cell workbench provide a checkbox that if checked when a disk is partitioned not only partitions the disk but flags it as exclusive storage for the partitioned item(s).

When inserting items into an ME network, if exclusive storage for that item exists then it will only be sent to that disk, with drive priorities only considered to choose between multiple exclusively partitioned disks for the same item. If the exclusively partitioned storage is full, the network should not accept any further items that would otherwise be sent to exclusively partitioned storage.

Adding an exclusively partitioned disk to a network which already contains its partitioned contents on other storage would not cause already stored items to be migrated to the disk (consistent with current behavior when a partitioned disk is added), but newly inserted items would be handled as above, only stored to the exclusively partitioned disk and refused if this is not possible.

Similarly, preserving consistency with current behavior, the addition of a disk to a network, where that disk already contains items for which exclusive storage exists, they would stay where they are.

When extracting items from an ME network, if the item exists on both exclusive and non-exclusive storage the non-exclusive storage would always be emptied first.

For the use cases where this level of strictness is not required, the user would simply leave the "exclusive" checkbox unchecked. A network where all partitioned disks were configured without this option set would continue to behave exactly as currently so it could be introduced without breaking existing systems in any world. Adding disks with this option set to an existing network would, over time as items move into and out of the network, by emptying the non-exclusive storage first and only ever filling the exclusive storage, gradually clamp the item to its exclusive storage. If a user wished to speed up this process they could extract the non-exclusive disks containing the item and reimport those items via an IO port which would force them to the eclusive storage only.

Reasons why it should be considered

Currently, it is possible to prioritize disks and partition them, and this covers many varied use-cases. However, while we can say "put this item on this disk first" we can't say "put this item on this disk and nowhere else, even if other space is free."

This is a major functional gap, because no matter how large you make your partitioned storage it is still possible for the item to overflow it and fill any unpartitioned storage on the network. Adding this option to the partitioning functionality would close that gap.

Additional Context

commented

Dealing with overflow can already be handled with various approaches.

In case the "do not accept anymore item", it's technically possible, but probably more feasible for smaller networks. Or there are probably a couple of different approaches, which most likely can result in a comparable behaviour. Depending on what action is actually needed. E.g. chest not being emptied, some redstone signal or similar.

Keep in mind, the goal of AE2 is to give the player some tools, which they can combine to achieve their idea. But not necessarily in a single block/button solution.
As well as build guides being usually out of scope for bug reports/feature requests.

commented

With respect, there are no approaches other than having some way to tell the network to refuse the item to close off all the ways in which regular use can cause an item to overflow its designated storage. Redstone signals can halt miners or other machines, but a team member gets back from a raid and throws loot in the system when the intended storage is already full and the genie is out of the bottle - in some easily conceivable scenarios, even if they immediately realize and try to take it out again! The item now has a presence on "general storage" and because "where it is already" is prioritized for new storage the situation is guaranteed to get worse, not solve itself with ongoing use. Far from being a use-case most suited to smaller networks, it is a problem most critical for large, well organized ones where the feature, to limit an item to specific storage ONLY, is most severely lacking.

This is entirely in keeping with the "provision of some tools" philosophy - it is a tool that is missing from the set and which can only be added within AE2.