NanoUI synth airlock update

This commit is contained in:
Markolie
2015-03-03 18:45:22 +01:00
parent 4dd857e022
commit 1db034a8f8
8 changed files with 156 additions and 115 deletions
+2 -1
View File
@@ -19,6 +19,7 @@
if(istype(door,/obj/machinery/door/airlock/hatch/gamma))
return
if(istype(door,/obj/machinery/door/airlock))
door:unlock(1) //forced because it's magic!
var/obj/machinery/door/airlock/A = door
A.unlock(1) //forced because it's magic!
door.open()
return
+6 -18
View File
@@ -74,8 +74,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
if(!mended)
//Cutting this wire also drops the door bolts, and mending it does not raise them. (This is what happens now, except there are a lot more wires going to door bolts at present)
if(A.locked!=1)
A.locked = 1
A.lock(1)
A.update_icon()
if(AIRLOCK_WIRE_AI_CONTROL)
@@ -96,12 +95,9 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
if(AIRLOCK_WIRE_ELECTRIFY)
if(!mended)
//Cutting this wire electrifies the door, so that the next person to touch the door without insulated gloves gets electrocuted.
if(A.electrified_until != -1)
A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
add_logs(usr, A, "electrified", null, addition="at [A.x],[A.y],[A.z]")
A.electrified_until = -1
A.electrify(-1)
else
A.electrified_until = 0
A.electrify(0)
return // Don't update the dialog.
if (AIRLOCK_WIRE_SAFETY)
@@ -135,13 +131,9 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
//one wire for door bolts. Sending a pulse through this drops door bolts if they're not down (whether power's on or not),
//raises them if they are down (only if power's on)
if(!A.locked)
A.locked = 1
A.audible_message("You hear a click from the bottom of the door.", null, 1)
A.lock()
else
if(A.arePowerSystemsOn()) //only can raise bolts if power's on
A.locked = 0
A.audible_message("You hear a click from the bottom of the door.", null, 1)
A.update_icon()
A.unlock()
if(AIRLOCK_WIRE_BACKUP_POWER1 || AIRLOCK_WIRE_BACKUP_POWER2)
//two wires for backup power. Sending a pulse through either one causes a breaker to trip, but this does not disable it unless main power is down too (in which case it is disabled for 1 minute or however long it takes main power to come back, whichever is shorter).
@@ -161,11 +153,7 @@ var/const/AIRLOCK_WIRE_LIGHT = 2048
if(AIRLOCK_WIRE_ELECTRIFY)
//one wire for electrifying the door. Sending a pulse through this electrifies the door for 30 seconds.
if(A.electrified_until >= 0)
A.shockedby += text("\[[time_stamp()]\][usr](ckey:[usr.ckey])")
add_logs(usr, A, "electrified", null, addition="at [A.x],[A.y],[A.z]")
A.electrified_until = world.time + SecondsToTicks(30)
return
A.electrify(30)
if(AIRLOCK_WIRE_OPEN_DOOR)
//tries to open the door without ID
//will succeed only if the ID wire is cut or the door requires no access and it's not emagged