diff --git a/_maps/map_files/BirdStation/BirdStation.dmm b/_maps/map_files/BirdStation/BirdStation.dmm index f0ff541230e..894e04e8f60 100644 --- a/_maps/map_files/BirdStation/BirdStation.dmm +++ b/_maps/map_files/BirdStation/BirdStation.dmm @@ -701,7 +701,7 @@ "any" = (/obj/machinery/atmospherics/pipe/manifold/supply/hidden{dir = 1},/turf/simulated/wall,/area/engine/engineering) "anz" = (/obj/machinery/atmospherics/components/unary/portables_connector/visible{dir = 8},/obj/machinery/portable_atmospherics/pump,/turf/simulated/floor/plasteel,/area/hallway/primary/port{name = "\improper Northwest Hallway"}) "anA" = (/obj/machinery/atmospherics/pipe/manifold/scrubbers/hidden{dir = 8},/turf/simulated/floor/plasteel,/area/hallway/primary/port{name = "\improper Northwest Hallway"}) -"anB" = (/obj/machinery/atmospherics/components/unary/portables_connector/visible{dir = 8},/obj/machinery/portable_atmospherics/scrubber/huge,/turf/simulated/floor/plasteel,/area/hallway/primary/port{name = "\improper Northwest Hallway"}) +"anB" = (/obj/machinery/atmospherics/components/unary/portables_connector/visible{dir = 8},/obj/machinery/portable_atmospherics/scrubber/huge/movable,/turf/simulated/floor/plasteel,/area/hallway/primary/port{name = "\improper Northwest Hallway"}) "anC" = (/turf/simulated/floor/plasteel,/area/hallway/primary/port{name = "\improper Northwest Hallway"}) "anD" = (/obj/structure/cable/cyan{icon_state = "2-4"},/obj/machinery/atmospherics/pipe/simple/cyan/hidden,/turf/simulated/floor/plasteel,/area/hallway/primary/port{name = "\improper Northwest Hallway"}) "anE" = (/obj/machinery/door/airlock/command{name = "teleporter door"; req_access_txt = "17"},/obj/structure/cable/cyan{icon_state = "4-8"},/turf/simulated/floor/plasteel,/area/teleporter{name = "\improper Teleporter Room"}) @@ -730,7 +730,7 @@ "aob" = (/obj/machinery/door/airlock/glass_engineering{name = "engineering door"; req_access_txt = "10"; req_one_access_txt = "0"},/obj/structure/cable/cyan{icon_state = "1-2"},/turf/simulated/floor/plasteel,/area/engine/engineering) "aoc" = (/obj/machinery/atmospherics/pipe/manifold/supply/hidden{dir = 8},/turf/simulated/wall,/area/engine/engineering) "aod" = (/obj/machinery/atmospherics/components/unary/portables_connector/visible{dir = 8},/obj/machinery/portable_atmospherics/pump,/obj/machinery/light{dir = 8},/turf/simulated/floor/plasteel,/area/hallway/primary/port{name = "\improper Northwest Hallway"}) -"aoe" = (/obj/machinery/atmospherics/components/unary/portables_connector/visible{dir = 8},/obj/machinery/portable_atmospherics/scrubber/huge,/obj/machinery/camera/autoname{icon_state = "camera"; dir = 9},/turf/simulated/floor/plasteel,/area/hallway/primary/port{name = "\improper Northwest Hallway"}) +"aoe" = (/obj/machinery/atmospherics/components/unary/portables_connector/visible{dir = 8},/obj/machinery/portable_atmospherics/scrubber/huge/movable,/obj/machinery/camera/autoname{icon_state = "camera"; dir = 9},/turf/simulated/floor/plasteel,/area/hallway/primary/port{name = "\improper Northwest Hallway"}) "aof" = (/turf/simulated/wall,/area/hallway/primary/port{name = "\improper Northwest Hallway"}) "aog" = (/obj/machinery/power/apc{dir = 8; name = "Northwest Hallway APC"; pixel_x = -24},/obj/structure/cable/cyan{icon_state = "0-2"},/turf/simulated/floor/plasteel,/area/hallway/primary/port{name = "\improper Northwest Hallway"}) "aoh" = (/obj/structure/cable/cyan{icon_state = "1-2"},/obj/machinery/light{dir = 4; icon_state = "tube1"},/obj/machinery/atmospherics/pipe/simple/cyan/hidden,/turf/simulated/floor/plasteel,/area/hallway/primary/port{name = "\improper Northwest Hallway"}) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index eac0c535cbd..08b64bb3234 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -6,6 +6,7 @@ var/icon_state_open = "cold_off" density = TRUE anchored = TRUE + idle_power_usage = 25 var/on = FALSE var/min_temperature = 0 diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index db5d12938ad..7381da4889d 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -21,7 +21,7 @@ pressure_resistance = 7 * ONE_ATMOSPHERE var/temperature_resistance = 1000 + T0C - var/update_flag = 0 + var/update = 0 var/static/list/label2types = list( "n2" = /obj/machinery/portable_atmospherics/canister/nitrogen, "o2" = /obj/machinery/portable_atmospherics/canister/oxygen, @@ -90,26 +90,57 @@ air_contents.gases["o2"][MOLES] = (O2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature) air_contents.gases["n2"][MOLES] = (N2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature) +#define HOLDING 1 +#define CONNECTED 2 +#define EMPTY 4 +#define LOW 8 +#define FULL 16 +#define DANGER 32 /obj/machinery/portable_atmospherics/canister/update_icon() if(destroyed) - overlays = 0 + overlays.Cut() icon_state = "[initial(icon_state)]-1" return - overlays.Cut() + var/last_update = update + update = 0 + if(holding) - overlays += "can-open" + update |= HOLDING if(connected_port) - overlays += "can-connector" + update |= CONNECTED var/pressure = air_contents.return_pressure() if(pressure < 10) - overlays += "can-o0" + update |= EMPTY else if(pressure < ONE_ATMOSPHERE) - overlays += "can-o1" + update |= LOW else if(pressure < 15 * ONE_ATMOSPHERE) - overlays += "can-o2" + update |= FULL else + update |= DANGER + + if(update == last_update) + return + + overlays.Cut() + if(update & HOLDING) + overlays += "can-open" + if(update & CONNECTED) + overlays += "can-connector" + if(update & EMPTY) + overlays += "can-o0" + else if(update & LOW) + overlays += "can-o1" + else if(update & FULL) + overlays += "can-o2" + else if(update & DANGER) overlays += "can-o3" +#undef HOLDING +#undef CONNECTED +#undef EMPTY +#undef LOW +#undef FULL +#undef DANGER /obj/machinery/portable_atmospherics/canister/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) if(exposed_temperature > temperature_resistance) diff --git a/code/modules/atmospherics/machinery/portable/scrubber.dm b/code/modules/atmospherics/machinery/portable/scrubber.dm index 52cc1aa6434..82098daf373 100644 --- a/code/modules/atmospherics/machinery/portable/scrubber.dm +++ b/code/modules/atmospherics/machinery/portable/scrubber.dm @@ -97,18 +97,26 @@ /obj/machinery/portable_atmospherics/scrubber/huge name = "huge air scrubber" icon_state = "scrubber:0" - anchored = 1 + anchored = TRUE + active_power_usage = 500 + idle_power_usage = 10 volume_rate = 1500 volume = 50000 + var/movable = FALSE + +/obj/machinery/portable_atmospherics/scrubber/huge/movable + movable = TRUE + /obj/machinery/portable_atmospherics/scrubber/huge/update_icon() icon_state = "scrubber:[on]" /obj/machinery/portable_atmospherics/scrubber/huge/process_atmos() - if(!anchored) + if((!anchored && !movable) || !is_operational()) on = FALSE update_icon() + use_power = 1 + on if(!on) return @@ -120,6 +128,7 @@ /obj/machinery/portable_atmospherics/scrubber/huge/attackby(obj/item/weapon/W, mob/user) if(default_unfasten_wrench(user, W)) - on = FALSE + if(!movable) + on = FALSE else ..() diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index d1b4c5a01ec..6e8c3607a00 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -50,10 +50,8 @@ // returns true if the area has power on given channel (or doesn't require power). // defaults to power_channel /obj/machinery/proc/powered(var/chan = -1) // defaults to power_channel - - if(!src.loc) + if(!loc) return 0 - if(!use_power) return 1