mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Makes clicking on airlocks work again.
This commit is contained in:
@@ -727,7 +727,7 @@ About the new airlock wires panel:
|
||||
update_icon()
|
||||
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)
|
||||
if(!istype(usr, /mob/living/silicon))
|
||||
if(src.isElectrified())
|
||||
@@ -737,6 +737,9 @@ About the new airlock wires panel:
|
||||
return
|
||||
|
||||
src.add_fingerprint(user)
|
||||
if(istype(C, /mob/living))
|
||||
..()
|
||||
return
|
||||
if(!repairing && (istype(C, /obj/item/weapon/weldingtool) && !( src.operating > 0 ) && src.density))
|
||||
var/obj/item/weapon/weldingtool/W = C
|
||||
if(W.remove_fuel(0,user))
|
||||
@@ -810,22 +813,24 @@ About the new airlock wires panel:
|
||||
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).
|
||||
else if((C.pry == 1) && !arePowerSystemsOn())
|
||||
if(locked)
|
||||
user << "<span class='notice'>The airlock's bolts prevent it from being forced.</span>"
|
||||
else if( !welded && !operating )
|
||||
if(istype(C, /obj/item/weapon/material/twohanded/fireaxe)) // If this is a fireaxe, make sure it's held in two hands.
|
||||
var/obj/item/weapon/material/twohanded/fireaxe/F = C
|
||||
if(!F.wielded)
|
||||
user << "<span class='warning'>You need to be wielding \the [F] to do that.</span>"
|
||||
return
|
||||
// At this point, it's an armblade or a fireaxe that passed the wielded test, let's try to open it.
|
||||
if(density)
|
||||
spawn(0)
|
||||
open(1)
|
||||
else
|
||||
spawn(0)
|
||||
close(1)
|
||||
else if(istype(C, /obj/item/weapon))
|
||||
var/obj/item/weapon/W = C
|
||||
if((W.pry == 1) && !arePowerSystemsOn())
|
||||
if(locked)
|
||||
user << "<span class='notice'>The airlock's bolts prevent it from being forced.</span>"
|
||||
else if( !welded && !operating )
|
||||
if(istype(C, /obj/item/weapon/material/twohanded/fireaxe)) // If this is a fireaxe, make sure it's held in two hands.
|
||||
var/obj/item/weapon/material/twohanded/fireaxe/F = C
|
||||
if(!F.wielded)
|
||||
user << "<span class='warning'>You need to be wielding \the [F] to do that.</span>"
|
||||
return
|
||||
// At this point, it's an armblade or a fireaxe that passed the wielded test, let's try to open it.
|
||||
if(density)
|
||||
spawn(0)
|
||||
open(1)
|
||||
else
|
||||
spawn(0)
|
||||
close(1)
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user