diff --git a/code/__DEFINES/traits/declarations.dm b/code/__DEFINES/traits/declarations.dm index 697fd7d88d851..cf598b9d5fa6d 100644 --- a/code/__DEFINES/traits/declarations.dm +++ b/code/__DEFINES/traits/declarations.dm @@ -285,6 +285,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_TOXINLOVER "toxinlover" /// Doesn't get overlays from being in critical. #define TRAIT_NOCRITOVERLAY "no_crit_overlay" +/// For gloves that should not incur a penalty when doing surgery +#define TRAIT_STERILE "sterilegloves" /// reduces the use time of syringes, pills, patches and medigels but only when using on someone #define TRAIT_FASTMED "fast_med_use" /// The mob is holy and resistance to cult magic diff --git a/code/_globalvars/traits/_traits.dm b/code/_globalvars/traits/_traits.dm index ccdf42017eb1a..a48e79c27ecac 100644 --- a/code/_globalvars/traits/_traits.dm +++ b/code/_globalvars/traits/_traits.dm @@ -411,6 +411,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_NO_DEBRAIN_OVERLAY" = TRAIT_NO_DEBRAIN_OVERLAY, "TRAIT_NO_DNA_COPY" = TRAIT_NO_DNA_COPY, "TRAIT_NO_EXTINGUISH" = TRAIT_NO_EXTINGUISH, + "TRAIT_STERILE" = TRAIT_STERILE, "TRAIT_NO_FLOATING_ANIM" = TRAIT_NO_FLOATING_ANIM, "TRAIT_NO_GLIDE" = TRAIT_NO_GLIDE, "TRAIT_NO_HUSK" = TRAIT_NO_HUSK, diff --git a/code/modules/clothing/gloves/plasmaman.dm b/code/modules/clothing/gloves/plasmaman.dm index 086e711d4da99..72a749812d44c 100644 --- a/code/modules/clothing/gloves/plasmaman.dm +++ b/code/modules/clothing/gloves/plasmaman.dm @@ -28,7 +28,7 @@ desc = "Pricy nitrile gloves made for plasmamen." icon_state = "nitrile" greyscale_colors = "#913b00" - clothing_traits = list(TRAIT_QUICKER_CARRY, TRAIT_FASTMED) + clothing_traits = list(TRAIT_QUICKER_CARRY, TRAIT_FASTMED, TRAIT_STERILE) /obj/item/clothing/gloves/color/plasmaman/white name = "white envirogloves" @@ -132,4 +132,4 @@ desc = "A new pattern plasmaman nitril glove set to match that drippy security grey suit." icon_state = "secmedplasma" greyscale_colors = "#918F8C" - clothing_traits = list(TRAIT_QUICKER_CARRY, TRAIT_FASTMED) + clothing_traits = list(TRAIT_QUICKER_CARRY, TRAIT_FASTMED, TRAIT_STERILE) diff --git a/code/modules/clothing/gloves/special.dm b/code/modules/clothing/gloves/special.dm index 7c6d84a6e4926..0c4e25a7070f9 100644 --- a/code/modules/clothing/gloves/special.dm +++ b/code/modules/clothing/gloves/special.dm @@ -103,7 +103,7 @@ greyscale_colors = null siemens_coefficient = 0.3 armor_type = /datum/armor/latex_gloves - clothing_traits = list(TRAIT_QUICK_CARRY, TRAIT_FINGERPRINT_PASSTHROUGH) + clothing_traits = list(TRAIT_QUICK_CARRY, TRAIT_FINGERPRINT_PASSTHROUGH, TRAIT_STERILE) resistance_flags = NONE /datum/armor/latex_gloves @@ -116,7 +116,7 @@ inhand_icon_state = "greyscale_gloves" armor_type = /datum/armor/nitrile greyscale_colors = "#99eeff" - clothing_traits = list(TRAIT_QUICKER_CARRY, TRAIT_FASTMED) + clothing_traits = list(TRAIT_QUICKER_CARRY, TRAIT_FASTMED, TRAIT_STERILE) /datum/armor/nitrile bio = 100 diff --git a/code/modules/surgery/surgery_helpers.dm b/code/modules/surgery/surgery_helpers.dm index 9b71628a0e62c..e5e0db85abc18 100644 --- a/code/modules/surgery/surgery_helpers.dm +++ b/code/modules/surgery/surgery_helpers.dm @@ -8,6 +8,8 @@ return 1 else if(locate(/obj/machinery/stasis, mob_turf)) return 0.9 + else if(locate(/obj/structure/bed/medical, mob_turf) || locate(/obj/structure/bed/medical/emergency, mob_turf) || locate(/obj/structure/bed/pod, mob_turf)) + return 0.85 else if(locate(/obj/structure/table, mob_turf)) return 0.8 else if(locate(/obj/structure/bed, mob_turf)) @@ -15,7 +17,6 @@ else return 0.5 - /proc/get_location_accessible(mob/located_mob, location) var/covered_locations = 0 //based on body_parts_covered var/face_covered = 0 //based on flags_inv diff --git a/code/modules/surgery/surgery_step.dm b/code/modules/surgery/surgery_step.dm index fc7585bc7071f..ada582002855b 100644 --- a/code/modules/surgery/surgery_step.dm +++ b/code/modules/surgery/surgery_step.dm @@ -104,10 +104,22 @@ speed_mod /= (get_location_modifier(target) * (1 + surgery.speed_modifier) * implement_speed_mod) * target.mob_surgery_speed_mod var/modded_time = time * speed_mod + var/slowdown_time = time * SURGERY_SLOWDOWN_CAP_MULTIPLIER + + fail_prob = modded_time - slowdown_time//if modded_time > time * modifier, then fail_prob = modded_time - time*modifier. starts at 0, caps at 99 + if(user == target && surgery.requires_bodypart_type != 2)//If doing self surgery & the limb is non robotic, apply a 50% penalty. + fail_prob += 50 + if((get_location_modifier(target) < 0.8))//if the surgery is not on a operating table or stasis bed, incur a 10% penalty + fail_prob += 10 + if(!HAS_TRAIT(user, TRAIT_STERILE))//if the person doing surgery does not have latex gloves, incure a 15% failure penalty. If you have gloves, gain a 5% bonus + fail_prob += 15 + else + fail_prob -= 5 + if(surgery.speed_modifier > 0 || HAS_TRAIT(target, TRAIT_ANALGESIA))//for chemical related surgery speed buffs, adds a reduction in failure chance. also checks for painkillers + fail_prob -= 15 + fail_prob = min(max(0, fail_prob), 99)//minimum of 0 and maximum of 99 - - fail_prob = min(max(0, modded_time - (time * SURGERY_SLOWDOWN_CAP_MULTIPLIER)),99)//if modded_time > time * modifier, then fail_prob = modded_time - time*modifier. starts at 0, caps at 99 - modded_time = min(modded_time, time * SURGERY_SLOWDOWN_CAP_MULTIPLIER)//also if that, then cap modded_time at time*modifier + modded_time = min(modded_time, slowdown_time)//also if that, then cap modded_time at time*modifier if(iscyborg(user))//any immunities to surgery slowdown should go in this check. modded_time = (time * tool.toolspeed) //Monkestation edit, allows borgs to have better surgery speed diff --git a/monkestation/code/modules/clothing/gloves/gloves.dm b/monkestation/code/modules/clothing/gloves/gloves.dm index 4185d5140605d..ec4962cef4ef5 100644 --- a/monkestation/code/modules/clothing/gloves/gloves.dm +++ b/monkestation/code/modules/clothing/gloves/gloves.dm @@ -43,7 +43,7 @@ worn_icon = 'monkestation/icons/mob/clothing/gloves.dmi' icon_state = "surgeonlatex" armor_type = /datum/armor/surgeon - clothing_traits = list(TRAIT_PERFECT_SURGEON, TRAIT_FASTMED) + clothing_traits = list(TRAIT_PERFECT_SURGEON, TRAIT_FASTMED, TRAIT_STERILE) custom_premium_price = PAYCHECK_CREW * 6 /datum/armor/surgeon