-Multiple fixes for machinery not correctly updating their icons when depowered.

-Gave request consoles an off sprite.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5421 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-12-30 02:20:03 +00:00
parent d99e8264e2
commit b9bb759cd8
17 changed files with 58 additions and 13 deletions
@@ -1,6 +1,7 @@
obj/machinery/atmospherics/binary
dir = SOUTH
initialize_directions = SOUTH|NORTH
use_power = 1
var/datum/gas_mixture/air1
var/datum/gas_mixture/air2
@@ -15,7 +15,9 @@ obj/machinery/atmospherics/binary/passive_gate
var/datum/radio_frequency/radio_connection
update_icon()
if(node1&&node2)
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node1 && node2)
icon_state = "intact_[on?("on"):("off")]"
else
if(node1)
@@ -24,8 +26,6 @@ obj/machinery/atmospherics/binary/passive_gate
icon_state = "exposed_2_off"
else
icon_state = "exposed_3_off"
on = 0
return
process()
@@ -31,7 +31,9 @@ obj/machinery/atmospherics/binary/pump
icon_state = "intact_on"
update_icon()
if(node1&&node2)
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node1 && node2)
icon_state = "intact_[on?("on"):("off")]"
else
if(node1)
@@ -31,7 +31,9 @@ obj/machinery/atmospherics/binary/volume_pump
icon_state = "intact_on"
update_icon()
if(node1&&node2)
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node1 && node2)
icon_state = "intact_[on?("on"):("off")]"
else
if(node1)
@@ -15,7 +15,7 @@
var/datum/pipe_network/network
var/on = 0
use_power = 0
level = 0
@@ -39,16 +39,21 @@ Filter types:
..()
update_icon()
if(node2 && node3 && node1)
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node2 && node3 && node1)
icon_state = "intact_[on?("on"):("off")]"
else
icon_state = "hintact_off"
icon_state = "intact_off"
on = 0
return
New()
power_change()
var/old_stat = stat
..()
if(old_stat != stat)
update_icon()
process()
..()
@@ -16,7 +16,9 @@ obj/machinery/atmospherics/trinary/mixer
//node 3 is the outlet, nodes 1 & 2 are intakes
update_icon()
if(node2 && node3 && node1)
if(stat & NOPOWER)
icon_state = "intact_off"
else if(node2 && node3 && node1)
icon_state = "intact_[on?("on"):("off")]"
else
icon_state = "intact_off"
@@ -24,6 +26,12 @@ obj/machinery/atmospherics/trinary/mixer
return
power_change()
var/old_stat = stat
..()
if(old_stat != stat)
update_icon()
New()
..()
air3.volume = 300
@@ -1,6 +1,7 @@
obj/machinery/atmospherics/trinary
dir = SOUTH
initialize_directions = SOUTH|NORTH|WEST
use_power = 1
var/datum/gas_mixture/air1
var/datum/gas_mixture/air2
@@ -2,6 +2,7 @@
icon = 'icons/obj/atmospherics/cold_sink.dmi'
icon_state = "intact_off"
density = 1
use_power = 1
name = "Cold Sink"
desc = "Cools gas when connected to pipe network"
@@ -4,6 +4,7 @@
icon = 'icons/obj/atmospherics/cold_sink.dmi'
icon_state = "intact_off"
density = 1
use_power = 1
name = "Heat Reservoir"
desc = "Heats gas when connected to pipe network"
@@ -1,6 +1,7 @@
/obj/machinery/atmospherics/unary/outlet_injector
icon = 'icons/obj/atmospherics/outlet_injector.dmi'
icon_state = "off"
use_power = 1
name = "Air Injector"
desc = "Has a valve and pump attached to it"
@@ -18,7 +19,7 @@
update_icon()
if(node)
if(on)
if(on && !(stat & NOPOWER))
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]on"
else
icon_state = "[level == 1 && istype(loc, /turf/simulated) ? "h" : "" ]off"
@@ -28,11 +29,18 @@
return
power_change()
var/old_stat = stat
..()
if(old_stat != stat)
update_icon()
process()
..()
injecting = 0
if(!on)
if(!on || stat & NOPOWER)
return 0
if(air_contents.temperature > 0)
@@ -4,6 +4,7 @@
name = "Air Vent"
desc = "Has a valve and pump attached to it"
use_power = 1
var/area/initial_loc
level = 1
@@ -4,6 +4,7 @@
name = "Air Scrubber"
desc = "Has a valve and pump attached to it"
use_power = 1
level = 1