mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
vehLock - debug trace / type checking
This commit is contained in:
parent
50adc7c096
commit
a9ed1052dd
@ -20,7 +20,10 @@
|
|||||||
|
|
||||||
private ["_previousMags","_newMags","_keyMagazine","_keyName"];
|
private ["_previousMags","_newMags","_keyMagazine","_keyName"];
|
||||||
|
|
||||||
params ["_unit", "_veh", "_useCustom"];
|
if (!params [["_unit", objNull, [objNull]], ["_veh", objNull, [objNull]], ["_useCustom", false, [false]]]) exitWith {
|
||||||
|
ERROR("Input wrong type");
|
||||||
|
};
|
||||||
|
TRACE_3("params",_unit,_veh,_useCustom);
|
||||||
|
|
||||||
if (isNull _unit) exitWith {ERROR("null unit");};
|
if (isNull _unit) exitWith {ERROR("null unit");};
|
||||||
if (isNull _veh) exitWith {ERROR("null vehicle");};
|
if (isNull _veh) exitWith {ERROR("null vehicle");};
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
private ["_vehConfigSide","_vehSide","_returnValue"];
|
private ["_vehConfigSide","_vehSide","_returnValue"];
|
||||||
|
|
||||||
params ["_veh"];
|
params ["_veh"];
|
||||||
|
TRACE_1("params",_veh);
|
||||||
|
|
||||||
if (isNull _veh) exitWith {ERROR("null vehicle"); "error"};
|
if (isNull _veh) exitWith {ERROR("null vehicle"); "error"};
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
if (!isServer) exitWith {};
|
if (!isServer) exitWith {};
|
||||||
|
|
||||||
params ["_vehicle"];
|
params ["_vehicle"];
|
||||||
|
TRACE_1("params",_vehicle);
|
||||||
|
|
||||||
[{
|
[{
|
||||||
//If the module wasn't placed, just exit (needs to be in wait because objectInitEH is before moduleInit)
|
//If the module wasn't placed, just exit (needs to be in wait because objectInitEH is before moduleInit)
|
||||||
@ -41,4 +42,4 @@ params ["_vehicle"];
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
//Delay call until mission start (so everyone has the eventHandler's installed)
|
//Delay call until mission start (so everyone has the eventHandler's installed)
|
||||||
}, [_vehicle], 0.25, 0.25] call EFUNC(common,waitAndExecute);
|
}, [_vehicle], 0.25] call EFUNC(common,waitAndExecute);
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
private ["_returnValue","_sideKeyName","_customKeys"];
|
private ["_returnValue","_sideKeyName","_customKeys"];
|
||||||
|
|
||||||
params ["_unit", "_veh"];
|
params ["_unit", "_veh"];
|
||||||
|
TRACE_2("params",_unit,_veh);
|
||||||
|
|
||||||
if (isNull _unit) exitWith {ERROR("null unit"); false};
|
if (isNull _unit) exitWith {ERROR("null unit"); false};
|
||||||
if (isNull _veh) exitWith {ERROR("null vehicle"); false};
|
if (isNull _veh) exitWith {ERROR("null vehicle"); false};
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
private ["_vehLockpickStrenth","_condition","_returnValue"];
|
private ["_vehLockpickStrenth","_condition","_returnValue"];
|
||||||
|
|
||||||
params ["_unit", "_veh", "_funcType"];
|
params ["_unit", "_veh", "_funcType"];
|
||||||
|
TRACE_3("params",_unit,_veh,_funcType);
|
||||||
|
|
||||||
if (isNull _unit) exitWith {ERROR("null unit"); false};
|
if (isNull _unit) exitWith {ERROR("null unit"); false};
|
||||||
if (isNull _veh) exitWith {ERROR("null vehicle"); false};
|
if (isNull _veh) exitWith {ERROR("null vehicle"); false};
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
if (!isServer) exitWith {};
|
if (!isServer) exitWith {};
|
||||||
|
|
||||||
params ["_logic", "_syncedUnits", "_activated"];
|
params ["_logic", "_syncedUnits", "_activated"];
|
||||||
|
TRACE_3("params",_logic,_syncedObjects,_activated);
|
||||||
|
|
||||||
if (!_activated) exitWith {WARNING("Vehicle Lock Init Module - placed but not active");};
|
if (!_activated) exitWith {WARNING("Vehicle Lock Init Module - placed but not active");};
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
if (!isServer) exitWith {};
|
if (!isServer) exitWith {};
|
||||||
|
|
||||||
params ["_logic", "_syncedObjects", "_activated"];
|
params ["_logic", "_syncedObjects", "_activated"];
|
||||||
|
TRACE_3("params",_logic,_syncedObjects,_activated);
|
||||||
|
|
||||||
if !(_activated) exitWith {WARNING("Vehicle Lock Sync Module - placed but not active");};
|
if !(_activated) exitWith {WARNING("Vehicle Lock Sync Module - placed but not active");};
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
params ["_unit", "_container"];
|
params ["_unit", "_container"];
|
||||||
|
TRACE_2("params",_unit,_container);
|
||||||
|
|
||||||
//Only check for player:
|
//Only check for player:
|
||||||
if (_unit != ace_player) exitWith {false};
|
if (_unit != ace_player) exitWith {false};
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
private ["_currentKeys"];
|
private ["_currentKeys"];
|
||||||
|
|
||||||
params ["_veh", "_key"];
|
params ["_veh", "_key"];
|
||||||
|
TRACE_2("params",_veh,_key);
|
||||||
|
|
||||||
if (!isServer) exitWith {ERROR("only run on server");};
|
if (!isServer) exitWith {ERROR("only run on server");};
|
||||||
if (isNull _veh) exitWith {ERROR("null vehicle");};
|
if (isNull _veh) exitWith {ERROR("null vehicle");};
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
private ["_lockNumber"];
|
private ["_lockNumber"];
|
||||||
|
|
||||||
params ["_veh", "_isLocked"];
|
params ["_veh", "_isLocked"];
|
||||||
|
TRACE_2("params",_veh,_isLocked);
|
||||||
|
|
||||||
_lockNumber = if (_isLocked) then {2} else {0};
|
_lockNumber = if (_isLocked) then {2} else {0};
|
||||||
TRACE_2("Setting Lock State", _veh, _lockNumber);
|
TRACE_2("Setting Lock State", _veh, _lockNumber);
|
||||||
|
Loading…
Reference in New Issue
Block a user