Makes clicking on airlocks work again.

This commit is contained in:
Neerti
2016-07-09 22:37:51 -04:00
parent 108a8743f5
commit 06b97aa990

View File

@@ -727,7 +727,7 @@ About the new airlock wires panel:
update_icon() update_icon()
return 1 return 1
/obj/machinery/door/airlock/attackby(obj/C as obj, mob/user as mob) /obj/machinery/door/airlock/attackby(C as obj, mob/user as mob)
//world << text("airlock attackby src [] obj [] mob []", src, C, user) //world << text("airlock attackby src [] obj [] mob []", src, C, user)
if(!istype(usr, /mob/living/silicon)) if(!istype(usr, /mob/living/silicon))
if(src.isElectrified()) if(src.isElectrified())
@@ -737,6 +737,9 @@ About the new airlock wires panel:
return return
src.add_fingerprint(user) src.add_fingerprint(user)
if(istype(C, /mob/living))
..()
return
if(!repairing && (istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density)) if(!repairing && (istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density))
var/obj/item/weapon/weldingtool/W = C var/obj/item/weapon/weldingtool/W = C
if(W.remove_fuel(0,user)) if(W.remove_fuel(0,user))
@@ -810,22 +813,24 @@ About the new airlock wires panel:
spawn(0) close(1) spawn(0) close(1)
// Check if we're using a crowbar or armblade, and if the airlock's unpowered for whatever reason (off, broken, etc). // Check if we're using a crowbar or armblade, and if the airlock's unpowered for whatever reason (off, broken, etc).
else if((C.pry == 1) && !arePowerSystemsOn()) else if(istype(C, /obj/item/weapon))
if(locked) var/obj/item/weapon/W = C
user << "<span class='notice'>The airlock's bolts prevent it from being forced.</span>" if((W.pry == 1) && !arePowerSystemsOn())
else if( !welded && !operating ) if(locked)
if(istype(C, /obj/item/weapon/material/twohanded/fireaxe)) // If this is a fireaxe, make sure it's held in two hands. user << "<span class='notice'>The airlock's bolts prevent it from being forced.</span>"
var/obj/item/weapon/material/twohanded/fireaxe/F = C else if( !welded && !operating )
if(!F.wielded) if(istype(C, /obj/item/weapon/material/twohanded/fireaxe)) // If this is a fireaxe, make sure it's held in two hands.
user << "<span class='warning'>You need to be wielding \the [F] to do that.</span>" var/obj/item/weapon/material/twohanded/fireaxe/F = C
return if(!F.wielded)
// At this point, it's an armblade or a fireaxe that passed the wielded test, let's try to open it. user << "<span class='warning'>You need to be wielding \the [F] to do that.</span>"
if(density) return
spawn(0) // At this point, it's an armblade or a fireaxe that passed the wielded test, let's try to open it.
open(1) if(density)
else spawn(0)
spawn(0) open(1)
close(1) else
spawn(0)
close(1)
else else
..() ..()
return return