mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Added the preference option + smoll fix
This commit is contained in:
@@ -15,9 +15,9 @@ SUBSYSTEM_DEF(afk)
|
||||
/datum/controller/subsystem/afk/fire()
|
||||
var/list/toRemove = list()
|
||||
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
|
||||
if(H.client == null)
|
||||
if(H.client == null || !H.client.prefs.afk_watch) // Only players and players with the AFK watch enabled
|
||||
continue
|
||||
if(H.stat == DEAD && H.job) // No clientless or dead
|
||||
if(H.stat == DEAD || !H.job) // No dead or people without jobs
|
||||
if(afk_players[H.client])
|
||||
toRemove += H.client
|
||||
continue
|
||||
@@ -30,15 +30,20 @@ SUBSYSTEM_DEF(afk)
|
||||
afk_players[H.client] = AFK_WARNED
|
||||
warn(H, "<span class='danger'>You are AFK for [mins_afk] minutes. You will be cryod after [config.auto_cryo_afk] total minutes and fully despawned after [config.auto_despawn_afk] total minutes. Please move or click in game if you want to avoid being despawned.</span>")
|
||||
else if(afk_players[H.client] == AFK_WARNED)
|
||||
if(mins_afk >= config.auto_cryo_afk && cryo_ssd(H))
|
||||
afk_players[H.client] = AFK_CRYOD
|
||||
warn(H, "<span class='danger'>You are AFK for [mins_afk] minutes and have been moved to cryostorage. After being AFK for [config.auto_despawn_afk] total minutes you will be fully despawned. Please move out of cryostorage if you want to avoid being despawned.</span>")
|
||||
else
|
||||
if(mins_afk >= config.auto_despawn_afk)
|
||||
var/obj/machinery/cryopod/P = H.loc
|
||||
warn(H, "<span class='danger'>You are have been despawned after being AFK for [mins_afk] minutes.</span>")
|
||||
P.despawn_occupant()
|
||||
toRemove += H.client
|
||||
var/area/A = get_area(H)
|
||||
if(mins_afk >= config.auto_cryo_afk)
|
||||
if(A.fast_despawn)
|
||||
toRemove += H.client
|
||||
warn(H, "<span class='danger'>You are have been despawned after being AFK for [mins_afk] minutes. You have been despawned instantly due to you being in a secure area.</span>")
|
||||
force_cryo_human(H)
|
||||
else if(cryo_ssd(H))
|
||||
afk_players[H.client] = AFK_CRYOD
|
||||
warn(H, "<span class='danger'>You are AFK for [mins_afk] minutes and have been moved to cryostorage. After being AFK for [config.auto_despawn_afk] total minutes you will be fully despawned. Please eject yourself (right click, eject) out of the cryostorage if you want to avoid being despawned.</span>")
|
||||
else if(mins_afk >= config.auto_despawn_afk)
|
||||
var/obj/machinery/cryopod/P = H.loc
|
||||
warn(H, "<span class='danger'>You are have been despawned after being AFK for [mins_afk] minutes.</span>")
|
||||
toRemove += H.client
|
||||
P.despawn_occupant()
|
||||
|
||||
removeFromWatchList(toRemove)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user