mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-29 03:32:28 +00:00
Prevents augmenting with just any robot_parts (#22242)
Co-authored-by: Adrer <adrermail@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user