From fdb097ebcdc5a164949fdbe8679a40b60bc72bf0 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 26 Dec 2024 01:28:58 -0600 Subject: [PATCH] Fix holoparasite using gas ability while not summoned (#88719) ## About The Pull Request - Fixes #88686 Holoparasites were able to use the gas ability while not directly summoned. This fixes that so they need to be summoned to use the ability properly. ## Why It's Good For The Game No more cheap exploits. ## Changelog :cl: fix: Fix holoparasite using gas ability while not summoned /:cl: --- .../living/basic/guardian/guardian_types/gaseous.dm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/code/modules/mob/living/basic/guardian/guardian_types/gaseous.dm b/code/modules/mob/living/basic/guardian/guardian_types/gaseous.dm index bc6415c1a53..e9b5573ec47 100644 --- a/code/modules/mob/living/basic/guardian/guardian_types/gaseous.dm +++ b/code/modules/mob/living/basic/guardian/guardian_types/gaseous.dm @@ -122,6 +122,12 @@ if(isnull(picked_gas) || isnull(gas_type)) return + if(isguardian(owner)) + var/mob/living/basic/guardian/guardian_owner = owner + if(!guardian_owner.is_deployed()) + to_chat(owner, span_warning("You cannot release gas without being summoned!")) + return + to_chat(owner, span_bolddanger("You start releasing [picked_gas].")) owner.investigate_log("set their gas type to [picked_gas].", INVESTIGATE_ATMOS) var/had_gas = !isnull(active_gas) @@ -150,6 +156,13 @@ SIGNAL_HANDLER if (isnull(active_gas)) return // We shouldn't even be registered at this point but just in case + + if(isguardian(owner)) + var/mob/living/basic/guardian/guardian_owner = owner + if(!guardian_owner.is_deployed()) + stop_gas() + return + var/datum/gas_mixture/mix_to_spawn = new() mix_to_spawn.add_gas(active_gas) mix_to_spawn.gases[active_gas][MOLES] = possible_gases[active_gas] * seconds_per_tick