diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm index 5fe96021461b..967efa40d0bb 100644 --- a/code/modules/mob/living/brain/brain_item.dm +++ b/code/modules/mob/living/brain/brain_item.dm @@ -349,14 +349,14 @@ return TRUE //Proc to use when directly adding a trauma to the brain, so extra args can be given -/obj/item/organ/brain/proc/gain_trauma(datum/brain_trauma/trauma, resilience, ...) +/obj/item/organ/brain/proc/gain_trauma(datum/brain_trauma/trauma, resilience, natural_gain = FALSE, ...) var/list/arguments = list() - if(args.len > 2) - arguments = args.Copy(3) - . = brain_gain_trauma(trauma, resilience, arguments) + if(args.len > 3) + arguments = args.Copy(4) + . = brain_gain_trauma(trauma, resilience, natural_gain, arguments) //Direct trauma gaining proc. Necessary to assign a trauma to its brain. Avoid using directly. -/obj/item/organ/brain/proc/brain_gain_trauma(datum/brain_trauma/trauma, resilience, list/arguments) +/obj/item/organ/brain/proc/brain_gain_trauma(datum/brain_trauma/trauma, resilience, list/arguments, natural_gain = FALSE) if(!can_gain_trauma(trauma, resilience)) return @@ -378,7 +378,10 @@ if(owner) actual_trauma.owner = owner actual_trauma.on_gain() - if(resilience) + if(natural_gain) + if(actual_trauma.resilience >= TRAUMA_RESILIENCE_LOBOTOMY) + actual_trauma.resilience = TRAUMA_RESILIENCE_SURGERY + else if(resilience) actual_trauma.resilience = resilience . = actual_trauma if(owner?.client) @@ -396,7 +399,7 @@ return var/trauma_type = pick(possible_traumas) - gain_trauma(trauma_type, resilience) + gain_trauma(trauma_type, resilience, natural_gain) //Cure a random trauma of a certain resilience level /obj/item/organ/brain/proc/cure_trauma_type(brain_trauma_type = /datum/brain_trauma, resilience = TRAUMA_RESILIENCE_BASIC) diff --git a/code/modules/surgery/brain_surgery.dm b/code/modules/surgery/brain_surgery.dm index 0b1d8610889f..7544f683b74a 100644 --- a/code/modules/surgery/brain_surgery.dm +++ b/code/modules/surgery/brain_surgery.dm @@ -55,7 +55,7 @@ "[user] screws up, causing brain damage!", "[user] completes the surgery on [target]'s brain.") target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 60) - target.gain_trauma_type(BRAIN_TRAUMA_SEVERE, TRAUMA_RESILIENCE_LOBOTOMY) + target.gain_trauma_type(BRAIN_TRAUMA_SEVERE, TRAUMA_RESILIENCE_SURGERY) else user.visible_message("[user] suddenly notices that the brain [user.p_they()] [user.p_were()] working on is not there anymore.", "You suddenly notice that the brain you were working on is not there anymore.") return FALSE