From defe9a65a4ea1805808e7dd0a4aa37abeb24d3d2 Mon Sep 17 00:00:00 2001 From: JezuzLizard Date: Thu, 22 Feb 2024 20:06:39 -0800 Subject: [PATCH] Improved documentation of builtins. --- zm_ai_pack/pluto_sys.gsc | 54 +++++++++++++++++++++++++++++----------- zm_ai_pack/sys.gsc | 6 +++-- 2 files changed, 44 insertions(+), 16 deletions(-) diff --git a/zm_ai_pack/pluto_sys.gsc b/zm_ai_pack/pluto_sys.gsc index 52ac81b..189b423 100644 --- a/zm_ai_pack/pluto_sys.gsc +++ b/zm_ai_pack/pluto_sys.gsc @@ -15,6 +15,19 @@ getfunction( path, func_name ) return getfunction( path, func_name ); } +/@ + [DESCRIPTION]: Returns the name of the input function pointer in :: format.; + [CALL_TYPE]: function; + [USAGE]: func_name = getfunctionname( ); + [PARAMS]: ARG1:; + [PARAMS_NOTES]: NONE; + [RETURNS]: or ; +@/ +getfunction( path, func_name ) +{ + return getfunction( path, func_name ); +} + /@ [DESCRIPTION]: Used inside a function with a hook applied to it by replacefunc. When called resumes execution of the original function starting at the top. Unlike removedetour the hook is reenabled automatically when the function exits.; @@ -48,7 +61,7 @@ getdetour( func ) [DESCRIPTION]: Returns an array of pathnodes based on the caller node's path links. Returns an empty array if no links exist for caller node; [CALL_TYPE]: method; [USAGE]: self getlinkednodes(); - [PARAMS]: ARG0:; + [PARAMS]: CALLER:; [PARAMS_NOTES]: NONE; [RETURNS]: ; @/ @@ -62,7 +75,7 @@ getlinkednodes() in which case the message is not modified before being sent to the client.; [CALL_TYPE]: method; [USAGE]: self tell( ); - [PARAMS]: ARG0: ARG1:; + [PARAMS]: CALLER: ARG1:; [PARAMS_NOTES]: NONE; [RETURNS]: NONE; @/ @@ -85,6 +98,19 @@ say( message ) say( message ); } +/@ + [DESCRIPTION]: Executes as a console command using CBuf_AddText.; + [CALL_TYPE]: function; + [USAGE]: cmdexec( ); + [PARAMS]: ARG1:; + [PARAMS_NOTES]: NONE; + [RETURNS]: NONE; +@/ +cmdexec( cmd_string ) +{ + cmdexec( cmd_string ); +} + // The following are bot specifc builtins /@ [BOT_BUTTON_TYPES]: @@ -133,7 +159,7 @@ say( message ) is hard capped to values between 0 and 255.; [CALL_TYPE]: method; [USAGE]: self botmeleeparams( , ); - [PARAMS]: ARG0: ARG1: ARG2:; + [PARAMS]: CALLER: ARG1: ARG2:; [PARAMS_NOTES]: NONE; [RETURNS]: NONE; @/ @@ -146,7 +172,7 @@ botmeleeparams( ent_num, dist ) [DESCRIPTION]: Toggles off melee lunging for bot and clears the current dist and ent_num set by botmeleeparams.; [CALL_TYPE]: method; [USAGE]: self botclearmeleeparams(); - [PARAMS]: ARG0:; + [PARAMS]: CALLER:; [PARAMS_NOTES]: NONE; [RETURNS]: NONE; @/ @@ -160,7 +186,7 @@ botclearmeleeparams() Bot effectively simulates analog movement where max absolute values mean maximum speed and 0 no movement in that direction at all.; [CALL_TYPE]: method; [USAGE]: self botmovementoverride( , ); - [PARAMS]: ARG0: ARG1: ARG2:; + [PARAMS]: CALLER: ARG1: ARG2:; [PARAMS_NOTES]: NONE; [RETURNS]: NONE; @/ @@ -173,7 +199,7 @@ botmovementoverride( forward, right ) [DESCRIPTION]: Toggles off a movement override and resets forward and right values for caller bot.; [CALL_TYPE]: method; [USAGE]: self botclearmovementoverride(); - [PARAMS]: ARG0:; + [PARAMS]: CALLER:; [PARAMS_NOTES]: NONE; [RETURNS]: NONE; @/ @@ -187,7 +213,7 @@ botclearmovementoverride() otherwise if is "disable" will not be able to use