big refactor, WIP!
This commit is contained in:
@@ -17,7 +17,7 @@ private _allSaved = [];
|
||||
private _assetsAtThisBaseVar = QGVAR(assetsAtThisBase);
|
||||
private _assetsStartedAtThisBaseVar = QGVAR(assetsStartedAtThisBase);
|
||||
|
||||
private _approvedAssetsCfg = call EFUNC(util,getApprovedAssetsCfg);
|
||||
private _approvedAssetsCfg = call EFUNC(common,getApprovedAssetsCfg);
|
||||
if (isNull _approvedAssetsCfg) exitWith {};
|
||||
|
||||
{
|
||||
@@ -34,7 +34,7 @@ if (isNull _approvedAssetsCfg) exitWith {};
|
||||
|
||||
|
||||
// add to base's assets list
|
||||
private _closestBase = [_asset] call EFUNC(util,getNearestBase);
|
||||
private _closestBase = [_asset] call EFUNC(common,getNearestBase);
|
||||
private _baseAssets = _closestBase getVariable [_assetsAtThisBaseVar, []];
|
||||
_baseAssets pushBackUnique [
|
||||
_asset call BIS_fnc_netId,
|
||||
@@ -69,7 +69,7 @@ if (isNull _approvedAssetsCfg) exitWith {};
|
||||
|
||||
|
||||
// add to base's assets list
|
||||
private _closestBase = [_asset] call EFUNC(util,getNearestBase);
|
||||
private _closestBase = [_asset] call EFUNC(common,getNearestBase);
|
||||
private _baseAssets = _closestBase getVariable [_assetsAtThisBaseVar, []];
|
||||
_baseAssets pushBackUnique [
|
||||
_asset call BIS_fnc_netId,
|
||||
@@ -142,13 +142,14 @@ if !(_isInit || _logCurrentAssets) exitWith {};
|
||||
if (_logCurrentAssets) then {
|
||||
{
|
||||
[
|
||||
LEVEL_INFO,
|
||||
QUOTE(COMPONENT),
|
||||
"CURRENT ASSETS",
|
||||
[
|
||||
["baseName", [[_base] call EFUNC(util,getNameOfBase)]],
|
||||
["baseName", [[_base] call EFUNC(common,getNameOfBase)]],
|
||||
["asset", _x]
|
||||
]
|
||||
] call EFUNC(util,log);
|
||||
] call EFUNC(common,log);
|
||||
} forEach _baseAssetsHashes;
|
||||
};
|
||||
|
||||
@@ -156,13 +157,14 @@ if !(_isInit || _logCurrentAssets) exitWith {};
|
||||
if (_isInit) then {
|
||||
{
|
||||
[
|
||||
"fbcb2_assets",
|
||||
LEVEL_INFO,
|
||||
QUOTE(COMPONENT),
|
||||
"STARTING ASSETS",
|
||||
[
|
||||
["baseName", [[_base] call EFUNC(util,getNameOfBase)]],
|
||||
["baseName", [[_base] call EFUNC(common,getNameOfBase)]],
|
||||
["asset", _x]
|
||||
]
|
||||
] call EFUNC(util,log);
|
||||
] call EFUNC(common,log);
|
||||
} forEach _baseAssetsHashes;
|
||||
};
|
||||
} forEach GVARMAIN(baseObjects);
|
||||
Reference in New Issue
Block a user