From 1bb21f5dba471349ee1d9bef0bd69ceec0373f3d Mon Sep 17 00:00:00 2001 From: Roxy <75404941+TealSeer@users.noreply.github.com> Date: Sun, 10 Aug 2025 18:21:45 -0400 Subject: [PATCH] Fix flaky CI failure related to liquids (#4422) ## About The Pull Request `/datum/reagents/expose()` was changed upstream to not accept a `volume_modifier` argument of 0, which can happen if liquid code passes along an empty reagent holder. Changes the code to just return if this happens, as there's nothing to do. ## Why It's Good For The Game Fixes https://github.com/Bubberstation/Bubberstation/actions/runs/16816835574/job/47635694919 ## Proof Of Testing Yes ## Changelog No --- .../modules/liquids/code/liquid_systems/liquid_effect.dm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modular_skyrat/modules/liquids/code/liquid_systems/liquid_effect.dm b/modular_skyrat/modules/liquids/code/liquid_systems/liquid_effect.dm index 030e925599e..9c45792f940 100644 --- a/modular_skyrat/modules/liquids/code/liquid_systems/liquid_effect.dm +++ b/modular_skyrat/modules/liquids/code/liquid_systems/liquid_effect.dm @@ -304,7 +304,7 @@ /obj/effect/abstract/liquid_turf/immutable/take_reagents_flat(flat_amount) return simulate_reagents_flat(flat_amount) -//Returns a reagents holder with all the reagents with a higher volume than the threshold +//Returns a reagents holder with all the reagents with a higher volume than the threshold, returns null if no reagents exceeded the threshold /obj/effect/abstract/liquid_turf/proc/simulate_reagents_threshold(amount_threshold) var/datum/reagents/tempr = new(10000) var/passed_list = list() @@ -315,6 +315,9 @@ passed_list[reagent_type] = amount tempr.add_noreact_reagent_list(passed_list) tempr.chem_temp = temp + if(tempr.total_volume == 0) + qdel(tempr) + return null return tempr //Returns a flat of our reagents without any effects on the liquids @@ -525,6 +528,9 @@ //Exposes my turf with simulated reagents /obj/effect/abstract/liquid_turf/proc/ExposeMyTurf() var/datum/reagents/tempr = simulate_reagents_threshold(LIQUID_REAGENT_THRESHOLD_TURF_EXPOSURE) + // Nothing met the threshold + if(isnull(tempr)) + return tempr.expose(my_turf, TOUCH, tempr.total_volume) qdel(tempr)