From 230d676c3f46542ca313fffe041e45b8c9d8518d Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 2 Dec 2015 03:45:24 +0000 Subject: [PATCH 1/5] Changes the arbitrary failure return for surgery from 2 to -1. This is because ORGAN_BLEEDING in damage_organs.dm is now 2 so some statements evaluate to 2, which causes bleeding clamp surgery to fail as it triggered the "This is an error that's already been dealt with" condition coincidentally. Surgeries which report failures (like trying to stick a brain in someone who's already got one) now throw back a -1 not a 2. --- code/modules/surgery/organs_internal.dm | 12 ++++++------ code/modules/surgery/robotics.dm | 12 ++++++------ code/modules/surgery/surgery.dm | 3 ++- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index d352c4aed4..8579173218 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -273,11 +273,11 @@ if((affected.status & ORGAN_ROBOT) && !(O.status & ORGAN_ROBOT)) user << "You cannot install a naked organ into a robotic body." - return 2 + return -1 if(!target.species) user << "\red You have no idea what species this person is. Report this on the bug tracker." - return 2 + return -1 var/o_is = (O.gender == PLURAL) ? "are" : "is" var/o_a = (O.gender == PLURAL) ? "" : "a " @@ -289,22 +289,22 @@ if(O.damage > (O.max_damage * 0.75)) user << "\red \The [O.organ_tag] [o_is] in no state to be transplanted." - return 2 + return -1 if(!target.internal_organs_by_name[O.organ_tag]) organ_missing = 1 else user << "\red \The [target] already has [o_a][O.organ_tag]." - return 2 + return -1 if(O && affected.limb_name == O.parent_organ) organ_compatible = 1 else user << "\red \The [O.organ_tag] [o_do] normally go in \the [affected.name]." - return 2 + return -1 else user << "\red You're pretty sure [target.species.name_plural] don't normally have [o_a][O.organ_tag]." - return 2 + return -1 return ..() && organ_missing && organ_compatible diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index dc626ec60a..c3a89a5dfc 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -171,7 +171,7 @@ if(istype(C)) if(!C.get_amount() >= 3) user << "You need three or more cable pieces to repair this damage." - return 2 + return -1 C.use(3) return 1 return 0 @@ -383,23 +383,23 @@ if(!M.brainmob || !M.brainmob.client || !M.brainmob.ckey || M.brainmob.stat >= DEAD) user << "That brain is not usable." - return 2 + return -1 if(!(affected.status & ORGAN_ROBOT)) user << "You cannot install a computer brain into a meat skull." - return 2 + return -1 if(!target.species) user << "You have no idea what species this person is. Report this on the bug tracker." - return 2 + return -1 if(!target.species.has_organ["brain"]) user << "You're pretty sure [target.species.name_plural] don't normally have a brain." - return 2 + return -1 if(!isnull(target.internal_organs["brain"])) user << "Your subject already has a brain." - return 2 + return -1 return 1 diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 6e57a4f37b..2a760f1f28 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -90,8 +90,9 @@ proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool) //check if tool is right or close enough and if this step is possible if(S.tool_quality(tool)) var/step_is_valid = S.can_use(user, M, zone, tool) + world.log << "Is Valid = [step_is_valid]" if(step_is_valid && S.is_valid_target(M)) - if(step_is_valid == 2) // This is a failure that already has a message for failing. + if(step_is_valid == -1) // This is a failure that already has a message for failing. return 1 M.op_stage.in_progress += zone S.begin_step(user, M, zone, tool) //start on it From 03a4b91ad0e4e2f1fa1ad1ada8b83a76fd39ae3f Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 2 Dec 2015 03:47:05 +0000 Subject: [PATCH 2/5] Removes erroneous world.log line. --- code/modules/surgery/surgery.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 2a760f1f28..f0ed31b2c4 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -90,7 +90,6 @@ proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool) //check if tool is right or close enough and if this step is possible if(S.tool_quality(tool)) var/step_is_valid = S.can_use(user, M, zone, tool) - world.log << "Is Valid = [step_is_valid]" if(step_is_valid && S.is_valid_target(M)) if(step_is_valid == -1) // This is a failure that already has a message for failing. return 1 From 7ef07aeca6513013c12858abe99988eab270ee65 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Wed, 2 Dec 2015 08:56:11 +0100 Subject: [PATCH 3/5] Fixes hemostat surgery. Port of https://github.com/PolarisSS13/Polaris/pull/381. # Conflicts: # code/modules/surgery/organs_internal.dm # code/modules/surgery/robotics.dm # code/modules/surgery/surgery.dm # polaris.dme --- code/modules/surgery/_defines.dm | 1 + code/modules/surgery/organs_internal.dm | 12 ++++++------ code/modules/surgery/robotics.dm | 12 ++++++------ code/modules/surgery/surgery.dm | 2 +- code/modules/surgery/~defines.dm | 1 + 5 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 code/modules/surgery/_defines.dm create mode 100644 code/modules/surgery/~defines.dm diff --git a/code/modules/surgery/_defines.dm b/code/modules/surgery/_defines.dm new file mode 100644 index 0000000000..900f3e4545 --- /dev/null +++ b/code/modules/surgery/_defines.dm @@ -0,0 +1 @@ +#define SURGERY_FAILURE -1 diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 8579173218..b73509ddd2 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -273,11 +273,11 @@ if((affected.status & ORGAN_ROBOT) && !(O.status & ORGAN_ROBOT)) user << "You cannot install a naked organ into a robotic body." - return -1 + return SURGERY_FAILURE if(!target.species) user << "\red You have no idea what species this person is. Report this on the bug tracker." - return -1 + return SURGERY_FAILURE var/o_is = (O.gender == PLURAL) ? "are" : "is" var/o_a = (O.gender == PLURAL) ? "" : "a " @@ -289,22 +289,22 @@ if(O.damage > (O.max_damage * 0.75)) user << "\red \The [O.organ_tag] [o_is] in no state to be transplanted." - return -1 + return SURGERY_FAILURE if(!target.internal_organs_by_name[O.organ_tag]) organ_missing = 1 else user << "\red \The [target] already has [o_a][O.organ_tag]." - return -1 + return SURGERY_FAILURE if(O && affected.limb_name == O.parent_organ) organ_compatible = 1 else user << "\red \The [O.organ_tag] [o_do] normally go in \the [affected.name]." - return -1 + return SURGERY_FAILURE else user << "\red You're pretty sure [target.species.name_plural] don't normally have [o_a][O.organ_tag]." - return -1 + return SURGERY_FAILURE return ..() && organ_missing && organ_compatible diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index c3a89a5dfc..acdec5f2fd 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -171,7 +171,7 @@ if(istype(C)) if(!C.get_amount() >= 3) user << "You need three or more cable pieces to repair this damage." - return -1 + return SURGERY_FAILURE C.use(3) return 1 return 0 @@ -383,23 +383,23 @@ if(!M.brainmob || !M.brainmob.client || !M.brainmob.ckey || M.brainmob.stat >= DEAD) user << "That brain is not usable." - return -1 + return SURGERY_FAILURE if(!(affected.status & ORGAN_ROBOT)) user << "You cannot install a computer brain into a meat skull." - return -1 + return SURGERY_FAILURE if(!target.species) user << "You have no idea what species this person is. Report this on the bug tracker." - return -1 + return SURGERY_FAILURE if(!target.species.has_organ["brain"]) user << "You're pretty sure [target.species.name_plural] don't normally have a brain." - return -1 + return SURGERY_FAILURE if(!isnull(target.internal_organs["brain"])) user << "Your subject already has a brain." - return -1 + return SURGERY_FAILURE return 1 diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index f0ed31b2c4..116f15b4c3 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -91,7 +91,7 @@ proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool) if(S.tool_quality(tool)) var/step_is_valid = S.can_use(user, M, zone, tool) if(step_is_valid && S.is_valid_target(M)) - if(step_is_valid == -1) // This is a failure that already has a message for failing. + if(step_is_valid == SURGERY_FAILURE) // This is a failure that already has a message for failing. return 1 M.op_stage.in_progress += zone S.begin_step(user, M, zone, tool) //start on it diff --git a/code/modules/surgery/~defines.dm b/code/modules/surgery/~defines.dm new file mode 100644 index 0000000000..6b27ac56f5 --- /dev/null +++ b/code/modules/surgery/~defines.dm @@ -0,0 +1 @@ +#undef SURGERY_FAILURE From ba423361bd9d6340e36d3d710e78da3ee6155674 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Wed, 2 Dec 2015 09:16:04 +0100 Subject: [PATCH 4/5] Updates macro/span use. --- code/modules/surgery/organs_internal.dm | 52 +++++++++--------- code/modules/surgery/robotics.dm | 72 ++++++++++++------------- code/modules/surgery/surgery.dm | 6 +-- 3 files changed, 65 insertions(+), 65 deletions(-) diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index b73509ddd2..f0025b7429 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -45,7 +45,7 @@ ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("\red [user] rips the larva out of [target]'s ribcage!", + user.visible_message("[user] rips the larva out of [target]'s ribcage!", "You rip the larva out of [target]'s ribcage!") for(var/obj/item/alien_embryo/A in target) @@ -112,8 +112,8 @@ for(var/obj/item/organ/I in affected.internal_organs) if(I && I.damage > 0) if(I.robotic < 2) - user.visible_message("\blue [user] treats damage to [target]'s [I.name] with [tool_name].", \ - "\blue You treat damage to [target]'s [I.name] with [tool_name]." ) + user.visible_message("[user] treats damage to [target]'s [I.name] with [tool_name].", \ + "You treat damage to [target]'s [I.name] with [tool_name]." ) I.damage = 0 fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -122,8 +122,8 @@ return var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\red [user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!", \ - "\red Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!") + user.visible_message("[user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!", \ + "Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with \the [tool]!") var/dam_amt = 2 if (istype(tool, /obj/item/stack/medical/advanced/bruise_pack)) @@ -185,8 +185,8 @@ ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("\blue [user] has separated [target]'s [target.op_stage.current_organ] with \the [tool]." , \ - "\blue You have separated [target]'s [target.op_stage.current_organ] with \the [tool].") + user.visible_message("[user] has separated [target]'s [target.op_stage.current_organ] with \the [tool]." , \ + "You have separated [target]'s [target.op_stage.current_organ] with \the [tool].") var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ] if(I && istype(I)) @@ -194,8 +194,8 @@ fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\red [user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!", \ - "\red Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!") + user.visible_message("[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!", \ + "Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!") affected.createwound(CUT, rand(30,50), 1) /datum/surgery_step/internal/remove_organ @@ -236,8 +236,8 @@ ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("\blue [user] has removed [target]'s [target.op_stage.current_organ] with \the [tool].", \ - "\blue You have removed [target]'s [target.op_stage.current_organ] with \the [tool].") + user.visible_message("[user] has removed [target]'s [target.op_stage.current_organ] with \the [tool].", \ + "You have removed [target]'s [target.op_stage.current_organ] with \the [tool].") // Extract the organ! if(target.op_stage.current_organ) @@ -248,8 +248,8 @@ fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\red [user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!", \ - "\red Your hand slips, damaging [target]'s [affected.name] with \the [tool]!") + user.visible_message("[user]'s hand slips, damaging [target]'s [affected.name] with \the [tool]!", \ + "Your hand slips, damaging [target]'s [affected.name] with \the [tool]!") affected.createwound(BRUISE, 20) /datum/surgery_step/internal/replace_organ @@ -276,7 +276,7 @@ return SURGERY_FAILURE if(!target.species) - user << "\red You have no idea what species this person is. Report this on the bug tracker." + user << "You have no idea what species this person is. Report this on the bug tracker." return SURGERY_FAILURE var/o_is = (O.gender == PLURAL) ? "are" : "is" @@ -288,22 +288,22 @@ else if(target.species.has_organ[O.organ_tag]) if(O.damage > (O.max_damage * 0.75)) - user << "\red \The [O.organ_tag] [o_is] in no state to be transplanted." + user << "\The [O.organ_tag] [o_is] in no state to be transplanted." return SURGERY_FAILURE if(!target.internal_organs_by_name[O.organ_tag]) organ_missing = 1 else - user << "\red \The [target] already has [o_a][O.organ_tag]." + user << "\The [target] already has [o_a][O.organ_tag]." return SURGERY_FAILURE if(O && affected.limb_name == O.parent_organ) organ_compatible = 1 else - user << "\red \The [O.organ_tag] [o_do] normally go in \the [affected.name]." + user << "\The [O.organ_tag] [o_do] normally go in \the [affected.name]." return SURGERY_FAILURE else - user << "\red You're pretty sure [target.species.name_plural] don't normally have [o_a][O.organ_tag]." + user << "You're pretty sure [target.species.name_plural] don't normally have [o_a][O.organ_tag]." return SURGERY_FAILURE return ..() && organ_missing && organ_compatible @@ -317,16 +317,16 @@ end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\blue [user] has transplanted \the [tool] into [target]'s [affected.name].", \ - "\blue You have transplanted \the [tool] into [target]'s [affected.name].") + user.visible_message("[user] has transplanted \the [tool] into [target]'s [affected.name].", \ + "You have transplanted \the [tool] into [target]'s [affected.name].") var/obj/item/organ/O = tool if(istype(O)) user.remove_from_mob(O) O.replaced(target,affected) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("\red [user]'s hand slips, damaging \the [tool]!", \ - "\red Your hand slips, damaging \the [tool]!") + user.visible_message("[user]'s hand slips, damaging \the [tool]!", \ + "Your hand slips, damaging \the [tool]!") var/obj/item/organ/I = tool if(istype(I)) I.take_damage(rand(3,5),0) @@ -367,8 +367,8 @@ ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("\blue [user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool]." , \ - "\blue You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].") + user.visible_message("[user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool]." , \ + "You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].") var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ] if(I && istype(I)) @@ -376,8 +376,8 @@ fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\red [user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!", \ - "\red Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!") + user.visible_message("[user]'s hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!", \ + "Your hand slips, damaging the flesh in [target]'s [affected.name] with \the [tool]!") affected.createwound(BRUISE, 20) ////////////////////////////////////////////////////////////////// diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index acdec5f2fd..24bc848472 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -44,14 +44,14 @@ end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\blue [user] has opened the maintenance hatch on [target]'s [affected.name] with \the [tool].", \ - "\blue You have opened the maintenance hatch on [target]'s [affected.name] with \the [tool].",) + user.visible_message("[user] has opened the maintenance hatch on [target]'s [affected.name] with \the [tool].", \ + "You have opened the maintenance hatch on [target]'s [affected.name] with \the [tool].",) affected.open = 1 fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\red [user]'s [tool.name] slips, failing to unscrew [target]'s [affected.name].", \ - "\red Your [tool] slips, failing to unscrew [target]'s [affected.name].") + user.visible_message("[user]'s [tool.name] slips, failing to unscrew [target]'s [affected.name].", \ + "Your [tool] slips, failing to unscrew [target]'s [affected.name].") /datum/surgery_step/robotics/open_hatch allowed_tools = list( @@ -76,14 +76,14 @@ end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\blue [user] opens the maintenance hatch on [target]'s [affected.name] with \the [tool].", \ - "\blue You open the maintenance hatch on [target]'s [affected.name] with \the [tool]." ) + user.visible_message("[user] opens the maintenance hatch on [target]'s [affected.name] with \the [tool].", \ + "You open the maintenance hatch on [target]'s [affected.name] with \the [tool].") affected.open = 2 fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\red [user]'s [tool.name] slips, failing to open the hatch on [target]'s [affected.name].", - "\red Your [tool] slips, failing to open the hatch on [target]'s [affected.name].") + user.visible_message("[user]'s [tool.name] slips, failing to open the hatch on [target]'s [affected.name].", + "Your [tool] slips, failing to open the hatch on [target]'s [affected.name].") /datum/surgery_step/robotics/close_hatch allowed_tools = list( @@ -108,15 +108,15 @@ end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\blue [user] closes and secures the hatch on [target]'s [affected.name] with \the [tool].", \ - "\blue You close and secure the hatch on [target]'s [affected.name] with \the [tool].") + user.visible_message("[user] closes and secures the hatch on [target]'s [affected.name] with \the [tool].", \ + "You close and secure the hatch on [target]'s [affected.name] with \the [tool].") affected.open = 0 affected.germ_level = 0 fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\red [user]'s [tool.name] slips, failing to close the hatch on [target]'s [affected.name].", - "\red Your [tool.name] slips, failing to close the hatch on [target]'s [affected.name].") + user.visible_message("[user]'s [tool.name] slips, failing to close the hatch on [target]'s [affected.name].", + "Your [tool.name] slips, failing to close the hatch on [target]'s [affected.name].") /datum/surgery_step/robotics/repair_brute allowed_tools = list( @@ -144,14 +144,14 @@ end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\blue [user] finishes patching damage to [target]'s [affected.name] with \the [tool].", \ - "\blue You finish patching damage to [target]'s [affected.name] with \the [tool].") + user.visible_message("[user] finishes patching damage to [target]'s [affected.name] with \the [tool].", \ + "You finish patching damage to [target]'s [affected.name] with \the [tool].") affected.heal_damage(rand(30,50),0,1,1) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\red [user]'s [tool.name] slips, damaging the internal structure of [target]'s [affected.name].", - "\red Your [tool.name] slips, damaging the internal structure of [target]'s [affected.name].") + user.visible_message("[user]'s [tool.name] slips, damaging the internal structure of [target]'s [affected.name].", + "Your [tool.name] slips, damaging the internal structure of [target]'s [affected.name].") target.apply_damage(rand(5,10), BURN, affected) /datum/surgery_step/robotics/repair_burn @@ -184,14 +184,14 @@ end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\blue [user] finishes splicing cable into [target]'s [affected.name].", \ - "\blue You finishes splicing new cable into [target]'s [affected.name].") + user.visible_message("[user] finishes splicing cable into [target]'s [affected.name].", \ + "You finishes splicing new cable into [target]'s [affected.name].") affected.heal_damage(0,rand(30,50),1,1) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\red [user] causes a short circuit in [target]'s [affected.name]!", - "\red You cause a short circuit in [target]'s [affected.name]!") + user.visible_message("[user] causes a short circuit in [target]'s [affected.name]!", + "You cause a short circuit in [target]'s [affected.name]!") target.apply_damage(rand(5,10), BURN, affected) /datum/surgery_step/robotics/fix_organ_robotic //For artificial organs @@ -242,8 +242,8 @@ if(I && I.damage > 0) if(I.robotic >= 2) - user.visible_message("\blue [user] repairs [target]'s [I.name] with [tool].", \ - "\blue You repair [target]'s [I.name] with [tool]." ) + user.visible_message("[user] repairs [target]'s [I.name] with [tool].", \ + "You repair [target]'s [I.name] with [tool]." ) I.damage = 0 fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -252,8 +252,8 @@ return var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\red [user]'s hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!", \ - "\red Your hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!") + user.visible_message("[user]'s hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!", \ + "Your hand slips, gumming up the mechanisms inside of [target]'s [affected.name] with \the [tool]!") target.adjustToxLoss(5) affected.createwound(CUT, 5) @@ -301,16 +301,16 @@ ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("\blue [user] has decoupled [target]'s [target.op_stage.current_organ] with \the [tool]." , \ - "\blue You have decoupled [target]'s [target.op_stage.current_organ] with \the [tool].") + user.visible_message("[user] has decoupled [target]'s [target.op_stage.current_organ] with \the [tool]." , \ + "You have decoupled [target]'s [target.op_stage.current_organ] with \the [tool].") var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ] if(I && istype(I)) I.status |= ORGAN_CUT_AWAY fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("\red [user]'s hand slips, disconnecting \the [tool].", \ - "\red Your hand slips, disconnecting \the [tool].") + user.visible_message("[user]'s hand slips, disconnecting \the [tool].", \ + "Your hand slips, disconnecting \the [tool].") /datum/surgery_step/robotics/attach_organ_robotic allowed_tools = list( @@ -349,16 +349,16 @@ ..() end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("\blue [user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool]." , \ - "\blue You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].") + user.visible_message("[user] has reattached [target]'s [target.op_stage.current_organ] with \the [tool]." , \ + "You have reattached [target]'s [target.op_stage.current_organ] with \the [tool].") var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ] if(I && istype(I)) I.status &= ~ORGAN_CUT_AWAY fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("\red [user]'s hand slips, disconnecting \the [tool].", \ - "\red Your hand slips, disconnecting \the [tool].") + user.visible_message("[user]'s hand slips, disconnecting \the [tool].", \ + "Your hand slips, disconnecting \the [tool].") /datum/surgery_step/robotics/install_mmi allowed_tools = list( @@ -411,8 +411,8 @@ end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("\blue [user] has installed \the [tool] into [target]'s [affected.name].", \ - "\blue You have installed \the [tool] into [target]'s [affected.name].") + user.visible_message("[user] has installed \the [tool] into [target]'s [affected.name].", \ + "You have installed \the [tool] into [target]'s [affected.name].") var/obj/item/device/mmi/M = tool var/obj/item/organ/mmi_holder/holder = new(target, 1) @@ -426,5 +426,5 @@ M.brainmob.mind.transfer_to(target) fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("\red [user]'s hand slips.", \ - "\red Your hand slips.") \ No newline at end of file + user.visible_message("[user]'s hand slips.", \ + "Your hand slips.") \ No newline at end of file diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 116f15b4c3..cc56b311b5 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -84,7 +84,7 @@ proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool) return 0 var/zone = user.zone_sel.selecting if(zone in M.op_stage.in_progress) //Can't operate on someone repeatedly. - user << "\red You can't operate on this area while surgery is already in progress." + user << "You can't operate on this area while surgery is already in progress." return 1 for(var/datum/surgery_step/S in surgery_steps) //check if tool is right or close enough and if this step is possible @@ -101,7 +101,7 @@ proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool) else if ((tool in user.contents) && user.Adjacent(M)) //or S.fail_step(user, M, zone, tool) //malpractice~ else // This failing silently was a pain. - user << "\red You must remain close to your patient to conduct surgery." + user << "You must remain close to your patient to conduct surgery." M.op_stage.in_progress -= zone // Clear the in-progress flag. if (ishuman(M)) var/mob/living/carbon/human/H = M @@ -109,7 +109,7 @@ proc/do_surgery(mob/living/carbon/M, mob/living/user, obj/item/tool) return 1 //don't want to do weapony things after surgery if (user.a_intent == I_HELP) - user << "\red You can't see any useful way to use [tool] on [M]." + user << "You can't see any useful way to use [tool] on [M]." return 1 return 0 From 5756e8e3bcff18dda5c5a4e8f039772150ee798c Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 2 Dec 2015 15:02:24 +0000 Subject: [PATCH 5/5] Updates the dme to add the new surgery defines. --- polaris.dme | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/polaris.dme b/polaris.dme index 0d780a7955..54225c949c 100644 --- a/polaris.dme +++ b/polaris.dme @@ -5,6 +5,72 @@ // END_INTERNALS // BEGIN_FILE_DIR #define FILE_DIR . +#define FILE_DIR "html" +#define FILE_DIR "html/images" +#define FILE_DIR "icons" +#define FILE_DIR "icons/48x48" +#define FILE_DIR "icons/atmos" +#define FILE_DIR "icons/effects" +#define FILE_DIR "icons/mecha" +#define FILE_DIR "icons/misc" +#define FILE_DIR "icons/mob" +#define FILE_DIR "icons/mob/human_races" +#define FILE_DIR "icons/mob/human_races/cyberlimbs" +#define FILE_DIR "icons/mob/human_races/masks" +#define FILE_DIR "icons/mob/human_races/monkeys" +#define FILE_DIR "icons/mob/human_races/subspecies" +#define FILE_DIR "icons/mob/human_races/xenos" +#define FILE_DIR "icons/mob/items" +#define FILE_DIR "icons/mob/screen" +#define FILE_DIR "icons/mob/species" +#define FILE_DIR "icons/mob/species/resomi" +#define FILE_DIR "icons/mob/species/skrell" +#define FILE_DIR "icons/mob/species/tajaran" +#define FILE_DIR "icons/mob/species/unathi" +#define FILE_DIR "icons/mob/species/vox" +#define FILE_DIR "icons/NTOS" +#define FILE_DIR "icons/NTOS/battery_icons" +#define FILE_DIR "icons/obj" +#define FILE_DIR "icons/obj/assemblies" +#define FILE_DIR "icons/obj/atmospherics" +#define FILE_DIR "icons/obj/clothing" +#define FILE_DIR "icons/obj/clothing/species" +#define FILE_DIR "icons/obj/clothing/species/resomi" +#define FILE_DIR "icons/obj/clothing/species/skrell" +#define FILE_DIR "icons/obj/clothing/species/tajaran" +#define FILE_DIR "icons/obj/clothing/species/unathi" +#define FILE_DIR "icons/obj/doors" +#define FILE_DIR "icons/obj/flora" +#define FILE_DIR "icons/obj/machines" +#define FILE_DIR "icons/obj/pipes" +#define FILE_DIR "icons/pda_icons" +#define FILE_DIR "icons/spideros_icons" +#define FILE_DIR "icons/Testing" +#define FILE_DIR "icons/turf" +#define FILE_DIR "icons/turf/flooring" +#define FILE_DIR "icons/vending_icons" +#define FILE_DIR "maps" +#define FILE_DIR "maps/overmap" +#define FILE_DIR "maps/overmap/bearcat" +#define FILE_DIR "nano" +#define FILE_DIR "nano/images" +#define FILE_DIR "sound" +#define FILE_DIR "sound/AI" +#define FILE_DIR "sound/ambience" +#define FILE_DIR "sound/effects" +#define FILE_DIR "sound/effects/turret" +#define FILE_DIR "sound/effects/wind" +#define FILE_DIR "sound/hallucinations" +#define FILE_DIR "sound/items" +#define FILE_DIR "sound/machines" +#define FILE_DIR "sound/mecha" +#define FILE_DIR "sound/misc" +#define FILE_DIR "sound/music" +#define FILE_DIR "sound/piano" +#define FILE_DIR "sound/violin" +#define FILE_DIR "sound/voice" +#define FILE_DIR "sound/voice/Serithi" +#define FILE_DIR "sound/weapons" // END_FILE_DIR // BEGIN_PREFERENCES #define DEBUG @@ -1826,6 +1892,7 @@ #include "code\modules\spells\targeted\projectile\magic_missile.dm" #include "code\modules\spells\targeted\projectile\projectile.dm" #include "code\modules\supermatter\supermatter.dm" +#include "code\modules\surgery\_defines.dm" #include "code\modules\surgery\bones.dm" #include "code\modules\surgery\encased.dm" #include "code\modules\surgery\face.dm" @@ -1837,6 +1904,7 @@ #include "code\modules\surgery\robotics.dm" #include "code\modules\surgery\slimes.dm" #include "code\modules\surgery\surgery.dm" +#include "code\modules\surgery\~defines.dm" #include "code\modules\tables\flipping.dm" #include "code\modules\tables\interactions.dm" #include "code\modules\tables\presets.dm"