Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
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
13 changes: 11 additions & 2 deletions code/modules/surgery/surgery_step.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@
if(IS_MEDICAL(user))
user_speed_mod = 0.8

var/previous_loc = user.loc

if(do_after(user, time * tool_speed_mod * user_speed_mod, target))
var/prob_chance = 100

Expand All @@ -129,7 +131,9 @@
surgery.status++
if(surgery.status > surgery.steps.len)
surgery.complete()

else
if(!(previous_loc == user.loc))
move_ouchie(user, target, target_zone, tool, advance)
surgery.step_in_progress = FALSE
return advance

Expand Down Expand Up @@ -248,12 +252,17 @@
var/final_ouchie_chance = SURGERY_FUCKUP_CHANCE * ouchie_mod
if(!prob(final_ouchie_chance))
return
user.visible_message(span_boldwarning("[target] flinches, bumping [user]'s [tool ? tool.name : "hand"] into something important!"), span_boldwarning("[target] flinches, bumping your [tool ? tool.name : "hand"] into something important!"))
user.visible_message(span_boldwarning("[target] flinches, bumping [user]'s [tool ? tool.name : "hand"] into something important!"), span_boldwarning("[target] flinches, bumping your [tool ? tool.name : "hand"] into something important!"))
target.apply_damage(fuckup_damage, fuckup_damage_type, target_zone)
//if(ishuman(target) &&fuckup_damage_type == BRUTE && prob(final_ouchie_chance/2))
//var/mob/living/carbon/human/H = target
//H.bleed_rate += min(fuckup_damage/4, 10)

///Deal damage if the user moved during the op
/datum/surgery_step/proc/move_ouchie(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, success)
user.visible_message(span_boldwarning("[user] bumps [p_their(FALSE, user)] [tool ? tool.name : "hand"] into something important!"), span_boldwarning("You move, bumping your [tool ? tool.name : "hand"] into something important!"))
target.apply_damage(fuckup_damage, fuckup_damage_type, target_zone)

/**
* Sends a pain message to the target, including a chance of screaming.
*
Expand Down