AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [INC] Karyuu Library | Community Collection (https://forums.alliedmods.net/showthread.php?t=337687)

K4ryuu 05-07-2022 15:14

[INC] Karyuu Library | Community Collection
 

> 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

bigborther 05-09-2022 08:33

Re: [INC] Karyuu Library | Community Collection
 
what a huge work, thanks for shareing

eyal282 05-19-2022 17:39

Re: [INC] Karyuu Library | Community Collection
 
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.

Drixevel 05-19-2022 21:46

Re: [INC] Karyuu Library | Community Collection
 
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.

K4ryuu 05-20-2022 03:14

Re: [INC] Karyuu Library | Community Collection
 
Quote:

Originally Posted by eyal282 (Post 2779751)
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 (Post 2779758)
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. ❤️

Drixevel 05-20-2022 20:12

Re: [INC] Karyuu Library | Community Collection
 
Quote:

Originally Posted by K4ryuu (Post 2779769)
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.

psychonic 05-21-2022 23:31

Re: [INC] Karyuu Library | Community Collection
 
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.

Drixevel 05-22-2022 22:29

Re: [INC] Karyuu Library | Community Collection
 
Quote:

Originally Posted by psychonic (Post 2779903)
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.

K4ryuu 05-23-2022 13:51

Re: [INC] Karyuu Library | Community Collection
 
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!

K4ryuu 05-25-2022 14:45

Re: [INC] Karyuu Library | Community Collection
 
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

K4ryuu 05-29-2022 07:36

Re: [INC] Karyuu Library | Community Collection
 
New update is out with default knives support in weapon stocks.
The full changelog is here: https://github.com/K4ryuu/Karyuu-Lib...V1.1...Upgrade

New Stock list:
Spoiler

K4ryuu 06-08-2022 15:37

Re: [INC] Karyuu Library | Community Collection
 
New version pushed with Karyuu_ShuffleString (requested) and new defines & bug fixes.
The full changelog is here: https://github.com/K4ryuu/Karyuu-Lib...re/V1.1...V1.2

K4ryuu 08-07-2022 16:58

Re: [INC] Karyuu Library | Community Collection
 
New patch with some useful new stock and upgrades.

Changes:
Spoiler

K4ryuu 11-29-2022 11:47

Re: [INC] Karyuu Library | Community Collection
 
I have uploaded a the new patch, with SM1.11 compatibility.
Some of the unused stocks has been deleted and some has been fixed. (There was lot of mistakes :( )

The full changelog is here: https://github.com/K4ryuu/Karyuu-Lib...re/V1.4...V1.5


All times are GMT -4. The time now is 05:21.

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