mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
Prosthetic surgery now checks if you can attach the bodypart (#70157)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
co-authored by
Mothblocks
parent
6a4cc53fd1
commit
dafbcf29bd
@@ -518,7 +518,7 @@
|
||||
head.drop_organs()
|
||||
qdel(head)
|
||||
owner.regenerate_icons()
|
||||
RegisterSignal(owner, COMSIG_CARBON_ATTACH_LIMB, .proc/abortattachment)
|
||||
RegisterSignal(owner, COMSIG_ATTEMPT_CARBON_ATTACH_LIMB, .proc/abortattachment)
|
||||
|
||||
/datum/mutation/human/headless/on_losing()
|
||||
. = ..()
|
||||
@@ -527,7 +527,7 @@
|
||||
var/obj/item/organ/internal/brain/brain = owner.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(brain) //so this doesn't instantly kill you. we could delete the brain, but it lets people cure brain issues they /really/ shouldn't be
|
||||
brain.zone = BODY_ZONE_HEAD
|
||||
UnregisterSignal(owner, COMSIG_CARBON_ATTACH_LIMB)
|
||||
UnregisterSignal(owner, COMSIG_ATTEMPT_CARBON_ATTACH_LIMB)
|
||||
var/successful = owner.regenerate_limb(BODY_ZONE_HEAD)
|
||||
if(!successful)
|
||||
stack_trace("HARS mutation head regeneration failed! (usually caused by headless syndrome having a head)")
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
//If user does not have the corresponding hand anymore, give them one and return the rod to their hand
|
||||
if(((hand % 2) == 0))
|
||||
var/obj/item/bodypart/L = itemUser.newBodyPart(BODY_ZONE_R_ARM, FALSE, FALSE)
|
||||
if(L.attach_limb(itemUser))
|
||||
if(L.try_attach_limb(itemUser))
|
||||
itemUser.put_in_hand(newRod, hand, forced = TRUE)
|
||||
else
|
||||
qdel(L)
|
||||
@@ -245,7 +245,7 @@
|
||||
return
|
||||
else
|
||||
var/obj/item/bodypart/L = itemUser.newBodyPart(BODY_ZONE_L_ARM, FALSE, FALSE)
|
||||
if(L.attach_limb(itemUser))
|
||||
if(L.try_attach_limb(itemUser))
|
||||
itemUser.put_in_hand(newRod, hand, forced = TRUE)
|
||||
else
|
||||
qdel(L)
|
||||
|
||||
Reference in New Issue
Block a user