Skip to content

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

Merged
asherkin merged 2 commits intoalliedmodders:masterfrom
OkyHp:master
Jan 3, 2019
Merged

Added a method to get the value of whether an event's broadcasting di…#946
asherkin merged 2 commits intoalliedmodders:masterfrom
OkyHp:master

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.

{"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); No newline at end of file
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