diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index 16984f115f5e..eb2aee5bf4a9 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -268,7 +268,7 @@ else if(!key) npc_message = "[t_He] [t_is] totally catatonic. The horrors of this place must have been too much for [t_him]. Any recovery is unlikely." // DARKPACK EDIT CHANGE else if(!client) - npc_message ="[t_He] [t_has] a blank, absent-minded stare and appears completely unresponsive to anything. [t_He] may snap out of it soon." + npc_message = "[t_He] [t_has] a blank, absent-minded stare and [t_has] been completely unresponsive to anything for [round(((world.time - lastclienttime) / (1 MINUTES)),1)] minutes. [t_He] may snap out of it soon." // DARKPACK EDIT CHANGE - SSD_INDICATOR if(npc_message) // give some space since this is usually near the end ADD_NEWLINE_IF_NECESSARY(.) diff --git a/modular_darkpack/modules/ssd_indicator/code/ssd_indicator.dm b/modular_darkpack/modules/ssd_indicator/code/ssd_indicator.dm new file mode 100644 index 000000000000..8350215ee8cb --- /dev/null +++ b/modular_darkpack/modules/ssd_indicator/code/ssd_indicator.dm @@ -0,0 +1,38 @@ +GLOBAL_VAR_INIT(ssd_indicator_overlay, mutable_appearance('modular_darkpack/modules/ssd_indicator/icons/ssd_indicator.dmi', "default0", FLY_LAYER)) + +/mob/living + var/ssd_indicator = FALSE + var/lastclienttime = 0 + +/mob/living/proc/set_ssd_indicator(state) + if(state == ssd_indicator) + return + ssd_indicator = state + if(ssd_indicator) + add_overlay(GLOB.ssd_indicator_overlay) + log_message("has went SSD and got their indicator!", LOG_ATTACK) + else + cut_overlay(GLOB.ssd_indicator_overlay) + log_message("is no longer SSD and lost their indicator!", LOG_ATTACK) + +/mob/living/Login() + . = ..() + set_ssd_indicator(FALSE) + +/mob/living/Logout() + lastclienttime = world.time + set_ssd_indicator(TRUE) + . = ..() + +//Temporary, look below for the reason +/mob/living/ghostize(can_reenter_corpse = TRUE, forced = FALSE) + . = ..() + set_ssd_indicator(FALSE) + +/* +//EDIT - TRANSFER CKEY IS NOT A THING ON THE TG CODEBASE, if things break too bad because of it, consider implementing it +//This proc should stop mobs from having the overlay when someone keeps jumping control of mobs, unfortunately it causes Aghosts to have their character without the SSD overlay, I wasn't able to find a better proc unfortunately +/mob/living/transfer_ckey(mob/new_mob, send_signal = TRUE) + ..() + set_ssd_indicator(FALSE) +*/ diff --git a/modular_darkpack/modules/ssd_indicator/icons/ssd_indicator.dmi b/modular_darkpack/modules/ssd_indicator/icons/ssd_indicator.dmi new file mode 100644 index 000000000000..3f7d100b6c67 Binary files /dev/null and b/modular_darkpack/modules/ssd_indicator/icons/ssd_indicator.dmi differ diff --git a/modular_darkpack/modules/ssd_indicator/readme.md b/modular_darkpack/modules/ssd_indicator/readme.md new file mode 100644 index 000000000000..2bd496fdea83 --- /dev/null +++ b/modular_darkpack/modules/ssd_indicator/readme.md @@ -0,0 +1,41 @@ + + +https://github.com/NovaSector/NovaSector/pull/ + +## SSD Indicator + +Module ID: SSD_INDICATOR +### Description: + + + +### TG Proc/File Changes: + +- N/A + + +### Modular Overrides: + +- N/A + + +### Defines: + +- N/A + + +### Included files that are not contained in this module: + +- N/A + + +### Credits: + + diff --git a/tgstation.dme b/tgstation.dme index 1abcc702f237..484f3fa4d651 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -7842,6 +7842,7 @@ #include "modular_darkpack\modules\splats\code\prefrences\splat_pref.dm" #include "modular_darkpack\modules\splats\code\subsplat\_subsplat.dm" #include "modular_darkpack\modules\splats\code\subsplat\pref.dm" +#include "modular_darkpack\modules\ssd_indicator\code\ssd_indicator.dm" #include "modular_darkpack\modules\stock_market\code\stockexchange.dm" #include "modular_darkpack\modules\storage\code\firstaidkit.dm" #include "modular_darkpack\modules\storyteller_dice\code\roll_datum.dm"