2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-05-18 23:44:52 +00:00
|
|
|
/*
|
|
|
|
* Author: PabstMirror
|
|
|
|
* Dumps debug info to clipboard.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [] call ACE_optionsmenu_fnc_debugDumpToClipboard
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2019-10-13 17:21:55 +00:00
|
|
|
#define MIN_ARRAY_SIZE 100
|
2015-05-19 06:57:41 +00:00
|
|
|
|
2017-10-10 14:39:59 +00:00
|
|
|
private _outputText = {
|
2015-05-30 06:21:47 +00:00
|
|
|
diag_log text (_this select 0);
|
|
|
|
"ace_clipboard" callExtension ((_this select 0) + "
|
|
|
|
");
|
|
|
|
};
|
2015-05-19 06:57:41 +00:00
|
|
|
|
2017-10-10 14:39:59 +00:00
|
|
|
private _text = format ["~~~~~~~~~ACE Debug~~~~~~~~~
|
2019-10-13 17:21:55 +00:00
|
|
|
%1
|
2015-05-30 06:21:47 +00:00
|
|
|
------Performance------
|
|
|
|
diag_fps = %2
|
2016-06-02 14:22:40 +00:00
|
|
|
count cba_common_waitAndExecArray = %3
|
|
|
|
count cba_common_waitUntilAndExecArray = %4
|
|
|
|
count cba_common_perFrameHandlerArray = %5 (max %6)
|
|
|
|
count diag_activeSQFScripts = %7
|
|
|
|
count diag_activeSQSScripts = %8
|
|
|
|
count diag_activeMissionFSMs = %9",
|
2019-10-13 17:21:55 +00:00
|
|
|
format ["[Time: %1] [CBA_missionTime: %2] [tickTime: %3]", time toFixed 1, CBA_missionTime toFixed 1, diag_tickTime toFixed 1],
|
2016-06-02 14:22:40 +00:00
|
|
|
diag_fps,
|
|
|
|
count cba_common_waitAndExecArray,
|
|
|
|
count cba_common_waitUntilAndExecArray,
|
2019-10-13 17:21:55 +00:00
|
|
|
count cba_common_perFrameHandlerArray, count cba_common_PFHhandles,
|
2016-06-02 14:22:40 +00:00
|
|
|
count diag_activeSQFScripts,
|
|
|
|
count diag_activeSQSScripts,
|
|
|
|
count diag_activeMissionFSMs];
|
2015-05-30 06:21:47 +00:00
|
|
|
[_text] call _outputText;
|
2015-05-19 06:57:41 +00:00
|
|
|
|
|
|
|
|
2015-05-30 06:21:47 +00:00
|
|
|
_text = format ["
|
|
|
|
------Player------
|
|
|
|
typeOf = %1
|
|
|
|
animationState = %2",
|
|
|
|
if (isNull ace_player) then {"null"} else {typeOf ace_player},
|
|
|
|
if (isNull ace_player) then {"null"} else {animationState ace_player}];
|
|
|
|
[_text] call _outputText;
|
|
|
|
|
|
|
|
|
2019-10-13 17:21:55 +00:00
|
|
|
private _aceSettings = cba_settings_allSettings select {((_x select [0,4]) == "ace_") || {(_x select [0,5]) == "acex_"}};
|
|
|
|
_aceSettings sort true;
|
2015-06-04 20:31:10 +00:00
|
|
|
_text = format ["
|
2019-10-13 17:21:55 +00:00
|
|
|
------ACE's CBA Settings [%1 Total] [Only Non-Defaults]------", count _aceSettings];
|
2015-06-04 20:31:10 +00:00
|
|
|
[_text] call _outputText;
|
|
|
|
|
|
|
|
{
|
2019-10-13 17:21:55 +00:00
|
|
|
private _currentValue = missionNamespace getVariable [_x, "$"];
|
|
|
|
private _defaultValue = (cba_settings_default getVariable [_x, []]) param [0, "#"];
|
|
|
|
if (_currentValue isEqualTo _defaultValue) then {
|
|
|
|
// [format ["%1 - %2 - DEFAULT", _x, _currentValue]] call _outputText;
|
|
|
|
} else {
|
|
|
|
[format ["%1 - %2", _x, _currentValue]] call _outputText;
|
|
|
|
};
|
2017-12-26 23:43:42 +00:00
|
|
|
} forEach _aceSettings;
|
2015-06-04 20:31:10 +00:00
|
|
|
|
|
|
|
|
2015-05-30 06:21:47 +00:00
|
|
|
_text = format ["
|
|
|
|
------Array Info (count >= %1)------", MIN_ARRAY_SIZE];
|
|
|
|
[_text] call _outputText;
|
2015-05-19 06:57:41 +00:00
|
|
|
|
|
|
|
|
2015-05-18 23:44:52 +00:00
|
|
|
{
|
|
|
|
_var = missionNamespace getVariable [_x, nil];
|
2015-11-20 17:40:31 +00:00
|
|
|
if(!isnil "_var" && {_var isEqualType []} && {(count _var) > MIN_ARRAY_SIZE}) then {
|
2015-05-30 06:21:47 +00:00
|
|
|
_text = format ["%1 - ARRAY SIZE: %2", _x, (count _var)];
|
|
|
|
[_text] call _outputText;
|
2015-05-18 23:44:52 +00:00
|
|
|
};
|
|
|
|
} forEach (allVariables missionNamespace);
|
|
|
|
|
|
|
|
{
|
2017-10-10 14:39:59 +00:00
|
|
|
private _unit = _x;
|
2015-05-18 23:44:52 +00:00
|
|
|
{
|
2017-10-10 14:39:59 +00:00
|
|
|
private _var = _unit getVariable [_x, nil];
|
2015-11-20 17:40:31 +00:00
|
|
|
if(!isnil "_var" && {_var isEqualType []} && {(count _var) > MIN_ARRAY_SIZE}) then {
|
2015-05-30 06:21:47 +00:00
|
|
|
_text = format ["%1 on [%2] - ARRAY SIZE: %3", _x, _unit, (count _var)];
|
|
|
|
[_text] call _outputText;
|
2015-05-18 23:44:52 +00:00
|
|
|
};
|
|
|
|
} forEach (allVariables _unit);
|
|
|
|
} forEach allUnits;
|
|
|
|
|
2015-05-19 00:29:39 +00:00
|
|
|
"ace_clipboard" callExtension "--COMPLETE--";
|