Raised This Month: $12 Target: $400
 3% 

Sourcemod.dev - Client-Side SourceMod Scripting API Reference


Post New Thread Reply   
 
Thread Tools Display Modes
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 02-27-2020 , 07:51   Re: [BETA] Client-Side SourceMod Scripting API Reference
Reply With Quote #11

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
__________________
Peace-Maker is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-27-2020 , 10:18   Re: [BETA] Client-Side SourceMod Scripting API Reference
Reply With Quote #12

Quote:
Originally Posted by Peace-Maker View Post
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 .
__________________
asherkin is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 02-27-2020 , 19:00   Re: [BETA] Client-Side SourceMod Scripting API Reference
Reply With Quote #13

Quote:
Originally Posted by Peace-Maker View Post
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.
__________________
RumbleFrog is offline
JoinedSenses
Senior Member
Join Date: Sep 2013
Old 03-05-2020 , 18:41   Re: [BETA] Client-Side SourceMod Scripting API Reference
Reply With Quote #14

Idea: Add a 'Copy Parameters To Clipboard' button to the right of the typedef field

__________________
JoinedSenses is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 03-05-2020 , 23:59   Re: [BETA] Client-Side SourceMod Scripting API Reference
Reply With Quote #15

v0.17.0/2


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




__________________
RumbleFrog is offline
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
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 03-10-2020 , 09:02   Re: [BETA] Client-Side SourceMod Scripting API Reference
Reply With Quote #17

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?
__________________
Peace-Maker is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 03-10-2020 , 10:13   Re: [BETA] Client-Side SourceMod Scripting API Reference
Reply With Quote #18

Quote:
Originally Posted by Peace-Maker View Post
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 is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 03-10-2020 , 10:40   Re: [BETA] Client-Side SourceMod Scripting API Reference
Reply With Quote #19

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.
__________________
RumbleFrog is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 03-12-2020 , 07:28   Re: [BETA] Client-Side SourceMod Scripting API Reference
Reply With Quote #20

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

Last edited by kadet.89; 03-12-2020 at 07:38.
kadet.89 is offline
Send a message via Skype™ to kadet.89
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:44.


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