Applied Energistics 2

Applied Energistics 2

137M Downloads

Feature Request: Read Only Disk for item spills and creative use

mindforger opened this issue ยท 6 comments

commented

I just had an idea regarding an issue where an crafting cpu spilling items all over the world made the world unoperable.

How about a Read Only Disk, it has no defined capacity and it can not accept any items by any normal way.

It is created only when a Crafting CPU tries to drop it's contents. It can not be dismantled (shift rightcklick in hand) but it can be stuffed in a Drive, ME Chest or IO Port to regain the dropped items.

It will either vanish as the last item is removed from it (don't know if it possible to "programmatically remove" a disk from a drive without breaking something).
Or it will stay as an empty Read Only Disk containing nothing and can be trashed by the player.

(It could possibly store meta data on why it has been created for debugging purpose :P )

Also @yueh stated to make it "creative" useable for quest based modpacks to hand out rewards for example

commented

This would make sense now that crafting CPUs can store any kind of stacks, and not just items.

commented

ME Punchcards... ๐Ÿ˜

commented

It will either vanish as the last item is removed from it (don't know if it possible to "programmatically remove" a disk from a drive without breaking something).
Or it will stay as an empty Read Only Disk containing nothing and can be trashed by the player.

It could maybe loose durability like Tools based on the percentage of items extracted until it breaks at 0%.

+There should be a way to fill it if modpack creators want to use it.
An idea would be that you can put it only once into a ME Drive/Chest to fill it with stuff.
After removing it from the Drive/Chest it gets read only.

commented

Not sure about the destroying them. Iirc it is handled by onItemUse or whatever it was. And handling that inside a drive might be error prone.

Just keeping it around is certainly the best option. It does not need any changes to drives. Just a new cell type without a way to insert into them. Which is pretty easy.

Not destroying also allows them to be kept as trophy should someone want it. If not throwing it into lava is still an option, but not a forced one.

commented

The read only property is actually completely useless. It is near impossible to create cells, which can be transfered between worlds. Thus no use for modpacks at all currently.

I do not see them being used as storage as a large issue. Creating them is actually not that straightforward as it is the option of last resort for cpus. Further they could simply require an absurd amount of energy per tick, like in the range of 1k-10k ae/t. Thus using them outside an IO Port would be pretty taxing on the whole system.

commented

I was looking at this FR and it interested me (moreso for custom maps to use, than for crafting CPUs to drop), and I think I could implement it fairly easily, but I have a concern I'd like to raise first.

Implementing this in the way its currently explained would allow players to create infinite RODs (Read Only Disks) by making a dummy recipe (e.g. Cobble to Diamonds), attempt to craft a bunch of them, and then just break the crafting CPUs. Sure the disks are read only, but that still allows someone to store up to 64k's worth of items for free, for every crafting CPU they break and can replace ad infinitum.

If we decide to continue with the FR anyways, or limit it to a creative only item for map creators, then I think it can easily be implemented by duplicating appeng.items.storage.ItemBasicStorageCell, manually setting the variables to match a 64k storage cell, and adding a readOnly boolean- initially set to false. Override isBlackListed( final ItemStack cellItem, final IAEItemStack requestedAddition ) to return readOnly;, and instead of dismantling the drive on shift+right click, make it set readOnly to true.