Skip to content

Commit eb036b0

Browse files
ZiiroZiiro
and
Ziiro
authored
New surgeries for IPCs to resolve damage edgecases (#6027)
## About The Pull Request This adds two new surgeries to clear damage from dead IPCs that otherwise cannot be cleared. ## Why It's Good For The Game The fact that an IPC body can be bricked without reasonable way to replace it is obnoxious. This should help a little. The surgeries only appear if something that otherwise can't clear it ((target.dna.species.reagent_tag & PROCESS_SYNTHETIC) or (HAS_TRAIT(target, TRAIT_NOBREATH)) has that damage, and is dead. ## Changelog :cl: add: Two new IPC surgeries have been added to resolve Toxin and Oxygen damage on dead IPCs! /:cl: --------- Co-authored-by: Ziiro <[email protected]>
1 parent fc5e883 commit eb036b0

File tree

4 files changed

+116
-0
lines changed

4 files changed

+116
-0
lines changed

monkestation/code/modules/research/designs/medical_designs.dm

+14
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,20 @@
6767
id = "surgery_heal_robot_upgrade_femto"
6868
research_icon_state = "surgery_chest"
6969

70+
/datum/design/surgery/robot_toxheal
71+
name = "Clear Corrosive Buildup (Repair Toxins)"
72+
desc = "A procedure that removes corrosion and chemical buildup on mechanical components inside of a deactivated synthetic chassis."
73+
surgery = /datum/surgery/robot_tox_clean
74+
id = "surgery_heal_robot_toxin"
75+
research_icon_state = "surgery_chest"
76+
77+
/datum/design/surgery/robot_oxyheal
78+
name = "Clean Components of Debris (Repair Suffocation)"
79+
desc = "A procedure that clears the debris from ventilation and temperature regulation systems in a mechanical chassis."
80+
surgery = /datum/surgery/robot_oxy_clean
81+
id = "surgery_heal_robot_oxy"
82+
research_icon_state = "surgery_chest"
83+
7084
/datum/design/cyberimp_sprinter
7185
name = "Vacuole ligament system"
7286
desc = "Mechicanical servos in ones leg that increases their natural stride. Popular amongst parkour enthusiasts. You need to implant this in both of your legs to make it work."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/datum/surgery/robot_oxy_clean // HI BILLY MAYS HERE WITH...
2+
name = "Clean Components of Debris (Repair Suffocation)"
3+
requires_bodypart_type = BODYTYPE_ROBOTIC
4+
surgery_flags = SURGERY_REQUIRE_LIMB
5+
possible_locs = list(BODY_ZONE_CHEST)
6+
desc = "A procedure that clears the debris from ventilation and temperature regulation systems in a deactivated mechanical 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/clear_debris,
13+
/datum/surgery_step/mechanic_wrench,
14+
/datum/surgery_step/mechanic_close,
15+
)
16+
17+
/datum/surgery/robot_oxy_clean/can_start(mob/user, mob/living/carbon/target)
18+
if(HAS_TRAIT(target, TRAIT_NOBREATH) && (target.stat == DEAD) && (target.getOxyLoss() > 0)) // Have you somehow accumulated OxyDamage while being TRAIT_NOBREATH and are dead with it? Boy do I have a deal for you!
19+
return TRUE
20+
return FALSE
21+
22+
/datum/surgery_step/clear_debris
23+
name = "Clear debris from components (hand)"
24+
accept_hand = TRUE
25+
repeatable = FALSE
26+
time = 50
27+
28+
/datum/surgery_step/clear_debris/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
29+
display_results(
30+
user,
31+
target,
32+
span_notice("You begin to clear the dust and debris inside of [target]'s [parse_zone(target_zone)] components..."),
33+
span_notice("[user] begins to clear the dust and debris inside of [target]'s [parse_zone(target_zone)] components."),
34+
span_notice("[user] begins to clear the dust and debris inside of [target]'s [parse_zone(target_zone)] components."),
35+
)
36+
display_pain(target, "You feel someone reaching around inside of your [parse_zone(target_zone)] as debris is removed from your components.", TRUE)
37+
38+
/datum/surgery_step/clear_debris/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
39+
target.setOxyLoss(0, TRUE, TRUE) // Bam! Just like that!
40+
display_results(
41+
user,
42+
target,
43+
span_notice("You clear debris out of [target]'s [parse_zone(target_zone)] components."),
44+
span_notice("[user] clear the debris out of [target]'s [parse_zone(target_zone)] components."),
45+
span_notice("[user] clear the debris out of [target]'s [parse_zone(target_zone)] components."),
46+
)
47+
return TRUE
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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

tgstation.dme

+2
Original file line numberDiff line numberDiff line change
@@ -8410,6 +8410,8 @@
84108410
#include "monkestation\code\modules\surgery\robot_brain_healing.dm"
84118411
#include "monkestation\code\modules\surgery\robot_chest_repair.dm"
84128412
#include "monkestation\code\modules\surgery\robot_healing.dm"
8413+
#include "monkestation\code\modules\surgery\robot_oxy_clean.dm"
8414+
#include "monkestation\code\modules\surgery\robot_tox_clean.dm"
84138415
#include "monkestation\code\modules\surgery\splenorrhaphy.dm"
84148416
#include "monkestation\code\modules\surgery\steps.dm"
84158417
#include "monkestation\code\modules\surgery\advanced\brainwashing.dm"

0 commit comments

Comments
 (0)