diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 9854950fd..bd6582c23 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -177,6 +177,16 @@ desc = "You're severely dehydrated." icon_state = "dehydrated" +/obj/screen/alert/pain + name = "Pain" + desc = "You're in pain!" + icon_state = "pain" + +/obj/screen/alert/painmajor + name = "Major Pain" + desc = "You're in major pain!" + icon_state = "pain_major" + /obj/screen/alert/gross name = "Grossed out." desc = "That was kind of gross..." diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index e3d0be6bb..8547e5117 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -36,7 +36,7 @@ All effects don't start immediately, but rather get worse over time; the rate is */ /datum/reagent/consumable/ethanol/on_mob_life(mob/living/carbon/C) - M.adjustPainLoss(-0.25*REM, 0) //alchol dulls pain + C.adjustPainLoss(-0.25*REM, 0) //alchol dulls pain if(C.drunkenness < volume * boozepwr * ALCOHOL_THRESHOLD_MODIFIER) var/booze_power = boozepwr if(HAS_TRAIT(C, TRAIT_ALCOHOL_TOLERANCE)) //we're an accomplished drinker diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index a6d6fec74..f6c1b89c3 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -391,7 +391,7 @@ datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M) /datum/reagent/medicine/mine_salve/on_mob_life(mob/living/carbon/C) C.hal_screwyhud = SCREWYHUD_HEALTHY C.adjustBruteLoss(-0.25*REM, 0) - M.adjustPainLoss(-1*REM, 0) + C.adjustPainLoss(-1*REM, 0) C.adjustFireLoss(-0.25*REM, 0) C.adjustStaminaLoss(-0.5*REM, 0) ..() diff --git a/hyperstation/code/modules/mob/living/carbon/carbon.dm b/hyperstation/code/modules/mob/living/carbon/carbon.dm index 2b6f4d682..e7c8ddd8e 100644 --- a/hyperstation/code/modules/mob/living/carbon/carbon.dm +++ b/hyperstation/code/modules/mob/living/carbon/carbon.dm @@ -16,6 +16,7 @@ /mob/living/carbon/proc/handle_pain() var/pain_amount = 0 pain_effect += 1 + //build up pain in the system from all your limbs and natrually heal pain if its attached to a live body. for(var/X in bodyparts) var/obj/item/bodypart/BP = X @@ -55,6 +56,16 @@ total_pain = pain_amount + //handle onscreen alert + if (pain_effect == 5) //alittle early to give you a 5 second warning + switch(total_pain) + if(-100 to 29) + clear_alert("pain") + if(30 to 79) + throw_alert("pain", /obj/screen/alert/pain) + if(80 to 200) + throw_alert("pain", /obj/screen/alert/painmajor) + if (pain_effect > 10) pain_effect = 0 //reset the timer 10 seconds. if(stat != DEAD) @@ -79,6 +90,8 @@ visible_message("[src] goes into shock!") death() // kill. + + //HS Pain heal /mob/living/carbon/adjustPainLoss(amount, updating_health = TRUE, forced = FALSE) if (!forced && amount < 0 && HAS_TRAIT(src,TRAIT_NONATURALHEAL)) diff --git a/icons/mob/screen_alert.dmi b/icons/mob/screen_alert.dmi index 1d9d5a373..5ff995490 100644 Binary files a/icons/mob/screen_alert.dmi and b/icons/mob/screen_alert.dmi differ