mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #4538 from VOREStation/upstream-merge-5726
[MIRROR] Refactors Sun and Inactivity processes to subsystems, and a few globa lvariables to be managed
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
/datum/controller/process/inactivity/setup()
|
||||
name = "inactivity"
|
||||
schedule_interval = 600 // Once every minute (approx.)
|
||||
|
||||
/datum/controller/process/inactivity/doWork()
|
||||
if(config.kick_inactive)
|
||||
for(last_object in clients)
|
||||
var/client/C = last_object
|
||||
if(C.is_afk(config.kick_inactive MINUTES) && !C.holder) // VOREStation Edit - Allow admins to idle
|
||||
to_chat(C,"<span class='warning'>You have been inactive for more than [config.kick_inactive] minute\s and have been disconnected.</span>")
|
||||
var/information
|
||||
|
||||
if(C.mob)
|
||||
if(ishuman(C.mob))
|
||||
var/job
|
||||
var/mob/living/carbon/human/H = C.mob
|
||||
var/datum/data/record/R = find_general_record("name", H.real_name)
|
||||
if(R)
|
||||
job = R.fields["real_rank"]
|
||||
if(!job && H.mind)
|
||||
job = H.mind.assigned_role
|
||||
if(!job && H.job)
|
||||
job = H.job
|
||||
if(job)
|
||||
information = " while [job]."
|
||||
|
||||
else if(issilicon(C.mob))
|
||||
information = " while a silicon."
|
||||
|
||||
var/adminlinks
|
||||
adminlinks = " (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[C.mob.x];Y=[C.mob.y];Z=[C.mob.z]'>JMP</a>|<A HREF='?_src_=holder;cryoplayer=\ref[C.mob]'>CRYO</a>)"
|
||||
|
||||
log_and_message_admins("being kicked for AFK[information][adminlinks]", C.mob)
|
||||
|
||||
qdel(C)
|
||||
SCHECK
|
||||
@@ -1,7 +0,0 @@
|
||||
/datum/controller/process/sun/setup()
|
||||
name = "sun"
|
||||
schedule_interval = 20 // every second
|
||||
sun = new
|
||||
|
||||
/datum/controller/process/sun/doWork()
|
||||
sun.calc_position()
|
||||
Reference in New Issue
Block a user