Merge pull request #6618 from Crazylemon64/firedoor_robofix

Robots can now work with firelocks again
This commit is contained in:
Fox McCloud
2017-02-26 11:56:36 -05:00
committed by GitHub
2 changed files with 32 additions and 24 deletions
+3 -3
View File
@@ -118,8 +118,8 @@
/obj/machinery/door/attack_ghost(mob/user)
if(user.can_advanced_admin_interact())
return attack_hand(user)
return attack_hand(user)
/obj/machinery/door/attack_hand(mob/user)
return attackby(user, user)
@@ -132,7 +132,7 @@
if(istype(I, /obj/item/device/detective_scanner))
return
if(operating || isrobot(user))
if(operating || isrobot(user))
return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
add_fingerprint(user)
+29 -21
View File
@@ -23,7 +23,7 @@
var/can_force = TRUE
var/force_open_time = 300
var/can_crush = TRUE
var/assembly_type = /obj/structure/firelock_frame
var/assembly_type = /obj/structure/firelock_frame
var/nextstate = null
var/welded = FALSE
var/boltslocked = TRUE
@@ -31,9 +31,9 @@
var/active_alarm = FALSE
/obj/machinery/door/firedoor/Bumped(atom/AM)
if(p_open || operating)
if(p_open || operating)
return
if(!density)
if(!density)
return ..()
return 0
@@ -86,27 +86,27 @@
if(istype(C, /obj/item/weapon/crowbar) || istype(C, /obj/item/weapon/twohanded/fireaxe))
if(istype(C, /obj/item/weapon/twohanded/fireaxe))
var/obj/item/weapon/twohanded/fireaxe/F = C
var/obj/item/weapon/twohanded/fireaxe/F = C
if(!F.wielded)
return
user.visible_message("[user] forces \the [src] with [C].",
"You force \the [src] with [C].")
"You force \the [src] with [C].")
if(density)
autoclose = TRUE
open()
else
close()
/obj/machinery/door/firedoor/attack_hand(mob/user)
/obj/machinery/door/firedoor/attack_hand(mob/user)
if(operating || !density)
return
add_fingerprint(user)
if(can_force && (!glass || user.a_intent != I_HELP))
user.visible_message("<span class='notice'>[user] begins forcing \the [src].</span>", \
"<span class='notice'>You begin forcing \the [src].</span>")
"<span class='notice'>You begin forcing \the [src].</span>")
if(do_after(user, force_open_time, target = src))
user.visible_message("<span class='notice'>[user] forces \the [src].</span>", \
"<span class='notice'>You force \the [src].</span>")
@@ -116,14 +116,14 @@
user.changeNext_move(CLICK_CD_MELEE)
user.visible_message("<span class='warning'>[user] bangs on \the [src].</span>",
"<span class='warning'>You bang on \the [src].</span>")
playsound(get_turf(src), 'sound/effects/Glassknock.ogg', 10, 1)
playsound(get_turf(src), 'sound/effects/Glassknock.ogg', 10, 1)
/obj/machinery/door/firedoor/attack_ai(mob/user)
attack_hand(user)
forcetoggle()
/obj/machinery/door/firedoor/attack_ghost(mob/user)
if(user.can_advanced_admin_interact())
attack_hand(user)
forcetoggle(TRUE)
/obj/machinery/door/firedoor/attack_alien(mob/user)
add_fingerprint(user)
@@ -151,11 +151,11 @@
icon_state = "door_open"
if(welded)
overlays += "welded_open"
/obj/machinery/door/firedoor/proc/activate_alarm()
active_alarm = TRUE
update_icon()
/obj/machinery/door/firedoor/proc/deactivate_alarm()
active_alarm = FALSE
update_icon()
@@ -169,7 +169,7 @@
if(can_crush)
crush()
latetoggle()
/obj/machinery/door/firedoor/autoclose()
if(active_alarm)
. = ..()
@@ -184,7 +184,15 @@
if(CLOSED)
nextstate = null
close()
/obj/machinery/door/firedoor/proc/forcetoggle(magic = FALSE)
if(!magic && (operating || stat & NOPOWER))
return
if(density)
open()
else
close()
/obj/machinery/door/firedoor/proc/deconstruct(disassembled = TRUE)
if(can_deconstruct)
var/obj/structure/firelock_frame/F = new assembly_type(get_turf(src))
@@ -194,8 +202,8 @@
F.constructionStep = CONSTRUCTION_WIRES_EXPOSED
F.update_icon()
qdel(src)
/obj/machinery/door/firedoor/border_only
/obj/machinery/door/firedoor/border_only
icon = 'icons/obj/doors/edge_Doorfire.dmi'
flags = ON_BORDER
can_crush = FALSE
@@ -229,7 +237,7 @@
opacity = 1
assembly_type = /obj/structure/firelock_frame/heavy
can_force = FALSE
/obj/machinery/door/firedoor/heavy/ex_act(severity)
switch(severity)
if(1.0)
@@ -252,7 +260,7 @@
density = 1
var/constructionStep = CONSTRUCTION_NOCIRCUIT
var/reinforced = 0
/obj/structure/firelock_frame/heavy
name = "heavy firelock frame"
reinforced = 1
@@ -435,4 +443,4 @@
constructionStep = CONSTRUCTION_GUTTED
update_icon()
return
return ..()
return ..()