[MIRROR] filter improvements and oldchat colours [Follow up for #15712] (#7653)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
CHOMPStation2
2024-01-31 11:09:50 -07:00
committed by GitHub
parent 268424f436
commit 231ab5e123
4 changed files with 30 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
//Health bars in the game window would be pretty challenging and I don't know how to do that, so I thought this would be a good alternative
/mob/living/proc/chat_healthbar(var/mob/living/reciever, override = FALSE)
/mob/living/proc/chat_healthbar(var/mob/living/reciever, onExamine = FALSE, override = FALSE)
if(!reciever) //No one to send it to, don't bother
return
if(!reciever.client) //No one is home, don't bother
@@ -78,6 +78,8 @@
ourbar = "[ourbar] - [span_red("<b>DEAD</b>")]"
if(absorbed)
ourbar = span_purple("[ourbar] - ABSORBED") //Absorb is a little funny, I didn't want it to say 'absorbing ABSORBED' so we did it different
else if(ourpercent > 99 && ourbelly.digest_mode == DM_HEAL)
ourbar = span_green("<b>[ourbar] - [ourbelly.digest_mode]ed</b>")
else if(ourpercent > 75)
ourbar = span_green("[ourbar] - [ourbelly.digest_mode]ing")
else if(ourpercent > 50)
@@ -87,9 +89,12 @@
else if(ourpercent > 0)
ourbar = span_red("[ourbar] - [ourbelly.digest_mode]ing")
else
ourbar = "<span class='vdanger'>[ourbar] - [ourbelly.digest_mode]ing</span>"
ourbar = span_red("<b>[ourbar] - [ourbelly.digest_mode]ed</b>")
to_chat(reciever,"<span class='vnotice'>[ourbar]</span>")
if(onExamine)
to_chat(reciever,"<span class='notice'>[ourbar]</span>")
else
to_chat(reciever,"<span class='vnotice'>[ourbar]</span>")
/mob/living/verb/print_healthbars()
set name = "Print Prey Healthbars"
@@ -104,10 +109,10 @@
if(!isliving(thing))
continue
if(!belly_announce)
to_chat(src, "<span class='vnotice'>[b.digest_mode] - Within [b.name]:</span>") //We only want to announce the belly if we found something
to_chat(src, "<span class='notice'>[b.digest_mode] - Within [b.name]:</span>") //We only want to announce the belly if we found something
belly_announce = TRUE
var/mob/living/ourmob = thing
ourmob.chat_healthbar(src, TRUE)
ourmob.chat_healthbar(src, TRUE, TRUE)
nuffin = FALSE
if(nuffin)
to_chat(src, "<span class='vwarning'>There are no mobs within any of your bellies to print health bars for.</span>")
to_chat(src, "<span class='warning'>There are no mobs within any of your bellies to print health bars for.</span>")

View File

@@ -406,7 +406,9 @@ GLOBAL_LIST_INIT(digest_modes, list())
new_percent = (L.health / L.maxHealth) * 100
var/lets_announce = FALSE
if(new_percent <= 75 && old_percent > 75)
if(new_percent <= 99 && old_percent > 99)
lets_announce = TRUE
else if(new_percent <= 75 && old_percent > 75)
lets_announce = TRUE
else if(new_percent <= 50 && old_percent > 50)
lets_announce = TRUE
@@ -435,7 +437,9 @@ GLOBAL_LIST_INIT(digest_modes, list())
new_percent = (L.health / L.maxHealth) * 100
var/lets_announce = FALSE
if(new_percent >= 75 && old_percent < 75)
if(new_percent >= 100 && old_percent < 100)
lets_announce = TRUE
else if(new_percent >= 75 && old_percent < 75)
lets_announce = TRUE
else if(new_percent >= 50 && old_percent < 50)
lets_announce = TRUE
@@ -455,7 +459,9 @@ GLOBAL_LIST_INIT(digest_modes, list())
var/old_percent = ((old_nutrition - 100) / 500) * 100
var/new_percent = ((L.nutrition - 100) / 500) * 100
var/lets_announce = FALSE
if(new_percent <= 75 && old_percent > 75)
if(new_percent <= 99 && old_percent > 99)
lets_announce = TRUE
else if(new_percent <= 75 && old_percent > 75)
lets_announce = TRUE
else if(new_percent <= 50 && old_percent > 50)
lets_announce = TRUE
@@ -477,7 +483,9 @@ GLOBAL_LIST_INIT(digest_modes, list())
var/new_percent = ((L.nutrition - 100) / 500) * 100
var/lets_announce = FALSE
if(new_percent <= 75 && old_percent > 75)
if(new_percent <= 99 && old_percent > 99)
lets_announce = TRUE
else if(new_percent <= 75 && old_percent > 75)
lets_announce = TRUE
else if(new_percent <= 50 && old_percent > 50)
lets_announce = TRUE

View File

@@ -1972,7 +1972,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
to_chat(user, jointext(results, "<br>"))
if(isliving(target))
var/mob/living/ourtarget = target
ourtarget.chat_healthbar(user)
ourtarget.chat_healthbar(user, TRUE)
return TRUE
if("Use Hand")
@@ -2092,7 +2092,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
to_chat(user, jointext(results, "<br>"))
if(isliving(target))
var/mob/living/ourtarget = target
ourtarget.chat_healthbar(user)
ourtarget.chat_healthbar(user, TRUE)
return TRUE
if("Eject")

View File

@@ -78,7 +78,7 @@ em {font-style: normal;font-weight: bold;}
/* Miscellaneous */
.name {font-weight: bold;}
.say {}
.alert {color: #ff0000;}
.alert, .valert {color: #ff0000;}
h1.alert, h2.alert {color: #000000;}
.ghostalert {color: #5c00e6; font-style: italic; font-weight: bold;}
@@ -96,11 +96,11 @@ h1.alert, h2.alert {color: #000000;}
.passive {color: #660000;}
.critical {color: #ff0000; font-weight: bold; font-size: 150%;}
.danger {color: #ff0000; font-weight: bold;}
.warning {color: #ff0000; font-style: italic;}
.danger, .vdanger {color: #ff0000; font-weight: bold;}
.warning, .vwarning {color: #ff0000; font-style: italic;}
.rose {color: #ff5050;}
.info {color: #0000CC;}
.notice {color: #000099;}
.notice, .vnotice {color: #000099;}
.alium {color: #00ff00;}
.cult {color: #800080; font-weight: bold; font-style: italic;}
@@ -116,7 +116,7 @@ h1.alert, h2.alert {color: #000000;}
.skrellfar {color: #70FCFF;}
.soghun {color: #50BA6C;}
.solcom {color: #22228B;}
.changeling {color: #800080;font-style: italic;}
.changeling, .psay, .pemote {color: #800080;font-style: italic;}
.sergal {color: #0077FF;}
.birdsongc {color: #CC9900;}
.vulpkanin {color: #B97A57;}