From 0cd6599e2d0690068e33f2ba657d39fe0e41fb97 Mon Sep 17 00:00:00 2001 From: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Date: Mon, 3 May 2021 05:22:41 -0700 Subject: [PATCH] Cleans up a use of air_contents in pipeline code, it's not doing anything yet, but if someone wants to change how reactions work they might break it. Adds a proc override to catch taking damage, which fixes the canister not leaking until it's updated (#58829) --- code/modules/atmospherics/machinery/datum_pipeline.dm | 2 +- code/modules/atmospherics/machinery/portable/canister.dm | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/code/modules/atmospherics/machinery/datum_pipeline.dm b/code/modules/atmospherics/machinery/datum_pipeline.dm index cdf2c61babd..57ecd52bdd9 100644 --- a/code/modules/atmospherics/machinery/datum_pipeline.dm +++ b/code/modules/atmospherics/machinery/datum_pipeline.dm @@ -240,7 +240,7 @@ else if (istype(atmosmch, /obj/machinery/atmospherics/components/unary/portables_connector)) var/obj/machinery/atmospherics/components/unary/portables_connector/considered_connector = atmosmch if(considered_connector.connected_device) - gas_mixture_list += considered_connector.connected_device.air_contents + gas_mixture_list += considered_connector.connected_device.return_air() var/total_thermal_energy = 0 var/total_heat_capacity = 0 diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index 9a4097fecd0..b2d0854690f 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -500,6 +500,12 @@ GLOBAL_LIST_INIT(gas_id_to_canister, init_gas_id_to_canister()) to_chat(user, "You repair some of the cracks in [src]...") return TRUE +/obj/machinery/portable_atmospherics/canister/take_damage(damage_amount, damage_type = BRUTE, damage_flag = "", sound_effect = TRUE, attack_dir, armour_penetration = 0) + . = ..() + if(!.) + return + SSair.start_processing_machine(src) + /obj/machinery/portable_atmospherics/canister/obj_break(damage_flag) . = ..() if(!.)