Skip to content

Commit

Permalink
much pain (MrMelbert#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMelbert authored Dec 3, 2021
1 parent 572b86c commit 17f3369
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 6 deletions.
12 changes: 6 additions & 6 deletions jollystation_modules/code/datums/pain/pain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,9 @@
* Only sends a vague description of how much pain, instead of a detailed report -
* it's up to the patient to elaborate on which limbs hurt and how much they hurt.
*
* adds text to [analyzer_text] list in place
* adds text to [render_list] list in place
*/
/datum/pain/proc/on_analyzed(mob/living/carbon/source, mob/living/carbon/human/user, list/analyzer_text)
/datum/pain/proc/on_analyzed(datum/source, list/render_list, advanced)
SIGNAL_HANDLER

var/amount = ""
Expand Down Expand Up @@ -771,10 +771,10 @@
tip += "Treat wounds and abate pain with long rest, anesthetic, cryogenics, or stasis, and heavy painkilling medication."

if(amount && tip)
analyzer_text += "<span class='alert ml-1'>"
analyzer_text += span_bold("Subject is experiencing [amount] pain. ")
analyzer_text += tip
analyzer_text += "</span>"
render_list += "<span class='alert ml-1'>"
render_list += span_bold("Subject is experiencing [amount] pain. ")
render_list += tip
render_list += "</span>\n"

// ------ Pain debugging stuff. ------
/datum/pain/vv_get_dropdown()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,39 @@
pain = PAIN_CHEST_MAX
bodypart_pain_modifier = 0.5

// Chests can't go below 100 max_stamina_damage for stam crit reasons
// So this override is here until stamina damage is improved a bit
/obj/item/bodypart/chest/on_gain_pain_effects(amount)
if(!owner)
return FALSE

var/base_max_stamina_damage = initial(max_stamina_damage)

switch(pain)
if(10 to 25)
max_stamina_damage = base_max_stamina_damage - 5
if(25 to 50)
max_stamina_damage = base_max_stamina_damage - 12
if(50 to 65)
max_stamina_damage = base_max_stamina_damage - 20

return TRUE

/obj/item/bodypart/chest/on_lose_pain_effects(amount)
if(!owner)
return FALSE

var/base_max_stamina_damage = initial(max_stamina_damage)
switch(pain)
if(0 to 10)
max_stamina_damage = base_max_stamina_damage
if(10 to 25)
max_stamina_damage = base_max_stamina_damage - 5
if(25 to 50)
max_stamina_damage = base_max_stamina_damage - 12

return TRUE

/obj/item/bodypart/chest/pain_feedback(delta_time, healing_pain)
if(!owner || !pain)
return FALSE
Expand Down

0 comments on commit 17f3369

Please sign in to comment.