From f9c7f9f118710c4b80111fee11f81972cb113a99 Mon Sep 17 00:00:00 2001 From: Silverplate <118299273+silverplatedelta@users.noreply.github.com> Date: Mon, 24 Feb 2025 11:08:56 -0500 Subject: [PATCH] Fixes a runtime in PDA gas scanner code (#28310) * Runtime fix * Chuga review * Update code/game/objects/items/devices/scanners.dm Co-authored-by: chuga-git <98280110+chuga-git@users.noreply.github.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> * forgot I changed these too. Co-authored-by: chuga-git <98280110+chuga-git@users.noreply.github.com> Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> --------- Signed-off-by: Silverplate <118299273+silverplatedelta@users.noreply.github.com> Co-authored-by: chuga-git <98280110+chuga-git@users.noreply.github.com> --- code/game/objects/items/devices/scanners.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 66e831b66c8..e54d482c80d 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -750,7 +750,6 @@ SLIME SCANNER volume = air.return_volume() //could just do mixture.volume... but safety, I guess? heat_capacity = air.heat_capacity() thermal_energy = air.thermal_energy() - if(total_moles) message += "Total: [round(total_moles, 0.01)] moles" if(air.oxygen() && (milla_turf_details || air.oxygen() / total_moles > 0.01)) @@ -776,6 +775,8 @@ SLIME SCANNER else// Sum mixtures then present for(var/datum/gas_mixture/air as anything in airs) + if(isnull(air)) + continue total_moles += air.total_moles() volume += air.return_volume() heat_capacity += air.heat_capacity()