/tg/ Station 13 - Modules - TypesVar Details - Proc Details

verb_manager

Vars

FOR_ADMINS_IF_VERBS_FUCKED_immediately_execute_all_verbsif this is true all verbs immediately execute and dont queue. in case the mc is fucked or something
always_queuealways queue if possible. overides can_queue_admin_verbs but not FOR_ADMINS_IF_VERBS_FUCKED_immediately_execute_all_verbs
can_queue_admin_verbsif TRUE we treat usr's with holders just like usr's without holders. otherwise they always execute immediately
message_admins_on_queueif TRUE this will... message admins every time a verb is queued to this subsystem for the next tick with stats. for obvious reasons dont make this be TRUE on the code level this is for admins to turn on
use_default_statsused for subtypes to determine if they use their own stats for the stat entry
verb_queuelist of callbacks to procs called from verbs or verblike procs that were executed when the server was overloaded and had to delay to the next tick. this list is ran through every tick, and the subsystem does not yield until this queue is finished.
verbs_executed_per_secondrunning average of how many verb callbacks are executed every second. used for the stat entry

Procs

can_queue_verbsubsystem-specific check for whether a callback can be queued. intended so that subsystem subtypes can verify whether
queue_verbqueue a callback for the given proc, so that it is invoked in the next tick. intended to only work with verbs or verblike procs called directly from client input, use as part of TRY_QUEUE_VERB()
run_verb_queueruns through all of this subsystems queue of verb callbacks. goes through the entire verb queue without yielding. used so you can flush the queue outside of fire() without interfering with anything else subtype subsystems might do in fire().

Var Details

FOR_ADMINS_IF_VERBS_FUCKED_immediately_execute_all_verbs

if this is true all verbs immediately execute and dont queue. in case the mc is fucked or something

always_queue

always queue if possible. overides can_queue_admin_verbs but not FOR_ADMINS_IF_VERBS_FUCKED_immediately_execute_all_verbs

can_queue_admin_verbs

if TRUE we treat usr's with holders just like usr's without holders. otherwise they always execute immediately

message_admins_on_queue

if TRUE this will... message admins every time a verb is queued to this subsystem for the next tick with stats. for obvious reasons dont make this be TRUE on the code level this is for admins to turn on

use_default_stats

used for subtypes to determine if they use their own stats for the stat entry

verb_queue

list of callbacks to procs called from verbs or verblike procs that were executed when the server was overloaded and had to delay to the next tick. this list is ran through every tick, and the subsystem does not yield until this queue is finished.

verbs_executed_per_second

running average of how many verb callbacks are executed every second. used for the stat entry

Proc Details

can_queue_verb

subsystem-specific check for whether a callback can be queued. intended so that subsystem subtypes can verify whether

subtypes may include additional arguments here if they need them! you just need to include them properly in TRY_QUEUE_VERB() and co.

queue_verb

queue a callback for the given proc, so that it is invoked in the next tick. intended to only work with verbs or verblike procs called directly from client input, use as part of TRY_QUEUE_VERB()

returns TRUE if the queuing was successful, FALSE otherwise.

run_verb_queue

runs through all of this subsystems queue of verb callbacks. goes through the entire verb queue without yielding. used so you can flush the queue outside of fire() without interfering with anything else subtype subsystems might do in fire().