AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   Sourcemod.dev - Client-Side SourceMod Scripting API Reference (https://forums.alliedmods.net/showthread.php?t=320631)

Peace-Maker 02-27-2020 07:51

Re: [BETA] Client-Side SourceMod Scripting API Reference
 
This looks awesome! I like the offline search and the speed of it!
What should I enter in the "Import 3rd Party Includes" page to import a file from your "sp-gid" repository? Do I have to download it or link to the raw github?

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?

Looks like you're missing the docs for deprecated api as well as the deprecated flag in general?
https://sourcemod.dev/#/string/function.StrBreak

asherkin 02-27-2020 10:18

Re: [BETA] Client-Side SourceMod Scripting API Reference
 
Quote:

Originally Posted by Peace-Maker (Post 2685187)
Looks like you're missing the docs for deprecated api as well as the deprecated flag in general?
https://sourcemod.dev/#/string/function.StrBreak

docparse has an issue where comment nodes are attached to the immediately following node, so the function's documentation ends up being attached to the `#pragma deprecated` rather than the function :crab:.

RumbleFrog 02-27-2020 19:00

Re: [BETA] Client-Side SourceMod Scripting API Reference
 
Quote:

Originally Posted by Peace-Maker (Post 2685187)
This looks awesome! I like the offline search and the speed of it!
What should I enter in the "Import 3rd Party Includes" page to import a file from your "sp-gid" repository? Do I have to download it or link to the raw github?

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?

Looks like you're missing the docs for deprecated api as well as the deprecated flag in general?
https://sourcemod.dev/#/string/function.StrBreak


Yeah, perhaps I should clear that up more. You just need a raw link to the content, in the future, I may add drag and drop.

And the deprecated symbols are not being picked up by the docparse atm similar to what Ash said.

JoinedSenses 03-05-2020 18:41

Re: [BETA] Client-Side SourceMod Scripting API Reference
 
Idea: Add a 'Copy Parameters To Clipboard' button to the right of the typedef field

https://i.imgur.com/SrW9GQe.png

RumbleFrog 03-05-2020 23:59

Re: [BETA] Client-Side SourceMod Scripting API Reference
 
v0.17.0/2


Changes:
  • You can now copy type definition signatures
  • Signature blocks are now overflowing horizontally on mobile making it more readable

https://i.imgur.com/c9sXYrO.png

https://i.imgur.com/ADtuGXm.gif

RumbleFrog 03-10-2020 00:48

Re: [BETA] Client-Side SourceMod Scripting API Reference
 
Quote:

Originally Posted by Peace-Maker (Post 2685187)

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 


Peace-Maker 03-10-2020 09:02

Re: [BETA] Client-Side SourceMod Scripting API Reference
 
Hm, the version number isn't really helping given the rolling release cycle. You might be on 1.10, but on an old commit. I think a timestamp when you added the function to the database might be useful? Maybe we could add some action to the sourcemod repo to trigger a script on your side on new commits?

RumbleFrog 03-10-2020 10:13

Re: [BETA] Client-Side SourceMod Scripting API Reference
 
Quote:

Originally Posted by Peace-Maker (Post 2686489)
Hm, the version number isn't really helping given the rolling release cycle. You might be on 1.10, but on an old commit. I think a timestamp when you added the function to the database might be useful? Maybe we could add some action to the sourcemod repo to trigger a script on your side on new commits?

Hm, I'm not sure how to approach that, there isn't really a database, all the processing is pushed to a repo that is served through a CDN https://github.com/rumblefrog/sp-gid . And my rust docgen does not guarantee the preservation of order, because it's being overwritten each time. So to do that, it would have to read existing ones and merge.

RumbleFrog 03-10-2020 10:40

Re: [BETA] Client-Side SourceMod Scripting API Reference
 
What I'll probably end up doing is creating another facilitator and run Github actions on schedule every day to check each manifest for changes and comparing to previous.

The only problem now is figuring out what schema or data structure that would work.

kadet.89 03-12-2020 07:28

Re: [BETA] Client-Side SourceMod Scripting API Reference
 
Would be nice to have comments like in the old API:

https://sm.alliedmods.net/api/index....ad=show&id=44&
https://sm.alliedmods.net/api/index....ad=show&id=87&
https://sm.alliedmods.net/api/index....ad=show&id=69&
https://sm.alliedmods.net/api/index....d=show&id=829&

We could add examples to just copy and past them to own plugins or describe some features and nuances.
Or automatically generate links to plugins where a specific function is used, something of that kind:

Need an example?, here are all plugins where "Teleport" function is used: https://www.sourcemod.net/plugins.ph...eport&search=1


All times are GMT -4. The time now is 00:55.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.