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 OkyHp commented Jan 3, 2019

…sabled or not

@asherkin
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
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 asherkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed all comments

Copy link
Member

@asherkin asherkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Headline anything you'd like to add?

Copy link
Member

@Headline Headline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asherkin 🚢

@asherkin asherkin merged commit b88e0d7 into alliedmodders:master Jan 3, 2019
@asherkin
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants