Files
vgstation13/code/modules/surgery/appendix.dm
Chinsky c84ce517e3 Changed way substitute tools are handled.
Now all tools have chance of success. Proper ones have 100.
If tool has less than 100 chance of success, it can fail the step.
2013-05-28 18:16:11 +04:00

88 lines
3.5 KiB
Plaintext

//Procedures in this file: Appendectomy
//////////////////////////////////////////////////////////////////
// APPENDECTOMY //
//////////////////////////////////////////////////////////////////
/datum/surgery_step/appendectomy/
priority = 2
can_infect = 1
blood_level = 1
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
if (target_zone != "groin")
return 0
var/datum/organ/external/groin = target.get_organ("groin")
if (!groin)
return 0
if (groin.open < 2)
return 0
return 1
/datum/surgery_step/appendectomy/cut_appendix
allowed_tools = list(
/obj/item/weapon/scalpel = 100, \
/obj/item/weapon/kitchenknife = 75, \
/obj/item/weapon/shard = 50, \
)
min_duration = 70
max_duration = 90
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.appendix == 0
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts to separating [target]'s appendix from the abdominal wall with \the [tool].", \
"You start to separating [target]'s appendix from the abdominal wall with \the [tool]." )
target.custom_pain("The pain in your abdomen is living hell!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has separated [target]'s appendix with \the [tool]." , \
"\blue You have separated [target]'s appendix with \the [tool].")
target.op_stage.appendix = 1
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/groin = target.get_organ("groin")
user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!", \
"\red Your hand slips, slicing an artery inside [target]'s abdomen with \the [tool]!")
groin.createwound(CUT, 50, 1)
/datum/surgery_step/appendectomy/remove_appendix
allowed_tools = list(
/obj/item/weapon/hemostat = 100, \
/obj/item/weapon/wirecutters = 75, \
/obj/item/weapon/kitchen/utensil/fork = 20
)
min_duration = 60
max_duration = 80
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return ..() && target.op_stage.appendix == 1
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("[user] starts removing [target]'s appendix with \the [tool].", \
"You start removing [target]'s appendix with \the [tool].")
target.custom_pain("Someone's ripping out your bowels!",1)
..()
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("\blue [user] has removed [target]'s appendix with \the [tool].", \
"\blue You have removed [target]'s appendix with \the [tool].")
var/app = 0
for(var/datum/disease/appendicitis/appendicitis in target.viruses)
app = 1
appendicitis.cure()
target.resistances += appendicitis
if (app)
new /obj/item/weapon/reagent_containers/food/snacks/appendix/inflamed(get_turf(target))
else
new /obj/item/weapon/reagent_containers/food/snacks/appendix(get_turf(target))
target.op_stage.appendix = 2
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/datum/organ/external/affected = target.get_organ(target_zone)
user.visible_message("\red [user]'s hand slips, nicking internal organs in [target]'s abdomen with \the [tool]!", \
"\red Your hand slips, nicking internal organs in [target]'s abdomen with \the [tool]!")
affected.createwound(BRUISE, 20)