implement CBA macros, fix for prod

- using a3go 0.3.2, no longer relies on ext callback for anything except RPT logging and waiting DB connect at postinit
- tested and functional
This commit is contained in:
2023-10-12 15:41:22 -07:00
parent 62fbe8b24c
commit 6cf76d1019
29 changed files with 487 additions and 452 deletions

31
addons/main/fnc_log.sqf Normal file
View File

@@ -0,0 +1,31 @@
#include "script_component.hpp"
if (!isServer) exitWith {};
if (typeName _this != "ARRAY") exitWith {
diag_log format ["[%1]: Invalid log params: %2", GVAR(logPrefix), _this];
};
params [
["_level", "INFO", [""]],
["_text", "", ["", []]]
];
if (_text isEqualType []) then {
_text = format ["%1", _text];
};
if (
_level == "DEBUG" &&
!GVAR(debug)
) exitWith {};
if (_text isEqualTo "") exitWith {};
diag_log formatText [
"[%1] %2: %3",
GVAR(logPrefix),
_level,
_text
];