mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Converts most istype(thing,tool) procs into an appropriate thing.is_tool() format
This commit is contained in:
@@ -32,16 +32,16 @@
|
||||
/obj/machinery/slime/extractor/attackby(var/obj/item/W, var/mob/user)
|
||||
|
||||
//Let's try to deconstruct first.
|
||||
if(istype(W, /obj/item/weapon/screwdriver) && !inuse)
|
||||
if(W.is_screwdriver() && !inuse)
|
||||
default_deconstruction_screwdriver(user, W)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(W.is_crowbar())
|
||||
default_deconstruction_crowbar(user, W)
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
user << "<span class='warning'>Close the panel first!</span>"
|
||||
to_chat(user, "<span class='warning'>Close the panel first!</span>")
|
||||
|
||||
var/obj/item/weapon/grab/G = W
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
return ..()
|
||||
|
||||
if(G.state < 2)
|
||||
user << "<span class='danger'>You need a better grip to do that!</span>"
|
||||
to_chat(user, "<span class='danger'>You need a better grip to do that!</span>")
|
||||
return
|
||||
|
||||
move_into_extractor(user,G.affecting)
|
||||
@@ -62,20 +62,20 @@
|
||||
/obj/machinery/slime/extractor/proc/move_into_extractor(var/mob/user,var/mob/living/victim)
|
||||
|
||||
if(src.occupant)
|
||||
user << "<span class='danger'>The core extractor is full, empty it first!</span>"
|
||||
to_chat(user, "<span class='danger'>The core extractor is full, empty it first!</span>")
|
||||
return
|
||||
|
||||
if(inuse)
|
||||
user << "<span class='danger'>The core extractor is locked and running, wait for it to finish.</span>"
|
||||
to_chat(user, "<span class='danger'>The core extractor is locked and running, wait for it to finish.</span>")
|
||||
return
|
||||
|
||||
if(!(istype(victim, /mob/living/simple_animal/xeno/slime)) )
|
||||
user << "<span class='danger'>This is not a suitable subject for the core extractor!</span>"
|
||||
if(!(istype(victim, /mob/living/simple_animal/xeno/slime)))
|
||||
to_chat(user, "<span class='danger'>This is not a suitable subject for the core extractor!</span>")
|
||||
return
|
||||
|
||||
var/mob/living/simple_animal/xeno/slime/S = victim
|
||||
if(S.is_child)
|
||||
user << "<span class='danger'>This subject is not developed enough for the core extractor!</span>"
|
||||
to_chat(user, "<span class='danger'>This subject is not developed enough for the core extractor!</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>[user] starts to put [victim] into the core extractor!</span>")
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
if(genes.len)
|
||||
var/choice = alert(user, "Are you sure you want to wipe the disk?", "Xenobiological Data", "No", "Yes")
|
||||
if(src && user && genes && choice && choice == "Yes" && user.Adjacent(get_turf(src)))
|
||||
user << "You wipe the disk data."
|
||||
to_chat(user, "You wipe the disk data.")
|
||||
name = initial(name)
|
||||
desc = initial(name)
|
||||
genes = list()
|
||||
@@ -67,24 +67,24 @@
|
||||
return
|
||||
if(istype(W,/obj/item/weapon/disk/xenobio))
|
||||
if(loaded_disk)
|
||||
user << "There is already a data disk loaded."
|
||||
to_chat(user, "There is already a data disk loaded.")
|
||||
return
|
||||
else
|
||||
var/obj/item/weapon/disk/xenobio/B = W
|
||||
|
||||
if(B.genes && B.genes.len)
|
||||
if(!disk_needs_genes)
|
||||
user << "That disk already has gene data loaded."
|
||||
to_chat(user, "That disk already has gene data loaded.")
|
||||
return
|
||||
else
|
||||
if(disk_needs_genes)
|
||||
user << "That disk does not have any gene data loaded."
|
||||
to_chat(user, "That disk does not have any gene data loaded.")
|
||||
return
|
||||
|
||||
user.drop_from_inventory(W)
|
||||
W.forceMove(src)
|
||||
loaded_disk = W
|
||||
user << "You load [W] into [src]."
|
||||
to_chat(user, "You load [W] into [src].")
|
||||
|
||||
return
|
||||
..()
|
||||
@@ -137,14 +137,14 @@
|
||||
/obj/machinery/xenobio/extractor/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/xenoproduct))
|
||||
if(product)
|
||||
user << "There is already a xenobiological product loaded."
|
||||
to_chat(user, "There is already a xenobiological product loaded.")
|
||||
return
|
||||
else
|
||||
var/obj/item/xenoproduct/B = W
|
||||
user.drop_from_inventory(B)
|
||||
B.forceMove(src)
|
||||
product = B
|
||||
user << "You load [B] into [src]."
|
||||
to_chat(user, "You load [B] into [src].")
|
||||
|
||||
return
|
||||
..()
|
||||
@@ -280,7 +280,7 @@
|
||||
if(istype(W,/obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(occupant)
|
||||
user << "There is already an organism loaded."
|
||||
to_chat(user, "There is already an organism loaded.")
|
||||
return
|
||||
else
|
||||
if(isxeno(G.affecting))
|
||||
@@ -289,9 +289,9 @@
|
||||
user.drop_from_inventory(G)
|
||||
X.forceMove(src)
|
||||
occupant = X
|
||||
user << "You load [X] into [src]."
|
||||
to_chat(user, "You load [X] into [src]."
|
||||
else
|
||||
user << "<span class='danger'>This specimen is incompatible with the machinery!</span>"
|
||||
to_chat(user, "<span class='danger'>This specimen is incompatible with the machinery!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -374,15 +374,15 @@
|
||||
/obj/machinery/xenobio/editor/proc/move_into_editor(var/mob/user,var/mob/living/victim)
|
||||
|
||||
if(src.occupant)
|
||||
user << "<span class='danger'>The [src] is full, empty it first!</span>"
|
||||
to_chat(user, "<span class='danger'>The [src] is full, empty it first!</span>")
|
||||
return
|
||||
|
||||
if(in_use)
|
||||
user << "<span class='danger'>The [src] is locked and running, wait for it to finish.</span>"
|
||||
to_chat(user, "<span class='danger'>The [src] is locked and running, wait for it to finish.</span>")
|
||||
return
|
||||
|
||||
if(!(istype(victim, /mob/living/simple_animal/xeno/slime)) )
|
||||
user << "<span class='danger'>This is not a suitable subject for the [src]!</span>"
|
||||
to_chat(user, "<span class='danger'>This is not a suitable subject for the [src]!</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>[user] starts to put [victim] into the [src]!</span>")
|
||||
|
||||
@@ -93,11 +93,11 @@
|
||||
/obj/machinery/xenobio2/manualinjector/attackby(var/obj/item/W, var/mob/user)
|
||||
|
||||
//Let's try to deconstruct first.
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(W.is_screwdriver())
|
||||
default_deconstruction_screwdriver(user, W)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/crowbar) && !occupant)
|
||||
if(W.is_crowbar() && !occupant)
|
||||
default_deconstruction_crowbar(user, W)
|
||||
return
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
return
|
||||
|
||||
//Did you want to link it?
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
if(W.is_multitool())
|
||||
var/obj/item/device/multitool/P = W
|
||||
if(P.connectable)
|
||||
if(istype(P.connectable, /obj/machinery/computer/xenobio2))
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
|
||||
/obj/machinery/slime/replicator/attackby(var/obj/item/W, var/mob/user)
|
||||
//Let's try to deconstruct first.
|
||||
if(istype(W, /obj/item/weapon/screwdriver) && !inuse)
|
||||
if(W.is_screwdriver() && !inuse)
|
||||
default_deconstruction_screwdriver(user, W)
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
if(W.is_crowbar())
|
||||
default_deconstruction_crowbar(user, W)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user