Level emitter
Sidorion opened this issue · 10 comments
Due to the fact, that you can screw the whole system when you put a supplier pipe on an Inv with more, than a single crafting process can provide (e.g. four stacks of glass, but your furnaces can only hold two stacks of sand), I suggest implementing a way to send a redstone-signal based on the amount of a certain item-type in the system.
That way you can supply the furnace with sand and have it activated as long, as there is less than maybe 200 glass in the system.
Crafting recipe could be a pipe plug, a redstone torch and a golden chipset or golden keg.
The block the plug is facing could recieve a strong redstone signal.
Extra points for an analog signal with strength equalling the percentage of the set amount reached.
The interface could be like the one for the fluid supplier with a slot for a ghost-block instead of the fluid selector.
I have another use case that is possibly more cut and dry for a level emitter:
Forestry has farm multi-structures, each direction can be a different farm, and by applying a redstone signal to the corresponding side of a control block you can shut off one direction of the farm (or the whole farm if you want).
The farm essentially just spits out resources (lets say carrots) indefinitely otherwise and I end up terminating the excess, but that's wasteful. What I would like to be able to do is have a pipe or module that can be used to emit a redstone signal on certain conditions of items in inventory (say, when available carrots is at or above 2048) so I can shut down the farm when I have enough carrots in my inventory.
"both make LP more dependant onto BC"
It wouldn't, if you make BC as an optional dependency, and only add the affected blocks/items when BC exists. It does not build a direct dependency between LP and BC. And at least you have other BC integrations, so development environment will have to have BC anyway.
both make LP more dependant onto BC, where the current goal is to get it standalone....
though the idea is interesting... I could imagine a module for that
or a seperate pipe
On the other hand, you cann allready achieve that by setting the furnace up with a Crafting pipe and a Chest with a supplier and a provider. The supplier will not see the provider since its on the same inventory. it will instead task the Furnace to smelt sand into Glass
This works only up to the maximum inventory space of the crafting machine. When I want four stacks of glass stocked and there is less than three stacks stored, the system sends more than one stack to the furnace and the system starts doing weird things like sending sand in all directions and not counting the crafted glass and so on.
Its actually not acting wierd, its acting like it should. The shifting items round and round you mentioned has to do with the following:
As a smleter gets ordered more than it can hold for its input slot, all the needed ressources get requested. Any overflow gets sent back and sinks back into your designated storage medium. Once the system detects space int the Input slot again, it'll issue the request again for the Rest of the requested material.
That results in items flowing back and forth every time there is 1 Item of space inside your Smelter, since LP doesnt break down the request to grab exactly the free amount. Actually doing that would result in request spam, as the inventory could tick down another time before the last request arrives
And by the way it DOES count the Glass you produced, but if you request 128 Glass and have a single slot Furnace you wind up with 64 Sand as overflow getting sent back. And every time a smelting operation finishes the crafting pipe will request the last n-i Items (n ϵ Overflow, i = Smelting operations done)
I'm fully aware of that behaviour. I use this for my ore processing as I have a supplier to suply ten of each ore to the pulverizer. The first ore type can go in, the rest is sent back.
Nevertheless I made the observation that in the end there is too much glass in the supplied chest when furnace and chest are far away from each other. It seems as if processed items on the way to the storage are not counted for the last n-i items.
A level emitter could have another use, too: Process all BUT a certain number. In current LP there is no way to process all wood to charcoal, but leave two stacks for daily use.
You can set your Provider to “Leave 1st and last Stack“ wich equates to what you want.
I noticed that too, stuff traveling is not that easy to take into count though
Well, two stacks was only a random number. What if I want five stacks? There is no leave last five stacks option ;).
The other thing is, those two stacks are totally invisible to the whole system so the only way to access them is by opening the chest. Neither request nor autocrafting would be possible with these two stacks.
You can trick your System a bit with Firewalls and/or subsystems
Such that there are 2 seperate providers on one storage Medium. You tell one to keep stacks and one to not do that. The unrestricted pipe gets connected to your main network and power. When you connect the smelters to the restricted Provider you generate a subsystem. Now to Power and allow smelting you connect the 2 providers via a firewall pipe, wich only allows energy, crafting and routing. Now you have a smelter with restricted access to your ressources