mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
fix
This commit is contained in:
@@ -187,3 +187,6 @@
|
|||||||
var/list/block_parry_hinted = list()
|
var/list/block_parry_hinted = list()
|
||||||
/// moused over objects, currently capped at 7. this is awful, and should be replaced with a component to track it using signals for parrying at some point.
|
/// moused over objects, currently capped at 7. this is awful, and should be replaced with a component to track it using signals for parrying at some point.
|
||||||
var/list/moused_over_objects = list()
|
var/list/moused_over_objects = list()
|
||||||
|
|
||||||
|
/// AFK tracking
|
||||||
|
var/last_activity = 0
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
|||||||
log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]")
|
log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
last_activity = world.time
|
||||||
|
|
||||||
//Logs all hrefs
|
//Logs all hrefs
|
||||||
log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]")
|
log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]")
|
||||||
|
|
||||||
@@ -850,6 +852,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
|||||||
/client/Click(atom/object, atom/location, control, params, ignore_spam = FALSE, extra_info)
|
/client/Click(atom/object, atom/location, control, params, ignore_spam = FALSE, extra_info)
|
||||||
if(last_click > world.time - world.tick_lag)
|
if(last_click > world.time - world.tick_lag)
|
||||||
return
|
return
|
||||||
|
last_activity = world.time
|
||||||
last_click = world.time
|
last_click = world.time
|
||||||
var/ab = FALSE
|
var/ab = FALSE
|
||||||
var/list/L = params2list(params)
|
var/list/L = params2list(params)
|
||||||
@@ -922,6 +925,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
|||||||
//checks if a client is afk
|
//checks if a client is afk
|
||||||
//3000 frames = 5 minutes
|
//3000 frames = 5 minutes
|
||||||
/client/proc/is_afk(duration = CONFIG_GET(number/inactivity_period))
|
/client/proc/is_afk(duration = CONFIG_GET(number/inactivity_period))
|
||||||
|
var/inactivity = world.time - last_activity
|
||||||
if(inactivity > duration)
|
if(inactivity > duration)
|
||||||
return inactivity
|
return inactivity
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
set hidden = TRUE
|
set hidden = TRUE
|
||||||
|
|
||||||
client_keysend_amount += 1
|
client_keysend_amount += 1
|
||||||
|
last_activity = world.time
|
||||||
|
|
||||||
var/cache = client_keysend_amount
|
var/cache = client_keysend_amount
|
||||||
|
|
||||||
@@ -89,6 +90,7 @@
|
|||||||
set hidden = TRUE
|
set hidden = TRUE
|
||||||
|
|
||||||
keys_held -= _key
|
keys_held -= _key
|
||||||
|
last_activity = world.time
|
||||||
var/movement = movement_keys[_key]
|
var/movement = movement_keys[_key]
|
||||||
if(!(next_move_dir_add & movement))
|
if(!(next_move_dir_add & movement))
|
||||||
next_move_dir_sub |= movement
|
next_move_dir_sub |= movement
|
||||||
|
|||||||
@@ -295,6 +295,7 @@
|
|||||||
process_status()
|
process_status()
|
||||||
if(src_object.ui_act(act_type, payload, src, state))
|
if(src_object.ui_act(act_type, payload, src, state))
|
||||||
SStgui.update_uis(src_object)
|
SStgui.update_uis(src_object)
|
||||||
|
usr?.client?.last_activity = world.time
|
||||||
return FALSE
|
return FALSE
|
||||||
switch(type)
|
switch(type)
|
||||||
if("ready")
|
if("ready")
|
||||||
|
|||||||
Reference in New Issue
Block a user