|
| 1 | +/datum/surgery/robot_tox_clean |
| 2 | + name = "Clear Corrosive Buildup (Repair Toxins)" |
| 3 | + requires_bodypart_type = BODYTYPE_ROBOTIC |
| 4 | + surgery_flags = SURGERY_REQUIRE_LIMB |
| 5 | + possible_locs = list(BODY_ZONE_CHEST) |
| 6 | + desc = "A procedure that removes corrosion and chemical buildup on mechanical components inside of a deactivated synthetic chassis." |
| 7 | + steps = list( |
| 8 | + /datum/surgery_step/mechanic_open, |
| 9 | + /datum/surgery_step/open_hatch, |
| 10 | + /datum/surgery_step/mechanic_unwrench, |
| 11 | + /datum/surgery_step/prepare_electronics, |
| 12 | + /datum/surgery_step/clean_corrosion, |
| 13 | + /datum/surgery_step/mechanic_wrench, |
| 14 | + /datum/surgery_step/mechanic_close, |
| 15 | + ) |
| 16 | + |
| 17 | +/datum/surgery/robot_tox_clean/can_start(mob/user, mob/living/carbon/target) |
| 18 | + if((target.dna.species.reagent_tag & PROCESS_SYNTHETIC) && target.stat == DEAD && (target.getToxLoss() > 0)) // This surgery is only available if you can't process most Toxin-clearing chems and you're not alive to process system cleaner. |
| 19 | + return TRUE |
| 20 | + return FALSE |
| 21 | + |
| 22 | +/datum/surgery_step/clean_corrosion |
| 23 | + name = "Remove corrosion (Soap/Crowbar/Scalpel)" |
| 24 | + repeatable = FALSE |
| 25 | + implements = list( |
| 26 | + /obj/item/soap = 100, |
| 27 | + TOOL_CROWBAR = 75, |
| 28 | + TOOL_SCALPEL = 50, |
| 29 | + ) |
| 30 | + time = 50 |
| 31 | + preop_sound = 'sound/items/unsheath.ogg' |
| 32 | + success_sound = 'sound/items/unsheath.ogg' |
| 33 | + |
| 34 | +/datum/surgery_step/clean_corrosion/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) |
| 35 | + display_results( |
| 36 | + user, |
| 37 | + target, |
| 38 | + span_notice("You begin to clear the corrosion inside of [target]'s [parse_zone(target_zone)]..."), |
| 39 | + span_notice("[user] begins to clear the corrosion inside of [target]'s [parse_zone(target_zone)]."), |
| 40 | + span_notice("[user] begins to clear the corrosion inside of [target]'s [parse_zone(target_zone)]."), |
| 41 | + ) |
| 42 | + display_pain(target, "You feel an unpleasant scraping in your [parse_zone(target_zone)] as the corrosion is removed.", TRUE) |
| 43 | + |
| 44 | +/datum/surgery_step/clean_corrosion/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE) |
| 45 | + target.setToxLoss(0, TRUE, TRUE) |
| 46 | + display_results( |
| 47 | + user, |
| 48 | + target, |
| 49 | + span_notice("You clear the corrosion off of [target]'s [parse_zone(target_zone)] components."), |
| 50 | + span_notice("[user] clear the corrosion off of [target]'s [parse_zone(target_zone)] components."), |
| 51 | + span_notice("[user] clear the corrosion off of [target]'s [parse_zone(target_zone)] components."), |
| 52 | + ) |
| 53 | + return TRUE |
0 commit comments