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

[INC] Karyuu Library | Community Collection


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
K4ryuu
Junior Member
Join Date: May 2022
Location: KitsuneLab®
Old 05-07-2022 , 14:14   [INC] Karyuu Library | Community Collection
Reply With Quote #1


> Description
Essentially, I have created a collection of useful stocks and functions into one massive library, to fasten the developments. I want to upgrade the collection with the AlliedModders community, so if you can improve this library or attach other files or new stocks, throw me with a pull request and let's build/enhance it together! Every contributor and also people whose functions are used other than my own ones, gets credited.

If you have any request of a stock, send an Issue on GitHub or reply to the thread!
> Credits
  • BCServ for some SMLIB stocks
  • c0rp3n for the base of the built in chat-processor part
> Changelog
Spoiler


> Links
Download > Click me
Source-Code > Click me
__________________
KitsuneLab® Developments
> K4ryuu <


Love the project? Please consider donating to help it improve!
GitHub | Website | Patreon | Discord | Email

Last edited by K4ryuu; 08-07-2022 at 16:00. Reason: Update
K4ryuu is offline
bigborther
Member
Join Date: Feb 2014
Location: china
Old 05-09-2022 , 07:33   Re: [INC] Karyuu Library | Community Collection
Reply With Quote #2

what a huge work, thanks for shareing
bigborther is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 05-19-2022 , 16:39   Re: [INC] Karyuu Library | Community Collection
Reply With Quote #3

Karyuu_IsValidClient

This stock and alternatives need to disappear out of existence.
Code:
#define KARYUU_LOOP_CLIENTS(%1) for (int %1 = 0; %1 <= MaxClients; %1++) if (Karyuu_IsValidClient(%1))

#define KARYUU_LOOP_CLIENTS(%1) for (int %1 = 0; %1 < 999; %1++) if (Karyuu_IsValidClient(%1))
Only the second stock requires IsValidClient, because it leaks outside MaxClients

Note that I think MAXPLAYERS is a wrote method to loop.
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 05-19-2022 , 20:46   Re: [INC] Karyuu Library | Community Collection
Reply With Quote #4

I think that having a library up that has useful stocks is awesome except I don't think people will use this repository often because everything has your username as a prefix.
Drixevel is offline
K4ryuu
Junior Member
Join Date: May 2022
Location: KitsuneLab®
Old 05-20-2022 , 02:14   Re: [INC] Karyuu Library | Community Collection
Reply With Quote #5

Quote:
Originally Posted by eyal282 View Post
Karyuu_IsValidClient

This stock and alternatives need to disappear out of existence.
Code:
#define KARYUU_LOOP_CLIENTS(%1) for (int %1 = 0; %1 <= MaxClients; %1++) if (Karyuu_IsValidClient(%1))

#define KARYUU_LOOP_CLIENTS(%1) for (int %1 = 0; %1 < 999; %1++) if (Karyuu_IsValidClient(%1))
Only the second stock requires IsValidClient, because it leaks outside MaxClients

Note that I think MAXPLAYERS is a wrote method to loop.
I'm going to modify it. Thank you!

Quote:
Originally Posted by Drixevel View Post
I think that having a library up that has useful stocks is awesome except I don't think people will use this repository often because everything has your username as a prefix.
We can change that, but I wanted to create the stocks to not to conflict with anything else. If you have any idea to change the prefixes to, I appreciate it and change ot of course! Thank you for the feedback!

Also I appreciate any Pull Requests, if you guys want to modify anything. ❤️
__________________
KitsuneLab® Developments
> K4ryuu <


Love the project? Please consider donating to help it improve!
GitHub | Website | Patreon | Discord | Email

Last edited by K4ryuu; 05-20-2022 at 02:16.
K4ryuu is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 05-20-2022 , 19:12   Re: [INC] Karyuu Library | Community Collection
Reply With Quote #6

Quote:
Originally Posted by K4ryuu View Post
We can change that, but I wanted to create the stocks to not to conflict with anything else. If you have any idea to change the prefixes to, I appreciate it and change ot of course! Thank you for the feedback!
I'd suggest you just don't use any prefixes unless they're game specific ones like TF2_ or CS_ probably, that's what I did for my library.
Drixevel is offline
psychonic

BAFFLED
Join Date: May 2008
Old 05-21-2022 , 22:31   Re: [INC] Karyuu Library | Community Collection
Reply With Quote #7

Using a prefix is the closest thing available to having a namespace. It makes sense to avoid potential collision with other includes or future first-party functions.
psychonic is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 05-22-2022 , 21:29   Re: [INC] Karyuu Library | Community Collection
Reply With Quote #8

Quote:
Originally Posted by psychonic View Post
Using a prefix is the closest thing available to having a namespace. It makes sense to avoid potential collision with other includes or future first-party functions.
I'll pass on the extra layer of complexity, also some of these functions should probably be built into Sourcemod already.
Drixevel is offline
K4ryuu
Junior Member
Join Date: May 2022
Location: KitsuneLab®
Old 05-23-2022 , 12:51   Re: [INC] Karyuu Library | Community Collection
Reply With Quote #9

If any idea comes up or anyone has any useful idea or recommendation, just send it to me and I implement it.

In the other hand, I was thinking about to rename the library to "Additional Additions", and the prefix of the stocks could be "AA_". Short and easy. However I stick to use prefixes, because we never know if any other required library uses a same stock name or not. I mostly develop to not to use prefixes in the plugin and use prefixes in libraries for better readability.

Appreciate your feedbacks!
__________________
KitsuneLab® Developments
> K4ryuu <


Love the project? Please consider donating to help it improve!
GitHub | Website | Patreon | Discord | Email

Last edited by K4ryuu; 05-23-2022 at 12:51.
K4ryuu is offline
K4ryuu
Junior Member
Join Date: May 2022
Location: KitsuneLab®
Old 05-25-2022 , 13:45   Re: [INC] Karyuu Library | Community Collection
Reply With Quote #10

I have uploaded a new version, which contains 38 new stocks and also a duplication fix.
The full changelog is here: https://github.com/K4ryuu/Karyuu-Lib...re/V1.0...V1.1

New Stock list:
Spoiler
__________________
KitsuneLab® Developments
> K4ryuu <


Love the project? Please consider donating to help it improve!
GitHub | Website | Patreon | Discord | Email
K4ryuu is offline
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 04:46.


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