Skip to content

Commit

Permalink
[MIRROR] Fix /datum/ui_state/greyscale_menu_state for non-atom datu…
Browse files Browse the repository at this point in the history
…ms (#791)

* Fix `/datum/ui_state/greyscale_menu_state` for non-atom datums (#81310)

## About The Pull Request

`can_use_topic` returns a UI define like `UI_INTERACTIVE`, not `TRUE` /
`FALSE`

This line is intended to allow greyscale menus to be used when targeting
non-atoms, however it prevents that entirely. #77322

## Changelog

Not necessary since _we_ don't have any GAGS menu usage that targets a
datum... currently.

* Fix `/datum/ui_state/greyscale_menu_state` for non-atom datums

---------

Co-authored-by: MrMelbert <[email protected]>
  • Loading branch information
2 people authored and FFMirrorBot committed Feb 6, 2024
1 parent 6856b05 commit a7347e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/modules/tgui/states/greyscale_menu.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ GLOBAL_DATUM_INIT(greyscale_menu_state, /datum/ui_state/greyscale_menu_state, ne
/datum/ui_state/greyscale_menu_state/can_use_topic(src_object, mob/user)
var/datum/greyscale_modify_menu/menu = src_object
if(!isatom(menu.target))
return TRUE
return UI_INTERACTIVE

return GLOB.default_state.can_use_topic(menu.target, user)

0 comments on commit a7347e2

Please sign in to comment.