mirror of
https://github.com/fulpstation/fulpstation.git
synced 2025-12-10 10:01:40 +00:00
* works on my machine * saving is a sin 1% of the time! * works... on... my... machine...? * i can't test this but it worked on my machine too Co-Authored-By: Bobbahbrown <bobbahbrown@gmail.com> * more testing /w TW * caps XP gain (per iteration) for TW * no skinnies Co-authored-by: Bobbahbrown <bobbahbrown@gmail.com>
50 lines
2.5 KiB
Plaintext
50 lines
2.5 KiB
Plaintext
/datum/surgery/embedded_removal
|
|
name = "Removal of embedded objects"
|
|
steps = list(/datum/surgery_step/incise, /datum/surgery_step/remove_object)
|
|
possible_locs = list(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM,BODY_ZONE_R_LEG,BODY_ZONE_L_LEG,BODY_ZONE_CHEST,BODY_ZONE_HEAD)
|
|
|
|
|
|
/datum/surgery_step/remove_object
|
|
name = "remove embedded objects"
|
|
time = 32
|
|
accept_hand = 1
|
|
experience_given = 5
|
|
var/obj/item/bodypart/L = null
|
|
|
|
|
|
/datum/surgery_step/remove_object/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
|
|
L = surgery.operated_bodypart
|
|
if(L)
|
|
user.visible_message("<span class='notice'>[user] looks for objects embedded in [target]'s [parse_zone(user.zone_selected)].</span>", "<span class='notice'>You look for objects embedded in [target]'s [parse_zone(user.zone_selected)]...</span>")
|
|
display_results(user, target, "<span class='notice'>You look for objects embedded in [target]'s [parse_zone(user.zone_selected)]...</span>",
|
|
"<span class='notice'>[user] looks for objects embedded in [target]'s [parse_zone(user.zone_selected)].</span>",
|
|
"<span class='notice'>[user] looks for something in [target]'s [parse_zone(user.zone_selected)].</span>")
|
|
else
|
|
user.visible_message("<span class='notice'>[user] looks for [target]'s [parse_zone(user.zone_selected)].</span>", "<span class='notice'>You look for [target]'s [parse_zone(user.zone_selected)]...</span>")
|
|
|
|
|
|
/datum/surgery_step/remove_object/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
|
|
if(L)
|
|
if(ishuman(target))
|
|
var/mob/living/carbon/human/H = target
|
|
var/objects = 0
|
|
for(var/obj/item/I in L.embedded_objects)
|
|
objects++
|
|
I.forceMove(get_turf(H))
|
|
L.embedded_objects -= I
|
|
if(!H.has_embedded_objects())
|
|
H.clear_alert("embeddedobject")
|
|
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "embedded")
|
|
|
|
if(objects > 0)
|
|
display_results(user, target, "<span class='notice'>You successfully remove [objects] objects from [H]'s [L.name].</span>",
|
|
"<span class='notice'>[user] successfully removes [objects] objects from [H]'s [L]!</span>",
|
|
"<span class='notice'>[user] successfully removes [objects] objects from [H]'s [L]!</span>")
|
|
else
|
|
to_chat(user, "<span class='warning'>You find no objects embedded in [H]'s [L]!</span>")
|
|
|
|
else
|
|
to_chat(user, "<span class='warning'>You can't find [target]'s [parse_zone(user.zone_selected)], let alone any objects embedded in it!</span>")
|
|
|
|
return ..()
|