View Single Post
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 03-10-2020 , 00:48   Re: [BETA] Client-Side SourceMod Scripting API Reference
Reply With Quote #16

Quote:
Originally Posted by Peace-Maker View Post

Now that you're tracking all the include files, would it be possible to add some "Added in commit x" or "Added in version y" or "Added on date" to new api you discover?
I'm not sure how I should go about approaching that effectively, right now the documentation update is not triggered by sourcemod repo changes and is done manually. So perhaps if I could figure out how to trigger Github action from a 3rd party repo, this would be do-able and just compare previous versions for changes (additions, etc)

Another approach would be going forward, perhaps we could add more tags to documentations?

Ex: with recent GetCmdArgInt addition

PHP Code:
/**
 * Retrieves a numeric command argument given its index, from the current
 * console or server command. Will return 0 if the argument can not be
 * parsed as a number. Use GetCmdArgIntEx to handle that explicitly.
 *
 * @param argnum Argument number to retrieve.
 * @return       Value of the command argument.
 */
stock int GetCmdArgInt(int argnum) {
    
char str[12];
    
GetCmdArg(argnumstrsizeof(str));

    return 
StringToInt(str);

Perhaps we could add more meta tags, quite similar to Rust stability attributes (https://rust-lang.github.io/rustc-guide/stability.html) but on the docs side that I could parse without any additional work on the compile side.

PHP Code:
@since 1.10.0 
__________________

Last edited by RumbleFrog; 03-10-2020 at 00:50.
RumbleFrog is offline