ID:2230076
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
At the moment when you mouse over an atom in BYOND the name var of the atom is shown on the bottom left of DS and the webclient, this is the same for the right click menu when you right click on an atom or turf. I would like to have an atom proc that will change what is displayed on the bottom left status and right click menu depending on what is returned. If this proc is not overridden on an atom then the name var will be used.

The reason for this is I want some mobs to have their name displayed differently to different players when you mouseover them or right click them. I don't want this new proc to be used with the [] macro functionality (e.g recipient << "It looks like an [atom]!"), just for the tooltip and right click menu.

This proc would only be called when you mouse over an atom or when the right click menu is computed, and not be called again until you move the mouse off of the atom and move it back on, or right click again.

An example:

/mob/cat/quantum/Hint()
var/superposition = pick("black", "white")
return "schrodinger's [superposition] [name]"


This would randomly show the cat as black or white in the bottom left tooltip/right click menu to different players, and would potentially change every time the same player mouses over the cat or right clicks them.

I would also like to be able to call this proc arbitrarily to get the returned value at any time, as the project I contribute to has its own menu for viewing atoms on a tile.

My direct use case is that I am trying to change our game so that you don't necessarily know the name of every player, and the lower left tooltip and right click menu are hard coded to display the name var of the atom, which is not going to work, because I can't change the name var per client. I have already named all human mobs as the same so that way it doesn't matter, but I don't like it and think it's an unnecessary hack, and I would like to do this properly.
When would this be called?

Currently, when a client mouses over an object, the status bar immediately changes to that object's name because the client knows the object's name as part of the object's appearance.

If this new proc is called when a client mouses over an object, then the status bar can't be updated until the client receives the result from the server.

But, at that point, you might as well use a custom status bar that doesn't automatically show the name. This is what Hazordhu uses; no one knows anyone's name automatically, everyone has their own name associations.

It's probably fine for the context menu, though, which may already be affected by network latency.

Also, depending on when this is called, your cat's name could change every time an individual mouses over it.
If I use my own custom status bar then it won't really be a problem, I didn't think of that.

Well, either way, it would be called whenever you mouse over an object, but only if the proc is actually defined.

For the right click context menu, it would be called for each atom in the menu, again only if it's defined, and won't be called again unless you right click again.
In response to JJRcop
Of course, you could make a custom context menu, or forego context menus in general. Some games work better with a more natural interaction scheme. The built-in context menu is lazy and not very visually appealing. (Hazordhu doesn't use context menus...)