Files
Paradise/code/__DEFINES/user_verb_defines.html

13 lines
5.4 KiB
HTML

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>code/__DEFINES/user_verb_defines.dm - Space Station 13</title></head><body><header><a href="index.html">Space Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a><a href="code/__DEFINES/user_verb_defines.html#define">Define Details</a></header><main><h1>code/__DEFINES/user_verb_defines.dm <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/user_verb_defines.dm"><img src="git.png" width="16" height="16" title="code/__DEFINES/user_verb_defines.dm"></a></h1><table class="summary" cellspacing="0"><tr><th><a href="code/__DEFINES/user_verb_defines.html#define/VERB_NO_DESCRIPTION">VERB_NO_DESCRIPTION</a></th><td>Use this to mark your verb as not having a description. Should ONLY be used if you are also hiding the verb!</td></tr><tr><th><a href="code/__DEFINES/user_verb_defines.html#define/_USER_VERB">_USER_VERB</a></th><td>This is the only macro you should use to define admin verbs.
It will define the verb and the verb holder for you.
Using it is very simple:
USER_VERB(verb_path, R_PERM, &quot;Name&quot;, &quot;Description&quot;, &quot;Admin.Category&quot;, args...)
This sets up all of the above and also acts as syntatic sugar as a verb delcaration for the verb itself.
Note that the verb args have an injected <code>client/user</code> argument that is the user that called the verb.
Do not use usr in your verb; technically you can but I'll kill you.</td></tr><tr><th><a href="code/__DEFINES/user_verb_defines.html#define/USER_VERB_CUSTOM_EXIST_CHECK">USER_VERB_CUSTOM_EXIST_CHECK</a></th><td>Used to define a special check to determine if the admin verb should exist at all. Useful for verbs such as play sound which require configuration.</td></tr><tr><th><a href="code/__DEFINES/user_verb_defines.html#define/USER_VERB_VISIBILITY">USER_VERB_VISIBILITY</a></th><td>Used to define the visibility flag of the verb. If the admin does not have this flag enabled they will not see the verb.</td></tr><tr><th><a href="code/__DEFINES/user_verb_defines.html#define/VERB_CATEGORY_HIDDEN">VERB_CATEGORY_HIDDEN</a></th><td>Used for verbs you do not want to show up in the master verb panel.</td></tr></table><h2 id="define">Define Details</h2><h3 id="define/USER_VERB_CUSTOM_EXIST_CHECK"><aside class="declaration">#define </aside>USER_VERB_CUSTOM_EXIST_CHECK<aside>(verb_path_name)</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/user_verb_defines.dm#L55"><img src="git.png" width="16" height="16" title="code/__DEFINES/user_verb_defines.dm 55"></a></h3><p>Used to define a special check to determine if the admin verb should exist at all. Useful for verbs such as play sound which require configuration.</p><h3 id="define/USER_VERB_VISIBILITY"><aside class="declaration">#define </aside>USER_VERB_VISIBILITY<aside>(verb_path_name, verb_visibility)</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/user_verb_defines.dm#L59"><img src="git.png" width="16" height="16" title="code/__DEFINES/user_verb_defines.dm 59"></a></h3><p>Used to define the visibility flag of the verb. If the admin does not have this flag enabled they will not see the verb.</p><h3 id="define/VERB_CATEGORY_HIDDEN"><aside class="declaration">#define </aside>VERB_CATEGORY_HIDDEN <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/user_verb_defines.dm#L70"><img src="git.png" width="16" height="16" title="code/__DEFINES/user_verb_defines.dm 70"></a></h3><p>Used for verbs you do not want to show up in the master verb panel.</p><h3 id="define/VERB_NO_DESCRIPTION"><aside class="declaration">#define </aside>VERB_NO_DESCRIPTION <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/user_verb_defines.dm#L2"><img src="git.png" width="16" height="16" title="code/__DEFINES/user_verb_defines.dm 2"></a></h3><p>Use this to mark your verb as not having a description. Should ONLY be used if you are also hiding the verb!</p><h3 id="define/_USER_VERB"><aside class="declaration">#define </aside>_USER_VERB<aside>(verb_path_name, verb_permissions, verb_name, verb_desc, verb_category, show_in_context_menu, verb_args ...)</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/user_verb_defines.dm#L23"><img src="git.png" width="16" height="16" title="code/__DEFINES/user_verb_defines.dm 23"></a></h3><p>This is the only macro you should use to define admin verbs.
It will define the verb and the verb holder for you.
Using it is very simple:
USER_VERB(verb_path, R_PERM, &quot;Name&quot;, &quot;Description&quot;, &quot;Admin.Category&quot;, args...)
This sets up all of the above and also acts as syntatic sugar as a verb delcaration for the verb itself.
Note that the verb args have an injected <code>client/user</code> argument that is the user that called the verb.
Do not use usr in your verb; technically you can but I'll kill you.</p></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/8a8a00a2a9bec485351e5f219982b7315d3504fa">8a8a00a</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html>