Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] More Reliable Shrapnel Removal #1270

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 13 additions & 28 deletions code/modules/surgery/implant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@
/obj/item/wirecutters = 75,
/obj/item/material/kitchen/utensil/fork = 20
)
min_duration = 80
max_duration = 100
min_duration = 120
max_duration = 150

/singleton/surgery_step/cavity/implant_removal/assess_bodypart(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = ..()
Expand All @@ -177,49 +177,34 @@
if(BP_IS_ROBOTIC(affected) && affected.hatch_state == HATCH_OPENED)
exposed = 1

var/find_prob = 0
var/list/loot = list()
if(exposed)
loot = affected.implants
else
for(var/datum/wound/wound in affected.wounds)
if(LAZYLEN(wound.embedded_objects))
loot |= wound.embedded_objects
find_prob += 50

if (length(loot))

var/obj/item/obj = pick(loot)

if(istype(obj,/obj/item/implant))
var/obj/item/implant/imp = obj
if (imp.islegal())
find_prob +=60
else
find_prob +=40
else
find_prob +=50

if (prob(find_prob))
user.visible_message(SPAN_NOTICE("[user] takes something out of incision on [target]'s [affected.name] with \the [tool]."), \
SPAN_NOTICE("You take \the [obj] out of incision on \the [target]'s [affected.name] with \the [tool].") )
target.remove_implant(obj, TRUE, affected)
user.visible_message(SPAN_NOTICE("[user] takes something out of incision on [target]'s [affected.name] with \the [tool]."), \
SPAN_NOTICE("You take \the [obj] out of incision on \the [target]'s [affected.name] with \the [tool].") )
target.remove_implant(obj, TRUE, affected)

SET_BIT(target.hud_updateflag, IMPLOYAL_HUD)
SET_BIT(target.hud_updateflag, IMPLOYAL_HUD)

//Handle possessive brain borers.
if(istype(obj,/mob/living/simple_animal/borer))
var/mob/living/simple_animal/borer/worm = obj
if(worm.controlling)
target.release_control()
worm.detatch()
worm.leave_host()
//Handle possessive brain borers.
if(istype(obj,/mob/living/simple_animal/borer))
var/mob/living/simple_animal/borer/worm = obj
if(worm.controlling)
target.release_control()
worm.detatch()
worm.leave_host()


playsound(target.loc, 'sound/effects/squelch1.ogg', 15, 1)
else
user.visible_message(SPAN_NOTICE("[user] removes \the [tool] from [target]'s [affected.name]."), \
SPAN_NOTICE("There's something inside [target]'s [affected.name], but you just missed it this time.") )
else
user.visible_message(SPAN_NOTICE("[user] could not find anything inside [target]'s [affected.name], and pulls \the [tool] out."), \
SPAN_NOTICE("You could not find anything inside [target]'s [affected.name].") )
Expand Down