Merge pull request #5577 from Anewbe/grilles

Fixes a couple of tool related oversight/runtimes
This commit is contained in:
Neerti
2018-09-19 16:08:37 -04:00
committed by GitHub
2 changed files with 70 additions and 67 deletions

View File

@@ -205,6 +205,7 @@
/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob)
src.add_fingerprint(user)
if(istype(I))
if(istype(I, /obj/item/stack/material) && I.get_material_name() == src.get_material_name())
if(stat & BROKEN)
user << "<span class='notice'>It looks like \the [src] is pretty busted. It's going to need more than just patching up now.</span>"
@@ -275,9 +276,11 @@
take_damage(W.force)
return
if(src.operating > 0 || isrobot(user)) return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
if(src.operating > 0 || isrobot(user))
return //borgs can't attack doors open because it conflicts with their AI-like interaction with them.
if(src.operating) return
if(src.operating)
return
if(src.allowed(user) && operable())
if(src.density)

View File

@@ -93,7 +93,7 @@
src.health -= damage*0.2
spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/grille/attackby(obj/item/W as obj, mob/user as mob)
if(!istype(W))
return
if(W.is_wirecutter())
@@ -109,7 +109,7 @@
"<span class='notice'>You have [anchored ? "fastened the grille to" : "unfastened the grille from"] the floor.</span>")
return
//window placing begin //TODO CONVERT PROPERLY TO MATERIAL DATUM
//window placing begin //TODO CONVERT PROPERLY TO MATERIAL DATUM
else if(istype(W,/obj/item/stack/material))
var/obj/item/stack/material/ST = W
if(!ST.material.created_window)