diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm index d745a48d89..3c12e1f943 100644 --- a/code/ATMOSPHERICS/atmospherics.dm +++ b/code/ATMOSPHERICS/atmospherics.dm @@ -12,7 +12,6 @@ Pipelines + Other Objects -> Pipe network obj/machinery/atmospherics anchored = 1 - use_power = 0 idle_power_usage = 0 active_power_usage = 0 power_channel = ENVIRON diff --git a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm index 44446589cb..9d2a8e32e8 100644 --- a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm +++ b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm @@ -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 diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm index e92cc48510..a126928e2d 100644 --- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm +++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm @@ -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() diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index 04aeccfff9..e4d62469ad 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -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) diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm index 2c5f233706..e2dddfa97c 100644 --- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm @@ -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) diff --git a/code/ATMOSPHERICS/components/portables_connector.dm b/code/ATMOSPHERICS/components/portables_connector.dm index 8d7a6efb05..9ecc82b324 100644 --- a/code/ATMOSPHERICS/components/portables_connector.dm +++ b/code/ATMOSPHERICS/components/portables_connector.dm @@ -15,7 +15,7 @@ var/datum/pipe_network/network var/on = 0 - + use_power = 0 level = 0 diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm index a2d72ca523..6a92f9a24b 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm @@ -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() ..() diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm index 69307784a9..6d532286de 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm @@ -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 diff --git a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm index e22208b071..d3f1116a43 100644 --- a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm +++ b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm @@ -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 diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm index 32de005dc6..ef1d5f60be 100644 --- a/code/ATMOSPHERICS/components/unary/cold_sink.dm +++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm @@ -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" diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm index adfd04e15a..01438c32d9 100644 --- a/code/ATMOSPHERICS/components/unary/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary/heat_source.dm @@ -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" diff --git a/code/ATMOSPHERICS/components/unary/outlet_injector.dm b/code/ATMOSPHERICS/components/unary/outlet_injector.dm index 571fc7dcb9..f070882ba8 100644 --- a/code/ATMOSPHERICS/components/unary/outlet_injector.dm +++ b/code/ATMOSPHERICS/components/unary/outlet_injector.dm @@ -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) diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index 6abdea210d..9590a9015e 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -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 diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index a5df87d7c2..4c386f44ec 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -4,6 +4,7 @@ name = "Air Scrubber" desc = "Has a valve and pump attached to it" + use_power = 1 level = 1 diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index 8e00cfbe83..38c6e8d8c2 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -7,6 +7,7 @@ obj/machinery/atmospherics/pipe force = 20 layer = 2.4 //under wires with their 2.44 + use_power = 0 var/alert_pressure = 80*ONE_ATMOSPHERE //minimum pressure before check_pressure(...) should be called diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index b294cf026e..f31e1a1a51 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -56,6 +56,18 @@ var/list/obj/machinery/requests_console/allConsoles = list() var/priority = -1 ; //Priority of the message being sent luminosity = 0 +/obj/machinery/requests_console/power_change() + ..() + update_icon() + +/obj/machinery/requests_console/update_icon() + if(stat & NOPOWER) + if(icon_state != "req_comp_off") + icon_state = "req_comp_off" + else + if(icon_state == "req_comp_off") + icon_state = "req_comp0" + /obj/machinery/requests_console/New() name = "[department] Requests Console" allConsoles += src @@ -95,6 +107,8 @@ var/list/obj/machinery/requests_console/allConsoles = list() /obj/machinery/requests_console/attack_hand(user as mob) + if(..(user)) + return var/dat dat = text("Requests Console

[department] Requests Console

") if(!open) diff --git a/icons/obj/terminals.dmi b/icons/obj/terminals.dmi index 82e55b340a..a3ad55381a 100644 Binary files a/icons/obj/terminals.dmi and b/icons/obj/terminals.dmi differ