[MIRROR] Ventcrawler update (#11930)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-11-07 06:42:34 -07:00
committed by GitHub
parent 4f048b932d
commit c0da916575
13 changed files with 155 additions and 93 deletions

View File

@@ -11,7 +11,7 @@
var/datum/pipe_network/network
var/welded = 0 //defining this here for ventcrawl stuff
var/welded = FALSE //defining this here for ventcrawl stuff
/obj/machinery/atmospherics/unary/Initialize(mapload)
. = ..()

View File

@@ -68,7 +68,9 @@
if(!istype(T))
return
if(!powered())
if(welded)
scrubber_icon += "weld"
else if(!powered())
scrubber_icon += "off"
else
scrubber_icon += "[use_power ? "[scrubbing ? "on" : "in"]" : "off"]"
@@ -269,6 +271,27 @@
update_icon()
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/W as obj, var/mob/user as mob)
if(W.has_tool_quality(TOOL_WELDER))
var/obj/item/weldingtool/WT = W
if (WT.remove_fuel(0,user))
to_chat(user, span_notice("Now welding the vent."))
if(do_after(user, 20 * WT.toolspeed))
if(!src || !WT.isOn()) return
playsound(src, WT.usesound, 50, 1)
if(!welded)
user.visible_message(span_notice("<b>\The [user]</b> welds the vent shut."), span_notice("You weld the vent shut."), "You hear welding.")
welded = TRUE
update_icon()
else
user.visible_message(span_notice("[user] unwelds the vent."), span_notice("You unweld the vent."), "You hear welding.")
welded = FALSE
update_icon()
else
to_chat(user, span_notice("The welding tool needs to be on to start this task."))
else
to_chat(user, span_warning("You need more welding fuel to complete this task."))
return 1
if (!W.has_tool_quality(TOOL_WRENCH))
return ..()
if (!(stat & NOPOWER) && use_power)
@@ -278,6 +301,9 @@
if (node && node.level==1 && isturf(T) && !T.is_plating())
to_chat(user, span_warning("You must remove the plating first."))
return 1
if(welded)
to_chat(user, span_warning("You cannot unwrench \the [src], it is welded down firmly."))
return 1
if(!can_unwrench())
to_chat(user, span_warning("You cannot unwrench \the [src], it is too exerted due to internal pressure."))
add_fingerprint(user)
@@ -297,3 +323,5 @@
. += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
else
. += "You are too far away to read the gauge."
if(welded)
. += "It is welded shut."