mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-22 23:15:13 +00:00
## About The Pull Request So, I've been recently told that Skyrat uses the greyscale modify menu for loadouts, and the new ui state kinda borked it. I honestly haven't taken the possibility that the target could be anything but a subtype of `/atom` (and still work) into account because much of the code assumes the target is an atom. It's kinda crappy. Also I hadn't noticed we've an `unlocked` variable, which makes `vv_mode` var superflous, so i'm going to remove the latter.
15 lines
444 B
Plaintext
15 lines
444 B
Plaintext
/**
|
|
* tgui state: greyscale menu
|
|
*
|
|
* Checks that the target var of the greyscale menu meets the default can_use_topic criteria
|
|
*/
|
|
|
|
GLOBAL_DATUM_INIT(greyscale_menu_state, /datum/ui_state/greyscale_menu_state, new)
|
|
|
|
/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 GLOB.default_state.can_use_topic(menu.target, user)
|