mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-15 12:11:45 +00:00
## About The Pull Request - Fixes #84699 The issue isn't with reagents getting transferred one at a time. Yes this happens inside plumbing machinery and it isn't an issue there because they are not processed but simply stored(until all reagents can get there) until it is transferred to another machine that requests it. This however is a problem with hydroponic trays which both store & process those reagents. So when 1 reagent comes into the tray & if the tray gets full before the other reagents can get there it leads to missing fertilizers/nutrients in the tray causing problems in plant growth & such. For e.g. if your ducts have reagents like 3u sodium, 7u ash & 5u water & the tray has space for only 10u reagents. Using round robin it takes in 3u sodium + 7u ash = 10u reagents. The 5u water is left out cause the 10u request is complete causing the plants to dehydrate & die. Now trays are reverted to use the old "proportional method" of transferring reagents leading to trays getting all their nutrients from plumbing ducts. So using the old technique we get sodium + ash + water = 10u i.e. all reagents in the tray so the plants are happy Additionally bottler also uses the old "proportional method" of transferring reagents so it pumps out all reagents into the beaker ## Changelog 🆑 fix: hydroponic trays take in all reagents "proportionally" from plumbing ducts without leaving any behind fix: plumbing bottler pumps out all reagents "proportionally" into output beakers /🆑
18 lines
517 B
Plaintext
18 lines
517 B
Plaintext
#define READY 2
|
|
|
|
/datum/component/plumbing/buffer
|
|
demand_connects = WEST
|
|
supply_connects = EAST
|
|
|
|
/datum/component/plumbing/buffer/Initialize(start = TRUE, _turn_connects = TRUE, _ducting_layer, datum/reagents/custom_receiver)
|
|
if(!istype(parent, /obj/machinery/plumbing/buffer))
|
|
return COMPONENT_INCOMPATIBLE
|
|
|
|
return ..()
|
|
|
|
/datum/component/plumbing/buffer/can_give(amount, reagent, datum/ductnet/net)
|
|
var/obj/machinery/plumbing/buffer/buffer = parent
|
|
return (buffer.mode == READY) ? ..() : FALSE
|
|
|
|
#undef READY
|