Cleanup, remove debug spam

This commit is contained in:
PabstMirror
2015-04-04 00:52:21 -05:00
parent 9f60bf9906
commit c055911231
5 changed files with 11 additions and 19 deletions

View File

@ -5,11 +5,10 @@ class CfgVehicles {
class ACE_MainActions { class ACE_MainActions {
class ACE_DisarmInventory { class ACE_DisarmInventory {
displayName = "$STR_ACE_Disarming_OpenInventory"; displayName = "$STR_ACE_Disarming_OpenInventory";
distance = 4; distance = 3.5;
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canPlayerDisarmUnit)); condition = QUOTE([ARR_2(_player,_target)] call FUNC(canPlayerDisarmUnit));
statement = QUOTE([ARR_2(_player,_target)] call FUNC(openDisarmDialog)); statement = QUOTE([ARR_2(_player,_target)] call FUNC(openDisarmDialog));
icon = "\a3\Modules_F_Curator\Data\portraitRespawnInventory_ca.paa"; icon = "\a3\Modules_F_Curator\Data\portraitRespawnInventory_ca.paa";
selection = "spine3";
exceptions[] = {}; exceptions[] = {};
}; };
}; };

View File

@ -48,13 +48,12 @@ if (!_doNotDropAmmo) then {
} forEach ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); } forEach ((getpos _target) nearObjects [DISARM_CONTAINER, 3]);
}; };
//Create a new weapon holder
if (isNull _holder) then { if (isNull _holder) then {
_dropPos = _target modelToWorld [0.333, 0.75, 0]; _dropPos = _target modelToWorld [0.4, 0.75, 0]; //offset someone unconscious isn't lying over it
_dropPos set [2, ((getPosASL _target) select 2)]; _dropPos set [2, ((getPosASL _target) select 2)];
// _holder = createVehicle ["WeaponHolderSimulated", _dropPos, [], 0, "CAN_COLLIDE"];
_holder = createVehicle [DISARM_CONTAINER, _dropPos, [], 0, "CAN_COLLIDE"]; _holder = createVehicle [DISARM_CONTAINER, _dropPos, [], 0, "CAN_COLLIDE"];
_holder setPosASL _dropPos; _holder setPosASL _dropPos;
_holder setVariable [QGVAR(holderInUse), false];
_holder setVariable [QGVAR(disarmUnit), _target, true]; _holder setVariable [QGVAR(disarmUnit), _target, true];
}; };
@ -64,7 +63,6 @@ if (isNull _holder) exitWith {
}; };
//Make sure only one drop operation at a time (using PFEH system as a queue) //Make sure only one drop operation at a time (using PFEH system as a queue)
if (_holder getVariable [QGVAR(holderInUse), false]) exitWith { if (_holder getVariable [QGVAR(holderInUse), false]) exitWith {
systemChat format ["Debug: %1 - Ground Container In Use, waiting until free", time];
[{ [{
_this call FUNC(disarmDropItems); _this call FUNC(disarmDropItems);
}, _this, 0, 0] call EFUNC(common,waitAndExecute); }, _this, 0, 0] call EFUNC(common,waitAndExecute);
@ -141,7 +139,6 @@ if (((count _targetItemsStart) - (count _targetItemsEnd)) != ([_addToCrateCount]
[_caller, _target, "Debug: Items Not Removed From Player"] call FUNC(eventTargetFinish); [_caller, _target, "Debug: Items Not Removed From Player"] call FUNC(eventTargetFinish);
}; };
if ((([_holderItemsEnd select 1] call _fncSumArray) - ([_holderItemsStart select 1] call _fncSumArray)) != ([_addToCrateCount] call _fncSumArray)) exitWith { if ((([_holderItemsEnd select 1] call _fncSumArray) - ([_holderItemsStart select 1] call _fncSumArray)) != ([_addToCrateCount] call _fncSumArray)) exitWith {
_holder setVariable [QGVAR(holderInUse), false]; _holder setVariable [QGVAR(holderInUse), false];
[_caller, _target, "Debug: Items Not Added to Holder"] call FUNC(eventTargetFinish); [_caller, _target, "Debug: Items Not Added to Holder"] call FUNC(eventTargetFinish);
}; };
@ -151,11 +148,10 @@ if ((([_holderItemsEnd select 1] call _fncSumArray) - ([_holderItemsStart select
//So add a dummy item and just remove at the end //So add a dummy item and just remove at the end
_holderIsEmpty = ([_holder] call FUNC(getAllGearContainer)) isEqualTo [[],[]]; _holderIsEmpty = ([_holder] call FUNC(getAllGearContainer)) isEqualTo [[],[]];
if (_holderIsEmpty) then { if (_holderIsEmpty) then {
systemChat "Debug: making dummy"; TRACE_1("Debug: adding dummy item to holder",_holder);
_holder addItemCargoGlobal [DUMMY_ITEM, 1]; _holder addItemCargoGlobal [DUMMY_ITEM, 1];
}; };
systemChat format ["PFEh start %1", time];
//Start the PFEH to do the actions (which could take >1 frame) //Start the PFEH to do the actions (which could take >1 frame)
[{ [{
PARAMS_2(_args,_pfID); PARAMS_2(_args,_pfID);
@ -185,11 +181,8 @@ systemChat format ["PFEh start %1", time];
//Drop backpack (Keeps variables for ACRE/TFR) //Drop backpack (Keeps variables for ACRE/TFR)
if (_needToRemoveBackpack) then {_target action ["DropBag", _holder, (backPack _target)];}; if (_needToRemoveBackpack) then {_target action ["DropBag", _holder, (backPack _target)];};
} else { } else {
systemChat format ["PFEh done %1", time];
//Exit PFEH
[_pfID] call CBA_fnc_removePerFrameHandler; [_pfID] call CBA_fnc_removePerFrameHandler;
if (_doNotDropAmmo) then { if (_doNotDropAmmo) then {
_error = false; _error = false;
@ -222,7 +215,7 @@ systemChat format ["PFEh start %1", time];
[_caller, _target, "Debug: Holder should only have dummy item"] call FUNC(eventTargetFinish); [_caller, _target, "Debug: Holder should only have dummy item"] call FUNC(eventTargetFinish);
}; };
if (_holderIsEmpty) then { if (_holderIsEmpty) then {
systemChat "Debug: Deleting Dummy"; TRACE_1("Debug: removing dummy item from holder",_holder);
clearItemCargoGlobal _holder; clearItemCargoGlobal _holder;
}; };
//Verify we didn't timeout waiting on drop action //Verify we didn't timeout waiting on drop action

View File

@ -20,7 +20,6 @@
PARAMS_3(_caller,_target,_errorMsg); PARAMS_3(_caller,_target,_errorMsg);
if (_errorMsg != "") then { if (_errorMsg != "") then {
diag_log text format ["[ACE_Disarming] %1 - eventTargetFinish: %2", time, _this]; diag_log text format ["[ACE_Disarming] %1 - eventTargetFinish: %2", time, _this];
["DisarmDebugCallback", [_caller], [_caller, _target, _errorMsg]] call EFUNC(common,targetEvent); ["DisarmDebugCallback", [_caller], [_caller, _target, _errorMsg]] call EFUNC(common,targetEvent);

View File

@ -51,7 +51,7 @@ GVAR(disarmTarget) = _target;
if (isNull GVAR(disarmTarget)) exitWith {ERROR("disarmTarget is null");}; if (isNull GVAR(disarmTarget)) exitWith {ERROR("disarmTarget is null");};
systemChat format ["Debug: Droping %1 from %2", _data, GVAR(disarmTarget)]; TRACE_2("Debug: Droping %1 from %2",_data,GVAR(disarmTarget));
["DisarmDropItems", [GVAR(disarmTarget)], [ACE_player, GVAR(disarmTarget), [_data]]] call EFUNC(common,targetEvent); ["DisarmDropItems", [GVAR(disarmTarget)], [ACE_player, GVAR(disarmTarget), [_data]]] call EFUNC(common,targetEvent);
false //not sure what this does false //not sure what this does
@ -67,8 +67,6 @@ GVAR(disarmTarget) = _target;
{isNull _display} || {isNull _display} ||
{_player != ACE_player}) then { {_player != ACE_player}) then {
systemChat "Debug: closeing dialog";
[_pfID] call CBA_fnc_removePerFrameHandler; [_pfID] call CBA_fnc_removePerFrameHandler;
GVAR(disarmTarget) = objNull; GVAR(disarmTarget) = objNull;
if (!isNull _display) then {closeDialog 0;}; //close dialog if still open if (!isNull _display) then {closeDialog 0;}; //close dialog if still open

View File

@ -47,6 +47,9 @@ private "_classname";
_displayName = getText (configFile >> "CfgGlasses" >> _classname >> "displayName"); _displayName = getText (configFile >> "CfgGlasses" >> _classname >> "displayName");
_picture = getText (configFile >> "CfgGlasses" >> _classname >> "picture"); _picture = getText (configFile >> "CfgGlasses" >> _classname >> "picture");
}; };
default {
ERROR(format ["[%1] - bad classname", _classname]);
};
}; };
_listBoxCtrl lbAdd format ["%1", _displayName]; _listBoxCtrl lbAdd format ["%1", _displayName];