Does anyone know why this might be? The admins have a lot of verbs that look like this: SomeVerb(mob/m in players). I suspect this is somehow lagging anyone who gets near them by the sheer number of admin verbs?
|
Why... are we not addressing the fact that this guy has "admin" verbs as just normal mob verbs? Every verb that's /mob/verb will be given to every mob in the entire game (even your /mob type NPCs). Same thing happens with /client/verb, except just for clients connected to the game.
To fix this guy's issue the proper way, would be to actually have an admin "system" in place that only gives these verbs TO admins... |
I just used the /mob/verb directory as an example.
Of course you should have them under an extra type, like /mob/Admin/verb or something. I'm sure he does. All I wanted to illustrate was the changing of the target to inside of the verb's body rather than outside. |
Using the popup_menu=0 setting on all those admin verbs would fix his issue as well then. Or even enabling the right-click setting on his primary map element. Anything that prevents the context menus from getting humongous for no reason, right?
|
A workaround would be to make the required target be declared later, rather than when you define the verb.
You'd need to refactor it such that...
If you dislike switch( statements, this accomplishes the same thing, and is a little less wordy.
Others will tell you to just not have verbs specifically, and instead refactor into an interface or something a bit less... Rip-y. This'll work for how I figure your game works.
My personal suggestion to you would be to get rid of as many admin verbs as you can. There's no reason you should have over 100 admin verbs. Shift that power to the players.
Edit: Added something for if you hate switch().