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

Add the ability to disable fnc_globalExecute #270

Merged
merged 3 commits into from
Feb 22, 2016
Merged

Conversation

Killswitch00
Copy link
Contributor

Mission makers and/or server managers can disable the use of
CBA_fnc_globalExecute either by using a mission setting or
an optional addon. When disabled, calling fnc_globalExecute
does nothing. Fixes #269

Mission makers and/or server managers can disable the use of
CBA_fnc_globalExecute either by using a mission setting or
an optional addon. When disabled, calling fnc_globalExecute
does nothing. Fixes #269
@@ -95,8 +93,38 @@ if (SLX_XEH_MACHINE select 3) then {
};
};

// CBA_fnc_globalExecute is normally enabled
_disableGE = false;
Copy link
Member

Choose a reason for hiding this comment

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

private

@nicolasbadano
Copy link
Contributor

👍 for the optional pbo


[QUOTE(GVAR(cmd)), { if (GVAR(init)) then { _this spawn FUNC(exec) } }] call (uiNamespace getVariable "CBA_fnc_addEventHandler");
if (_disableGE) then {
uiNamespace setVariable [QGVAR(exec), compileFinal ""];
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be QUOTE(DFUNC(exec))?

I don't think we want to use uiNameSpace / caching for this function at all.
Otherwise I can create a mission with it disabled, and it will compileFinal the function to {} in UI
then join a server with it enabled and PREP will still pull the {}.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point - the idea was to make sure "FUNC(exec)" cannot be used nor restored (by non-CBA means) while globalExecute is disabled.

@commy2
Copy link
Contributor

commy2 commented Feb 21, 2016

looks good 👍

Killswitch00 added a commit that referenced this pull request Feb 22, 2016
Add the ability to disable fnc_globalExecute
@Killswitch00 Killswitch00 merged commit 47adbb9 into master Feb 22, 2016
@ViperMaul
Copy link
Contributor

Good. Let's update the optionals section of README.md

@Killswitch00
Copy link
Contributor Author

This needs more work to handle a few more...issues. (Discussed elsewhere)

@Killswitch00 Killswitch00 deleted the disableglobalexec branch February 22, 2016 19:23
@commy2 commy2 added this to the 2.3.2 milestone May 15, 2016
@commy2 commy2 added the Feature label May 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants