diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index b2505271c03..39aac7ede4c 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -21,6 +21,8 @@ Pipelines + Other Objects -> Pipe network var/pipe_color var/obj/item/pipe/stored + var/welded = 0 //Used on pumps and scrubbers + var/global/list/iconsetids = list() var/global/list/pipeimages = list() diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index 3cba602bac1..7efc82f265e 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -23,8 +23,6 @@ //2: Do not pass internal_pressure_bound //3: Do not pass either - var/welded = 0 - var/frequency = 1439 var/datum/radio_frequency/radio_connection diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index cb7859c1268..04e9754f1b2 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -27,6 +27,7 @@ var/radio_filter_out var/radio_filter_in + /obj/machinery/atmospherics/unary/vent_scrubber/New() ..() initial_loc = get_area(loc) @@ -50,6 +51,10 @@ if(showpipe) overlays += getpipeimage('icons/obj/atmospherics/unary_devices.dmi', "scrub_cap", initialize_directions) + if(welded) + icon_state = "scrub_welded" + return + if(!node || !on || stat & (NOPOWER|BROKEN)) icon_state = "scrub_off" return @@ -107,7 +112,7 @@ if (!node) on = 0 //broadcast_status() - if(!on) + if(!on || welded) return 0 @@ -238,6 +243,24 @@ update_icon_nopipes() /obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params) + if(istype(W, /obj/item/weapon/weldingtool)) + var/obj/item/weapon/weldingtool/WT = W + if(WT.remove_fuel(0,user)) + playsound(loc, 'sound/items/Welder.ogg', 40, 1) + user << "Now welding \the [src]." + if(do_after(user, 20)) + if(!src || !WT.isOn()) + return + playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) + if(!welded) + user.visible_message("[user] welds the scrubber shut.","You weld the vent shit.", "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() + return 1 if (!istype(W, /obj/item/weapon/wrench)) return ..() if (!(stat & NOPOWER) && on) @@ -245,6 +268,7 @@ return 1 return ..() + /obj/machinery/atmospherics/unary/vent_scrubber/Destroy() if(initial_loc) initial_loc.air_scrub_info -= id_tag diff --git a/code/modules/mob/living/ventcrawling.dm b/code/modules/mob/living/ventcrawling.dm index 90efe23c815..4de322f1bd2 100644 --- a/code/modules/mob/living/ventcrawling.dm +++ b/code/modules/mob/living/ventcrawling.dm @@ -17,8 +17,8 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, if(A) - var/obj/machinery/atmospherics/unary/vent_pump/V = A - if(!istype(V) || !V.welded)//not a vent, or not welded + var/obj/machinery/atmospherics/unary/V = A + if(istype(V) && (!V.welded))//Not welded vent_found = V if(!vent_found) @@ -26,7 +26,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, if(is_type_in_list(machine, ventcrawl_machinery)) vent_found = machine - var/obj/machinery/atmospherics/unary/vent_pump/V = machine + var/obj/machinery/atmospherics/unary/V = machine if(istype(V) && V.welded) vent_found = null diff --git a/icons/obj/atmospherics/unary_devices.dmi b/icons/obj/atmospherics/unary_devices.dmi index 60dec4db9a3..bc43f452e17 100644 Binary files a/icons/obj/atmospherics/unary_devices.dmi and b/icons/obj/atmospherics/unary_devices.dmi differ