mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Adds GetTypeInAllContents, which should be self-explanatory. Recursively checks for a typepath locating in an atom.
It's used by cavity implants to make sure you can't slip the nuke disk in.
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
|
||||
/datum/surgery_step/handle_cavity/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
||||
if(tool)
|
||||
if(IC || tool.w_class > 3 || istype(tool, /obj/item/weapon/disk/nuclear) || istype(tool, /obj/item/organ))
|
||||
if(IC || tool.w_class > 3 || tool.GetTypeInAllContents(/obj/item/weapon/disk/nuclear) || istype(tool, /obj/item/organ))
|
||||
user.visible_message("<span class='notice'>[user] can't seem to fit [tool] in [target]'s [target_zone].</span>")
|
||||
return 0
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user