From 367d91a39f8cf93fcf9805f2e6e1424a6a46df25 Mon Sep 17 00:00:00 2001 From: John Jordan Date: Tue, 30 Jan 2024 04:01:20 +0000 Subject: [PATCH] Fix fallback code for militia lacking cargo trucks --- A3A/addons/core/functions/CREATE/fn_createAIOutposts.sqf | 2 +- A3A/addons/core/functions/CREATE/fn_createAIResources.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/A3A/addons/core/functions/CREATE/fn_createAIOutposts.sqf b/A3A/addons/core/functions/CREATE/fn_createAIOutposts.sqf index 66574e858b..eb5328afb9 100644 --- a/A3A/addons/core/functions/CREATE/fn_createAIOutposts.sqf +++ b/A3A/addons/core/functions/CREATE/fn_createAIOutposts.sqf @@ -256,7 +256,7 @@ if (_spawnParameter isEqualType []) then if (FactionGet(civ,"vehiclesCivFuel") isEqualTo [] and random 1 < 0.1) exitWith { selectRandom (_faction get "vehiclesFuelTrucks") }; private _types = if (!_isFIA) then {(_faction get "vehiclesTrucks") + (_faction get "vehiclesCargoTrucks")} else {_faction get "vehiclesMilitiaTrucks"}; _types = _types select { _x in FactionGet(all,"vehiclesCargoTrucks") }; - if (count _types == 0) then { (_faction get "vehiclesCargoTrucks") } else { _types }; + if (count _types == 0) then { _types = (_faction get "vehiclesCargoTrucks") }; selectRandom _types; }; isNil { diff --git a/A3A/addons/core/functions/CREATE/fn_createAIResources.sqf b/A3A/addons/core/functions/CREATE/fn_createAIResources.sqf index d3cf9305ab..0283e78594 100644 --- a/A3A/addons/core/functions/CREATE/fn_createAIResources.sqf +++ b/A3A/addons/core/functions/CREATE/fn_createAIResources.sqf @@ -152,7 +152,7 @@ if (_spawnParameter isEqualType []) then if (FactionGet(civ,"vehiclesCivFuel") isEqualTo [] and random 1 < 0.1) exitWith { selectRandom (_faction get "vehiclesFuelTrucks") }; private _types = if (!_isFIA) then {(_faction get "vehiclesTrucks") + (_faction get "vehiclesCargoTrucks")} else {_faction get "vehiclesMilitiaTrucks"}; _types = _types select { _x in FactionGet(all,"vehiclesCargoTrucks") }; - if (count _types == 0) then { (_faction get "vehiclesCargoTrucks") } else { _types }; + if (count _types == 0) then { _types = (_faction get "vehiclesCargoTrucks") }; selectRandom _types; }; isNil {