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 description.ext entry to enable debug console in SP #843

Merged
merged 3 commits into from
Dec 22, 2017
Merged
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
16 changes: 15 additions & 1 deletion addons/diagnostic/fnc_initExtendedDebugConsole.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,23 @@ _expression ctrlCommit 0;

// Save expression when hitting enter key inside expression text field
_expression ctrlAddEventHandler ["KeyDown", {
params ["", "_key", "_shift"];
params ["_expression", "_key", "_shift"];

if (_key in [DIK_RETURN, DIK_NUMPADENTER] && {!_shift}) then { // shift + enter is newline
// fix for enter key not working in MP
private _buttonLocalExec = ctrlParentControlsGroup _expression controlsGroupCtrl IDC_RSCDEBUGCONSOLE_BUTTONEXECUTELOCAL;

if (isMultiplayer && {ctrlEnabled _buttonLocalExec}) then {
[
"executeButton",
[ctrlParent _buttonLocalExec, _buttonLocalExec],
"RscDisplayDebugPublic",
0
] call compile preprocessFileLineNumbers "\A3\Ui_f\scripts\GUI\RscDebugConsole.sqf";

playSound "SoundClick";
};

_this call FUNC(logStatement);
};
false
Expand Down
1 change: 1 addition & 0 deletions addons/diagnostic/fnc_isDebugConsoleAllowed.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

// enable debug console in virtual arsenal
if (str missionConfigFile == "A3\Missions_F_Bootcamp\Scenarios\Arsenal.VR\description.ext") exitWith {true};
if (!isMultiplayer && {getNumber (missionConfigFile >> "enableDebugConsoleSP") == 1}) exitWith {true};

call {
#include "\a3\functions_f\Debug\fn_isDebugConsoleAllowed.sqf";
Expand Down
4 changes: 2 additions & 2 deletions addons/diagnostic/fnc_removeUnitTrackProjectiles.sqf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* ----------------------------------------------------------------------------
Function: CBA_removeUnitTrackProjectiles
Function: CBA_fnc_removeUnitTrackProjectiles

Description:
Removes projectile tracking from a given unit or vehicle.
Expand All @@ -12,7 +12,7 @@ Returns:

Examples:
(begin example)
[vehicle player] call CBA_removeUnitTrackProjectiles;
[vehicle player] call CBA_fnc_removeUnitTrackProjectiles;
(end)

Author:
Expand Down