Skip to content

Commit

Permalink
Suspiciously easy alternative
Browse files Browse the repository at this point in the history
Not sure why I didn't just do this in the first place...
  • Loading branch information
SabreML committed Feb 20, 2024
1 parent ead2cdd commit 34e8b15
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
10 changes: 6 additions & 4 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@
/atom/movable/screen/action_button/attack_ghost(mob/dead/observer/user)
return

/atom/movable/screen/action_button/clicked(mob/user)
/atom/movable/screen/action_button/clicked(mob/user, list/mods)
if(!user || !source_action)
return TRUE
if(source_action.owner != user)
return TRUE

if(source_action.can_use_action())
source_action.action_activate()
Expand Down Expand Up @@ -97,7 +99,7 @@
icon_state = "hide"
var/hidden = 0

/atom/movable/screen/action_button/hide_toggle/clicked(mob/user, mods)
/atom/movable/screen/action_button/hide_toggle/clicked(mob/user, list/mods)
user.hud_used.action_buttons_hidden = !user.hud_used.action_buttons_hidden
hidden = user.hud_used.action_buttons_hidden
if(hidden)
Expand All @@ -107,7 +109,7 @@
name = "Hide Buttons"
icon_state = "hide"
user.update_action_buttons()
return 1
return TRUE

/atom/movable/screen/action_button/ghost/minimap/get_button_screen_loc(button_number)
return "SOUTH:6,CENTER+1:24"
Expand Down Expand Up @@ -211,7 +213,7 @@
update_icon(user)
return 1

/atom/movable/screen/clicked(mob/user)
/atom/movable/screen/clicked(mob/user, list/mods)
if(!user)
return TRUE

Expand Down
4 changes: 0 additions & 4 deletions code/_onclick/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
if(..())
return TRUE

// If the player is auto-observing someone, and they clicked on part of the target's UI.
if((observe_target_client || observe_target_mob) && istype(target, /atom/movable/screen))
return TRUE

if (mods["shift"] && mods["middle"])
point_to(target)
return TRUE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
show_browser(user, dat, name, "mob[name]")

/**
* Handles any storage containers that `src` is looking inside when auto-observed.
* Handles any storage containers that the human is looking inside when auto-observed.
*/
/mob/living/carbon/human/auto_observed(mob/dead/observer/observer)
. = ..()
Expand Down

0 comments on commit 34e8b15

Please sign in to comment.