Prevents augmenting with just any robot_parts (#22242)

Co-authored-by: Adrer <adrermail@gmail.com>
This commit is contained in:
Adrer
2023-09-06 20:01:49 +02:00
committed by GitHub
parent 9ce4886bc6
commit f781310ae5

View File

@@ -28,16 +28,17 @@
/datum/surgery_step/augment/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/robot_parts/p = tool
if(p.part)
if(!(target_zone in p.part))
to_chat(user, "<span class='warning'>[tool] cannot be used to augment this limb!</span>")
return SURGERY_BEGINSTEP_ABORT
if(target_zone in p.part)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(
"[user] starts augmenting [affected] with [tool].",
"You start augmenting [affected] with [tool]."
)
return ..()
to_chat(user, "<span class='warning'>[tool] cannot be used to augment this limb!</span>")
return SURGERY_BEGINSTEP_ABORT
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message(
"[user] starts augmenting [affected] with [tool].",
"You start augmenting [affected] with [tool]."
)
return ..()
/datum/surgery_step/augment/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/robot_parts/L = tool