mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +01:00
Implant removal improvements. (#7825)
Implant surgery has been improved. Knife shrapnel extraction has been improved.
This commit is contained in:
+23
-38
@@ -1015,7 +1015,23 @@
|
||||
imp.removed()
|
||||
. = TRUE
|
||||
|
||||
mob/proc/yank_out_object()
|
||||
/mob/living/carbon/human/remove_implant(var/obj/item/implant, var/surgical_removal = FALSE, var/obj/item/organ/external/affected)
|
||||
if(!affected) //Grab the organ holding the implant.
|
||||
for(var/obj/item/organ/external/organ in organs)
|
||||
for(var/obj/item/O in organ.implants)
|
||||
if(O == implant)
|
||||
affected = organ
|
||||
break
|
||||
if(affected)
|
||||
affected.implants -= implant
|
||||
if(!surgical_removal)
|
||||
shock_stage += 20
|
||||
apply_damage((implant.w_class * 7), BRUTE, affected)
|
||||
if(!BP_IS_ROBOTIC(affected) && prob(implant.w_class * 5) && affected.sever_artery()) //I'M SO ANEMIC I COULD JUST -DIE-.
|
||||
custom_pain("Something tears wetly in your [affected.name] as [implant] is pulled free!", 50, affecting = affected)
|
||||
. = ..()
|
||||
|
||||
/mob/proc/yank_out_object()
|
||||
set category = "Object"
|
||||
set name = "Yank out object"
|
||||
set desc = "Remove an embedded item at the cost of bleeding and pain."
|
||||
@@ -1062,49 +1078,18 @@ mob/proc/yank_out_object()
|
||||
return
|
||||
|
||||
if(self)
|
||||
visible_message("<span class='warning'><b>[src] rips [selection] out of their body.</b></span>","<span class='warning'><b>You rip [selection] out of your body.</b></span>")
|
||||
visible_message("<span class='warning'><b>[src] rips [selection] out of their body!</b></span>","<span class='warning'><b>You rip [selection] out of your body!</b></span>")
|
||||
else
|
||||
visible_message("<span class='warning'><b>[usr] rips [selection] out of [src]'s body.</b></span>","<span class='warning'><b>[usr] rips [selection] out of your body.</b></span>")
|
||||
visible_message("<span class='warning'><b>[usr] rips [selection] out of [src]'s body!</b></span>","<span class='warning'><b>[usr] rips [selection] out of your body!</b></span>")
|
||||
valid_objects = get_visible_implants(0)
|
||||
if(valid_objects.len == 1) //Yanking out last object - removing verb.
|
||||
src.verbs -= /mob/proc/yank_out_object
|
||||
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/obj/item/organ/external/affected
|
||||
|
||||
for(var/obj/item/organ/external/organ in H.organs) //Grab the organ holding the implant.
|
||||
for(var/obj/item/O in organ.implants)
|
||||
if(O == selection)
|
||||
affected = organ
|
||||
|
||||
affected.implants -= selection
|
||||
H.shock_stage+=20
|
||||
affected.take_damage((selection.w_class * 3), 0, 0, 1, "Embedded object extraction")
|
||||
|
||||
if(prob(selection.w_class * 5)) //I'M SO ANEMIC I COULD JUST -DIE-.
|
||||
affected.sever_artery()
|
||||
H.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 50)
|
||||
|
||||
if (ishuman(U))
|
||||
var/mob/living/carbon/human/human_user = U
|
||||
human_user.bloody_hands(H)
|
||||
|
||||
else if(issilicon(src))
|
||||
var/mob/living/silicon/robot/R = src
|
||||
R.embedded -= selection
|
||||
R.adjustBruteLoss(5)
|
||||
R.adjustFireLoss(10)
|
||||
|
||||
remove_implant(selection)
|
||||
selection.forceMove(get_turf(src))
|
||||
if(!(U.l_hand && U.r_hand))
|
||||
U.put_in_hands(selection)
|
||||
|
||||
for(var/obj/item/O in pinned)
|
||||
if(O == selection)
|
||||
pinned -= O
|
||||
if(!pinned.len)
|
||||
anchored = 0
|
||||
if(ishuman(U))
|
||||
var/mob/living/carbon/human/human_user = U
|
||||
human_user.bloody_hands(src)
|
||||
return 1
|
||||
|
||||
/mob/living/proc/handle_statuses()
|
||||
|
||||
Reference in New Issue
Block a user