diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index fc93d905b63..d0dd7f8e388 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1113,56 +1113,97 @@ del(feet_blood_DNA) return 1 -/mob/living/carbon/human/verb/yank_out_object() - set name = "Yank out object" +mob/living/carbon/human/verb/yank_out_object_test() + set category = "IC" + set name = "Yank out object (test)" set desc = "Remove an embedded item at the cost of bleeding and pain." - set category = "Object" + set src in view(1) if(!isliving(usr) || usr.next_move > world.time) return usr.next_move = world.time + 20 - var/list/valid_objects = get_visible_implants(1) + if(usr.stat == 1) + usr << "You are unconcious and cannot do that!" + return + + if(usr.restrained()) + usr << "You are restrained and cannot do that!" + return + +// /* + var/list/valid_objects = list() var/datum/organ/external/affected = null + var/mob/living/carbon/human/S = src + var/mob/living/carbon/human/U = usr - if(!valid_objects.len) - src << "You have nothing stuck in your wounds that is large enough to remove without surgery." - return + if(S == U) // Removing something from yourself. + valid_objects = get_visible_implants(1) - if(src.stat == 1) - src << "You are unconcious and cannot do that!" - return + if(!valid_objects.len) + src << "You have nothing stuck in your wounds that is large enough to remove without surgery." + return - if(src.restrained()) - src << "You are restrained and cannot do that!" - return + var/obj/item/weapon/selection = input("What do you want to yank out?", "Embedded objects") in valid_objects - var/obj/item/weapon/selection = input("What do you want to yank out?", "Embedded objects") in valid_objects + for(var/datum/organ/external/organ in organs) //Grab the organ holding the implant. Messy as Hell, TBD: fix. + for(var/obj/item/weapon/O in organ.implants) + if(O == selection) + affected = organ - for(var/datum/organ/external/organ in src.organs) //Grab the organ holding the implant. Messy as Hell, TBD: fix. - for(var/obj/item/weapon/O in organ.implants) - if(O == selection) - affected = organ + src << "You attempt to get a good grip on the [selection] in your [affected] with bloody fingers." + bloody_hands(S) - src << "You attempt to get a good grip on the [selection] in your [affected] with bloody fingers." - bloody_hands(src) + spawn(80) + visible_message("[src] rips [selection] out of their [affected] in a welter of blood.","You rip [selection] out of your [affected] in a welter of blood.") + selection.loc = get_turf(src) + affected.implants -= selection + shock_stage+=10 - spawn(80) - visible_message("[src] rips [selection] out of their [affected] in a welter of blood.","You rip [selection] out of your [affected] in a welter of blood.") - selection.loc = get_turf(src) - affected.implants -= selection - shock_stage+=10 + for(var/obj/item/weapon/O in pinned) + if(O == selection) + pinned -= O + anchored = 0 - for(var/obj/item/weapon/O in pinned) - if(O == selection) - pinned -= O - src.anchored = 0 + if(prob(10)) //I'M SO ANEMIC I COULD JUST -DIE-. + var/datum/wound/internal_bleeding/I = new (15) + affected.wounds += I + custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1) + return 1 - if(prob(10)) //I'M SO ANEMIC I COULD JUST -DIE-. - var/datum/wound/internal_bleeding/I = new (15) - affected.wounds += I - src.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1) - return 1 + else // Removing something from someone else. + valid_objects = src.get_visible_implants(1) + + if(!valid_objects.len) + U << "[src] has nothing stuck in their wounds that is large enough to remove without surgery." + return + + var/obj/item/weapon/selection = input("What do you want to yank out?", "Embedded objects") in valid_objects + + for(var/datum/organ/external/organ in src.organs) //Grab the organ holding the implant. Messy as Hell, TBD: fix. + for(var/obj/item/weapon/O in organ.implants) + if(O == selection) + affected = organ + + U << "You attempt to get a good grip on the [selection] in [S]'s [affected] with bloody fingers." + U.bloody_hands(S) + + spawn(80) + visible_message("[usr] rips [selection] out of [src]'s [affected] in a welter of blood.","[src] rips [selection] out of your [affected] in a welter of blood.") + selection.loc = get_turf(usr) + affected.implants -= selection + src.shock_stage+=10 + + for(var/obj/item/weapon/O in S.pinned) + if(O == selection) + S.pinned -= O + S.anchored = 0 + + if(prob(10)) //I'M SO ANEMIC I COULD JUST -DIE-. + var/datum/wound/internal_bleeding/I = new (15) + affected.wounds += I + custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1) + return 1 /mob/living/carbon/human/proc/get_visible_implants(var/class = 0) diff --git a/code/modules/projectiles/guns/projectile/bow.dm b/code/modules/projectiles/guns/projectile/bow.dm index 25f4276d9a0..4c5c0c0b1c2 100644 --- a/code/modules/projectiles/guns/projectile/bow.dm +++ b/code/modules/projectiles/guns/projectile/bow.dm @@ -61,6 +61,7 @@ arrow = new /obj/item/weapon/arrow/rod(src) arrow.fingerprintslast = src.fingerprintslast arrow.loc = src + icon_state = "crossbow-nocked" user.visible_message("[user] haphazardly jams [arrow] into [src].","You jam [arrow] into [src].") if(cell) if(cell.charge >= 500)