mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
Made character HUD show pain level instead of actual health.
Pain are calculated based on health, but all damages contribute differently, for example 50u burn will feel like 100u, but 50u poisoning would only feel like 25u.
This commit is contained in:
@@ -1230,18 +1230,22 @@
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if(healths)
|
||||
switch(hal_screwyhud)
|
||||
if(1) healths.icon_state = "health6"
|
||||
if(2) healths.icon_state = "health7"
|
||||
else
|
||||
switch(health - halloss)
|
||||
if(100 to INFINITY) healths.icon_state = "health0"
|
||||
if(80 to 100) healths.icon_state = "health1"
|
||||
if(60 to 80) healths.icon_state = "health2"
|
||||
if(40 to 60) healths.icon_state = "health3"
|
||||
if(20 to 40) healths.icon_state = "health4"
|
||||
if(0 to 20) healths.icon_state = "health5"
|
||||
else healths.icon_state = "health6"
|
||||
if (analgesic)
|
||||
healths.icon_state = "health_health_numb"
|
||||
else
|
||||
switch(hal_screwyhud)
|
||||
if(1) healths.icon_state = "health6"
|
||||
if(2) healths.icon_state = "health7"
|
||||
else
|
||||
//switch(health - halloss)
|
||||
switch(100 - traumatic_shock)
|
||||
if(100 to INFINITY) healths.icon_state = "health0"
|
||||
if(80 to 100) healths.icon_state = "health1"
|
||||
if(60 to 80) healths.icon_state = "health2"
|
||||
if(40 to 60) healths.icon_state = "health3"
|
||||
if(20 to 40) healths.icon_state = "health4"
|
||||
if(0 to 20) healths.icon_state = "health5"
|
||||
else healths.icon_state = "health6"
|
||||
|
||||
if(nutrition_icon)
|
||||
switch(nutrition)
|
||||
|
||||
@@ -3,7 +3,14 @@
|
||||
|
||||
// proc to find out in how much pain the mob is at the moment
|
||||
/mob/living/carbon/proc/updateshock()
|
||||
src.traumatic_shock = src.getOxyLoss() + src.getToxLoss() + src.getFireLoss() + 1.2*src.getBruteLoss() + 2*src.getCloneLoss() + src.halloss
|
||||
src.traumatic_shock = \
|
||||
1 * src.getOxyLoss() + \
|
||||
0.5 * src.getToxLoss() + \
|
||||
2.5 * src.getFireLoss() + \
|
||||
1.5 * src.getBruteLoss() + \
|
||||
2 * src.getCloneLoss() + \
|
||||
1 * src.halloss
|
||||
|
||||
if(reagents.has_reagent("alkysine"))
|
||||
src.traumatic_shock -= 10
|
||||
if(reagents.has_reagent("inaprovaline"))
|
||||
|
||||
Reference in New Issue
Block a user