Files
Bubberstation/code/modules/surgery/appendectomy.dm
petethegoat@gmail.com efe09a57c8 Adds cavity implant surgery. Turn people into walking bombs, etc.
Adds two new variables to surgery steps- accept_hand, and accept_any_item. They are compatible and you can use both at once.
Removes the always_advance variable on surgery steps, in favour of the success() and failure() procs returning 1 or 0 to advance or not.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5765 316c924e-a436-60f5-8080-3fe189b3f50e
2013-02-22 18:10:28 +00:00

30 lines
1.3 KiB
Plaintext

/datum/surgery/appendectomy
name = "appendectomy"
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/incise, /datum/surgery_step/extract_appendix, /datum/surgery_step/close)
species = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
location = "groin"
//extract appendix
/datum/surgery_step/extract_appendix
accept_hand = 1
time = 64
var/obj/item/organ/appendix/A = null
/datum/surgery_step/extract_appendix/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
A = locate() in target.internal_organs
if(A)
user.visible_message("<span class='notice'>[user] begins to extract [target]'s appendix.</span>")
else
user.visible_message("<span class='notice'>[user] looks for an appendix in [target].</span>")
/datum/surgery_step/extract_appendix/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
if(A)
user.visible_message("<span class='notice'>[user] successfully removes [target]'s appendix!</span>")
A.loc = get_turf(target)
target.internal_organs -= A
for(var/datum/disease/appendicitis in target.viruses)
appendicitis.cure()
else
user.visible_message("<span class='notice'>[user] can't find an appendix in [target]!</span>")
return 1