mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-26 09:03:37 +00:00
39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
GLOBAL_VAR_INIT(ssd_indicator_overlay, mutable_appearance('modular_skyrat/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(var/state)
|
|
if(state == ssd_indicator)
|
|
return
|
|
ssd_indicator = state
|
|
if(ssd_indicator)
|
|
add_overlay(GLOB.ssd_indicator_overlay)
|
|
log_message("<font color='green'>has went SSD and got their indicator!</font>", INDIVIDUAL_ATTACK_LOG)
|
|
else
|
|
cut_overlay(GLOB.ssd_indicator_overlay)
|
|
log_message("<font color='green'>is no longer SSD and lost their indicator!</font>", INDIVIDUAL_ATTACK_LOG)
|
|
|
|
/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)
|
|
. = ..()
|
|
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)
|
|
*/
|