Converts most istype(thing,tool) procs into an appropriate thing.is_tool() format

This commit is contained in:
Anewbe
2018-08-02 21:45:15 -05:00
parent 8b6377016f
commit 729ce71aa0
294 changed files with 20414 additions and 3197 deletions

View File

@@ -264,13 +264,13 @@
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
interact(user)
return TRUE
else if(istype(I, /obj/item/weapon/crowbar))
else if(I.is_crowbar())
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
opened = !opened
to_chat(user, "<span class='notice'>You [opened ? "opened" : "closed"] \the [src].</span>")
update_icon()
return TRUE
else if(istype(I, /obj/item/device/integrated_electronics/wirer) || istype(I, /obj/item/device/integrated_electronics/debugger) || istype(I, /obj/item/weapon/screwdriver))
else if(istype(I, /obj/item/device/integrated_electronics/wirer) || istype(I, /obj/item/device/integrated_electronics/debugger) || I.is_screwdriver())
if(opened)
interact(user)
else

View File

@@ -12,7 +12,7 @@
..()
/obj/item/device/assembly/electronic_assembly/attackby(obj/item/I as obj, mob/user as mob)
if (iscrowbar(I) )
if (I.is_crowbar())
toggle_open(user)
else if (opened)
EA.attackby(I, user)

View File

@@ -261,11 +261,11 @@
/obj/item/weapon/storage/bag/circuits/mini,
/obj/item/device/electronic_assembly,
/obj/item/device/integrated_electronics,
/obj/item/weapon/crowbar,
/obj/item/weapon/screwdriver,
/obj/item/weapon/tool/crowbar,
/obj/item/weapon/tool/screwdriver,
/obj/item/device/multitool
)
cant_hold = list(/obj/item/weapon/screwdriver/power)
cant_hold = list(/obj/item/weapon/tool/screwdriver/power)
/obj/item/weapon/storage/bag/circuits/basic/New()
..()
@@ -290,8 +290,8 @@
new /obj/item/device/assembly/electronic_assembly(src)
new /obj/item/device/assembly/electronic_assembly(src)
new /obj/item/device/multitool(src)
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/weapon/tool/screwdriver(src)
new /obj/item/weapon/tool/crowbar(src)
make_exact_fit()
/obj/item/weapon/storage/bag/circuits/all/New()
@@ -317,7 +317,7 @@
new /obj/item/device/electronic_assembly/drone(src)
new /obj/item/device/integrated_electronics/wirer(src)
new /obj/item/device/integrated_electronics/debugger(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/weapon/tool/crowbar(src)
make_exact_fit()
/obj/item/weapon/storage/bag/circuits/mini/

View File

@@ -32,13 +32,13 @@
if(istype(O, /obj/item/weapon/gun))
var/obj/item/weapon/gun/gun = O
if(installed_gun)
user << "<span class='warning'>There's already a weapon installed.</span>"
to_chat(user, "<span class='warning'>There's already a weapon installed.</span>")
return
user.drop_from_inventory(gun)
installed_gun = gun
size += gun.w_class
gun.forceMove(src)
user << "<span class='notice'>You slide \the [gun] into the firing mechanism.</span>"
to_chat(user, "<span class='notice'>You slide \the [gun] into the firing mechanism.</span>")
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
else
..()
@@ -46,12 +46,12 @@
/obj/item/integrated_circuit/manipulation/weapon_firing/attack_self(var/mob/user)
if(installed_gun)
installed_gun.forceMove(get_turf(src))
user << "<span class='notice'>You slide \the [installed_gun] out of the firing mechanism.</span>"
to_chat(user, "<span class='notice'>You slide \the [installed_gun] out of the firing mechanism.</span>")
size = initial(size)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
installed_gun = null
else
user << "<span class='notice'>There's no weapon to remove from the mechanism.</span>"
to_chat(user, "<span class='notice'>There's no weapon to remove from the mechanism.</span>")
/obj/item/integrated_circuit/manipulation/weapon_firing/do_work()
if(!installed_gun)