Added the abitility to turn the AFK system on when you're antag

This commit is contained in:
joep van der velden
2019-12-23 19:29:23 +01:00
parent 81476df826
commit 377ae7671b
7 changed files with 17 additions and 6 deletions
+1 -1
View File
@@ -72,7 +72,7 @@
var/assistantlimit = 0 //enables assistant limiting
var/assistantratio = 2 //how many assistants to security members
// The AFK subsystem will not be activated if the below config values are equal or less than 0
// The AFK subsystem will not be activated if the below config value is equal or less than 0
var/auto_despawn_afk = 0 // How long till you actually despawn in cryo when you're AFK (Not ssd so not automatic)
var/auto_cryo_ssd_mins = 0
+2 -2
View File
@@ -21,9 +21,9 @@ SUBSYSTEM_DEF(afk)
var/turf/T
var/afk_warn_min
// Only players and players with the AFK watch enabled
// No dead, unconcious, restrained, people without jobs, people on other Z levels than the station or antags
// No dead, unconcious, restrained, people without jobs, people on other Z levels than the station or antags (if they have the preference option off)
if(!H.client || !(afk_warn_min = H.client.prefs.AFK_WATCH_warn_minutes) || !H.mind || \
H.stat || H.restrained() || !H.job || H.mind.special_role || \
H.stat || H.restrained() || !H.job || (H.mind.special_role && !H.client.prefs.AFK_WATCH_antag) || \
!is_station_level((T = get_turf(H)).z)) // Assign the turf as last. Small optimization
if(afk_players[H.ckey])
toRemove += H.ckey