Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Click catcher bugfix #1135

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

/// If set to TRUE, mobs that do not own this hud cannot click this screen object.
var/private_screen = TRUE
/// If set to TRUE, call atom/Click()
var/default_click = FALSE

/atom/movable/screen/Initialize(mapload, datum/hud/hud_owner)
. = ..()
Expand All @@ -55,7 +57,10 @@
if(!can_usr_use(usr))
return TRUE

SEND_SIGNAL(src, COMSIG_CLICK, location, control, params, usr)
if(default_click)
..()
else
SEND_SIGNAL(src, COMSIG_CLICK, location, control, params, usr)

/atom/movable/screen/examine(mob/user)
return list()
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/effects/cursor_catcher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
plane = HUD_PLANE
mouse_opacity = MOUSE_OPACITY_ICON
private_screen = FALSE
default_click = TRUE
/// The mob whose cursor we are tracking.
var/mob/owner
/// Client view size of the scoping mob.
Expand Down
Loading