Reverts health rounding changes

This commit is contained in:
Aurorablade
2017-12-02 18:26:58 -05:00
parent dc6bb34b38
commit 5301e37f22
2 changed files with 42 additions and 39 deletions
+42 -39
View File
@@ -76,51 +76,54 @@
return 0
//helper for getting the appropriate health status UPDATED BY PUCKABOO2 TO INCLUDE NEGATIVES.
/proc/RoundHealth(mob/living/M)
if(M.stat == DEAD)
return "health-100" //what's our health? it doesn't matter, we're dead
var/resulthealth = (M.health / M.maxHealth) * 100
switch(resulthealth)
/proc/RoundHealth(health)
switch(health)
if(100 to INFINITY)
return "health100"
if(90.625 to 100)
return "health93.75"
if(84.375 to 90.625)
return "health87.5"
if(78.125 to 84.375)
return "health81.25"
if(71.875 to 78.125)
return "health75"
if(65.625 to 71.875)
return "health68.75"
if(59.375 to 65.625)
return "health62.5"
if(53.125 to 59.375)
return "health56.25"
if(46.875 to 53.125)
if(95 to 100)
return "health95" //For telling patients to eat a warm donk pocket and go on with their shift.
if(90 to 95)
return "health90"
if(80 to 90)
return "health80"
if(70 to 80)
return "health70"
if(60 to 70)
return "health60"
if(50 to 60)
return "health50"
if(40.625 to 46.875)
return "health43.75"
if(34.375 to 40.625)
return "health37.5"
if(28.125 to 34.375)
return "health31.25"
if(21.875 to 28.125)
return "health25"
if(15.625 to 21.875)
return "health18.75"
if(9.375 to 15.625)
return "health12.5"
if(1 to 9.375)
return "health6.25"
if(-50 to 1)
if(40 to 50)
return "health40"
if(30 to 40)
return "health30"
if(20 to 30)
return "health20"
if(10 to 20)
return "health10"
if(0 to 10)
return "health0"
if(-85 to -50)
if(-10 to 0)
return "health-0" //The health bar will turn a brilliant red and flash as usual, but deducted health will be black.
if(-20 to -10)
return "health-10"
if(-30 to -20)
return "health-20"
if(-40 to -30)
return "health-30"
if(-50 to -40)
return "health-40"
if(-60 to -50)
return "health-50"
if(-99 to -85)
return "health-85"
if(-70 to -60)
return "health-60"
if(-80 to -70)
return "health-70" //Doc?
if(-90 to -80)
return "health-80" //Hey, doc?
if(-100 to -90)
return "health-90" //HURRY UP, DOC!
else
return "health-100"
return "health-100" //doc u had 1 job
return "0"
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB