From f116289e671e50f4bbd3a7dba5e2e7ad88c908ba Mon Sep 17 00:00:00 2001 From: Timberpoes Date: Mon, 22 Mar 2021 05:14:47 +0000 Subject: [PATCH] Fixes not being able to open inactive ticket browser on admin ticket tab. (#57882) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit About The Pull Request Currently admins can't access the ticket logs for Resolved, Disconnected, Closed and Active tickets due to an early return that will block these from being opened in 100% of circumstances. Clicking on the Active/Disconnected/Closed/Resolved tickets would have behaviour handled by /datum/admin_help_tickets/proc/BrowseTickets() which was reached through Click() calls. image When we call .Click() from topic calls, we provide a null var for the control parameter. This then leads through to /client/Click() where #57084 added a bunch of if(!control) checks supposedly ported from TGMC (or at least Fikou couldn't explain why we changed that). I can't find a single instance of us using this locally, it appears it's always passed through to Byond. Byond docs at http://www.byond.com/docs/ref/#/client/proc/Click describe it as control - the name of the skin control involved I can't see any reason to early return if control is a FALSE-y value. This check is what was blocking access to the admin_help_tickets datum. In testing, removing these checks restored previous functionality. Why It's Good For The Game Admins less triggered. Changelog 🆑 fix: Admins can once again open the stat panels to look at active, disconnected, closed and resolved tickets. /🆑 --- code/_onclick/drag_drop.dm | 4 ---- code/modules/client/client_procs.dm | 2 -- 2 files changed, 6 deletions(-) diff --git a/code/_onclick/drag_drop.dm b/code/_onclick/drag_drop.dm index 41ccfff56f6..dde65e877e9 100644 --- a/code/_onclick/drag_drop.dm +++ b/code/_onclick/drag_drop.dm @@ -25,8 +25,6 @@ /client/MouseDown(datum/object, location, control, params) - if(!control) - return if(QDELETED(object)) //Yep, you can click on qdeleted things before they have time to nullspace. Fun. return SEND_SIGNAL(src, COMSIG_CLIENT_MOUSEDOWN, object, location, control, params) @@ -44,8 +42,6 @@ active_mousedown_item.onMouseDown(object, location, params, mob) /client/MouseUp(object, location, control, params) - if(!control) - return if(SEND_SIGNAL(src, COMSIG_CLIENT_MOUSEUP, object, location, control, params) & COMPONENT_CLIENT_MOUSEUP_INTERCEPT) click_intercept_time = world.time if(mouse_up_icon) diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index e2c52829380..86cfc3524e4 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -811,8 +811,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( ip_intel = res.intel /client/Click(atom/object, atom/location, control, params) - if(!control) - return if(click_intercept_time) if(click_intercept_time >= world.time) click_intercept_time = 0 //Reset and return. Next click should work, but not this one.