Chunk Data to Extension, add some extra diag info

This commit is contained in:
PabstMirror 2015-05-19 01:57:41 -05:00
parent b727fd79c4
commit 7c8505592b

View File

@ -15,12 +15,42 @@
*/
#include "script_component.hpp"
private ["_outputString", "_var", "_unit", "_countSent"];
#define CHARS_PER_EXT_CALL 2000
#define MIN_ARRAY_SIZE 0
_outputString = "---ACE Debug---
";
_outputString = _outputString + format ["--Performance--
diag_fps = %1
count cba_common_perFrameHandlerArray = %2
count diag_activeSQFScripts = %3
count diag_activeSQSScripts = %4
count diag_activeMissionFSMs = %5
", diag_fps, count cba_common_perFrameHandlerArray, count diag_activeSQFScripts, count diag_activeSQSScripts,count diag_activeMissionFSMs];
_outputString = _outputString + "--Player--
";
if (isNull ACE_player) then {
_outputString = _outputString + "Null
";
} else {
_outputString = _outputString + format ["typeOf = %1
animationState = %2
", typeOf ace_player, animationState ace_player];
};
_outputString = _outputString + format ["--Array Info (count >= %1)--
", MIN_ARRAY_SIZE];
{
private["_var"];
_var = missionNamespace getVariable [_x, nil];
if(!isnil "_var" && {(typeName _var) == "ARRAY"} ) then {
"ace_clipboard" callExtension format["%1 - ARRAY SIZE: %2
if(!isnil "_var" && {(typeName _var) == "ARRAY"} && {(count _var) > MIN_ARRAY_SIZE}) then {
_outputString = _outputString + format["%1 - ARRAY SIZE: %2
", _x, (count _var)];
};
} forEach (allVariables missionNamespace);
@ -28,14 +58,18 @@
{
_unit = _x;
{
private["_var"];
_var = _unit getVariable [_x, nil];
if(!isnil "_var" && {(typeName _var) == "ARRAY"} ) then {
"ace_clipboard" callExtension format["%1 - ARRAY SIZE: %2 for %3
", _x, (count _var), _unit];
if(!isnil "_var" && {(typeName _var) == "ARRAY"} && {(count _var) > MIN_ARRAY_SIZE}) then {
_outputString = _outputString + format["%1 on [%2] - ARRAY SIZE: %3
", _x, _unit, (count _var)];
};
} forEach (allVariables _unit);
} forEach allUnits;
_countSent = 0;
while {_countSent < (count _outputString)} do {
"ace_clipboard" callExtension (_outputString select [_countSent, CHARS_PER_EXT_CALL]);
_countSent = _countSent + CHARS_PER_EXT_CALL;
};
"ace_clipboard" callExtension "--COMPLETE--";