diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm
index 81883558d1..eb338e199b 100644
--- a/code/ATMOSPHERICS/components/unary/vent_pump.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm
@@ -29,19 +29,21 @@
var/welded = 0 // Added for aliens -- TLE
update_icon()
- if(on&&node)
+ if(on && !(stat & (NOPOWER|BROKEN)))
if(pump_direction)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]out"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
- on = 0
return
-
process()
..()
+ if(stat & (NOPOWER|BROKEN))
+ return
+ if (!node)
+ on = 0
broadcast_status()
if(!on)
@@ -66,6 +68,7 @@
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
+ use_power(10, ENVIRON)
loc.assume_air(removed)
if(network)
@@ -84,7 +87,9 @@
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
-
+ if (isnull(removed)) //in space
+ return
+ use_power(10, ENVIRON)
air_contents.merge(removed)
if(network)
@@ -204,14 +209,13 @@
user << "\blue You need more welding fuel to complete this task."
return
W:use_fuel(1)
+ playsound(src.loc, 'Welder2.ogg', 50, 1)
if(!welded)
- user.visible_message("[user] welds the vent shut.", "You weld the vent shut.")
- playsound(src.loc, 'Welder2.ogg', 50, 1)
+ user.visible_message("[user] welds the vent shut.", "You weld the vent shut.", "You hear welding.")
welded = 1
else
- user.visible_message("[user] unwelds the vent.", "You unweld the vent.")
- playsound(src.loc, 'Welder2.ogg', 50, 1)
+ user.visible_message("[user] unwelds the vent.", "You unweld the vent.", "You hear welding.")
welded = 0
examine()
@@ -219,3 +223,10 @@
..()
if(welded)
usr << "It seems welded shut."
+
+ power_change()
+ if(powered(ENVIRON))
+ stat &= ~NOPOWER
+ else
+ stat |= NOPOWER
+ update_icon()
diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
index 68a0062316..03317e68bb 100644
--- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm
@@ -21,18 +21,15 @@
var/panic = 0 //is this scrubber panicked?
update_icon()
- if(on&&node)
+ if(node && on && !(stat & (NOPOWER|BROKEN)))
if(scrubbing)
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]in"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
- on = 0
-
return
-
proc
set_frequency(new_frequency)
radio_controller.remove_object(src, "[frequency]")
@@ -66,11 +63,15 @@
process()
..()
+ if(stat & (NOPOWER|BROKEN))
+ return
+ if (!node)
+ on = 0
broadcast_status()
-
if(!on)
return 0
+
var/datum/gas_mixture/environment = loc.return_air()
if(scrubbing)
@@ -79,7 +80,9 @@
//Take a gas sample
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
-
+ if (isnull(removed)) //in space
+ return
+ use_power(30, ENVIRON)
//Filter it
var/datum/gas_mixture/filtered_out = new
filtered_out.temperature = removed.temperature
@@ -109,6 +112,7 @@
network.update = 1
else //Just siphoning all air
+ use_power(volume_rate/12, ENVIRON)
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
@@ -161,3 +165,10 @@
broadcast_status()
update_icon()
return
+
+ power_change()
+ if(powered(ENVIRON))
+ stat &= ~NOPOWER
+ else
+ stat |= NOPOWER
+ update_icon()
diff --git a/code/WorkInProgress/Chemistry-Recipes.dm b/code/WorkInProgress/Chemistry-Recipes.dm
index c9476ff8b8..be1a0fbba4 100644
--- a/code/WorkInProgress/Chemistry-Recipes.dm
+++ b/code/WorkInProgress/Chemistry-Recipes.dm
@@ -669,7 +669,7 @@ datum
result_amount = 5
manhattan
- name = "Manhattan "
+ name = "Manhattan"
id = "manhattan"
result = "manhattan"
required_reagents = list("whiskey" = 2, "vermouth" = 1)
diff --git a/code/game/cellautomata.dm b/code/game/cellautomata.dm
index ded8d44c38..003b48c2f6 100644
--- a/code/game/cellautomata.dm
+++ b/code/game/cellautomata.dm
@@ -150,7 +150,7 @@
/atom/movable/Bump(var/atom/A as mob|obj|turf|area, yes)
spawn( 0 )
if ((A && yes))
- A.last_bumped = world.timeofday
+ A.last_bumped = world.time
A.Bumped(src)
return
..()
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 083d43569f..d7c4d8ac09 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -93,16 +93,14 @@
..()
- var/datum/gas_mixture/environment
-
- if(holding)
- environment = holding.air_contents
- else
- environment = loc.return_air()
-
- var/env_pressure = environment.return_pressure()
-
if(valve_open)
+ var/datum/gas_mixture/environment
+ if(holding)
+ environment = holding.air_contents
+ else
+ environment = loc.return_air()
+
+ var/env_pressure = environment.return_pressure()
var/pressure_delta = min(release_pressure - env_pressure, (air_contents.return_pressure() - env_pressure)/2)
//Can not have a pressure delta that would cause environment pressure > tank pressure
@@ -117,9 +115,9 @@
environment.merge(removed)
else
loc.assume_air(removed)
+ src.update_icon()
src.updateDialog()
- src.update_icon()
return
/obj/machinery/portable_atmospherics/canister/return_air()
@@ -166,7 +164,7 @@ Port Status: [(connected_port)?("Connected"):("Disconnected")]
[holding_text]
Release Valve: [valve_open?("Open"):("Closed")]
-Release Pressure: - - [release_pressure] + +
+Release Pressure: - - - - [release_pressure] + + + +