Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion [.INC file related] #4

Closed
ClaudiuHKS opened this issue May 31, 2020 · 2 comments
Closed

Suggestion [.INC file related] #4

ClaudiuHKS opened this issue May 31, 2020 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ClaudiuHKS
Copy link

ClaudiuHKS commented May 31, 2020

native bool DHookSetFromConf(Handle setup, Handle gameconf, SDKFuncConfSource source, const char[] name);

IIRC, SDKFuncConfSource needs sdktools.inc see https://sm.alliedmods.net/new-api/sdktools/SDKFuncConfSource

I suggest to edit the .INC file doing something about this. Either #include <sdktools> or #tryinclude <sdktools> + #if defined (_..._included) /* ... */ #endif.

Thanks for your great work though!

@peace-maker
Copy link
Owner

I didn't include something like this yet, since I thought it would obscure dependencies in plugins. Like only wanting an optional dependency on dhooks, but a strong dependency on sdktools. Thinking about it now, adding #include <sdktools> to the dhooks include file wouldn't hurt this at all.

You could still manually include sdktools before dhooks in your plugin and thus only include dhooks without REQUIRE_EXTENSIONS. DHooks itself requires bintools, sdktools and sdkhooks to be running to load up, so only wanting dhooks and not sdktools is not even possible.

I don't know what I was thinking when adding the DHookSetFromConf native, but it seemed like a good reason to not include sdktools back then. I guess we can just add it now.

@peace-maker peace-maker added enhancement New feature or request good first issue Good for newcomers labels May 31, 2020
peace-maker added a commit that referenced this issue Jun 5, 2020
Needed when using the DHookSetFromConf native for the SDKFuncConfSource enum.
@peace-maker
Copy link
Owner

#include <sdktools> is in the include file now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants