Skip to content

Commit

Permalink
results now stored in profileNamespace
Browse files Browse the repository at this point in the history
  • Loading branch information
alphakilo11 committed Dec 30, 2022
1 parent bc3af59 commit 5dbeaab
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
8 changes: 7 additions & 1 deletion functions/AK_fnc_AutomatedBattleEngine_Main.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ AK_fnc_automatedBattleEngine = {
["_delay", 60, [0]]
];
AK_var_fnc_automatedBattleEngine_unitTypes = _unitTypes; // store Unittypes for further use (eg AK_fnc_battlelogger)
AK_var_fnc_automatedBattleEngine_location = _location; // store location for further use (eg AK_fnc_battlelogger)
AK_var_fnc_automatedBattleEngine_location = _location; // store location for further use (eg AK_fnc_battlelogger)
// create variable for logging
private _var = profileNamespace getVariable "33f73e6e-ebd3-40ee-b3b2-8fbc9e71a7cc";
if (isNil "_var") then {
_var = [];
profileNamespace setVariable ["33f73e6e-ebd3-40ee-b3b2-8fbc9e71a7cc", _var];
};

AK_ABE = [
{ // The function you wish to execute. <CODE>
Expand Down
9 changes: 7 additions & 2 deletions functions/AK_fnc_battlelogger.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ AK_fnc_battlelogger = {
east_veh_survivors = ({side _x == east} count (AK_battlingUnits select 0));
indep_veh_survivors = ({side _x == independent} count (AK_battlingUnits select 0));
_summary = [
"AKBL Result: ",
"AKBL Result: ", // Do not remove 'AKBL Result: ' - see readme.txt for details
AK_var_fnc_battlelogger_Version,
AK_var_fnc_battlelogger_typeEAST,
east_veh_survivors,
Expand All @@ -120,7 +120,12 @@ AK_fnc_battlelogger = {
sunOrMoon,
moonIntensity
];
diag_log _summary; // Do not remove 'AKBL Result: ' - see readme.txt for details
private _var = profileNamespace getVariable "33f73e6e-ebd3-40ee-b3b2-8fbc9e71a7cc";
_var pushBack _summary;
profileNamespace setVariable ["33f73e6e-ebd3-40ee-b3b2-8fbc9e71a7cc", _var];
saveProfileNamespace;

//cleanup
{deleteVehicle _x} forEach (AK_battlingUnits select 0);
{deleteVehicle _x} forEach (AK_battlingUnits select 1);
{deleteGroup _x} forEach (AK_battlingUnits select 2);
Expand Down

0 comments on commit 5dbeaab

Please sign in to comment.