From eafa00f4b7d10760e8ac4b4dc9dcaba6cc00fa57 Mon Sep 17 00:00:00 2001 From: pinatacolada Date: Thu, 23 Mar 2017 15:10:28 +0000 Subject: [PATCH 1/8] Dirty surgery rooms more prone to infections and ghetto surgery internal organ disinfection and dead limb revival MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Combination of #6743 and #6479, because I am a pro mlg git user, who would never have issues with the master branch no sir Doing surgery with another person watching, even if they don't wear a mask, doesn't warrant an infection either, but beyond that you are pushing your luck However, doing surgery in this scenario: ![why would you even do this](http://puu.sh/u7kLj/f3a444e1e9.jpg) Resulted in acute infections to the heart and lungs. So, recap: -Wash your hands, wash your tools if needed, clean your room, wear a mask and nothing bad happens. You can even invite a friend to watch over -Do brain surgery in a blood filled room with 11 clowns honking and breathing cooties down your patient, and it's just bad //-Letting your patient go without closing the incisions is also bad why would you even do that (NOT WORKING ATM) Allows to use a droppers, bottle, drinking glasses, drinking bottles. beakers, sprays, or if you are brave enough, an entire bucket, to treat internal organ infections with alcohol. The more alcoholic the thing is the more it disinfects. This is an available option during organ manipulation, at the time where you can apply trauma kits and etc, so you can for instance apply a trauma kit and then drip a bottle of vodka over someone's liver to treat infection. Also adds a debridement surgery to revive dead EXTERNAL organs. Same list of utensils as the previous, lets you apply mithocolide on a dead limb or chest to make it unded. Surgery steps are incision, scalpel, applying a reagent container, cauterize. 🆑 pinatacolada add: dirty surgery environments get you nasty infections add: ghetto surgery internal organ disinfection with alcohol add: dead limb revival surgery step /🆑 --- .../reagents/reagent_containers/dropper.dm | 23 ++--- code/modules/surgery/generic.dm | 2 +- code/modules/surgery/organs/organ_external.dm | 8 +- code/modules/surgery/organs_internal.dm | 95 ++++++++++++++++++- code/modules/surgery/other.dm | 47 +++++++-- code/modules/surgery/surgery.dm | 37 +++++++- 6 files changed, 177 insertions(+), 35 deletions(-) diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index 60b4cefefc1..fe60ad7b3e0 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -9,13 +9,21 @@ amount_per_transfer_from_this = 5 possible_transfer_amounts = list(1,2,3,4,5) volume = 5 - var/filled = 0 + +/obj/item/weapon/reagent_containers/dropper/on_reagent_change() + update_icon() + +/obj/item/weapon/reagent_containers/dropper/update_icon() + if(reagents.total_volume<=0) + icon_state = "[initial(icon_state)]" + else + icon_state = "[initial(icon_state)]1" /obj/item/weapon/reagent_containers/dropper/afterattack(obj/target, mob/user , flag) if(!target.reagents) return - if(filled) + if(reagents.total_volume) if(target.reagents.total_volume >= target.reagents.maximum_volume) to_chat(user, "[target] is full.") @@ -51,12 +59,7 @@ spawn(5) reagents.reaction(safe_thing, TOUCH) - - to_chat(user, "You transfer [trans] units of the solution.") - if(reagents.total_volume<=0) - filled = 0 - icon_state = "[initial(icon_state)]" return @@ -80,9 +83,6 @@ trans = reagents.trans_to(target, amount_per_transfer_from_this) to_chat(user, "You transfer [trans] units of the solution.") - if(reagents.total_volume<=0) - filled = 0 - icon_state = "[initial(icon_state)]" else @@ -98,9 +98,6 @@ to_chat(user, "You fill [src] with [trans] units of the solution.") - filled = 1 - icon_state = "[initial(icon_state)][filled]" - /obj/item/weapon/reagent_containers/dropper/cyborg name = "Industrial Dropper" desc = "A larger dropper. Transfers 10 units." diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index 8d5f7669ecd..a782c0a981d 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -89,7 +89,7 @@ user.visible_message(" [user] clamps bleeders in [target]'s [affected.name] with \the [tool].", \ " You clamp bleeders in [target]'s [affected.name] with \the [tool].") affected.clamp() - spread_germs_to_organ(affected, user) + spread_germs_to_organ(affected, user, tool) return 1 /datum/surgery_step/generic/clamp_bleeders/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index 242b6e48217..48b4d1332c2 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -108,26 +108,26 @@ switch(open) if(0) if(istype(W,/obj/item/weapon/scalpel)) - spread_germs_to_organ(src,user) + spread_germs_to_organ(src,user, W) user.visible_message("[user] cuts [src] open with [W]!") open++ return if(1) if(istype(W,/obj/item/weapon/retractor)) - spread_germs_to_organ(src,user) + spread_germs_to_organ(src,user, W) user.visible_message("[user] cracks [src] open like an egg with [W]!") open++ return if(2) if(istype(W,/obj/item/weapon/hemostat)) - spread_germs_to_organ(src,user) + spread_germs_to_organ(src,user, W) if(contents.len) var/obj/item/removing = pick(contents) var/obj/item/organ/internal/O = removing if(istype(O)) O.status |= ORGAN_CUT_AWAY if(!O.sterile) - spread_germs_to_organ(O,user) // This wouldn't be any cleaner than the actual surgery + spread_germs_to_organ(O,user, W) // This wouldn't be any cleaner than the actual surgery user.put_in_hands(removing) user.visible_message("[user] extracts [removing] from [src] with [W]!") else diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 73416045624..db603a71b33 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -1,3 +1,5 @@ +#define GHETTO_DISINFECT_AMOUNT 5 //Amount of units to transfer from the container to the organs during ghetto surgery disinfection step + /datum/surgery/organ_manipulation name = "Organ Manipulation" steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw, @@ -68,6 +70,13 @@ allowed_tools = list(/obj/item/organ/internal = 100, /obj/item/weapon/reagent_containers/food/snacks/organ = 0) var/implements_extract = list(/obj/item/weapon/hemostat = 100, /obj/item/weapon/kitchen/utensil/fork = 55) var/implements_mend = list(/obj/item/stack/medical/bruise_pack = 20,/obj/item/stack/medical/bruise_pack/advanced = 100,/obj/item/stack/nanopaste = 100) + var/implements_clean = list(/obj/item/weapon/reagent_containers/dropper = 100, + /obj/item/weapon/reagent_containers/glass/bottle = 75, + /obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 70, + /obj/item/weapon/reagent_containers/food/drinks/bottle = 65, + /obj/item/weapon/reagent_containers/glass/beaker = 60, + /obj/item/weapon/reagent_containers/spray = 50, + /obj/item/weapon/reagent_containers/glass/bucket = 40) //Finish is just so you can close up after you do other things. var/implements_finsh = list(/obj/item/weapon/scalpel/manager = 120,/obj/item/weapon/retractor = 100 ,/obj/item/weapon/crowbar = 75) var/current_type @@ -77,7 +86,7 @@ /datum/surgery_step/internal/manipulate_organs/New() ..() - allowed_tools = allowed_tools + implements_extract + implements_mend + implements_finsh + allowed_tools = allowed_tools + implements_extract + implements_mend + implements_clean + implements_finsh /datum/surgery_step/internal/manipulate_organs/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) @@ -110,6 +119,27 @@ user.visible_message("[user] starts transplanting \the [tool] into [target]'s [parse_zone(target_zone)].", \ "You start transplanting \the [tool] into [target]'s [parse_zone(target_zone)].") + else if(implement_type in implements_clean) + current_type = "clean" + + if(!istype(tool, /obj/item/weapon/reagent_containers/)) + return + + var/obj/item/weapon/reagent_containers/C = tool + + for(var/obj/item/organ/internal/I in affected.internal_organs) + if(I) + if(C.reagents.total_volume < GHETTO_DISINFECT_AMOUNT) + user.visible_message("[user] notices \the [tool] is empty.", \ + "You notice \the [tool] is empty") + return 0 + + var/msg = "[user] starts pouring some of \the [tool] over [target]'s [I.name]." + var/self_msg = "You start pouring some of \the [tool] over [target]'s [I.name]." + user.visible_message(msg, self_msg) + if(H && affected) + H.custom_pain("Something burns horribly in your [affected.name]!",1) + else if(implement_type in implements_finsh) //same as surgery step /datum/surgery_step/open_encased/close/ current_type = "finish" @@ -168,7 +198,7 @@ if(I && I.damage > 0) if(I.robotic < 2 && !istype (tool, /obj/item/stack/nanopaste)) if(!(I.sterile)) - spread_germs_to_organ(I, user) + spread_germs_to_organ(I, user, tool) user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \ "You start treating damage to [target]'s [I.name] with [tool_name]." ) else if(I.robotic >= 2 && istype(tool, /obj/item/stack/nanopaste)) @@ -217,7 +247,7 @@ I = tool user.drop_item() I.insert(target) - spread_germs_to_organ(I, user) + spread_germs_to_organ(I, user, tool) if(!user.canUnEquip(I, 0)) to_chat(user, "[I] is stuck to your hand, you can't put it in [target]!") return 0 @@ -237,7 +267,7 @@ " You have separated and extracted [target]'s [I] with \the [tool].") add_logs(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]") - spread_germs_to_organ(I, user) + spread_germs_to_organ(I, user, tool) I.status |= ORGAN_CUT_AWAY var/obj/item/thing = I.remove(target) if(!istype(thing)) @@ -250,6 +280,37 @@ user.visible_message("[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!", "You can't extract anything from [target]'s [parse_zone(target_zone)]!") + else if(current_type == "clean") + if(!hasorgans(target)) + return + if(!istype(tool,/obj/item/weapon/reagent_containers/)) + return + + var/obj/item/weapon/reagent_containers/C = tool + var/datum/reagents/R = C.reagents + var/ethanol = 0 //how much alcohol is in the thing + + if(R.reagent_list.len) + for(var/datum/reagent/consumable/ethanol/alcohol in R.reagent_list) + ethanol += alcohol.alcohol_perc * 300 + ethanol /= R.reagent_list.len + + for(var/obj/item/organ/internal/I in affected.internal_organs) + if(I) + if(R.total_volume < GHETTO_DISINFECT_AMOUNT) + user.visible_message("[user] notices there is not enough of \the [tool].", \ + "You notice there is not enough of \the [tool].") + return 0 + if(I.germ_level < INFECTION_LEVEL_ONE / 2) + to_chat(user, "[I] does not appear to be infected.") + if(I.germ_level >= INFECTION_LEVEL_ONE / 2) + I.surgeryize()//is this even needed? + I.germ_level = max(I.germ_level-ethanol, 0) + user.visible_message(" [user] has poured some of \the [tool] over [target]'s [I.name].", + " You have poured some of \the [tool] over [target]'s [I.name].") + R.trans_to(target, GHETTO_DISINFECT_AMOUNT) + R.reaction(target, INGEST) + else if(current_type == "finish") if(affected && affected.encased) var/msg = " [user] bends [target]'s [affected.encased] back into place with \the [tool]." @@ -263,7 +324,6 @@ return 1 - return 0 /datum/surgery_step/internal/manipulate_organs/fail_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -299,6 +359,31 @@ return 0 + else if(current_type == "clean") + if(!hasorgans(target)) + return + if(!istype(tool,/obj/item/weapon/reagent_containers/)) + return + + var/obj/item/weapon/reagent_containers/C = tool + var/datum/reagents/R = C.reagents + var/ethanol = 0 //how much alcohol is in the thing + + if(R.reagent_list.len) + for(var/datum/reagent/consumable/ethanol/alcohol in R.reagent_list) + ethanol += alcohol.alcohol_perc * 300 + ethanol /= C.reagents.reagent_list.len + + for(var/obj/item/organ/internal/I in affected.internal_organs) + I.germ_level = max(I.germ_level-ethanol, 0) + I.take_damage(rand(4,8),0) + + R.trans_to(target, GHETTO_DISINFECT_AMOUNT * 10) + R.reaction(target, INGEST) + + user.visible_message(" [user]'s hand slips, splashing the contents of \the [tool] all over [target]'s [affected.name] incision!", \ + " Your hand slips, splashing the contents of \the [tool] all over [target]'s [affected.name] incision!") + return 0 else if(current_type == "extract") if(I && I.owner == target) diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index 8caac8e70eb..df058d08a44 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -13,6 +13,11 @@ steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders,/datum/surgery_step/generic/retract_skin,/datum/surgery_step/fix_vein,/datum/surgery_step/generic/cauterize) possible_locs = list("chest","head","groin", "l_arm", "r_arm", "l_leg", "r_leg", "r_hand", "l_hand", "r_foot", "l_foot") +/datum/surgery/debridement + name = "Debridement" + steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders,/datum/surgery_step/generic/retract_skin,/datum/surgery_step/fix_dead_tissue,/datum/surgery_step/treat_necrosis,/datum/surgery_step/generic/cauterize) + possible_locs = list("chest","head","groin", "l_arm", "r_arm", "l_leg", "r_leg", "r_hand", "l_hand", "r_foot", "l_foot") + /datum/surgery/infection/can_start(mob/user, mob/living/carbon/target) if(ishuman(target)) var/mob/living/carbon/human/H = target @@ -39,6 +44,24 @@ return 1 return 0 +/datum/surgery/debridement/can_start(mob/user, mob/living/carbon/target) + if(ishuman(target)) + var/mob/living/carbon/human/H = target + var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) + + if(!hasorgans(target)) + return 0 + + if(!affected) + return 0 + + if(!(affected.status & ORGAN_DEAD)) + return 0 + + return 1 + + return 0 + /datum/surgery_step/fix_vein name = "mend internal bleeding" allowed_tools = list( @@ -115,7 +138,6 @@ if(!(affected.status & ORGAN_DEAD)) return 0 - return 1 /datum/surgery_step/fix_dead_tissue/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -146,9 +168,11 @@ allowed_tools = list( /obj/item/weapon/reagent_containers/dropper = 100, /obj/item/weapon/reagent_containers/glass/bottle = 75, - /obj/item/weapon/reagent_containers/glass/beaker = 75, + /obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 70, + /obj/item/weapon/reagent_containers/food/drinks/bottle = 65, + /obj/item/weapon/reagent_containers/glass/beaker = 60, /obj/item/weapon/reagent_containers/spray = 50, - /obj/item/weapon/reagent_containers/glass/bucket = 50, + /obj/item/weapon/reagent_containers/glass/bucket = 40 ) can_infect = 0 @@ -156,12 +180,14 @@ time = 24 -/datum/surgery_step/fix_dead_tissue/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) +/datum/surgery_step/treat_necrosis/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) if(!istype(tool, /obj/item/weapon/reagent_containers)) return 0 var/obj/item/weapon/reagent_containers/container = tool if(!container.reagents.has_reagent("mitocholide")) + user.visible_message("[user] looks at \the [tool] and ponders." , \ + "You are not sure if \the [tool] contains mitocholide to treat the necrosis.") return 0 if(!hasorgans(target)) @@ -172,34 +198,39 @@ return 0 return 1 -/datum/surgery_step/fix_dead_tissue/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) +/datum/surgery_step/treat_necrosis/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) user.visible_message("[user] starts applying medication to the affected tissue in [target]'s [affected.name] with \the [tool]." , \ "You start applying medication to the affected tissue in [target]'s [affected.name] with \the [tool].") target.custom_pain("Something in your [affected.name] is causing you a lot of pain!",1) ..() -/datum/surgery_step/fix_dead_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) +/datum/surgery_step/treat_necrosis/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(!istype(tool, /obj/item/weapon/reagent_containers)) return 0 var/obj/item/weapon/reagent_containers/container = tool + var/mithocolide = 0 + + if(container.reagents.has_reagent("mitocholide")) + mithocolide = 1 var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this) if(trans > 0) container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue - if(container.reagents.has_reagent("mitocholide")) + if(mithocolide) affected.status &= ~ORGAN_DEAD + target.update_body() user.visible_message(" [user] applies [trans] units of the solution to affected tissue in [target]'s [affected.name]", \ " You apply [trans] units of the solution to affected tissue in [target]'s [affected.name] with \the [tool].") return 1 -/datum/surgery_step/fix_dead_tissue/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) +/datum/surgery_step/treat_necrosis/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(!istype(tool, /obj/item/weapon/reagent_containers)) diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index de3d84796f4..743953362fc 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -163,7 +163,7 @@ if(ishuman(target)) var/obj/item/organ/external/affected = target.get_organ(target_zone) if(can_infect && affected) - spread_germs_to_organ(affected, user) + spread_germs_to_organ(affected, user, tool) if(ishuman(user) && !(istype(target,/mob/living/carbon/alien)) && prob(60)) var/mob/living/carbon/human/H = user if(blood_level) @@ -180,16 +180,45 @@ /datum/surgery_step/proc/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) return null +/proc/spread_germs_to_organ(obj/item/organ/E, mob/living/carbon/human/user, obj/item/tool) + if(!istype(user) || !istype(E)) + return -/proc/spread_germs_to_organ(obj/item/organ/E, mob/living/carbon/human/user) - if(!istype(user) || !istype(E)) return -// to_chat(world, "Germ spread: [E] : [E.owner]") var/germ_level = user.germ_level + + //germ spread from surgeon touching the patient if(user.gloves) germ_level = user.gloves.germ_level if(!(E.status & ORGAN_ROBOT)) //Germs on robotic limbs bad E.germ_level = max(germ_level,E.germ_level) //as funny as scrubbing microbes out with clean gloves is - no. + spread_germs_by_incision(E,tool)//germ spread from environement to patient +/proc/spread_germs_by_incision(obj/item/organ/external/E,obj/item/tool) + if(!istype(E,/obj/item/organ/external)) + return + + var/germs = 0 + + for(var/mob/living/carbon/human/H in view(2, E.loc))//germs from people + if(AStar(E.loc, H.loc, /turf/proc/Distance, 2, simulated_only = 0)) + if((!(NO_BREATH in H.mutations) || !(H.species.flags & NO_BREATH)) && !H.wear_mask) //wearing a mask helps preventing people from breathing cooties into open incisions + germs+=H.germ_level/4 + + for(var/obj/effect/decal/cleanable/M in view(2, E.loc))//germs from messes + if(AStar(E.loc, M.loc, /turf/proc/Distance, 2, simulated_only = 0)) + if(!istype(M,/obj/effect/decal/cleanable/dirt))//dirt is too common + germs++ + + if(tool.blood_DNA) //germs from blood-stained tools + germs += 30 + + if(E.internal_organs.len) + germs = germs / E.internal_organs.len + for(var/obj/item/organ/internal/O in E.internal_organs) + if(!(O.status & ORGAN_ROBOT)) + O.germ_level += germs + + E.germ_level += germs /proc/sort_surgeries() var/gap = surgery_steps.len From 64dd2fd65670e1941a9617178ef27e796c1c4f1a Mon Sep 17 00:00:00 2001 From: pinatacolada Date: Fri, 24 Mar 2017 10:45:14 +0000 Subject: [PATCH 2/8] plis --- code/modules/reagents/reagent_containers/dropper.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index fe60ad7b3e0..0396d1f1002 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -14,7 +14,7 @@ update_icon() /obj/item/weapon/reagent_containers/dropper/update_icon() - if(reagents.total_volume<=0) + if(reagents.total_volume <= 0) icon_state = "[initial(icon_state)]" else icon_state = "[initial(icon_state)]1" From 7c85877950bf94c178ce0f1f787581d96b09dd1b Mon Sep 17 00:00:00 2001 From: pinatacolada Date: Fri, 24 Mar 2017 10:58:18 +0000 Subject: [PATCH 3/8] im legally blind dont judge --- code/modules/surgery/other.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index df058d08a44..1ff04db381d 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -212,16 +212,16 @@ return 0 var/obj/item/weapon/reagent_containers/container = tool - var/mithocolide = 0 + var/mitocholide = 0 if(container.reagents.has_reagent("mitocholide")) - mithocolide = 1 + mitocholide = 1 var/trans = container.reagents.trans_to(target, container.amount_per_transfer_from_this) if(trans > 0) container.reagents.reaction(target, INGEST) //technically it's contact, but the reagents are being applied to internal tissue - if(mithocolide) + if(mitocholide) affected.status &= ~ORGAN_DEAD target.update_body() From bca1f4b852b4bc30c1281845a075f110175263e1 Mon Sep 17 00:00:00 2001 From: pinatacolada Date: Mon, 27 Mar 2017 01:18:10 +0100 Subject: [PATCH 4/8] fixessssss --- .../reagents/reagent_containers/dropper.dm | 3 - code/modules/surgery/organs_internal.dm | 153 +++++++++--------- 2 files changed, 76 insertions(+), 80 deletions(-) diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index 0396d1f1002..336e0080ee7 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -11,9 +11,6 @@ volume = 5 /obj/item/weapon/reagent_containers/dropper/on_reagent_change() - update_icon() - -/obj/item/weapon/reagent_containers/dropper/update_icon() if(reagents.total_volume <= 0) icon_state = "[initial(icon_state)]" else diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index db603a71b33..a9be3a7593f 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -104,25 +104,25 @@ return -1 if(I.damage > (I.max_damage * 0.75)) - to_chat(user, " \The [I] is in no state to be transplanted.") + to_chat(user, " [I] is in no state to be transplanted.") return -1 if(target.get_int_organ(I)) - to_chat(user, " \The [target] already has [I].") + to_chat(user, " [target] already has [I].") return -1 if(affected) - user.visible_message("[user] starts transplanting \the [tool] into [target]'s [affected.name].", \ - "You start transplanting \the [tool] into [target]'s [affected.name].") + user.visible_message("[user] starts transplanting [tool] into [target]'s [affected.name].", \ + "You start transplanting [tool] into [target]'s [affected.name].") H.custom_pain("Someone's rooting around in your [affected.name]!",1) else - user.visible_message("[user] starts transplanting \the [tool] into [target]'s [parse_zone(target_zone)].", \ - "You start transplanting \the [tool] into [target]'s [parse_zone(target_zone)].") + user.visible_message("[user] starts transplanting [tool] into [target]'s [parse_zone(target_zone)].", \ + "You start transplanting [tool] into [target]'s [parse_zone(target_zone)].") else if(implement_type in implements_clean) current_type = "clean" - if(!istype(tool, /obj/item/weapon/reagent_containers/)) + if(!istype(tool, /obj/item/weapon/reagent_containers)) return var/obj/item/weapon/reagent_containers/C = tool @@ -130,12 +130,12 @@ for(var/obj/item/organ/internal/I in affected.internal_organs) if(I) if(C.reagents.total_volume < GHETTO_DISINFECT_AMOUNT) - user.visible_message("[user] notices \the [tool] is empty.", \ - "You notice \the [tool] is empty") + user.visible_message("[user] notices [tool] is empty.", \ + "You notice [tool] is empty") return 0 - var/msg = "[user] starts pouring some of \the [tool] over [target]'s [I.name]." - var/self_msg = "You start pouring some of \the [tool] over [target]'s [I.name]." + var/msg = "[user] starts pouring some of [tool] over [target]'s [I.name]." + var/self_msg = "You start pouring some of [tool] over [target]'s [I.name]." user.visible_message(msg, self_msg) if(H && affected) H.custom_pain("Something burns horribly in your [affected.name]!",1) @@ -145,12 +145,12 @@ current_type = "finish" if(affected && affected.encased) - var/msg = "[user] starts bending [target]'s [affected.encased] back into place with \the [tool]." - var/self_msg = "You start bending [target]'s [affected.encased] back into place with \the [tool]." + var/msg = "[user] starts bending [target]'s [affected.encased] back into place with [tool]." + var/self_msg = "You start bending [target]'s [affected.encased] back into place with [tool]." user.visible_message(msg, self_msg) else - var/msg = "[user] starts pulling [target]'s skin back into place with \the [tool]." - var/self_msg = "You start pulling [target]'s skin back into place with \the [tool]." + var/msg = "[user] starts pulling [target]'s skin back into place with [tool]." + var/self_msg = "You start pulling [target]'s skin back into place with [tool]." user.visible_message(msg, self_msg) if(H && affected) @@ -173,8 +173,8 @@ I = organs[I] if(!I) return -1 - user.visible_message("[user] starts to separate [target]'s [I] with \the [tool].", \ - "You start to separate [target]'s [I] with \the [tool] for removal." ) + user.visible_message("[user] starts to separate [target]'s [I] with [tool].", \ + "You start to separate [target]'s [I] with [tool] for removal." ) if(H && affected) H.custom_pain("The pain in your [affected.name] is living hell!",1) else @@ -182,13 +182,13 @@ else if(implement_type in implements_mend) current_type = "mend" - var/tool_name = "\the [tool]" + var/tool_name = " [tool]" if(istype(tool, /obj/item/stack/medical/bruise_pack)) tool_name = "the bandaid" if(istype(tool, /obj/item/stack/medical/bruise_pack/advanced)) tool_name = "regenerative membrane" else if(istype(tool, /obj/item/stack/nanopaste)) - tool_name = "\the [tool]" //what else do you call nanopaste medically? + tool_name = " [tool]" //what else do you call nanopaste medically? if(!hasorgans(target)) to_chat(user, "They do not have organs to mend!") @@ -219,13 +219,13 @@ /datum/surgery_step/internal/manipulate_organs/end_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) if(current_type == "mend") - var/tool_name = "\the [tool]" + var/tool_name = " [tool]" if(istype(tool, /obj/item/stack/medical/bruise_pack/advanced)) tool_name = "regenerative membrane" if(istype(tool, /obj/item/stack/medical/bruise_pack)) tool_name = "the bandaid" if(istype(tool, /obj/item/stack/nanopaste)) - tool_name = "\the [tool]" //what else do you call nanopaste medically? + tool_name = " [tool]" //what else do you call nanopaste medically? if(!hasorgans(target)) return @@ -253,18 +253,18 @@ return 0 if(affected) - user.visible_message(" [user] has transplanted \the [tool] into [target]'s [affected.name].", - " You have transplanted \the [tool] into [target]'s [affected.name].") + user.visible_message(" [user] has transplanted [tool] into [target]'s [affected.name].", + " You have transplanted [tool] into [target]'s [affected.name].") else - user.visible_message(" [user] has transplanted \the [tool] into [target]'s [parse_zone(target_zone)].", - " You have transplanted \the [tool] into [target]'s [parse_zone(target_zone)].") + user.visible_message(" [user] has transplanted [tool] into [target]'s [parse_zone(target_zone)].", + " You have transplanted [tool] into [target]'s [parse_zone(target_zone)].") I.status &= ~ORGAN_CUT_AWAY else if(current_type == "extract") if(I && I.owner == target) - user.visible_message(" [user] has separated and extracts [target]'s [I] with \the [tool].", - " You have separated and extracted [target]'s [I] with \the [tool].") + user.visible_message(" [user] has separated and extracts [target]'s [I] with [tool].", + " You have separated and extracted [target]'s [I] with [tool].") add_logs(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]") spread_germs_to_organ(I, user, tool) @@ -283,7 +283,7 @@ else if(current_type == "clean") if(!hasorgans(target)) return - if(!istype(tool,/obj/item/weapon/reagent_containers/)) + if(!istype(tool,/obj/item/weapon/reagent_containers)) return var/obj/item/weapon/reagent_containers/C = tool @@ -298,28 +298,27 @@ for(var/obj/item/organ/internal/I in affected.internal_organs) if(I) if(R.total_volume < GHETTO_DISINFECT_AMOUNT) - user.visible_message("[user] notices there is not enough of \the [tool].", \ - "You notice there is not enough of \the [tool].") + user.visible_message("[user] notices there is not enough of [tool].", \ + "You notice there is not enough of [tool].") return 0 if(I.germ_level < INFECTION_LEVEL_ONE / 2) to_chat(user, "[I] does not appear to be infected.") if(I.germ_level >= INFECTION_LEVEL_ONE / 2) - I.surgeryize()//is this even needed? I.germ_level = max(I.germ_level-ethanol, 0) - user.visible_message(" [user] has poured some of \the [tool] over [target]'s [I.name].", - " You have poured some of \the [tool] over [target]'s [I.name].") + user.visible_message(" [user] has poured some of [tool] over [target]'s [I.name].", + " You have poured some of [tool] over [target]'s [I.name].") R.trans_to(target, GHETTO_DISINFECT_AMOUNT) R.reaction(target, INGEST) else if(current_type == "finish") if(affected && affected.encased) - var/msg = " [user] bends [target]'s [affected.encased] back into place with \the [tool]." - var/self_msg = " You bend [target]'s [affected.encased] back into place with \the [tool]." + var/msg = " [user] bends [target]'s [affected.encased] back into place with [tool]." + var/self_msg = " You bend [target]'s [affected.encased] back into place with [tool]." user.visible_message(msg, self_msg) affected.open = 2.5 else - var/msg = "[user] pulls [target]'s flesh back into place with \the [tool]." - var/self_msg = "You pull [target]'s flesh back into place with \the [tool]." + var/msg = "[user] pulls [target]'s flesh back into place with [tool]." + var/self_msg = "You pull [target]'s flesh back into place with [tool]." user.visible_message(msg, self_msg) return 1 @@ -331,8 +330,8 @@ if(!hasorgans(target)) return - 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]!") + user.visible_message(" [user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.name] with [tool]!", \ + " Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with [tool]!") var/dam_amt = 2 @@ -351,8 +350,8 @@ return 0 else if(current_type == "insert") - user.visible_message(" [user]'s hand slips, damaging \the [tool]!", \ - " Your hand slips, damaging \the [tool]!") + user.visible_message(" [user]'s hand slips, damaging [tool]!", \ + " Your hand slips, damaging [tool]!") var/obj/item/organ/internal/I = tool if(istype(I) && !I.tough) I.take_damage(rand(3,5),0) @@ -381,19 +380,19 @@ R.trans_to(target, GHETTO_DISINFECT_AMOUNT * 10) R.reaction(target, INGEST) - user.visible_message(" [user]'s hand slips, splashing the contents of \the [tool] all over [target]'s [affected.name] incision!", \ - " Your hand slips, splashing the contents of \the [tool] all over [target]'s [affected.name] incision!") + user.visible_message(" [user]'s hand slips, splashing the contents of [tool] all over [target]'s [affected.name] incision!", \ + " Your hand slips, splashing the contents of [tool] all over [target]'s [affected.name] incision!") return 0 else if(current_type == "extract") if(I && I.owner == target) if(affected) - 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]!") + user.visible_message(" [user]'s hand slips, damaging [target]'s [affected.name] with [tool]!", \ + " Your hand slips, damaging [target]'s [affected.name] with [tool]!") affected.createwound(BRUISE, 20) else - user.visible_message(" [user]'s hand slips, damaging [target]'s [parse_zone(target_zone)] with \the [tool]!", \ - " Your hand slips, damaging [target]'s [parse_zone(target_zone)] with \the [tool]!") + user.visible_message(" [user]'s hand slips, damaging [target]'s [parse_zone(target_zone)] with [tool]!", \ + " Your hand slips, damaging [target]'s [parse_zone(target_zone)] with [tool]!") else user.visible_message("[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!", "You can't extract anything from [target]'s [parse_zone(target_zone)]!") @@ -434,20 +433,20 @@ /datum/surgery_step/saw_carapace/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message("[user] begins to cut through [target]'s [target_zone] with \the [tool].", \ - "You begin to cut through [target]'s [target_zone] with \the [tool].") + user.visible_message("[user] begins to cut through [target]'s [target_zone] with [tool].", \ + "You begin to cut through [target]'s [target_zone] with [tool].") ..() /datum/surgery_step/saw_carapace/end_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message(" [user] has cut [target]'s [target_zone] open with \the [tool].", \ - " You have cut [target]'s [target_zone] open with \the [tool].") + user.visible_message(" [user] has cut [target]'s [target_zone] open with [tool].", \ + " You have cut [target]'s [target_zone] open with [tool].") return 1 /datum/surgery_step/saw_carapace/fail_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message(" [user]'s hand slips, cracking [target]'s [target_zone] with \the [tool]!" , \ - " Your hand slips, cracking [target]'s [target_zone] with \the [tool]!" ) + user.visible_message(" [user]'s hand slips, cracking [target]'s [target_zone] with [tool]!" , \ + " Your hand slips, cracking [target]'s [target_zone] with [tool]!" ) return 0 /datum/surgery_step/cut_carapace @@ -471,20 +470,20 @@ /datum/surgery_step/cut_carapace/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message("[user] starts the incision on [target]'s [target_zone] with \the [tool].", \ - "You start the incision on [target]'s [target_zone] with \the [tool].") + user.visible_message("[user] starts the incision on [target]'s [target_zone] with [tool].", \ + "You start the incision on [target]'s [target_zone] with [tool].") ..() /datum/surgery_step/cut_carapace/end_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message(" [user] has made an incision on [target]'s [target_zone] with \the [tool].", \ - " You have made an incision on [target]'s [target_zone] with \the [tool].",) + user.visible_message(" [user] has made an incision on [target]'s [target_zone] with [tool].", \ + " You have made an incision on [target]'s [target_zone] with [tool].",) return 1 /datum/surgery_step/cut_carapace/fail_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message(" [user]'s hand slips, slicing open [target]'s [target_zone] in a wrong spot with \the [tool]!", \ - " Your hand slips, slicing open [target]'s [target_zone] in a wrong spot with \the [tool]!") + user.visible_message(" [user]'s hand slips, slicing open [target]'s [target_zone] in a wrong spot with [tool]!", \ + " Your hand slips, slicing open [target]'s [target_zone] in a wrong spot with [tool]!") return 0 /datum/surgery_step/retract_carapace @@ -500,37 +499,37 @@ time = 24 /datum/surgery_step/retract_carapace/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - var/msg = "[user] starts to pry open the incision on [target]'s [target_zone] with \the [tool]." - var/self_msg = "You start to pry open the incision on [target]'s [target_zone] with \the [tool]." + var/msg = "[user] starts to pry open the incision on [target]'s [target_zone] with [tool]." + var/self_msg = "You start to pry open the incision on [target]'s [target_zone] with [tool]." if(target_zone == "chest") - msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]." - self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]." + msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with [tool]." + self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with [tool]." if(target_zone == "groin") - msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]." - self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]." + msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with [tool]." + self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with [tool]." user.visible_message(msg, self_msg) ..() /datum/surgery_step/retract_carapace/end_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - var/msg = " [user] keeps the incision open on [target]'s [target_zone] with \the [tool]." - var/self_msg = " You keep the incision open on [target]'s [target_zone] with \the [tool]." + var/msg = " [user] keeps the incision open on [target]'s [target_zone] with [tool]." + var/self_msg = " You keep the incision open on [target]'s [target_zone] with [tool]." if(target_zone == "chest") - msg = " [user] keeps the ribcage open on [target]'s torso with \the [tool]." - self_msg = " You keep the ribcage open on [target]'s torso with \the [tool]." + msg = " [user] keeps the ribcage open on [target]'s torso with [tool]." + self_msg = " You keep the ribcage open on [target]'s torso with [tool]." if(target_zone == "groin") - msg = " [user] keeps the incision open on [target]'s lower abdomen with \the [tool]." - self_msg = " You keep the incision open on [target]'s lower abdomen with \the [tool]." + msg = " [user] keeps the incision open on [target]'s lower abdomen with [tool]." + self_msg = " You keep the incision open on [target]'s lower abdomen with [tool]." user.visible_message(msg, self_msg) return 1 /datum/surgery_step/generic/retract_carapace/fail_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - var/msg = " [user]'s hand slips, tearing the edges of incision on [target]'s [target_zone] with \the [tool]!" - var/self_msg = " Your hand slips, tearing the edges of incision on [target]'s [target_zone] with \the [tool]!" + var/msg = " [user]'s hand slips, tearing the edges of incision on [target]'s [target_zone] with [tool]!" + var/self_msg = " Your hand slips, tearing the edges of incision on [target]'s [target_zone] with [tool]!" if(target_zone == "chest") - msg = " [user]'s hand slips, damaging several organs [target]'s torso with \the [tool]!" - self_msg = " Your hand slips, damaging several organs [target]'s torso with \the [tool]!" + msg = " [user]'s hand slips, damaging several organs [target]'s torso with [tool]!" + self_msg = " Your hand slips, damaging several organs [target]'s torso with [tool]!" if(target_zone == "groin") - msg = " [user]'s hand slips, damaging several organs [target]'s lower abdomen with \the [tool]" - self_msg = " Your hand slips, damaging several organs [target]'s lower abdomen with \the [tool]!" + msg = " [user]'s hand slips, damaging several organs [target]'s lower abdomen with [tool]" + self_msg = " Your hand slips, damaging several organs [target]'s lower abdomen with [tool]!" user.visible_message(msg, self_msg) return 0 From ed875e2d40ea0e8cc314415f52cde20febda2899 Mon Sep 17 00:00:00 2001 From: pinatacolada Date: Mon, 27 Mar 2017 01:22:15 +0100 Subject: [PATCH 5/8] oops spacing --- code/modules/surgery/organs_internal.dm | 142 ++++++++++++------------ 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index a9be3a7593f..806f9b42b13 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -104,20 +104,20 @@ return -1 if(I.damage > (I.max_damage * 0.75)) - to_chat(user, " [I] is in no state to be transplanted.") + to_chat(user, " [I] is in no state to be transplanted.") return -1 if(target.get_int_organ(I)) - to_chat(user, " [target] already has [I].") + to_chat(user, " [target] already has [I].") return -1 if(affected) - user.visible_message("[user] starts transplanting [tool] into [target]'s [affected.name].", \ - "You start transplanting [tool] into [target]'s [affected.name].") + user.visible_message("[user] starts transplanting [tool] into [target]'s [affected.name].", \ + "You start transplanting [tool] into [target]'s [affected.name].") H.custom_pain("Someone's rooting around in your [affected.name]!",1) else - user.visible_message("[user] starts transplanting [tool] into [target]'s [parse_zone(target_zone)].", \ - "You start transplanting [tool] into [target]'s [parse_zone(target_zone)].") + user.visible_message("[user] starts transplanting [tool] into [target]'s [parse_zone(target_zone)].", \ + "You start transplanting [tool] into [target]'s [parse_zone(target_zone)].") else if(implement_type in implements_clean) current_type = "clean" @@ -130,12 +130,12 @@ for(var/obj/item/organ/internal/I in affected.internal_organs) if(I) if(C.reagents.total_volume < GHETTO_DISINFECT_AMOUNT) - user.visible_message("[user] notices [tool] is empty.", \ - "You notice [tool] is empty") + user.visible_message("[user] notices [tool] is empty.", \ + "You notice [tool] is empty") return 0 - var/msg = "[user] starts pouring some of [tool] over [target]'s [I.name]." - var/self_msg = "You start pouring some of [tool] over [target]'s [I.name]." + var/msg = "[user] starts pouring some of [tool] over [target]'s [I.name]." + var/self_msg = "You start pouring some of [tool] over [target]'s [I.name]." user.visible_message(msg, self_msg) if(H && affected) H.custom_pain("Something burns horribly in your [affected.name]!",1) @@ -145,12 +145,12 @@ current_type = "finish" if(affected && affected.encased) - var/msg = "[user] starts bending [target]'s [affected.encased] back into place with [tool]." - var/self_msg = "You start bending [target]'s [affected.encased] back into place with [tool]." + var/msg = "[user] starts bending [target]'s [affected.encased] back into place with [tool]." + var/self_msg = "You start bending [target]'s [affected.encased] back into place with [tool]." user.visible_message(msg, self_msg) else - var/msg = "[user] starts pulling [target]'s skin back into place with [tool]." - var/self_msg = "You start pulling [target]'s skin back into place with [tool]." + var/msg = "[user] starts pulling [target]'s skin back into place with [tool]." + var/self_msg = "You start pulling [target]'s skin back into place with [tool]." user.visible_message(msg, self_msg) if(H && affected) @@ -173,8 +173,8 @@ I = organs[I] if(!I) return -1 - user.visible_message("[user] starts to separate [target]'s [I] with [tool].", \ - "You start to separate [target]'s [I] with [tool] for removal." ) + user.visible_message("[user] starts to separate [target]'s [I] with [tool].", \ + "You start to separate [target]'s [I] with [tool] for removal." ) if(H && affected) H.custom_pain("The pain in your [affected.name] is living hell!",1) else @@ -253,18 +253,18 @@ return 0 if(affected) - user.visible_message(" [user] has transplanted [tool] into [target]'s [affected.name].", - " You have transplanted [tool] into [target]'s [affected.name].") + user.visible_message(" [user] has transplanted [tool] into [target]'s [affected.name].", + " You have transplanted [tool] into [target]'s [affected.name].") else - user.visible_message(" [user] has transplanted [tool] into [target]'s [parse_zone(target_zone)].", - " You have transplanted [tool] into [target]'s [parse_zone(target_zone)].") + user.visible_message(" [user] has transplanted [tool] into [target]'s [parse_zone(target_zone)].", + " You have transplanted [tool] into [target]'s [parse_zone(target_zone)].") I.status &= ~ORGAN_CUT_AWAY else if(current_type == "extract") if(I && I.owner == target) - user.visible_message(" [user] has separated and extracts [target]'s [I] with [tool].", - " You have separated and extracted [target]'s [I] with [tool].") + user.visible_message(" [user] has separated and extracts [target]'s [I] with [tool].", + " You have separated and extracted [target]'s [I] with [tool].") add_logs(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]") spread_germs_to_organ(I, user, tool) @@ -298,27 +298,27 @@ for(var/obj/item/organ/internal/I in affected.internal_organs) if(I) if(R.total_volume < GHETTO_DISINFECT_AMOUNT) - user.visible_message("[user] notices there is not enough of [tool].", \ - "You notice there is not enough of [tool].") + user.visible_message("[user] notices there is not enough of [tool].", \ + "You notice there is not enough of [tool].") return 0 if(I.germ_level < INFECTION_LEVEL_ONE / 2) to_chat(user, "[I] does not appear to be infected.") if(I.germ_level >= INFECTION_LEVEL_ONE / 2) I.germ_level = max(I.germ_level-ethanol, 0) - user.visible_message(" [user] has poured some of [tool] over [target]'s [I.name].", - " You have poured some of [tool] over [target]'s [I.name].") + user.visible_message(" [user] has poured some of [tool] over [target]'s [I.name].", + " You have poured some of [tool] over [target]'s [I.name].") R.trans_to(target, GHETTO_DISINFECT_AMOUNT) R.reaction(target, INGEST) else if(current_type == "finish") if(affected && affected.encased) - var/msg = " [user] bends [target]'s [affected.encased] back into place with [tool]." - var/self_msg = " You bend [target]'s [affected.encased] back into place with [tool]." + var/msg = " [user] bends [target]'s [affected.encased] back into place with [tool]." + var/self_msg = " You bend [target]'s [affected.encased] back into place with [tool]." user.visible_message(msg, self_msg) affected.open = 2.5 else - var/msg = "[user] pulls [target]'s flesh back into place with [tool]." - var/self_msg = "You pull [target]'s flesh back into place with [tool]." + var/msg = "[user] pulls [target]'s flesh back into place with [tool]." + var/self_msg = "You pull [target]'s flesh back into place with [tool]." user.visible_message(msg, self_msg) return 1 @@ -330,8 +330,8 @@ if(!hasorgans(target)) return - user.visible_message(" [user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.name] with [tool]!", \ - " Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with [tool]!") + user.visible_message(" [user]'s hand slips, getting mess and tearing the inside of [target]'s [affected.name] with [tool]!", \ + " Your hand slips, getting mess and tearing the inside of [target]'s [affected.name] with [tool]!") var/dam_amt = 2 @@ -350,8 +350,8 @@ return 0 else if(current_type == "insert") - user.visible_message(" [user]'s hand slips, damaging [tool]!", \ - " Your hand slips, damaging [tool]!") + user.visible_message(" [user]'s hand slips, damaging [tool]!", \ + " Your hand slips, damaging [tool]!") var/obj/item/organ/internal/I = tool if(istype(I) && !I.tough) I.take_damage(rand(3,5),0) @@ -380,19 +380,19 @@ R.trans_to(target, GHETTO_DISINFECT_AMOUNT * 10) R.reaction(target, INGEST) - user.visible_message(" [user]'s hand slips, splashing the contents of [tool] all over [target]'s [affected.name] incision!", \ - " Your hand slips, splashing the contents of [tool] all over [target]'s [affected.name] incision!") + user.visible_message(" [user]'s hand slips, splashing the contents of [tool] all over [target]'s [affected.name] incision!", \ + " Your hand slips, splashing the contents of [tool] all over [target]'s [affected.name] incision!") return 0 else if(current_type == "extract") if(I && I.owner == target) if(affected) - user.visible_message(" [user]'s hand slips, damaging [target]'s [affected.name] with [tool]!", \ - " Your hand slips, damaging [target]'s [affected.name] with [tool]!") + user.visible_message(" [user]'s hand slips, damaging [target]'s [affected.name] with [tool]!", \ + " Your hand slips, damaging [target]'s [affected.name] with [tool]!") affected.createwound(BRUISE, 20) else - user.visible_message(" [user]'s hand slips, damaging [target]'s [parse_zone(target_zone)] with [tool]!", \ - " Your hand slips, damaging [target]'s [parse_zone(target_zone)] with [tool]!") + user.visible_message(" [user]'s hand slips, damaging [target]'s [parse_zone(target_zone)] with [tool]!", \ + " Your hand slips, damaging [target]'s [parse_zone(target_zone)] with [tool]!") else user.visible_message("[user] can't seem to extract anything from [target]'s [parse_zone(target_zone)]!", "You can't extract anything from [target]'s [parse_zone(target_zone)]!") @@ -433,20 +433,20 @@ /datum/surgery_step/saw_carapace/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message("[user] begins to cut through [target]'s [target_zone] with [tool].", \ - "You begin to cut through [target]'s [target_zone] with [tool].") + user.visible_message("[user] begins to cut through [target]'s [target_zone] with [tool].", \ + "You begin to cut through [target]'s [target_zone] with [tool].") ..() /datum/surgery_step/saw_carapace/end_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message(" [user] has cut [target]'s [target_zone] open with [tool].", \ - " You have cut [target]'s [target_zone] open with [tool].") + user.visible_message(" [user] has cut [target]'s [target_zone] open with [tool].", \ + " You have cut [target]'s [target_zone] open with [tool].") return 1 /datum/surgery_step/saw_carapace/fail_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message(" [user]'s hand slips, cracking [target]'s [target_zone] with [tool]!" , \ - " Your hand slips, cracking [target]'s [target_zone] with [tool]!" ) + user.visible_message(" [user]'s hand slips, cracking [target]'s [target_zone] with [tool]!" , \ + " Your hand slips, cracking [target]'s [target_zone] with [tool]!" ) return 0 /datum/surgery_step/cut_carapace @@ -463,27 +463,27 @@ /obj/item/weapon/twohanded/chainsaw = 1, \ /obj/item/weapon/claymore = 5, \ /obj/item/weapon/melee/energy/ = 5, \ - /obj/item/weapon/pen/edagger = 5, \ + /obj/item/weapon/pen/edagger = 5, \ ) time = 16 /datum/surgery_step/cut_carapace/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message("[user] starts the incision on [target]'s [target_zone] with [tool].", \ - "You start the incision on [target]'s [target_zone] with [tool].") + user.visible_message("[user] starts the incision on [target]'s [target_zone] with [tool].", \ + "You start the incision on [target]'s [target_zone] with [tool].") ..() /datum/surgery_step/cut_carapace/end_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message(" [user] has made an incision on [target]'s [target_zone] with [tool].", \ - " You have made an incision on [target]'s [target_zone] with [tool].",) + user.visible_message(" [user] has made an incision on [target]'s [target_zone] with [tool].", \ + " You have made an incision on [target]'s [target_zone] with [tool].",) return 1 /datum/surgery_step/cut_carapace/fail_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - user.visible_message(" [user]'s hand slips, slicing open [target]'s [target_zone] in a wrong spot with [tool]!", \ - " Your hand slips, slicing open [target]'s [target_zone] in a wrong spot with [tool]!") + user.visible_message(" [user]'s hand slips, slicing open [target]'s [target_zone] in a wrong spot with [tool]!", \ + " Your hand slips, slicing open [target]'s [target_zone] in a wrong spot with [tool]!") return 0 /datum/surgery_step/retract_carapace @@ -499,37 +499,37 @@ time = 24 /datum/surgery_step/retract_carapace/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - var/msg = "[user] starts to pry open the incision on [target]'s [target_zone] with [tool]." - var/self_msg = "You start to pry open the incision on [target]'s [target_zone] with [tool]." + var/msg = "[user] starts to pry open the incision on [target]'s [target_zone] with [tool]." + var/self_msg = "You start to pry open the incision on [target]'s [target_zone] with [tool]." if(target_zone == "chest") - msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with [tool]." - self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with [tool]." + msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with [tool]." + self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with [tool]." if(target_zone == "groin") - msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with [tool]." - self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with [tool]." + msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with [tool]." + self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with [tool]." user.visible_message(msg, self_msg) ..() /datum/surgery_step/retract_carapace/end_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - var/msg = " [user] keeps the incision open on [target]'s [target_zone] with [tool]." - var/self_msg = " You keep the incision open on [target]'s [target_zone] with [tool]." + var/msg = " [user] keeps the incision open on [target]'s [target_zone] with [tool]." + var/self_msg = " You keep the incision open on [target]'s [target_zone] with [tool]." if(target_zone == "chest") - msg = " [user] keeps the ribcage open on [target]'s torso with [tool]." - self_msg = " You keep the ribcage open on [target]'s torso with [tool]." + msg = " [user] keeps the ribcage open on [target]'s torso with [tool]." + self_msg = " You keep the ribcage open on [target]'s torso with [tool]." if(target_zone == "groin") - msg = " [user] keeps the incision open on [target]'s lower abdomen with [tool]." - self_msg = " You keep the incision open on [target]'s lower abdomen with [tool]." + msg = " [user] keeps the incision open on [target]'s lower abdomen with [tool]." + self_msg = " You keep the incision open on [target]'s lower abdomen with [tool]." user.visible_message(msg, self_msg) return 1 /datum/surgery_step/generic/retract_carapace/fail_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) - var/msg = " [user]'s hand slips, tearing the edges of incision on [target]'s [target_zone] with [tool]!" - var/self_msg = " Your hand slips, tearing the edges of incision on [target]'s [target_zone] with [tool]!" + var/msg = " [user]'s hand slips, tearing the edges of incision on [target]'s [target_zone] with [tool]!" + var/self_msg = " Your hand slips, tearing the edges of incision on [target]'s [target_zone] with [tool]!" if(target_zone == "chest") - msg = " [user]'s hand slips, damaging several organs [target]'s torso with [tool]!" - self_msg = " Your hand slips, damaging several organs [target]'s torso with [tool]!" + msg = " [user]'s hand slips, damaging several organs [target]'s torso with [tool]!" + self_msg = " Your hand slips, damaging several organs [target]'s torso with [tool]!" if(target_zone == "groin") - msg = " [user]'s hand slips, damaging several organs [target]'s lower abdomen with [tool]" - self_msg = " Your hand slips, damaging several organs [target]'s lower abdomen with [tool]!" + msg = " [user]'s hand slips, damaging several organs [target]'s lower abdomen with [tool]" + self_msg = " Your hand slips, damaging several organs [target]'s lower abdomen with [tool]!" user.visible_message(msg, self_msg) return 0 From 05580dc40917f61b159f0b26023475897bdb3b84 Mon Sep 17 00:00:00 2001 From: pinatacolada Date: Mon, 27 Mar 2017 13:43:18 +0100 Subject: [PATCH 6/8] spesses --- code/modules/surgery/organs_internal.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 806f9b42b13..1966b99b184 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -182,13 +182,13 @@ else if(implement_type in implements_mend) current_type = "mend" - var/tool_name = " [tool]" + var/tool_name = "[tool]" if(istype(tool, /obj/item/stack/medical/bruise_pack)) tool_name = "the bandaid" if(istype(tool, /obj/item/stack/medical/bruise_pack/advanced)) tool_name = "regenerative membrane" else if(istype(tool, /obj/item/stack/nanopaste)) - tool_name = " [tool]" //what else do you call nanopaste medically? + tool_name = "[tool]" //what else do you call nanopaste medically? if(!hasorgans(target)) to_chat(user, "They do not have organs to mend!") @@ -219,13 +219,13 @@ /datum/surgery_step/internal/manipulate_organs/end_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) if(current_type == "mend") - var/tool_name = " [tool]" + var/tool_name = "[tool]" if(istype(tool, /obj/item/stack/medical/bruise_pack/advanced)) tool_name = "regenerative membrane" if(istype(tool, /obj/item/stack/medical/bruise_pack)) tool_name = "the bandaid" if(istype(tool, /obj/item/stack/nanopaste)) - tool_name = " [tool]" //what else do you call nanopaste medically? + tool_name = "[tool]" //what else do you call nanopaste medically? if(!hasorgans(target)) return @@ -361,7 +361,7 @@ else if(current_type == "clean") if(!hasorgans(target)) return - if(!istype(tool,/obj/item/weapon/reagent_containers/)) + if(!istype(tool,/obj/item/weapon/reagent_containers)) return var/obj/item/weapon/reagent_containers/C = tool From fae387b51abba16f0697731dd2d1d347af8e0ed6 Mon Sep 17 00:00:00 2001 From: pinatacolada Date: Thu, 6 Apr 2017 18:34:38 +0100 Subject: [PATCH 7/8] i went to great lengths to fix this --- code/modules/surgery/surgery.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 743953362fc..4668979b10d 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -209,7 +209,7 @@ if(!istype(M,/obj/effect/decal/cleanable/dirt))//dirt is too common germs++ - if(tool.blood_DNA) //germs from blood-stained tools + if(tool.blood_DNA.len) //germs from blood-stained tools germs += 30 if(E.internal_organs.len) From 4140b89b33748b64cc354d6921fd232fb7c477e3 Mon Sep 17 00:00:00 2001 From: Crazy Lemon Date: Sun, 16 Apr 2017 15:03:15 -0700 Subject: [PATCH 8/8] catch a possible runtime real quicklike --- code/modules/surgery/surgery.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 4668979b10d..127077a621d 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -209,7 +209,7 @@ if(!istype(M,/obj/effect/decal/cleanable/dirt))//dirt is too common germs++ - if(tool.blood_DNA.len) //germs from blood-stained tools + if(tool.blood_DNA && tool.blood_DNA.len) //germs from blood-stained tools germs += 30 if(E.internal_organs.len)