mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
[MIRROR] Action button refactor/rework: Enhanced Dragging [MDB IGNORE] (#12423)
* Action button refactor/rework: Enhanced Dragging * PHEW Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
co-authored by
LemonInTheDark
Gandalf
parent
2f25875974
commit
cec72761ac
@@ -166,14 +166,15 @@
|
||||
var/obj/item/active_mousedown_item = null
|
||||
///Used in MouseDrag to preserve the original mouse click parameters
|
||||
var/mouseParams = ""
|
||||
///Used in MouseDrag to preserve the last mouse-entered location.
|
||||
var/mouseLocation = null
|
||||
///Used in MouseDrag to preserve the last mouse-entered object.
|
||||
var/mouseObject = null
|
||||
///Used in MouseDrag to preserve the last mouse-entered location. Weakref
|
||||
var/datum/weakref/mouse_location_ref = null
|
||||
///Used in MouseDrag to preserve the last mouse-entered object. Weakref
|
||||
var/datum/weakref/mouse_object_ref
|
||||
//Middle-mouse-button click dragtime control for aimbot exploit detection.
|
||||
var/middragtime = 0
|
||||
//Middle-mouse-button clicked object control for aimbot exploit detection.
|
||||
var/atom/middragatom
|
||||
//Middle-mouse-button clicked object control for aimbot exploit detection. Weakref
|
||||
var/datum/weakref/middle_drag_atom_ref
|
||||
|
||||
|
||||
/// Messages currently seen by this client
|
||||
var/list/seen_messages
|
||||
|
||||
@@ -911,7 +911,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
if(dragged && !LAZYACCESS(modifiers, dragged)) //I don't know what's going on here, but I don't trust it
|
||||
return
|
||||
|
||||
if (object && object == middragatom && LAZYACCESS(modifiers, LEFT_CLICK))
|
||||
if (object && IS_WEAKREF_OF(object, middle_drag_atom_ref) && LAZYACCESS(modifiers, LEFT_CLICK))
|
||||
ab = max(0, 5 SECONDS-(world.time-middragtime)*0.1)
|
||||
|
||||
var/mcl = CONFIG_GET(number/minute_click_limit)
|
||||
@@ -960,6 +960,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
else
|
||||
winset(src, null, "input.focus=true input.background-color=[COLOR_INPUT_ENABLED]")
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_CLIENT_CLICK, object, location, control, params, usr)
|
||||
|
||||
..()
|
||||
|
||||
/client/proc/add_verbs_from_config()
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
/datum/preference/toggle/buttons_locked
|
||||
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
||||
savefile_key = "buttons_locked"
|
||||
savefile_identifier = PREFERENCE_PLAYER
|
||||
default_value = FALSE
|
||||
Reference in New Issue
Block a user