mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 12:05:59 +01:00
"Balances" New Scrubber ventcrawling by allowing weldable scrubbers.
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 << "<span class='notice'>Now welding \the [src].</span>"
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user