mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #2429 from MikeMatrix/feature/switchToLogMacros
Feature/switch to log macros
This commit is contained in:
commit
478b618e4b
@ -25,4 +25,4 @@ if (!_activated) exitWith {};
|
||||
|
||||
[_logic, QGVAR(enable), "enable"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
diag_log text "[ACE]: Cargo Module Initialized.";
|
||||
ACE_LOGINFO("Cargo Module Initialized.");
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
["HeadbugFixUsed", {
|
||||
PARAMS_2(_profileName,_animation);
|
||||
diag_log text format ["[ACE] Headbug Used: Name: %1, Animation: %2", _profileName, _animation];
|
||||
ACE_LOGINFO_2("Headbug Used: Name: %1, Animation: %2",_profileName,_animation);
|
||||
}] call FUNC(addEventHandler);
|
||||
|
||||
|
||||
@ -102,7 +102,7 @@ if (_currentVersion != _previousVersion) then {
|
||||
// Handle JIP scenario
|
||||
if(!isServer) then {
|
||||
["PlayerJip", {
|
||||
diag_log text format["[ACE] * JIP event synchronization initialized"];
|
||||
ACE_LOGINFO("JIP event synchronization initialized");
|
||||
["SEH_all", [player]] call FUNC(serverEvent);
|
||||
}] call FUNC(addEventHandler);
|
||||
} else {
|
||||
@ -128,13 +128,13 @@ call FUNC(checkFiles);
|
||||
if (isNil QGVAR(settings) || {(!isServer) && (isNil QEGVAR(modules,serverModulesRead))}) exitWith {
|
||||
if (!_waitingMsgSent) then {
|
||||
_args set [0, true];
|
||||
diag_log text format["[ACE] Waiting on settings from server"];
|
||||
ACE_LOGINFO("Waiting on settings from server...");
|
||||
};
|
||||
};
|
||||
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
|
||||
diag_log text format["[ACE] Settings received from server"];
|
||||
ACE_LOGINFO("Settings received from server.");
|
||||
|
||||
// Event so that ACE_Modules have their settings loaded:
|
||||
["InitSettingsFromModules", []] call FUNC(localEvent);
|
||||
@ -145,7 +145,7 @@ call FUNC(checkFiles);
|
||||
call FUNC(loadSettingsLocalizedText);
|
||||
};
|
||||
|
||||
diag_log text format["[ACE] Settings initialized"];
|
||||
ACE_LOGINFO("Settings initialized.");
|
||||
|
||||
//Event that settings are safe to use:
|
||||
["SettingsInitialized", []] call FUNC(localEvent);
|
||||
|
@ -18,15 +18,15 @@ if (_eventType == "ACEg") then {
|
||||
_events = (GVAR(events) select 1) select _eventIndex;
|
||||
|
||||
#ifdef DEBUG_EVENTS
|
||||
diag_log text format[ARR_2("* Net Event %1",_eventName)];
|
||||
diag_log text format[ARR_2(" args=%1",_eventArgs)];
|
||||
ACE_LOGINFO_1("* Net Event %1",_eventName);
|
||||
ACE_LOGINFO_1(" args=%1",_eventArgs);
|
||||
#endif
|
||||
|
||||
{
|
||||
if (!isNil "_x") then {
|
||||
_eventArgs call CALLSTACK_NAMED(_x, format[ARR_3("Net Event %1 ID: %2",_eventName,_forEachIndex)]);
|
||||
_eventArgs call CALLSTACK_NAMED(_x, FORMAT_2("Net Event %1 ID: %2",_eventName,_forEachIndex);
|
||||
#ifdef DEBUG_EVENTS_CALLSTACK
|
||||
diag_log text format[ARR_2(" ID: %1",_forEachIndex)];
|
||||
ACE_LOGINFO_1(" ID: %1",_forEachIndex);
|
||||
#endif
|
||||
};
|
||||
} forEach _events;
|
||||
|
@ -26,7 +26,7 @@ if(isServer) then {
|
||||
private["_eventEntry", "_eventLog"];
|
||||
|
||||
if(!HASH_HASKEY(GVAR(syncedEvents),_eventName)) exitWith {
|
||||
diag_log text format["[ACE] Error, request for synced event - key not found."];
|
||||
ACE_LOGERROR("Request for synced event - key not found.");
|
||||
false
|
||||
};
|
||||
_eventEntry = HASH_GET(GVAR(syncedEvents),_eventName);
|
||||
@ -42,7 +42,7 @@ if(isServer) then {
|
||||
_eventArgs = _x select 1;
|
||||
[_eventName, _eventArgs, (_x select 2)] call FUNC(_handleSyncedEvent);
|
||||
} forEach _eventLog;
|
||||
diag_log text format["[ACE] + [%1] synchronized", _eventName];
|
||||
ACE_LOGINFO_1("[%1] synchronized",_eventName);
|
||||
};
|
||||
|
||||
true
|
@ -17,7 +17,7 @@ PARAMS_3(_name,_args,_ttl);
|
||||
private["_internalData", "_eventLog", "_eventCode"];
|
||||
|
||||
if(!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
diag_log text format["[ACE] Error, synced event key not found."];
|
||||
ACE_LOGERROR("Synced event key not found.");
|
||||
false
|
||||
};
|
||||
|
||||
|
@ -25,7 +25,7 @@ if( (count _this) > 2) then {
|
||||
};
|
||||
|
||||
if(HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
diag_log text format["[ACE] Error, duplicate synced event creation."];
|
||||
ACE_LOGERROR("Duplicate synced event creation.");
|
||||
false
|
||||
};
|
||||
|
||||
|
@ -87,7 +87,9 @@ switch ((_type select 0)) do {
|
||||
_unit setPosATL _pos;
|
||||
};
|
||||
};
|
||||
default {diag_log format ["ACE: Incorrect item type passed to %1, passed: %2",QFUNC(AddToInventory),_type];};
|
||||
default {
|
||||
ACE_LOGWARNING_2("Incorrect item type passed to %1, passed: %2",QFUNC(AddToInventory),_type);
|
||||
};
|
||||
};
|
||||
|
||||
[_addedToPlayer,_unit]
|
||||
|
@ -40,7 +40,7 @@ if (((_namespace getVariable [_uid, [-99999]]) select 0) < ACE_diagTime) then {
|
||||
private ["_varName","_cacheList"];
|
||||
// _eventName is defined on the function that calls the event
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
diag_log text format ["ACE: Clear cached variables on event: %1", _eventName];
|
||||
ACE_LOGINFO_1("Clear cached variables on event: %1",_eventName);
|
||||
#endif
|
||||
// Get the list of caches to clear
|
||||
_varName = format [QGVAR(clearCache_%1),_eventName];
|
||||
@ -58,9 +58,9 @@ if (((_namespace getVariable [_uid, [-99999]]) select 0) < ACE_diagTime) then {
|
||||
_cacheList pushBack [_namespace, _uid];
|
||||
};
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
diag_log format ["Calculated result: %1 %2", _namespace, _uid];
|
||||
ACE_LOGINFO_2("Calculated result: %1 %2",_namespace,_uid);
|
||||
} else {
|
||||
diag_log format ["Cached result : %1 %2", _namespace, _uid];
|
||||
ACE_LOGINFO_2("Cached result: %1 %2",_namespace,_uid);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
private "_version";
|
||||
_version = getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr");
|
||||
|
||||
diag_log text format ["[ACE]: ACE is version %1.", _version];
|
||||
ACE_LOGINFO_1("ACE is version %1.",_version);
|
||||
|
||||
private "_addons";
|
||||
//_addons = activatedAddons; // broken with High-Command module, see #2134
|
||||
@ -30,7 +30,7 @@ _addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
|
||||
private "_errorMsg";
|
||||
_errorMsg = format ["File %1.pbo is outdated.", _x];
|
||||
|
||||
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
|
||||
ACE_LOGERROR(_errorMsg);
|
||||
|
||||
if (hasInterface) then {
|
||||
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||
@ -46,14 +46,14 @@ _addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
|
||||
private "_errorMsg";
|
||||
_errorMsg = format ["Extension %1.dll not installed.", _x];
|
||||
|
||||
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
|
||||
ACE_LOGERROR(_errorMsg);
|
||||
|
||||
if (hasInterface) then {
|
||||
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||
};
|
||||
} else {
|
||||
// Print the current extension version
|
||||
diag_log text format ["[ACE] Extension version: %1: %2", _x, (_x callExtension "version")];
|
||||
ACE_LOGINFO_2("Extension version: %1: %2",_x,(_x callExtension "version"));
|
||||
};
|
||||
} forEach getArray (configFile >> "ACE_Extensions" >> "extensions");
|
||||
|
||||
@ -80,7 +80,7 @@ if (isMultiplayer) then {
|
||||
private "_errorMsg";
|
||||
_errorMsg = format ["Client/Server Version Mismatch. Server: %1, Client: %2.", GVAR(ServerVersion), _version];
|
||||
|
||||
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
|
||||
ACE_LOGERROR(_errorMsg);
|
||||
|
||||
if (hasInterface) then {
|
||||
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||
@ -91,7 +91,7 @@ if (isMultiplayer) then {
|
||||
if !(_addons isEqualTo []) then {
|
||||
_errorMsg = format ["Client/Server Addon Mismatch. Client has extra addons: %1.",_addons];
|
||||
|
||||
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
|
||||
ACE_LOGERROR(_errorMsg);
|
||||
|
||||
if (hasInterface) then {
|
||||
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||
|
@ -67,7 +67,7 @@ if (!isServer) then {
|
||||
};
|
||||
|
||||
//[_error, "{systemChat _this}"] call FUNC(execRemoteFnc);
|
||||
diag_log text _error;
|
||||
ACE_LOGERROR(_error);
|
||||
|
||||
if (_mode < 2) then {
|
||||
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
||||
|
@ -22,7 +22,7 @@ private "_owner";
|
||||
_owner = _target getVariable [QGVAR(owner), objNull];
|
||||
|
||||
if (!isNull _owner && {!isNull _unit} && {_unit != _owner}) then {
|
||||
diag_log text "[ACE] ERROR: Claiming already owned object.";
|
||||
ACE_LOGERROR("Claiming already owned object.");
|
||||
};
|
||||
|
||||
// transfer this immediately
|
||||
|
@ -23,7 +23,7 @@ _force = False;
|
||||
|
||||
// no animation given
|
||||
if (isNil "_animation") exitWith {
|
||||
diag_log format ["[ACE] ERROR: No animation specified in %1", _fnc_scriptNameParent];
|
||||
ACE_LOGERROR_1("No animation specified in %1.",_fnc_scriptNameParent);
|
||||
};
|
||||
|
||||
if (isNil "_priority") then {
|
||||
|
@ -5,7 +5,7 @@ PARAMS_1(_target);
|
||||
|
||||
{
|
||||
if (isNil "_x") then {
|
||||
diag_log text format ["[ACE] ERROR: No argument and function for remote function. ID: %1", _forEachIndex];
|
||||
ACE_LOGERROR_1("No argument and function for remote function. ID: %1",_forEachIndex);
|
||||
} else {
|
||||
if (typeName _x == "ARRAY") then {
|
||||
[_x select 0, _target] call (_x select 1);
|
||||
|
@ -20,7 +20,7 @@ private ["_newArray", "_index"];
|
||||
PARAMS_2(_array,_code);
|
||||
|
||||
if (isNil "_array") exitWith {
|
||||
diag_log text format ["[ACE] ERROR: No array for function filter in %1", _fnc_scriptNameParent];
|
||||
ACE_LOGERROR_1("No array for function filter in %1.",_fnc_scriptNameParent);
|
||||
[]
|
||||
};
|
||||
|
||||
|
@ -44,7 +44,7 @@ _letterGrid = false;
|
||||
if (((toLower _formatX) find "a") != -1) then {_letterGrid = true};
|
||||
if (((toLower _formatY) find "a") != -1) then {_letterGrid = true};
|
||||
if (_letterGrid) exitWith {
|
||||
diag_log text format ["[ACE] Map Grid Warning (%1) - Map uses letter grids [%2,%3]", worldName, _formatX, _formatY];
|
||||
ACE_LOGWARNING_3("Map Grid Warning (%1) - Map uses letter grids [%2, %3]",worldName,_formatX,_formatY);
|
||||
};
|
||||
|
||||
//Start at [0, 500] and move north until we get a change in grid
|
||||
@ -64,13 +64,13 @@ _stepXat5 = _stepX * 10 ^ ((count _formatX) - 5);
|
||||
_stepYat5 = -1 * _stepY * 10 ^ ((count _formatY) - 5);
|
||||
|
||||
if (_stepYat5 < 0) then {
|
||||
diag_log text format ["[ACE] Map Grid Warning (%1) - Northing is reversed", worldName];
|
||||
ACE_LOGWARNING_1("Map Grid Warning (%1) - Northing is reversed.",worldName);
|
||||
};
|
||||
if (_stepXat5 != 1) then {
|
||||
diag_log text format ["[ACE] Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for x", worldName, _stepXat5];
|
||||
ACE_LOGWARNING_2("Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for x.",worldName,_stepXat5);
|
||||
};
|
||||
if ((_stepYat5 != 1) && {_stepYat5 != -1}) then {
|
||||
diag_log text format ["[ACE] Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for y", worldName, _stepXat5];
|
||||
ACE_LOGWARNING_2("Map Grid Warning (%1) - MGRS 10 digit grid does not equal 1 meter: (%2) for y.",worldName,_stepXat5);
|
||||
};
|
||||
|
||||
GVAR(mapGridData) = [_offsetX, _realOffsetY, _stepXat5, _stepYat5];
|
||||
|
@ -42,7 +42,7 @@ _parseConfigForDisplayNames = {
|
||||
if !([configFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames) then {
|
||||
if !([configFile >> "ACE_ServerSettings" >> _name] call _parseConfigForDisplayNames) then {
|
||||
if !([missionConfigFile >> "ACE_Settings" >> _name] call _parseConfigForDisplayNames) then {
|
||||
diag_log text format ["[ACE] - Setting found, but couldn't localize [%1] (server has but we don't?)", _name];
|
||||
ACE_LOGWARNING_1("Setting found, but couldn't localize [%1] (server has but we don't?)",_name);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -21,15 +21,15 @@ _eventIndex = _eventNames find _eventName;
|
||||
if(_eventIndex != -1) then {
|
||||
_events = (GVAR(events) select 1) select _eventIndex;
|
||||
#ifdef DEBUG_EVENTS
|
||||
diag_log text format[ARR_2("* Local Event: %1",_eventName)];
|
||||
diag_log text format[ARR_2(" args=%1",_eventArgs)];
|
||||
ACE_LOGINFO_1("* Local Event: %1",_eventName);
|
||||
ACE_LOGINFO_1(" args=%1",_eventArgs);
|
||||
#endif
|
||||
|
||||
{
|
||||
if(!isNil "_x") then {
|
||||
_eventArgs call CALLSTACK_NAMED(_x, format[ARR_3("Local Event %1 ID: %2",_eventName,_forEachIndex)]);
|
||||
_eventArgs call CALLSTACK_NAMED(_x, FORMAT_2("Local Event %1 ID: %2",_eventName,_forEachIndex));
|
||||
#ifdef DEBUG_EVENTS_CALLSTACK
|
||||
diag_log text format[ARR_2(" ID: %1",_forEachIndex)];
|
||||
ACE_LOGINFO_1(" ID: %1",_forEachIndex);
|
||||
#endif
|
||||
};
|
||||
} forEach _events;
|
||||
|
@ -21,7 +21,7 @@ _array = + _this select 0;
|
||||
_code = _this select 1;
|
||||
|
||||
if (isNil "_array") exitWith {
|
||||
diag_log text format ["[ACE] ERROR: No array for function map in %1", _fnc_scriptNameParent];
|
||||
ACE_LOGERROR_1("No array for function map in %1.",_fnc_scriptNameParent);
|
||||
[]
|
||||
};
|
||||
|
||||
|
@ -22,4 +22,4 @@ if !(_activated) exitWith {};
|
||||
[_logic, QGVAR(checkPBOsCheckAll), "CheckAll" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(checkPBOsWhitelist), "Whitelist" ] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
diag_log text format ["[ACE]: Check-PBOs Module Initialized. Mode: %1.", GVAR(checkPBOsAction)];
|
||||
ACE_LOGINFO_1("Check-PBOs Module Initialized. Mode: %1.",GVAR(checkPBOsAction));
|
||||
|
@ -44,4 +44,4 @@ if !(_activated) exitWith {};
|
||||
};
|
||||
} count _units;
|
||||
|
||||
diag_log text "[ACE]: WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.";
|
||||
ACE_LOGINFO("WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE.");
|
||||
|
@ -20,7 +20,7 @@ PARAMS_3(_logic,_settingName,_moduleVariable);
|
||||
|
||||
// Check if the parameter is defined in the module
|
||||
if (isNil {_logic getVariable _moduleVariable}) exitWith {
|
||||
diag_log text format["[ACE]: Warning in %1 module: %2 setting is missing. Probably an obsolete version of the module is used in the mission.", typeOf _logic, _moduleVariable];
|
||||
ACE_LOGWARNING_2("Warning in %1 module: %2 setting is missing. Probably an obsolete version of the module is used in the mission.",typeOf _logic,_moduleVariable);
|
||||
};
|
||||
|
||||
// Set the setting globally and force it
|
||||
|
@ -16,7 +16,7 @@ PARAMS_1(_name);
|
||||
private ["_data", "_eventId"];
|
||||
|
||||
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
diag_log text format["[ACE] Error, synced event key not found."];
|
||||
ACE_LOGERROR("Synced event key not found.");
|
||||
false
|
||||
};
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
PARAMS_2(_eventName,_eventArgs);
|
||||
|
||||
#ifdef DEBUG_EVENTS
|
||||
diag_log text format[ARR_2("* Server Event: %1",_eventName)];
|
||||
diag_log text format[ARR_2(" args=%1",_eventArgs)];
|
||||
ACE_LOGINFO_1("* Server Event: %1",_eventName);
|
||||
ACE_LOGINFO_1(" args=%1",_eventArgs);
|
||||
#endif
|
||||
|
||||
ACEg = [_eventName, _eventArgs];
|
||||
|
@ -25,7 +25,7 @@ if( (count _this) > 2) then {
|
||||
};
|
||||
|
||||
if(!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
diag_log text format["[ACE] Error, synced event key not found."];
|
||||
ACE_LOGERROR("Synced event key not found.");
|
||||
false
|
||||
};
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
||||
PARAMS_3(_eventName,_eventTargets,_eventArgs);
|
||||
|
||||
#ifdef DEBUG_EVENTS
|
||||
diag_log text format[ARR_3("* Target Event: %1 - %2",_eventName,_eventTargets)];
|
||||
diag_log text format[ARR_2(" args=%1",_eventArgs)];
|
||||
ACE_LOGINFO_2("* Target Event: %1 - %2",_eventName,_eventTargets);
|
||||
ACE_LOGINFO_1(" args=%1",_eventArgs);
|
||||
#endif
|
||||
|
||||
ACEc = [_eventName, _eventTargets, _eventArgs];
|
||||
|
@ -37,11 +37,15 @@ if (_vehicle isKindOf "Ship" ) then {
|
||||
};
|
||||
|
||||
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
|
||||
if (!_validVehiclestate) exitwith { diag_log format["Unable to unload patient because invalid (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4", _vehicle, getPos _vehicle, isTouchingGround _vehicle, speed _vehicle]; false };
|
||||
if (!_validVehiclestate) exitwith {
|
||||
ACE_LOGWARNING_4("Unable to unload patient because invalid (%1) vehicle state. Either moving or Not close enough on the ground. position: %2 isTouchingGround: %3 Speed: %4",_vehicle,getPos _vehicle,isTouchingGround _vehicle,speed _vehicle);
|
||||
false
|
||||
};
|
||||
|
||||
diag_log str _emptyPos;
|
||||
|
||||
if (count _emptyPos == 0) exitwith {diag_log format["No safe empty spots to unload patient. %1", _emptyPos]; false}; //consider displaying text saying there are no safe places to exit the vehicle
|
||||
if (count _emptyPos == 0) exitwith {
|
||||
ACE_LOGWARNING_1("No safe empty spots to unload patient. %1",_emptyPos);
|
||||
false
|
||||
}; //consider displaying text saying there are no safe places to exit the vehicle
|
||||
|
||||
|
||||
unassignVehicle _unit;
|
||||
|
@ -23,4 +23,4 @@ params ["_caller", "_target", "_errorMsg"];
|
||||
if (_caller != ACE_player) exitWith {};
|
||||
|
||||
systemChat format ["Debug-Caller: Disarm finished from [%1] with code [%2]", _target, _errorMsg];
|
||||
diag_log text format ["[ACE_Disarming] %1 - eventCallerFinish: %2", ACE_time, _this];
|
||||
ACE_LOGINFO_2("%1 - eventCallerFinish: %2",ACE_time,_this);
|
||||
|
@ -22,6 +22,6 @@
|
||||
params ["_caller", "_target", "_errorMsg"];
|
||||
|
||||
if (_errorMsg != "") then {
|
||||
diag_log text format ["[ACE_Disarming] %1 - eventTargetFinish: %2", ACE_time, _this];
|
||||
ACE_LOGINFO_2("%1 - eventTargetFinish: %2",ACE_time,_this);
|
||||
["DisarmDebugCallback", [_caller], [_caller, _target, _errorMsg]] call EFUNC(common,targetEvent);
|
||||
};
|
||||
|
@ -23,4 +23,4 @@ params ["_logic"];
|
||||
[_logic, QGVAR(PunishNonSpecialists),"PunishNonSpecialists"] call EFUNC(Common,readSettingFromModule);
|
||||
[_logic, QGVAR(ExplodeOnDefuse),"ExplodeOnDefuse"] call EFUNC(Common,readSettingFromModule);
|
||||
|
||||
diag_log text "[ACE]: Explosive Module Initialized.";
|
||||
ACE_LOGINFO("Explosive Module Initialized.");
|
||||
|
@ -36,7 +36,7 @@ if (!isNull _setupPlaceholderObject) then {
|
||||
};
|
||||
|
||||
if (isNil "_triggerConfig") exitWith {
|
||||
diag_log format ["ACE_Explosives: Error config not passed to PlaceExplosive: %1", _this];
|
||||
ACE_LOGERROR_1("Config not passed to PlaceExplosive: %1",_this);
|
||||
objNull
|
||||
};
|
||||
|
||||
@ -44,7 +44,7 @@ _magazineTrigger = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Trigge
|
||||
_triggerConfig = ConfigFile >> "ACE_Triggers" >> _triggerConfig;
|
||||
|
||||
if (isNil "_triggerConfig") exitWith {
|
||||
diag_log format ["ACE_Explosives: Error config not found in PlaceExplosive: %1", _this];
|
||||
ACE_LOGERROR_1("Config not found in PlaceExplosive: %1",_this);
|
||||
objNull
|
||||
};
|
||||
|
||||
|
@ -86,7 +86,7 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
|
||||
if(_gC == 0) then { _gC = 2440; _warn = true;};
|
||||
|
||||
if(_warn) then {
|
||||
diag_log text format["Ammo class %1 lacks proper explosive properties definitions for frag!", _roundType]; //TODO: turn this off when we get closer to release
|
||||
ACE_LOGWARNING_1("Ammo class %1 lacks proper explosive properties definitions for frag!",_roundType); //TODO: turn this off when we get closer to release
|
||||
};
|
||||
|
||||
_fragPower = (((_m/_c)+_k)^-(1/2))*_gC;
|
||||
|
@ -67,7 +67,7 @@ _gC = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_GURNEY_C");
|
||||
if(_gC == 0) then { _gC = 2440; _warn = true;};
|
||||
|
||||
if(_warn) then {
|
||||
diag_log text format["Ammo class %1 lacks proper explosive properties definitions for frag!", _shellType]; //TODO: turn this off when we get closer to release
|
||||
ACE_LOGWARNING_1("Ammo class %1 lacks proper explosive properties definitions for frag!",_shellType); //TODO: turn this off when we get closer to release
|
||||
};
|
||||
|
||||
_fragPower = (((_m/_c)+_k)^-(1/2))*_gC;
|
||||
|
@ -20,5 +20,4 @@ if ((_logic getVariable "DisableEarRinging") != -1) then {
|
||||
};
|
||||
|
||||
[_logic, QGVAR(enabledForZeusUnits), "enabledForZeusUnits"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
diag_log text "[ACE]: Hearing Module Initialized.";
|
||||
ACE_LOGINFO("Hearing Module Initialized.");
|
||||
|
@ -44,7 +44,7 @@ if (_parentPath isEqualTo ["ACE_MainActions"]) then {
|
||||
_parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode);
|
||||
if (isNil {_parentNode}) exitWith {
|
||||
ERROR("Failed to add action");
|
||||
diag_log text format ["action (%1) to parent %2 on object %3 [%4]", (_action select 0), _parentPath, _objectType, _typeNum];
|
||||
ACE_LOGERROR_4("action (%1) to parent %2 on object %3 [%4]",(_action select 0),_parentPath,_objectType,_typeNum);
|
||||
};
|
||||
|
||||
// Add action node as children of the correct node of action tree
|
||||
|
@ -26,4 +26,4 @@ if !(_activated) exitWith {};
|
||||
|
||||
[_logic, QGVAR(EnableTeamManagement), "EnableTeamManagement"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
diag_log text "[ACE]: Interaction Module Initialized.";
|
||||
ACE_LOGINFO("Interaction Module Initialized.");
|
||||
|
@ -1,9 +1,9 @@
|
||||
// This is a debug function for displaying visible lasers for ourselves
|
||||
#include "script_component.hpp"
|
||||
|
||||
diag_log text format["[ACE]: Laser Emitter Dump"];
|
||||
ACE_LOGINFO("Laser Emitter Dump");
|
||||
|
||||
{
|
||||
diag_log text format[" %1", _x];
|
||||
diag_log text format[" %2", HASH_GET(GVAR(laserEmitters), _x)];
|
||||
ACE_LOGINFO_1(" %1", _x);
|
||||
ACE_LOGINFO_1(" %1",HASH_GET(GVAR(laserEmitters),_x));
|
||||
} forEach GVAR(laserEmitters) select 0;
|
@ -84,6 +84,6 @@ switch (_currentWeaponType) do {
|
||||
if (!_error) then {
|
||||
[_description, _picture] call EFUNC(common,displayTextPicture);
|
||||
} else {
|
||||
diag_log text format ["Failed to add %1 to %2 - reverting to %3", _nextPointer, _weapon, _pointer];
|
||||
ACE_LOGERROR_3("Failed to add %1 to %2 - reverting to %3",_nextPointer,_weapon,_pointer);
|
||||
};
|
||||
playSound "ACE_Sound_Click";
|
||||
|
@ -22,5 +22,5 @@ if !(_activated) exitWith {};
|
||||
[_logic, QGVAR(BFT_Interval), "Interval"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
diag_log text "[ACE]: Blue Force Tracking Module initialized.";
|
||||
ACE_LOGINFO("Blue Force Tracking Module Initialized.");
|
||||
TRACE_2("[ACE]: Blue Force Tracking Module initialized.", GVAR(BFT_Interval), GVAR(BFT_HideAiGroups));
|
||||
|
@ -23,4 +23,4 @@ if !(_activated) exitWith {};
|
||||
[_logic, QGVAR(mapLimitZoom), "MapLimitZoom" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(mapShowCursorCoordinates), "MapShowCursorCoordinates"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
diag_log text "[ACE]: Map Module Initialized.";
|
||||
ACE_LOGINFO("Map Module Initialized.");
|
||||
|
@ -17,8 +17,6 @@ private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_
|
||||
|
||||
_control = _this select 0;
|
||||
_dir = _this select 1;
|
||||
diag_log "Scroll";
|
||||
diag_log _this;
|
||||
_handled = false;
|
||||
|
||||
_handled = true;
|
||||
|
@ -279,7 +279,7 @@ GVAR(lastHeartBeatSound) = ACE_time;
|
||||
|
||||
if (hasInterface) then {
|
||||
["PlayerJip", {
|
||||
diag_log format["[ACE] JIP Medical init for player"];
|
||||
ACE_LOGINFO("JIP Medical init for player.");
|
||||
[player] call FUNC(init);
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
};
|
||||
|
@ -38,14 +38,14 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
|
||||
if (isClass (configFile >> "cfgPatches" >> "acre_api")) then {
|
||||
diag_log text format ["[ACE_nametags] - ACRE Detected"];
|
||||
ACE_LOGINFO("ACRE Detected.");
|
||||
DFUNC(isSpeaking) = {
|
||||
params ["_unit"];
|
||||
(([_unit] call acre_api_fnc_isSpeaking) || {[ACE_player] call acre_api_fnc_isBroadcasting}) && {!(_unit getVariable ["ACE_isUnconscious", false])}
|
||||
};
|
||||
} else {
|
||||
if (isClass (configFile >> "cfgPatches" >> "task_force_radio")) then {
|
||||
diag_log text format ["[ACE_nametags] - TFR Detected"];
|
||||
ACE_LOGINFO("TFR Detected.");
|
||||
DFUNC(isSpeaking) = {
|
||||
params ["_unit"];
|
||||
(_unit getVariable ["tf_isSpeaking", false]) && {!(_unit getVariable ["ACE_isUnconscious", false])}
|
||||
|
@ -33,4 +33,4 @@ if ((_logic getVariable "showVehicleCrewInfo") != -1) then {
|
||||
[_logic, QGVAR(showVehicleCrewInfo), "showVehicleCrewInfo" ] call EFUNC(common,readSettingFromModule);
|
||||
};
|
||||
|
||||
diag_log text "[ACE]: NameTags Module Initialized.";
|
||||
ACE_LOGINFO("Nametags Module Initialized.");
|
||||
|
@ -39,7 +39,7 @@ while {true} do {
|
||||
if (_temperature < 1) exitWith {0};
|
||||
|
||||
if (isNil "_temperature") exitWith {
|
||||
diag_log text format ["[ACE] ERROR: _totalTime = %1; _time = %2; _deltaTime = %3;", _totalTime, _time, _deltaTime];
|
||||
ACE_LOGERROR_3("_totalTime = %1; _time = %2; _deltaTime = %3;",_totalTime,_time,_deltaTime);
|
||||
0
|
||||
};
|
||||
|
||||
|
@ -27,8 +27,6 @@ if !(hasInterface) exitWith {};
|
||||
// Listen for attempts to link ammo
|
||||
["linkedAmmo", {
|
||||
EXPLODE_3_PVT(_this,_receiver,_giver,_magazine);
|
||||
diag_log "linkedAmmo";
|
||||
diag_log _this;
|
||||
|
||||
private ["_magazineCfg","_magazineType"];
|
||||
_magazineType = currentMagazine _receiver;
|
||||
@ -62,8 +60,6 @@ if !(hasInterface) exitWith {};
|
||||
// Listen for returned magazines
|
||||
["returnedAmmo", {
|
||||
EXPLODE_3_PVT(_this,_receiver,_giver,_magazine);
|
||||
diag_log "returnedAmmo";
|
||||
diag_log _this;
|
||||
|
||||
_receiver addMagazine _magazine;
|
||||
}] call EFUNC(common,addEventhandler);
|
||||
|
@ -131,7 +131,7 @@ _hitPointsAddedAmount = [];
|
||||
if (typeName _position == "STRING") exitWith {
|
||||
_selection = _vehicle selectionPosition _position; // Selection name
|
||||
};
|
||||
diag_log text format ["[ACE] ERROR: Invalid custom position %1 of hitpoint %2 in vehicle %3", _position, _hitpoint, _vehicle];
|
||||
ACE_LOGERROR_3("Invalid custom position %1 of hitpoint %2 in vehicle %3.",_position,_hitpoint,_vehicle);
|
||||
};
|
||||
} forEach (getArray _customSelectionsConfig);
|
||||
};
|
||||
|
@ -33,4 +33,4 @@ if (!isServer) exitWith {};
|
||||
|
||||
[_logic, QGVAR(addSpareParts), "addSpareParts"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
diag_log text "[ACE]: Repair Module Initialized.";
|
||||
ACE_LOGINFO("Repair Module Initialized.");
|
||||
|
@ -65,5 +65,5 @@ if (isNil _name) then {
|
||||
|
||||
} else {
|
||||
deleteVehicle _rallypoint;
|
||||
diag_log text "[ACE] Respawn: ERROR Multiple Rallypoints of same type.";
|
||||
ACE_LOGERROR("Multiple Rallypoints of same type.");
|
||||
};
|
||||
|
@ -45,4 +45,4 @@ if (isServer) then {
|
||||
};
|
||||
};
|
||||
|
||||
diag_log text "[ACE]: Respawn Module Initialized.";
|
||||
ACE_LOGINFO("Respawn Module Initialized.");
|
||||
|
@ -28,5 +28,5 @@ _this spawn {
|
||||
publicVariable QGVAR(showFriendlyFireMessage);
|
||||
};
|
||||
|
||||
diag_log text "[ACE]: Friendly Fire Messages Module Initialized.";
|
||||
ACE_LOGINFO("Friendly Fire Messages Module Initialized.");
|
||||
};
|
||||
|
@ -26,4 +26,4 @@ if !(_activated) exitWith {};
|
||||
_x setVariable ["ACE_canMoveRallypoint", true];
|
||||
} forEach _units;
|
||||
|
||||
diag_log text "[ACE]: Rallypoint Module Initialized.";
|
||||
ACE_LOGINFO("Rallypoint Module Initialized.");
|
||||
|
@ -22,4 +22,4 @@ if (!_activated) exitWith {};
|
||||
|
||||
[_logic, QGVAR(enable), "enable"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
diag_log text "[ACE]: Sitting Module Initialized.";
|
||||
ACE_LOGINFO("Sitting Module Initialized.");
|
||||
|
@ -24,7 +24,7 @@ params ["_objects", "_controllers", "_images", "_names", "_duration"];
|
||||
|
||||
// Verify data
|
||||
if (count _images != count _names || {count _images == 0} || {count _names == 0}) exitWith {
|
||||
diag_log "[ACE] ERROR: Slideshow Images or Names fields can NOT be empty and must have equal number of items!"
|
||||
ACE_LOGERROR("Slideshow Images or Names fields can NOT be empty and must have equal number of items!");
|
||||
};
|
||||
|
||||
// Objects synced to the module
|
||||
@ -55,7 +55,7 @@ _currentSlideshow = GVAR(slideshows); // Local variable in case GVAR gets change
|
||||
// If interaction menu module is not present, set default duration value
|
||||
if !(["ace_interact_menu"] call EFUNC(common,isModLoaded)) then {
|
||||
_duration = 5;
|
||||
diag_log text format ["[ACE]: Slideshow: Interaction Menu module not present, defaulting duration value to %1", _duration];
|
||||
ACE_LOGINFO_1("Interaction Menu module not present, defaulting duration value to %1",_duration);
|
||||
};
|
||||
|
||||
// Add interactions if automatic transitions are disabled, else setup automatic transitions
|
||||
|
@ -33,4 +33,4 @@ _duration = _logic getVariable ["Duration", 0];
|
||||
// Prepare with actions
|
||||
[_objects, _controllers, _images, _names, _duration] call FUNC(createSlideshow);
|
||||
|
||||
diag_log text format ["[ACE]: Slideshow Module Initialized for: %1 with Duration: %2", _objects, _duration];
|
||||
ACE_LOGINFO_2("Slideshow Module Initialized for: %1 with Duration: %2", _objects, _duration);
|
||||
|
@ -35,4 +35,4 @@ GVAR(Module) = true;
|
||||
|
||||
[QGVAR(EnableSwitchUnits), true, false, true] call EFUNC(common,setSetting);
|
||||
|
||||
diag_log text "[ACE]: SwitchUnits Module Initialized.";
|
||||
ACE_LOGINFO("Switch Unit Module Initialized.");
|
||||
|
@ -20,10 +20,10 @@ if (!isServer) exitWith {};
|
||||
params ["_logic", "_units", "_activated"];
|
||||
|
||||
if (!_activated) exitWith {
|
||||
diag_log text "[ACE]: View Distance Limit Module is placed but NOT active.";
|
||||
ACE_LOGWARNING("View Distance Limit Module is placed but NOT active.");
|
||||
};
|
||||
|
||||
[_logic, QGVAR(enabled),"moduleViewDistanceEnabled"] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(limitViewDistance),"moduleViewDistanceLimit"] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
diag_log format ["[ACE]: View Distance Limit Module Initialized. Limit set by module: %1",GVAR(limitViewDistance)];
|
||||
ACE_LOGINFO_1("View Distance Limit Module Initialized. Limit set by module: %1",GVAR(limitViewDistance));
|
||||
|
Loading…
Reference in New Issue
Block a user