-
Notifications
You must be signed in to change notification settings - Fork 149
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
XEH - Add more events #1588
XEH - Add more events #1588
Conversation
addons/xeh/CfgEventHandlers.hpp
Outdated
//class Extended_HandleDamage_EventHandlers {}; // Not implemented yet | ||
//class Extended_HandleHeal_EventHandlers {}; // Not implemented yet | ||
class Extended_HandleDamage_EventHandlers {}; | ||
class Extended_HandleHeal_EventHandlers {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last time I checked, they ignored the return value. It was better to add handleDamage via init class event.
Does it work now? If not, don't enable these. It will only cause anger and confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should HandleHeal
be kept in script_component.hpp
and script_xeh.hpp
, or removed there as well? It was previously enabled there, just not enabled in config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove it.
If you want support for HandleDamage and HandleHeal in addClassEventHandler:
- make sure the RV is still ignored in current version
- if yes, make addClassEventHandler add a retroactive flag set init event handler that uses the addEventHandler command
Those would be removable by removeAllEventHandlers and removeEventHandler with hard-coded ehids, but anyone who uses the former is a terrorist and the latter goes against best practices (hard-coded or not), so is on their own.
This is a lesson in writing good comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm worried about adding HandleDamage now
it's going to take a ton of testing to make sure it doesn't cause problems with old mods that may have used this
and to make sure that the return value doesn't override existing code
I've commented out/removed all instances of |
When merged this pull request will: