From 02ecc3da752f7dc2806d9e551115a2dc3a14cd8c Mon Sep 17 00:00:00 2001 From: Ren Erthilo Date: Sun, 15 Apr 2012 18:41:41 +0100 Subject: [PATCH] TG: Added in stationary, super-high-capacity scrubbers. Currently two are located in the toxins gas storage room and one in the incinerator. They are controlled by an area air control computer, so you can turn them on at a distance. Added into code a legacy emergency closet which contains one oxygen tank and one gas mask, committing my version of oldstation. It still needs lighting and wires added as well as room wall-mounted things like air alarms, fire alarms, light switches and lights. Revision: r2955 Author: baloh.matevz --- baystation12.dme | 1 + code/defines/obj/closet.dm | 2 + .../atmoalter/area_atmos_computer.dm | 69 +++++++++++++++++++ code/game/machinery/atmoalter/scrubber.dm | 21 ++++++ code/game/objects/closets/emergency.dm | 4 ++ 5 files changed, 97 insertions(+) create mode 100644 code/game/machinery/atmoalter/area_atmos_computer.dm diff --git a/baystation12.dme b/baystation12.dme index 75d35c11776..4d995fb5723 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -502,6 +502,7 @@ #include "code\game\machinery\turrets.dm" #include "code\game\machinery\vending.dm" #include "code\game\machinery\walllockers.dm" +#include "code\game\machinery\atmoalter\area_atmos_computer.dm" #include "code\game\machinery\atmoalter\canister.dm" #include "code\game\machinery\atmoalter\meter.dm" #include "code\game\machinery\atmoalter\portable_atmospherics.dm" diff --git a/code/defines/obj/closet.dm b/code/defines/obj/closet.dm index 19256103605..652a89cac76 100644 --- a/code/defines/obj/closet.dm +++ b/code/defines/obj/closet.dm @@ -52,6 +52,8 @@ icon_closed = "emergency" icon_opened = "emergencyopen" +/obj/structure/closet/emcloset/legacy + /obj/structure/closet/firecloset name = "Fire Closet" desc = "A bulky (yet mobile) closet. Comes with supplies to fight fire." diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm new file mode 100644 index 00000000000..8a6853cf32b --- /dev/null +++ b/code/game/machinery/atmoalter/area_atmos_computer.dm @@ -0,0 +1,69 @@ +/obj/machinery/computer/area_atmos + name = "Area Air Control" + desc = "A computer used to control the stationary scrubbers and pumps in the area." + icon_state = "computer_generic" + var/scrubber_state = 0 //0 = off; 1 = on + + + attack_ai(var/mob/user as mob) + return src.attack_hand(user) + + attack_paw(var/mob/user as mob) + return + + attack_hand(var/mob/user as mob) + src.add_fingerprint(usr) + var/dat = text("
Area Air Control:
Turn area scrubbers [scrubber_state?"off":"on"]
") + user << browse("[dat]", "window=miningshuttle;size=200x100") + + Topic(href, href_list) + if(..()) + return + usr.machine = src + src.add_fingerprint(usr) + if(href_list["scrubbers"]) + toggle_scrubbers() + usr << "\blue Area scrubbers turned [scrubber_state?"on":"off"]" + + proc/toggle_scrubbers() + if( (ishuman(usr)||issilicon(usr)) && !usr.stat && !usr.restrained() ) + scrubber_state = !scrubber_state + var/turf/T = get_turf(src) + if(!T.loc) return + var/area/A = T.loc + if (A.master) + A = A.master + for( var/obj/machinery/portable_atmospherics/scrubber/stationary/SCRUBBER in world ) + var/turf/T2 = get_turf(SCRUBBER) + if ( T2 && T2.loc) + var/area/A2 = T2.loc + if ( istype(A2) && A2.master && A2.master == A ) + SCRUBBER.on = scrubber_state + SCRUBBER.update_icon() + + + + +/obj/machinery/computer/mining_shuttle/attack_hand(user as mob) + src.add_fingerprint(usr) + var/dat + dat = text("
Mining shuttle:
Send
") + user << browse("[dat]", "window=miningshuttle;size=200x100") + +/obj/machinery/computer/mining_shuttle/Topic(href, href_list) + if(..()) + return + usr.machine = src + src.add_fingerprint(usr) + if(href_list["move"]) + if(ticker.mode.name == "blob") + if(ticker.mode:declared) + usr << "Under directive 7-10, [station_name()] is quarantined until further notice." + return + + if (!mining_shuttle_moving) + usr << "\blue Shuttle recieved message and will be sent shortly." + move_mining_shuttle() + else + usr << "\blue Shuttle is already moving." + diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index 9aa0d7e821a..cec39215e6b 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -10,6 +10,27 @@ volume = 750 + stationary + name = "Stationary Air Scrubber" + icon_state = "scrubber:0" + anchored = 1 + volume = 30000 + volume_rate = 5000 + + attack_hand(var/mob/user as mob) + usr << "\blue You can't directly interact with this machine. Use the area atmos computer." + + update_icon() + src.overlays = 0 + + if(on) + icon_state = "scrubber:1" + else + icon_state = "scrubber:0" + + attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) + return + /obj/machinery/portable_atmospherics/scrubber/update_icon() src.overlays = 0 diff --git a/code/game/objects/closets/emergency.dm b/code/game/objects/closets/emergency.dm index 80e87c6367f..2b7d5b97225 100644 --- a/code/game/objects/closets/emergency.dm +++ b/code/game/objects/closets/emergency.dm @@ -14,3 +14,7 @@ while(prob(60) && counter < 3) new /obj/item/clothing/mask/breath(src) counter++ + +/obj/structure/closet/emcloset/legacy/New() + new /obj/item/weapon/tank/oxygen(src) + new /obj/item/clothing/mask/gas(src) \ No newline at end of file