Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions code/modules/clothing/gloves/plasmaman.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
4 changes: 2 additions & 2 deletions code/modules/clothing/gloves/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion code/modules/surgery/surgery_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
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))
return 0.7
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
Expand Down
18 changes: 15 additions & 3 deletions code/modules/surgery/surgery_step.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/clothing/gloves/gloves.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading