diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm
index fae280743aa..6d5f79398f1 100644
--- a/code/ATMOSPHERICS/atmospherics.dm
+++ b/code/ATMOSPHERICS/atmospherics.dm
@@ -185,21 +185,24 @@ Pipelines + Other Objects -> Pipe network
var/obj/machinery/atmospherics/target_move = findConnecting(direction)
if(target_move)
- if(is_type_in_list(target_move, ventcrawl_machinery))
+ if(is_type_in_list(target_move, ventcrawl_machinery) && target_move.can_crawl_through())
user.remove_ventcrawl()
user.forceMove(target_move.loc) //handles entering and so on
user.visible_message("You hear something squeezing through the ducts.", "You climb out the ventilation system.")
- else
+ else if(target_move.can_crawl_through())
user.loc = target_move
user.client.eye = target_move //if we don't do this, Byond only updates the eye every tick - required for smooth movement
if(world.time - user.last_played_vent > VENT_SOUND_DELAY)
user.last_played_vent = world.time
playsound(src, 'sound/machines/ventcrawl.ogg', 50, 1, -3)
else
- if((direction & initialize_directions) || is_type_in_list(src, ventcrawl_machinery)) //if we move in a way the pipe can connect, but doesn't - or we're in a vent
+ if((direction & initialize_directions) || is_type_in_list(src, ventcrawl_machinery) && src.can_crawl_through()) //if we move in a way the pipe can connect, but doesn't - or we're in a vent
user.remove_ventcrawl()
user.forceMove(src.loc)
user.visible_message("You hear something squeezing through the pipes.", "You climb out the ventilation system.")
user.canmove = 0
spawn(1)
- user.canmove = 1
\ No newline at end of file
+ user.canmove = 1
+
+/obj/machinery/atmospherics/proc/can_crawl_through()
+ return 1
diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm
index 9d07183e9b2..82ed2586eed 100644
--- a/code/ATMOSPHERICS/components/unary/vent_pump.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm
@@ -313,6 +313,9 @@
"}
+/obj/machinery/atmospherics/unary/vent_pump/can_crawl_through()
+ return !welded
+
/obj/machinery/atmospherics/unary/vent_pump/attackby(var/obj/item/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
index 0a48b80861b..0bf800b2ef0 100644
--- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
@@ -22,6 +22,7 @@
var/volume_rate = 1000 // 120
var/panic = 0 //is this scrubber panicked?
+ var/welded = 0
var/area_uid
var/radio_filter_out
@@ -41,6 +42,9 @@
var/hidden=""
if(level == 1 && istype(loc, /turf/simulated))
hidden="h"
+ if(welded)
+ icon_state = "[hidden]weld"
+ return
var/suffix=""
if(scrub_O2)
suffix="1"
@@ -108,6 +112,8 @@
return
if (!node)
return 0 // Let's not shut it off, for now.
+ if(welded)
+ return 0
//broadcast_status()
if(!on)
return 0
@@ -279,10 +285,33 @@
stat |= NOPOWER
update_icon()
+/obj/machinery/atmospherics/unary/vent_scrubber/can_crawl_through()
+ return !welded
+
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(istype(W, /obj/item/device/multitool))
update_multitool_menu(user)
return 1
+ if(istype(W, /obj/item/weapon/weldingtool))
+ var/obj/item/weapon/weldingtool/WT = W
+ if (WT.remove_fuel(0,user))
+ user << "Now welding the scrubber."
+ if(do_after(user, 20))
+ if(!src || !WT.isOn()) return
+ playsound(get_turf(src), 'sound/items/Welder2.ogg', 50, 1)
+ if(!welded)
+ user.visible_message("[user] welds the scrubber shut.", "You weld the vent scrubber.", "You hear welding.")
+ welded = 1
+ update_icon()
+ else
+ user.visible_message("[user] unwelds the scrubber.", "You unweld the scrubber.", "You hear welding.")
+ welded = 0
+ update_icon()
+ else
+ user << "The welding tool needs to be on to start this task."
+ else
+ user << "You need more welding fuel to complete this task."
+ return 1
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 9b98d7ad4b5..bc755e052dc 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -260,19 +260,22 @@
var/obj/machinery/atmospherics/unary/vent_found
if(clicked_on && Adjacent(clicked_on))
- var/obj/machinery/atmospherics/unary/vent_pump/v = clicked_on
- if(!istype(v) || !v.welded)
- vent_found = clicked_on
+ vent_found = clicked_on
+ if(!istype(vent_found) || !vent_found.can_crawl_through())
+ vent_found = null
+
if(!vent_found)
for(var/obj/machinery/atmospherics/machine in range(1,src))
if(is_type_in_list(machine, ventcrawl_machinery))
vent_found = machine
- var/obj/machinery/atmospherics/unary/vent_pump/v = machine
- if(istype(v) && v.welded)
+ if(!vent_found.can_crawl_through())
vent_found = null
+ if(vent_found)
+ break
+
if(vent_found)
if(vent_found.network && (vent_found.network.normal_members.len || vent_found.network.line_members.len))
diff --git a/icons/obj/atmospherics/vent_scrubber.dmi b/icons/obj/atmospherics/vent_scrubber.dmi
index b828539004a..bc02e4de175 100644
Binary files a/icons/obj/atmospherics/vent_scrubber.dmi and b/icons/obj/atmospherics/vent_scrubber.dmi differ