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

Added a method to get the value of whether an event's broadcasting di… #946

Merged
merged 2 commits into from Jan 3, 2019

Conversation

@OkyHp
Copy link
Contributor

OkyHp commented Jan 3, 2019

…sabled or not

@asherkin

This comment has been minimized.

Copy link
Member

asherkin commented Jan 3, 2019

This information is already included in the callback arguments - what are you doing that needs this info from the event handle?

@OkyHp OkyHp closed this Jan 3, 2019
@OkyHp OkyHp reopened this Jan 3, 2019
@OkyHp

This comment has been minimized.

Copy link
Contributor Author

OkyHp commented Jan 3, 2019

There is one problem: in another plugin, the notification for the event is disabled, but in another plugin, in the same event, it returns a different value when checked.
P.S. Sorry for my English.

Copy link
Member

asherkin left a comment

Thanks - that is a pretty annoying limitation of the param on the pre-hook, and something we'll need to document.

The core of this is fairly good, but I've left a couple of small inlines for changes before we can get this merged.

@@ -466,6 +483,7 @@ REGISTER_NATIVES(gameEventNatives)
{"Event.GetInt", sm_GetEventInt},
{"Event.GetFloat", sm_GetEventFloat},
{"Event.GetString", sm_GetEventString},
{"Event.BroadcastDisabled.get", sm_GetEventBroadcast},

This comment has been minimized.

Copy link
@asherkin

asherkin Jan 3, 2019

Member

Could you move this down under Event.BroadcastDisabled.set please. It's more readable to keep the properties together.

* @return The boolean value of the whether an event's broadcasting disabled.
* @error Invalid Handle.
*/
native bool GetEventBroadcast(Handle event);

This comment has been minimized.

Copy link
@asherkin

asherkin Jan 3, 2019

Member

We're trying to avoid adding any more "legacy" API where possible, so could you remove this one and keep only the MethodMap property.

This comment has been minimized.

Copy link
@OkyHp

OkyHp Jan 3, 2019

Author Contributor

Fixed all comments

Copy link
Member

asherkin left a comment

@Headline anything you'd like to add?

Copy link
Member

Headline left a comment

@asherkin 🚢

@asherkin asherkin merged commit b88e0d7 into alliedmodders:master Jan 3, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@asherkin

This comment has been minimized.

Copy link
Member

asherkin commented Jan 3, 2019

Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.