mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Allows simple mobs to be scanned by health analyzers. (#21802)
* Allows simple mobs to be scanned by health analyzers. * Better math.
This commit is contained in:
@@ -118,6 +118,13 @@ REAGENT SCANNER
|
||||
|
||||
// Used by the PDA medical scanner too
|
||||
/proc/healthscan(mob/user, mob/living/M, mode = 1, advanced = FALSE)
|
||||
if(issimple_animal(M))
|
||||
if(M.stat == DEAD)
|
||||
to_chat(user, "<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: <font color='red'>Dead</font></span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: [round(M.health / M.maxHealth * 100, 0.1)]% Healthy")
|
||||
to_chat(user, "\t Damage Specifics: <font color='red'>[M.maxHealth - M.health]</font>")
|
||||
return
|
||||
if(!ishuman(M) || ismachineperson(M))
|
||||
//these sensors are designed for organic life
|
||||
to_chat(user, "<span class='notice'>Analyzing Results for ERROR:\n\t Overall Status: ERROR</span>")
|
||||
|
||||
Reference in New Issue
Block a user