From 397fbdecc45c6dd2d6a880165f60571b721a1e7a Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+AnArgonianLizardThatStealsPRs@users.noreply.github.com> Date: Thu, 19 Oct 2023 12:05:47 +0300 Subject: [PATCH] [MIRROR] Fixes hole in ventcrawl logic [MDB IGNORE] (#143) * Fixes hole in ventcrawl logic (#79027) --------- Co-authored-by: san7890 --- code/modules/mob/living/ventcrawling.dm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/ventcrawling.dm b/code/modules/mob/living/ventcrawling.dm index 4335a0c4857..1a732c41a4d 100644 --- a/code/modules/mob/living/ventcrawling.dm +++ b/code/modules/mob/living/ventcrawling.dm @@ -61,7 +61,10 @@ return if(!do_after(src, 1 SECONDS, target = ventcrawl_target)) return - visible_message(span_notice("[src] scrambles out from the ventilation ducts!"),span_notice("You scramble out from the ventilation ducts.")) + if(ventcrawl_target.welded) // in case it got welded during our sleep + to_chat(src, span_warning("You can't crawl around a welded vent!")) + return + visible_message(span_notice("[src] scrambles out from the ventilation ducts!"), span_notice("You scramble out from the ventilation ducts.")) forceMove(ventcrawl_target.loc) REMOVE_TRAIT(src, TRAIT_MOVE_VENTCRAWLING, VENTCRAWLING_TRAIT) update_pipe_vision() @@ -76,8 +79,11 @@ return if(has_client && isnull(client)) return + if(ventcrawl_target.welded) // in case it got welded during our sleep + to_chat(src, span_warning("You can't crawl around a welded vent!")) + return ventcrawl_target.flick_overlay_static(image('icons/effects/vent_indicator.dmi', "insert", ABOVE_MOB_LAYER), 1 SECONDS) - visible_message(span_notice("[src] scrambles into the ventilation ducts!"),span_notice("You climb into the ventilation ducts.")) + visible_message(span_notice("[src] scrambles into the ventilation ducts!"), span_notice("You climb into the ventilation ducts.")) move_into_vent(ventcrawl_target) else to_chat(src, span_warning("This ventilation duct is not connected to anything!"))