ID:2864343
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
I took an answer that this feature request is not feasible because of how server-client works.

I instead posted another request for this.
https://www.byond.com/forum/post/2880508

-------------------------

Title.

Byond context menu thing shows the contents that I don't want to let people to see, or it shows an atom's name directly even if you are supposed to see it like 'Unidentified equipment'.
(For this, a player knows this, while another player doesn't know this, but 'name' variable will be the same to them. Mutable appearance is bad for this, I think, because you should make mutable_apprance per item per player which is extremely bloating.)

I literally want to get the list of atoms from the context menu when you right-clicked.
I know it's possible to get atoms from disabled right-click on dmf, and you can get Object/Location parameter and use those to locate more atoms on a turf of it.

BUT this is NOT what I want. There's a bad case that you can get the atom list when you click a big thing. If you click a big thing like 640x640px, you'll get atom/turf of the big thing, not the list of atoms under your cursor - which means getting atom list based on turf wouldn't be the same list of atom list on your cursor because it can be 10+ tiles away.


So, my request is literally to get the atom list on your cursor.
/Client/OnContextMenuOpen(atom_list)

maybe a proc like this?
This will let us adjust Context Menu items.
and I think "[image] [atom.name]" name format should be adjustable from 'atom_list' parameter.
It might need to be a kind of copied dictionary list because It should show different name per person if name format is changed.

-------------------------------------------------
(EDITED)

/Client/OnContextMenuOpen(atom_list)
for(var/atom/each_atom in atom_list)
if(!each_atom.visible)
atom_list.remove(each_atom)
if(src.mob.job != "Sage")
atom_list[each_atom] = "`atom_sprite` Unidentified item"
..() // I am not sure which is good to call a context menu upon right click between `..()` and `return atom_list`
This will be when you use standard context menu with adjusted atom list.
`atom_sprite` is an exclusive indicator there to express an item sprite there.
If you want another sprite on it, you should put `atom_sprite/(dmi.path)/(icon name)`

so, for the example as unidentified item in the example, it will be
"`atom_sprite/misc.dmi/quesitonmark` unidentified item"

` should be used here because you might want to put a series of icons into the context menu name...
"`atom_sprite/alphabet.dmi/h``atom_sprite/alphabet.dmi/e` ... to say hello in each icon.

/Client/OnContextMenuOpen(atom_list)
for(var/atom/each_atom in atom_list)
if(!each_atom.visible || each_atom.abstract)
atom_list.remove(each_atom)
popup_context_menu(atom_list)
// don't call ..() because we have a modified context menu

/Client/proc/popup_context_menu(atom_list)
//(bla bla) It shows a list of atoms you got from your mouse cursor with your own UI
and this will be when you want to make your own version of context menu.
https://www.byond.com/forum/post/2854298

For this, you can have two solutions through this:

1. You can copy only specific amount of items like how the first example says
2. You can send the atom_list data to your own context menu UI to express shitton of atoms. For example a scrollbar to your own version of context menu.
I took an answer that this feature request is not feasible because of how server-client works.

I instead posted another request for this.
https://www.byond.com/forum/post/2880508