TG: Adds two new vars to door_control.dm, normaldoorcontrol and range

If normaldoorcontrol is set, checks the id_tag of all airlocks in range against
its ID and opens it if they match.  Currently only opens.
Adds buttons to open medbay foyer and genetics.
 Revision: r2929
Author: 	 VivianFoxfoo
This commit is contained in:
Ren Erthilo
2012-04-15 15:54:41 +01:00
parent 1db2a54206
commit c670b3d496
3 changed files with 27 additions and 13 deletions

View File

@@ -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

View File

@@ -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))