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

Fix versioning #290

Merged
merged 4 commits into from
Mar 6, 2016
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion addons/versioning/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ if (!SLX_XEH_DisableLogging) then {
_mod = _x select 0;
_dependencyInfo = _x select 1;
_class = (configFile >> "CfgPatches" >> (_dependencyInfo select 0));
missionNamespace setVariable ["_dependencyIsPresent", _dependencyInfo select 2];
private _dependencyIsPresent = call compile format ["%1", (_dependencyInfo select 2)];
if ((isNil "_dependencyIsPresent") || {!(_dependencyIsPresent isEqualType false)}) then {
//https://dev.withsix.com/issues/74516 - The code could return non-bool, if "true" is converted to "1" durring binerization
Copy link
Contributor

Choose a reason for hiding this comment

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

binarization

WARNING("Versioning Conditional return is bad" + str _x);
Copy link
Contributor

Choose a reason for hiding this comment

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

conditional

_dependencyIsPresent = true;
};
if (_dependencyIsPresent) then {
if !(isClass(_class)) then {
format["WARNING: %1 requires %2 (@%3) at version %4 (or higher). You have none.", _key, _dependencyInfo select 0, _mod, _dependencyInfo select 1] spawn _f;
Expand Down