diff --git a/code/defines/obj/machinery.dm b/code/defines/obj/machinery.dm index 3f4c6708fe..19d4745390 100644 --- a/code/defines/obj/machinery.dm +++ b/code/defines/obj/machinery.dm @@ -262,6 +262,8 @@ icon_state = "doorctrl0" desc = "A remote control switch for a door." var/id = null + var/range = 10 + var/normaldoorcontrol = 0 anchored = 1.0 use_power = 1 idle_power_usage = 2 diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index fa22d982d4..fb5ee48c6e 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -15,16 +15,28 @@ use_power(5) icon_state = "doorctrl1" - for(var/obj/machinery/door/poddoor/M in machines) - if (M.id == src.id) - if (M.density) - spawn( 0 ) - M.open() - return - else - spawn( 0 ) - M.close() - return + if(normaldoorcontrol) + for(var/obj/machinery/door/airlock/D in range(range)) + if(D.id_tag == src.id) + if (D.density) + spawn( 0 ) + D.open() + return + else + spawn( 0 ) + // D.close() + return + else + for(var/obj/machinery/door/poddoor/M in machines) + if (M.id == src.id) + if (M.density) + spawn( 0 ) + M.open() + return + else + spawn( 0 ) + M.close() + return spawn(15) if(!(stat & NOPOWER)) diff --git a/maps/tgstation.2.0.8.dmm b/maps/tgstation.2.0.8.dmm index 1424985d13..8973f423f8 100755 --- a/maps/tgstation.2.0.8.dmm +++ b/maps/tgstation.2.0.8.dmm @@ -3171,7 +3171,7 @@ "biY" = (/obj/structure/table,/obj/item/weapon/reagent_containers/food/condiment/peppermill,/turf/simulated/floor{icon_state = "bar"},/area/crew_quarters/cafeteria) "biZ" = (/obj/machinery/firealarm{dir = 4; pixel_x = 24},/turf/simulated/floor{icon_state = "bar"},/area/crew_quarters/cafeteria) "bja" = (/obj/structure/filingcabinet,/turf/simulated/floor{icon_state = "white"},/area/medical/medbay) -"bjb" = (/obj/structure/stool/bed/chair{dir = 4},/obj/effect/landmark/start{name = "Medical Doctor"},/turf/simulated/floor{icon_state = "white"},/area/medical/medbay) +"bjb" = (/obj/structure/stool/bed/chair{dir = 4},/obj/effect/landmark/start{name = "Medical Doctor"},/obj/machinery/door_control{desc = "A remote control switch for the medbay foyer."; dir = 2; id = "MedbayFoyer"; name = "Medbay Doors Control"; normaldoorcontrol = 1; pixel_x = 26; pixel_y = 0; range = 6},/turf/simulated/floor{icon_state = "white"},/area/medical/medbay) "bjc" = (/obj/machinery/light{icon_state = "tube1"; dir = 4},/turf/simulated/floor{icon_state = "white"},/area/medical/medbay) "bjd" = (/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = "90Curve"},/obj/structure/disposalpipe/segment{dir = 4; icon_state = "pipe-c"},/turf/simulated/floor{icon_state = "dark"},/area/medical/morgue) "bje" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/medical{name = "Morgue"; req_access_txt = "6;5"},/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; tag = "Streight"},/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor{icon_state = "dark"},/area/medical/morgue) @@ -3289,8 +3289,8 @@ "blm" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/glass{name = "Medbay"; req_access_txt = "5"},/turf/simulated/floor{icon_state = "white"},/area/medical/medbay) "bln" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/turf/simulated/floor/plating,/area/medical/medbay) "blo" = (/obj/effect/sign/redcross,/turf/simulated/wall,/area/medical/medbay) -"blp" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/glass{name = "Medbay"; req_access_txt = "5"; req_one_access_txt = "1"},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor{icon_state = "white"},/area/medical/medbay) -"blq" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/glass{name = "Medbay"; req_access_txt = "5"; req_one_access_txt = "1"},/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor{icon_state = "white"},/area/medical/medbay) +"blp" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/glass{id_tag = "MedbayFoyer"; name = "Medbay"; req_access_txt = "5"; req_one_access_txt = "1"},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor{icon_state = "white"},/area/medical/medbay) +"blq" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/glass{id_tag = "MedbayFoyer"; name = "Medbay"; req_access_txt = "5"; req_one_access_txt = "1"},/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor{icon_state = "white"},/area/medical/medbay) "blr" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = "Streight"},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor{icon_state = "white"},/area/medical/medbay) "bls" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor{icon_state = "white"},/area/medical/medbay) "blt" = (/obj/machinery/door/firedoor/border_only,/obj/structure/table/reinforced,/obj/machinery/door/window/westleft{name = "Chemistry Desk"},/obj/machinery/door/window/eastright{name = "Chemistry Desk"; req_access_txt = "33"},/turf/simulated/floor{icon_state = "white"},/area/medical/chemistry)