Button Verb Permissions in Design Philosophy
|
|
I'm just curious, with the BYOND 4 interface features, how do yall handle permissions with verbs you use on buttons?
You can hide them, but if a player has access to an input control that doesn't have a verb tied into it, they can still type it out in there.
You could make a lengthy system for adding and removing verbs as needed.
You could add a permission check proc at the beginning of each verb that checks to see if a certain window is visible or not. (This is the method I use)
Are there any other methods that I haven't thought of? What do yall think about each method?
As for me. I feel hiding verbs is just security by obscurity, and not really secure at all. If a player were to figure out that all my interface verbs began with "dmf", they'd easily be able to use them when they're not supposed to.
The method of adding and removing them as needed works well, but if you've got an interface-heavy game with dozens of buttons and are constantly opening and closing windows, it can really become bothersome.
The permission proc method seems to work well, but I really wish there were some sort of built-in method instead. Perhaps a "parent window" setting, that could accept a single window name or list of multiple windows.
|
At runtime, you can winset() the (hidden) verb names in, if you do not want others to find out (not visible by modifying the skin).
In the said verbs, it is a really good idea to verify the conditions it should work in, in case someone typed in the verb.
:D