mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] Revert "Revert "/tg/ preference datums part 1: take two"" (#8929)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <KashL@t-online.de> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -30,19 +30,18 @@ SUBSYSTEM_DEF(ping)
|
||||
var/client/client = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
|
||||
if(client)
|
||||
if(!client.is_preference_enabled(/datum/client_preference/vchat_enable))
|
||||
winset(client, "output", "on-show=&is-disabled=0&is-visible=1")
|
||||
winset(client, "browseroutput", "is-disabled=1;is-visible=0")
|
||||
client.tgui_panel.oldchat = TRUE
|
||||
if(!client?.prefs?.read_preference(/datum/preference/toggle/vchat_enable))
|
||||
winset(client, "output", "on-show=&is-disabled=0&is-visible=1")
|
||||
winset(client, "browseroutput", "is-disabled=1;is-visible=0")
|
||||
client.tgui_panel.oldchat = TRUE
|
||||
|
||||
if (client?.tgui_panel?.is_ready())
|
||||
// Send a soft ping
|
||||
client.tgui_panel.window.send_message("ping/soft", list(
|
||||
// Slightly less than the subsystem timer (somewhat arbitrary)
|
||||
// to prevent incoming pings from resetting the afk state
|
||||
"afk" = client.is_afk(3.5 SECONDS),
|
||||
))
|
||||
if (client?.tgui_panel?.is_ready())
|
||||
// Send a soft ping
|
||||
client.tgui_panel.window.send_message("ping/soft", list(
|
||||
// Slightly less than the subsystem timer (somewhat arbitrary)
|
||||
// to prevent incoming pings from resetting the afk state
|
||||
"afk" = client.is_afk(3.5 SECONDS),
|
||||
))
|
||||
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user