[Request]Restriction Storage Chest

This is the place to request new mods or give ideas about what could be done.
Post Reply
Lost Ninja
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun May 24, 2015 8:59 pm
Contact:

[Request]Restriction Storage Chest

Post by Lost Ninja »

Either a chest that can be restricted to a single item, or better yet a way to lock specific slots (like the toolbar) to specific items. I can if needed provide graphics (my coding isn't great and I don't know the API at all) as I have Blender and some knowledge of using it with Factorio

dalsio
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sun Jun 21, 2015 9:56 pm
Contact:

Re: [Request]Restriction Storage Chest

Post by dalsio »

First, you can always just use the ground as a one-item chest of sorts. It only has a one-item buffer without stacking, but it essentially works that way since no other items can be placed there but inserters can still pick it up. You can also use the x on the bottom right of a chest to lock certain slots from being accessed. You probably already know this, I'm just making sure.

A chest that can restrict the types of items that can go into it (which is probably more what you're thinking of), this would require some GUI elements to control what is filtered, which I'm not too familiar with yet. As for the actual function, the only way to do this would be to interrupt or modify the function call, "game.caninsert()". This, I believe, is what's used when any entity (inserter, miner, etc.) is trying to intelligently determine if it can actually put items in an inventory. There is currently, as far as I know, no way to modify this function through the modding API, although it might be simple for the devs to add that ability in, and I can try and request as much.

Don't get me wring, I think this would be quite useful. I'd be interested in programming such a design, given the right API. Hopefully the devs can add either what I just described, or their own version if a filterable chest.

The only other way this could be done, as absurd as it would be, is to set up a recipe for each and every item in the game that takes one of the items and the result of which is the same item, and make a new assembler that can only use those recipes, but takes no electricity (or rather it's stored energy is constantly replenished) and instantly, or at least very very quickly, crafts these recipes. Then, you select the recipe from the list and only the items involved with that recipe could be inserted into it and, by extension, taken out. This of course would mean that the inventory is limited to only two stack (one on input inventory and one in output inventory) and would heavily crowd the crafting screen. It also probably would not be able to automatically include items from mods. This, of course, is not in any way an elegant solution, but if anyone is crazy enough to do it then feel free. :P

Post Reply

Return to “Ideas and Requests For Mods”