mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
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 🆑 fix: Fix holoparasite using gas ability while not summoned /🆑
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user