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
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-05-30 06:21:47 +00:00
|
|
|
private ["_var", "_unit", "_outputText", "_text"];
|
2015-05-18 23:44:52 +00:00
|
|
|
|
2015-05-28 09:33:13 +00:00
|
|
|
#define MIN_ARRAY_SIZE 10
|
2015-05-19 06:57:41 +00:00
|
|
|
|
2015-05-30 06:21:47 +00:00
|
|
|
_outputText = {
|
|
|
|
diag_log text (_this select 0);
|
|
|
|
"ace_clipboard" callExtension ((_this select 0) + "
|
|
|
|
");
|
|
|
|
};
|
2015-05-19 06:57:41 +00:00
|
|
|
|
2015-05-30 06:21:47 +00:00
|
|
|
_text = format ["~~~~~~~~~ACE Debug~~~~~~~~~
|
|
|
|
time = %1
|
2015-05-19 06:57:41 +00:00
|
|
|
|
2015-05-30 06:21:47 +00:00
|
|
|
------Performance------
|
|
|
|
diag_fps = %2
|
|
|
|
count ace_common_waitAndExecArray = %3
|
|
|
|
count cba_common_perFrameHandlerArray = %4 (max %5)
|
|
|
|
count diag_activeSQFScripts = %6
|
|
|
|
count diag_activeSQSScripts = %7
|
|
|
|
count diag_activeMissionFSMs = %8",
|
|
|
|
time, diag_fps, count ace_common_waitAndExecArray, {!isNil "_x"} count cba_common_perFrameHandlerArray, count cba_common_perFrameHandlerArray, count diag_activeSQFScripts, count diag_activeSQSScripts,count diag_activeMissionFSMs];
|
|
|
|
[_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;
|
|
|
|
|
|
|
|
|
2015-06-04 20:31:10 +00:00
|
|
|
_text = format ["
|
|
|
|
------ACE Settings------"];
|
|
|
|
[_text] call _outputText;
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
_var = missionNamespace getVariable [(_x select 0), "ERROR: Not Defined"];
|
|
|
|
_text = format ["%1 - %2", (_x select 0), _var];
|
|
|
|
[_text] call _outputText;
|
|
|
|
} forEach EGVAR(common,settings);
|
|
|
|
|
|
|
|
|
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-05-19 06:57:41 +00:00
|
|
|
if(!isnil "_var" && {(typeName _var) == "ARRAY"} && {(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);
|
|
|
|
|
|
|
|
{
|
|
|
|
_unit = _x;
|
|
|
|
{
|
2015-05-19 00:29:39 +00:00
|
|
|
_var = _unit getVariable [_x, nil];
|
2015-05-19 06:57:41 +00:00
|
|
|
if(!isnil "_var" && {(typeName _var) == "ARRAY"} && {(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--";
|