diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index fb6dcbc7594..a316b84ea61 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -262,7 +262,6 @@ Class Procs:
user << "You momentarily forget how to use [src]!"
return 1
if(!is_interactable())
- user << "\The [src] seems offline."
return 1
if(set_machine)
user.set_machine(src)
diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm
index 9f2c9cf4b1e..c93fd762994 100644
--- a/code/modules/atmospherics/machinery/portable/canister.dm
+++ b/code/modules/atmospherics/machinery/portable/canister.dm
@@ -102,7 +102,7 @@
#define FULL 16
#define DANGER 32
/obj/machinery/portable_atmospherics/canister/update_icon()
- if(destroyed)
+ if(stat & BROKEN)
overlays.Cut()
icon_state = "[initial(icon_state)]-1"
return
@@ -153,15 +153,17 @@
healthcheck()
/obj/machinery/portable_atmospherics/canister/proc/healthcheck()
- if(destroyed)
+ if(stat & BROKEN)
return
if(health <= 10)
+ disconnect()
+ var/datum/gas_mixture/expelled_gas = air_contents.remove(air_contents.total_moles())
var/turf/T = get_turf(src)
- T.assume_air(air_contents)
+ T.assume_air(expelled_gas)
air_update_turf()
- destroyed = TRUE
+ stat |= BROKEN
density = 0
playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
update_icon()
@@ -173,7 +175,7 @@
/obj/machinery/portable_atmospherics/canister/process_atmos()
..()
- if(destroyed)
+ if(stat & BROKEN)
return PROCESS_KILL
if(!valve_open)
pump.AIR1 = null
@@ -204,13 +206,13 @@
/obj/machinery/portable_atmospherics/canister/ex_act(severity, target)
switch(severity)
if(1)
- if(destroyed || prob(30))
+ if((stat & BROKEN) || prob(30))
qdel(src)
return
else
health = 0
if(2)
- if(destroyed)
+ if(stat & BROKEN)
qdel(src)
return
else
diff --git a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
index 480a2c62b41..f2b12e19c45 100644
--- a/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
+++ b/code/modules/atmospherics/machinery/portable/portable_atmospherics.dm
@@ -8,7 +8,6 @@
var/obj/item/weapon/tank/holding
var/volume = 0
- var/destroyed = 0
var/maximum_pressure = 90 * ONE_ATMOSPHERE
@@ -25,6 +24,7 @@
/obj/machinery/portable_atmospherics/Destroy()
SSair.atmos_machinery -= src
+ disconnect()
qdel(air_contents)
air_contents = null
@@ -69,14 +69,14 @@
return air_contents
/obj/machinery/portable_atmospherics/attackby(obj/item/weapon/W, mob/user, params)
- if((istype(W, /obj/item/weapon/tank) && !destroyed))
+ if(istype(W, /obj/item/weapon/tank) && !(stat & BROKEN))
var/obj/item/weapon/tank/T = W
if(holding || !user.drop_item())
return
T.loc = src
holding = T
update_icon()
- else if(istype(W, /obj/item/weapon/wrench))
+ else if(istype(W, /obj/item/weapon/wrench) && !(stat & BROKEN))
if(connected_port)
disconnect()
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)