fix includeDisabled flag in CBA_fnc_supportMonitor #1229
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When merged this pull request will:
CBA_fnc_supportMonitor
withincludeDuplicates
andincludeDisabled
is supposed to report all classes that do not support XEH, including those that have it explicitly disabled.The
XEH_DISABLED
macro sets a flag that is for bwc still namedSLX_XEH_DISABLED
to 1. This flags only remaining purpose is to indicate that at least one parent class disabled XEH intentionally. Intentional disabling is for example done when it is clear that a lot of ancestor classes will be created by BI or addon makers that create their ownEventHandler
classes without inheritance and therefore will not support XEH. This avoids unnecessary logging of incompatible classes and the starting of the fallback loop. (Think of one RPT line for every flagpole retexture: they all get their texture byEventHandlers
class init event that is not inherited, and BI and addon makers keep adding flagpoles using the same template).The
CBA_fnc_supportMonitor
function before checkingincludeDuplicates
andincludeDisabled
only considers classes that haveEventHandlers\CBA_Extended_EventHandlers
not defined.The
delete
config command when used inXEH_DISABLED
was very unreliable and caused inconsistency and unintended behavior. So when rewriting XEH to use theCBA_Extended_EventHandlers
sub class of theEventHandlers
class, I made it overwrite with an empty class instead of usingdelete
: https://github.com/CBATeam/CBA_A3/blob/master/addons/main/script_macros_common.hpp#L1759This means however that
isClass
still reports true. The real check should be if the class has content, which here is implemented asisText (X >> "init")
.Example:
before:
false
after:
true