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

Mission - Use OCAP Enabled Administrative UI setting #610

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions addons/cba_settings/cba_settings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ grad_trenches_functions_bigEnvelopeDigTime = 180;
grad_trenches_functions_giantEnvelopeDigTime = 300;

// OCAP
ocap_enabledAdministratorUI = false;
ocap_settings_autoStart = false;
ocap_settings_saveOnEmpty = false;
ocap_settings_saveMissionEnded = false;
Expand Down
8 changes: 0 additions & 8 deletions addons/mission/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ if (hasInterface) then {
};
} forEach _this;
}] call CBA_fnc_addEventHandler;

[QGVAR(aar_hideAdmin), {
[{
((allDiarySubjects player) findIf {_x select 0 == "ocap_diary_adminControls_subject"}) > -1
}, {
player removeDiarySubject "ocap_diary_adminControls_subject";
}] call CBA_fnc_waitUntilAndExecute;
}] call CBA_fnc_addEventHandler;
};

ADDON = true;
15 changes: 0 additions & 15 deletions addons/mission/functions/fnc_aar.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,3 @@ addMissionEventHandler ["MPEnded", {
call FUNC(stopAAR);
};
}];

// Hide Admin Diary controls - we use chat command for more control over recording metadata
addMissionEventHandler ["OnUserAdminStateChanged", {
params ["_networkId", "_loggedIn", "_votedIn"];

if (_loggedIn && !_votedIn) then {
private _unit = (getUserInfo _networkId) select 10;
[{
if (_this getVariable ["ocap_hasAdminControls", false]) then {
[QGVAR(aar_hideAdmin), [], _this] call CBA_fnc_targetEvent;
_this setVariable ["ocap_hasAdminControls", false];
};
}, _unit] call CBA_fnc_execNextFrame; // give OCAP time to set hasAdminControls variable
};
}];