Converts some istype's to use helpers (#3224)

Converts various istype's to use helpers. Mainly:
Cable
Wrench
Screwdriver
Multitool
Crowbar
Wirecutter

And makes the helpers defines.
This commit is contained in:
Ron
2017-08-06 15:08:42 -04:00
committed by Erki
parent ad96a34dd8
commit cb5e227320
219 changed files with 546 additions and 572 deletions

View File

@@ -37,11 +37,11 @@
return
else
name = ("bookcase ([newname])")
else if(istype(O,/obj/item/weapon/wrench))
else if(iswrench(O))
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user << (anchored ? "<span class='notice'>You unfasten \the [src] from the floor.</span>" : "<span class='notice'>You secure \the [src] to the floor.</span>")
anchored = !anchored
else if(istype(O,/obj/item/weapon/screwdriver))
else if(isscrewdriver(O))
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << "<span class='notice'>You begin dismantling \the [src].</span>"
if(do_after(user,25))
@@ -242,7 +242,7 @@
return
scanner.computer.inventory.Add(src)
user << "[W]'s screen flashes: 'Book stored in buffer. Title added to general inventory.'"
else if(istype(W, /obj/item/weapon/material/knife) || istype(W, /obj/item/weapon/wirecutters))
else if(istype(W, /obj/item/weapon/material/knife) || iswirecutter(W))
if(carved) return
user << "<span class='notice'>You begin to carve out [title].</span>"
if(do_after(user, 30))