mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
@@ -146,6 +146,44 @@
|
||||
|
||||
stat(null,"Power Level: [powerlevel]")
|
||||
|
||||
/mob/living/carbon/slime/updatehealth(reason)
|
||||
. = ..()
|
||||
update_health_hud()
|
||||
|
||||
/mob/living/carbon/slime/proc/update_health_hud()
|
||||
if(hud_used)
|
||||
var/severity = 0
|
||||
var/healthpercent = (health/maxHealth) * 100
|
||||
if(stat != DEAD)
|
||||
switch(healthpercent)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "slime_health0"
|
||||
if(80 to 100)
|
||||
healths.icon_state = "slime_health1"
|
||||
severity = 1
|
||||
if(60 to 80)
|
||||
healths.icon_state = "slime_health2"
|
||||
severity = 2
|
||||
if(40 to 60)
|
||||
healths.icon_state = "slime_health3"
|
||||
severity = 3
|
||||
if(20 to 40)
|
||||
healths.icon_state = "slime_health4"
|
||||
severity = 4
|
||||
if(0 to 20)
|
||||
healths.icon_state = "slime_health5"
|
||||
severity = 5
|
||||
if(-199 to 0)
|
||||
healths.icon_state = "slime_health6"
|
||||
severity = 6
|
||||
else
|
||||
healths.icon_state = "slime_health7"
|
||||
severity = 6
|
||||
if(severity > 0)
|
||||
overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
|
||||
else
|
||||
clear_fullscreen("brute")
|
||||
|
||||
/mob/living/carbon/slime/adjustFireLoss(amount)
|
||||
..(-abs(amount)) // Heals them
|
||||
return
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
response_disarm = "shoos"
|
||||
response_harm = "stomps on"
|
||||
emote_see = list("jiggles", "bounces in place")
|
||||
var/colour = "grey"
|
||||
pass_flags = PASSTABLE
|
||||
var/colour = "grey"
|
||||
|
||||
/mob/living/simple_animal/slime/adult
|
||||
health = 200
|
||||
@@ -24,3 +24,37 @@
|
||||
/mob/living/simple_animal/slime/New()
|
||||
..()
|
||||
overlays += "aslime-:33"
|
||||
|
||||
/mob/living/simple_animal/slime/updatehealth(reason)
|
||||
. = ..()
|
||||
update_health_hud()
|
||||
|
||||
/mob/living/simple_animal/slime/proc/update_health_hud()
|
||||
if(hud_used)
|
||||
var/severity = 0
|
||||
var/healthpercent = (health/maxHealth) * 100
|
||||
switch(healthpercent)
|
||||
if(100 to INFINITY)
|
||||
healths.icon_state = "slime_health0"
|
||||
if(80 to 100)
|
||||
healths.icon_state = "slime_health1"
|
||||
severity = 1
|
||||
if(60 to 80)
|
||||
healths.icon_state = "slime_health2"
|
||||
severity = 2
|
||||
if(40 to 60)
|
||||
healths.icon_state = "slime_health3"
|
||||
severity = 3
|
||||
if(20 to 40)
|
||||
healths.icon_state = "slime_health4"
|
||||
severity = 4
|
||||
if(1 to 20)
|
||||
healths.icon_state = "slime_health5"
|
||||
severity = 5
|
||||
else
|
||||
healths.icon_state = "slime_health7"
|
||||
severity = 6
|
||||
if(severity > 0)
|
||||
overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
|
||||
else
|
||||
clear_fullscreen("brute")
|
||||
|
||||
Reference in New Issue
Block a user