diff --git a/code/__DEFINES/reagents.dm b/code/__DEFINES/reagents.dm index b40ff65196..913cb70cef 100644 --- a/code/__DEFINES/reagents.dm +++ b/code/__DEFINES/reagents.dm @@ -88,6 +88,7 @@ #define REACTION_CLEAR_IMPURE (1<<0) //Convert into impure/pure on reaction completion #define REACTION_CLEAR_INVERSE (1<<1) //Convert into inverse on reaction completion when purity is low enough +///GS13 edit ///The minimum volume of reagents than can be operated on. #define CHEMICAL_QUANTISATION_LEVEL 0.0001 diff --git a/code/datums/components/plumbing/_plumbing.dm b/code/datums/components/plumbing/_plumbing.dm index cc80581866..ad2050e401 100644 --- a/code/datums/components/plumbing/_plumbing.dm +++ b/code/datums/components/plumbing/_plumbing.dm @@ -66,7 +66,7 @@ var/datum/component/plumbing/supplier = A if(supplier.can_give(amount, reagent, net)) valid_suppliers += supplier - // Need to ask for each in turn very carefully, making sure we get the total volume. This is to avoid a division that would always round down and become 0 + ///GS13 Edit: Need to ask for each in turn very carefully, making sure we get the total volume. This is to avoid a division that would always round down and become 0 var/targetVolume = reagents.total_volume = amount var/suppliersLeft = valid_suppliers.len for(var/A in valid_suppliers) diff --git a/code/datums/components/plumbing/reaction_chamber.dm b/code/datums/components/plumbing/reaction_chamber.dm index 6bd1464e59..3019e99a44 100644 --- a/code/datums/components/plumbing/reaction_chamber.dm +++ b/code/datums/components/plumbing/reaction_chamber.dm @@ -23,7 +23,7 @@ var/datum/reagent/RD = A if(RT == RD.type) has_reagent = TRUE - if(RD.volume + CHEMICAL_QUANTISATION_LEVEL < RC.required_reagents[RT]) // Allow the chamber to exit filling mode when it feels it has enough even if short by a tiny fraction + if(RD.volume + CHEMICAL_QUANTISATION_LEVEL < RC.required_reagents[RT]) //GS13 Edit: Allow the chamber to exit filling mode when it feels it has enough even if short by a tiny fraction process_request(min(RC.required_reagents[RT] - RD.volume, MACHINE_REAGENT_TRANSFER) , RT, dir) return if(!has_reagent)