diff --git a/addons/aircraft/functions/fnc_initEjectAction.sqf b/addons/aircraft/functions/fnc_initEjectAction.sqf index 8ec9e33ade..b453ce7704 100644 --- a/addons/aircraft/functions/fnc_initEjectAction.sqf +++ b/addons/aircraft/functions/fnc_initEjectAction.sqf @@ -19,7 +19,7 @@ params ["_vehicle"]; if (unitIsUAV _vehicle) exitWith {}; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _addAction = false; diff --git a/addons/artillerytables/XEH_postInit.sqf b/addons/artillerytables/XEH_postInit.sqf index 2f31655814..b558fb1096 100644 --- a/addons/artillerytables/XEH_postInit.sqf +++ b/addons/artillerytables/XEH_postInit.sqf @@ -15,7 +15,7 @@ if (GVAR(advancedCorrections)) then { ["LandVehicle", "init", { params ["_vehicle"]; - private _vehicleCfg = configFile >> "CfgVehicles" >> typeOf _vehicle; + private _vehicleCfg = configOf _vehicle; // config "ace_artillerytables_applyCorrections" [0 disabled, 1 enabled] falls back to artilleryScanner private _applyCorrections = if (isNumber (_vehicleCfg >> QGVAR(applyCorrections))) then { getNumber (_vehicleCfg >> QGVAR(applyCorrections)) diff --git a/addons/artillerytables/functions/fnc_interactMenuOpened.sqf b/addons/artillerytables/functions/fnc_interactMenuOpened.sqf index 849be932ce..8e396a0f13 100644 --- a/addons/artillerytables/functions/fnc_interactMenuOpened.sqf +++ b/addons/artillerytables/functions/fnc_interactMenuOpened.sqf @@ -26,7 +26,7 @@ private _rangeTablesShown = ace_player getVariable [QGVAR(rangeTablesShown), []] TRACE_2("searching for new vehicles",_vehicleAdded,_rangeTablesShown); { - private _vehicleCfg = configFile >> "CfgVehicles" >> typeOf _x; + private _vehicleCfg = configOf _x; // config "ace_artillerytables_showRangetable" [0 disabled, 1 enabled] falls back to artilleryScanner private _showRangetable = if (isNumber (_vehicleCfg >> QGVAR(showRangetable))) then { getNumber (_vehicleCfg >> QGVAR(showRangetable)) diff --git a/addons/cargo/CfgEden.hpp b/addons/cargo/CfgEden.hpp index 9144ba458b..a342215290 100644 --- a/addons/cargo/CfgEden.hpp +++ b/addons/cargo/CfgEden.hpp @@ -10,7 +10,7 @@ class Cfg3DEN { control = "Edit"; expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSpace);); - defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(space),0)); + defaultValue = QUOTE(GET_NUMBER(configOf _this >> QQGVAR(space),0)); validate = "number"; condition = "objectHasInventoryCargo"; @@ -24,7 +24,7 @@ class Cfg3DEN { // Expression only runs on the server, must handle actions for all machines and future JIPs (Why BI?!) expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSize);); - defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(size),-1)); + defaultValue = QUOTE(GET_NUMBER(configOf _this >> QQGVAR(size),-1)); validate = "number"; condition = "1-objectBrain"; diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 7ea978dc73..0f2ab2bd2c 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -11,8 +11,8 @@ // Show hint as feedback private _hint = [LSTRING(LoadingFailed), LSTRING(LoadedItem)] select _loaded; - private _itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName"); - private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + private _itemName = getText (configOf _item >> "displayName"); + private _vehicleName = getText (configOf _vehicle >> "displayName"); [[_hint, _itemName, _vehicleName], 3.0] call EFUNC(common,displayTextStructured); @@ -33,7 +33,7 @@ // Show hint as feedback private _hint = [LSTRING(UnloadingFailed), LSTRING(UnloadedItem)] select _unloaded; private _itemName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName"); - private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + private _vehicleName = getText (configOf _vehicle >> "displayName"); [[_hint, _itemName, _vehicleName], 3.0] call EFUNC(common,displayTextStructured); @@ -70,7 +70,7 @@ GVAR(vehicleAction) = [ { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(enable) && - {(_target getVariable [QGVAR(hasCargo), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(hasCargo)) == 1])} && + {(_target getVariable [QGVAR(hasCargo), getNumber (configOf _target >> QGVAR(hasCargo)) == 1])} && {locked _target < 2} && {([_player, _target] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE} && {alive _target} && @@ -87,12 +87,12 @@ GVAR(objectAction) = [ { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(enable) && - {(_target getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(canLoad))]) in [true, 1]} && + {(_target getVariable [QGVAR(canLoad), getNumber (configOf _target >> QGVAR(canLoad))]) in [true, 1]} && {locked _target < 2} && {alive _target} && {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} && {((nearestObjects [_target, GVAR(cargoHolderTypes), (MAX_LOAD_DISTANCE + 10)]) findIf { - private _hasCargoConfig = 1 == getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(hasCargo)); + private _hasCargoConfig = 1 == getNumber (configOf _x >> QGVAR(hasCargo)); private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false]; (_hasCargoConfig || {_hasCargoPublic}) && {_x != _target} && {alive _x} && {locked _x < 2} && {([_target, _x] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE} diff --git a/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf b/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf index d3a66794db..2bec4f4df3 100644 --- a/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf +++ b/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf @@ -23,7 +23,7 @@ private _statement = { }; private _vehicles = (nearestObjects [_target, GVAR(cargoHolderTypes), (MAX_LOAD_DISTANCE + 10)]) select { - private _hasCargoConfig = 1 == getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(hasCargo)); + private _hasCargoConfig = 1 == getNumber (configOf _x >> QGVAR(hasCargo)); private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false]; (_hasCargoConfig || {_hasCargoPublic}) && {_x != _target} && {alive _x} && {locked _x < 2} && {([_target, _x] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE} diff --git a/addons/cargo/functions/fnc_canLoadItemIn.sqf b/addons/cargo/functions/fnc_canLoadItemIn.sqf index f7bc696d35..469dc45c9d 100644 --- a/addons/cargo/functions/fnc_canLoadItemIn.sqf +++ b/addons/cargo/functions/fnc_canLoadItemIn.sqf @@ -21,7 +21,7 @@ params [["_item", "", [objNull,""]], "_vehicle", ["_ignoreInteraction", false]]; if ((!_ignoreInteraction) && {speed _vehicle > 1 || {((getPos _vehicle) select 2) > 3}}) exitWith {TRACE_1("vehicle not stable",_vehicle); false}; -if (_item isEqualType objNull && {{alive _x && {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") != "UAVPilot"}} count crew _item > 0}) exitWith { +if (_item isEqualType objNull && {{alive _x && {getText (configOf _x >> "simulation") != "UAVPilot"}} count crew _item > 0}) exitWith { TRACE_1("item is occupied",_item); false }; diff --git a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf index d9452d4b01..b03108066d 100644 --- a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf +++ b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf @@ -18,4 +18,4 @@ params ["_object"]; // TRACE_1("params",_object); -(_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))]) max 0 +(_object getVariable [QGVAR(space), getNumber (configOf _object >> QGVAR(space))]) max 0 diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf index 60f204cb75..dac28a5ac9 100644 --- a/addons/cargo/functions/fnc_initVehicle.sqf +++ b/addons/cargo/functions/fnc_initVehicle.sqf @@ -76,7 +76,7 @@ if (_vehicle isKindOf "Air") then { private _turretPath = _player call CBA_fnc_turretPath; (_player == (driver _target)) || // pilot {(getNumber (([_target, _turretPath] call CBA_fnc_getTurret) >> "isCopilot")) == 1} || // coPilot - {_turretPath in (getArray (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(loadmasterTurrets)))}} // loadMaster turret from config + {_turretPath in (getArray (configOf _target >> QGVAR(loadmasterTurrets)))}} // loadMaster turret from config }; private _statement = { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; diff --git a/addons/cargo/functions/fnc_paradropItem.sqf b/addons/cargo/functions/fnc_paradropItem.sqf index 4c873d189e..4e314cdf37 100644 --- a/addons/cargo/functions/fnc_paradropItem.sqf +++ b/addons/cargo/functions/fnc_paradropItem.sqf @@ -99,8 +99,8 @@ if (_showHint) then { [ [ LSTRING(UnloadedItem), - getText (configFile >> "CfgVehicles" >> typeOf _itemObject >> "displayName"), - getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName") + getText (configOf _itemObject >> "displayName"), + getText (configOf _vehicle >> "displayName") ], 3 ] call EFUNC(common,displayTextStructured); diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index 7cc7923696..ef5f543016 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -60,7 +60,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then { ] call EFUNC(common,progressBar); _return = true; } else { - private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName"); + private _displayName = getText (configOf _object >> "displayName"); [[LSTRING(LoadingFailed), _displayName], 3] call EFUNC(common,displayTextStructured); }; diff --git a/addons/cargo/functions/fnc_validateCargoSpace.sqf b/addons/cargo/functions/fnc_validateCargoSpace.sqf index b83ccfe93a..4f996a30aa 100644 --- a/addons/cargo/functions/fnc_validateCargoSpace.sqf +++ b/addons/cargo/functions/fnc_validateCargoSpace.sqf @@ -34,4 +34,4 @@ if (count _loaded != count _newLoaded) then { _vehicle setVariable [QGVAR(loaded), _newLoaded, true]; }; -_vehicle setVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true]; +_vehicle setVariable [QGVAR(space), getNumber (configOf _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true]; diff --git a/addons/chemlights/functions/fnc_initIR.sqf b/addons/chemlights/functions/fnc_initIR.sqf index 29532f41f1..b6be8cf5fe 100644 --- a/addons/chemlights/functions/fnc_initIR.sqf +++ b/addons/chemlights/functions/fnc_initIR.sqf @@ -17,7 +17,7 @@ params ["_dummy"]; -private _chemlightClass = getText (configFile >> "CfgVehicles" >> typeOf _dummy >> "ACE_Attachable"); +private _chemlightClass = getText (configOf _dummy >> "ACE_Attachable"); private _config = configFile >> "CfgAmmo" >> _chemlightClass; private _delay = getNumber (_config >> "explosionTime"); private _lifeTime = getNumber (_config >> "timeToLive"); diff --git a/addons/common/functions/fnc_canGetInPosition.sqf b/addons/common/functions/fnc_canGetInPosition.sqf index 22d885b38c..c8870cebd7 100644 --- a/addons/common/functions/fnc_canGetInPosition.sqf +++ b/addons/common/functions/fnc_canGetInPosition.sqf @@ -31,7 +31,7 @@ if (!alive _vehicle || {locked _vehicle > 1}) exitWith {false}; private ["_selectionPosition", "_selectionPosition2"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _turret = []; private _radius = 0; diff --git a/addons/common/functions/fnc_claim.sqf b/addons/common/functions/fnc_claim.sqf index 3c30b8f28f..f29f4622a0 100644 --- a/addons/common/functions/fnc_claim.sqf +++ b/addons/common/functions/fnc_claim.sqf @@ -30,7 +30,7 @@ _target setVariable [QGVAR(owner), _unit, true]; // lock target object if (_lockTarget) then { - private _canBeDisassembled = !([] isEqualTo getArray (_target call CBA_fnc_getObjectConfig >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) }; + private _canBeDisassembled = !([] isEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) }; if (!isNull _unit) then { [QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent; if (_canBeDisassembled) then { diff --git a/addons/common/functions/fnc_claimSafeServer.sqf b/addons/common/functions/fnc_claimSafeServer.sqf index f3017f5bed..1cf1d1385e 100644 --- a/addons/common/functions/fnc_claimSafeServer.sqf +++ b/addons/common/functions/fnc_claimSafeServer.sqf @@ -36,7 +36,7 @@ _target setVariable [QGVAR(owner), _unit, true]; // lock target object if (_lockTarget) then { - private _canBeDisassembled = !([] isEqualTo getArray (_target call CBA_fnc_getObjectConfig >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) }; + private _canBeDisassembled = !([] isEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) }; if (!isNull _unit) then { [QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent; if (_canBeDisassembled) then { diff --git a/addons/common/functions/fnc_fixPosition.sqf b/addons/common/functions/fnc_fixPosition.sqf index ac152cf5c9..e4f956dadb 100644 --- a/addons/common/functions/fnc_fixPosition.sqf +++ b/addons/common/functions/fnc_fixPosition.sqf @@ -19,7 +19,7 @@ if (!local _this) exitWith {}; // Objects with disabled simulation and objects with simulation type "house" don't have gravity/physics, so make sure they are not floating -private _hasGravity = simulationEnabled _this && {getText (configFile >> "CfgVehicles" >> typeOf _this >> "simulation") != "house"}; +private _hasGravity = simulationEnabled _this && {getText (configOf _this >> "simulation") != "house"}; if (!_hasGravity) then { private _positionASL = getPosASL _this; diff --git a/addons/common/functions/fnc_getAwakeAnim.sqf b/addons/common/functions/fnc_getAwakeAnim.sqf index 7da2837759..aa7a28c3c5 100644 --- a/addons/common/functions/fnc_getAwakeAnim.sqf +++ b/addons/common/functions/fnc_getAwakeAnim.sqf @@ -23,7 +23,7 @@ private _vehicle = vehicle _unit; if (_vehicle isEqualTo _unit) exitWith {""}; // --- driver -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; if (_unit == driver _vehicle) exitWith { getText (configFile >> "CfgMovesBasic" >> "ManActions" >> getText (_config >> "driverAction")) // return diff --git a/addons/common/functions/fnc_getConfigCommander.sqf b/addons/common/functions/fnc_getConfigCommander.sqf index f3d011c57a..a49664bcf2 100644 --- a/addons/common/functions/fnc_getConfigCommander.sqf +++ b/addons/common/functions/fnc_getConfigCommander.sqf @@ -17,7 +17,7 @@ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _turret = _vehicle call FUNC(getTurretCommander); [_config, _turret] call FUNC(getTurretConfigPath) // return diff --git a/addons/common/functions/fnc_getConfigGunner.sqf b/addons/common/functions/fnc_getConfigGunner.sqf index 732256b8a1..d1e86a9bd0 100644 --- a/addons/common/functions/fnc_getConfigGunner.sqf +++ b/addons/common/functions/fnc_getConfigGunner.sqf @@ -17,7 +17,7 @@ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _turret = _vehicle call FUNC(getTurretGunner); [_config, _turret] call FUNC(getTurretConfigPath) // return diff --git a/addons/common/functions/fnc_getDoorTurrets.sqf b/addons/common/functions/fnc_getDoorTurrets.sqf index 93b0360042..8fb872a6f7 100644 --- a/addons/common/functions/fnc_getDoorTurrets.sqf +++ b/addons/common/functions/fnc_getDoorTurrets.sqf @@ -22,7 +22,7 @@ private _turrets = allTurrets [_vehicle, true]; private _doorTurrets = []; { - private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; + private _config = configOf _vehicle; _config = [_config, _x] call FUNC(getTurretConfigPath); diff --git a/addons/common/functions/fnc_getInPosition.sqf b/addons/common/functions/fnc_getInPosition.sqf index a45b5546a6..ef012a33b4 100644 --- a/addons/common/functions/fnc_getInPosition.sqf +++ b/addons/common/functions/fnc_getInPosition.sqf @@ -28,7 +28,7 @@ _position = toLower _position; // general if (!alive _vehicle || {locked _vehicle > 1}) exitWith {false}; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _turret = []; private _isInside = vehicle _unit == _vehicle; @@ -206,7 +206,7 @@ switch (_position) do { // this will execute all config based event handlers. Not script based ones unfortunately, but atleast we don't use any. private _fnc_getInEH = { // config based getIn EHs are assigned to the soldier, not the vehicle. Why Bis? Why? - private _config = configFile >> "CfgVehicles" >> typeOf _unit >> "EventHandlers"; + private _config = configOf _unit >> "EventHandlers"; if (isClass _config) then { //getIn is local effects with global arguments. It doesn't trigger if the unit was already inside and only switched seats diff --git a/addons/common/functions/fnc_getLightProperties.sqf b/addons/common/functions/fnc_getLightProperties.sqf index 002868dd4e..635284ade4 100644 --- a/addons/common/functions/fnc_getLightProperties.sqf +++ b/addons/common/functions/fnc_getLightProperties.sqf @@ -22,7 +22,7 @@ params ["_vehicle", "_light"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle >> "Reflectors" >> _light; +private _config = configOf _vehicle >> "Reflectors" >> _light; private _intensity = getNumber (_config >> "intensity"); private _position = getText (_config >> "position"); diff --git a/addons/common/functions/fnc_getMarkerType.sqf b/addons/common/functions/fnc_getMarkerType.sqf index 1541074a07..7f44861769 100644 --- a/addons/common/functions/fnc_getMarkerType.sqf +++ b/addons/common/functions/fnc_getMarkerType.sqf @@ -23,9 +23,9 @@ private _side = side _leader; if (_vehicle == _leader) exitWith { if ( - getNumber (configFile >> "CfgVehicles" >> typeOf _leader >> "detectSkill") > 20 || - getNumber (configFile >> "CfgVehicles" >> typeOf _leader >> "camouflage") < 1 || - getText (configFile >> "CfgVehicles" >> typeOf _leader >> "textsingular") == "diver" + getNumber (configOf _leader >> "detectSkill") > 20 || + getNumber (configOf _leader >> "camouflage") < 1 || + getText (configOf _leader >> "textsingular") == "diver" ) then { ["n_recon", "b_recon", "o_recon"] select ((["GUER", "WEST", "EAST"] find str _side) max 0) } else { @@ -33,16 +33,16 @@ if (_vehicle == _leader) exitWith { }; }; -if (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "attendant") == 1) exitWith { +if (getNumber (configOf _vehicle >> "attendant") == 1) exitWith { ["n_med", "b_med", "o_med"] select ((["GUER", "WEST", "EAST"] find str _side) max 0) }; if ( - getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportRepair") > 0 || - getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportFuel") > 0 || - getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportAmmo") > 0 || - getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "ACE_canRepair") > 0 || - getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "ACE_fuelCapacityCargo") > 0 + getNumber (configOf _vehicle >> "transportRepair") > 0 || + getNumber (configOf _vehicle >> "transportFuel") > 0 || + getNumber (configOf _vehicle >> "transportAmmo") > 0 || + getNumber (configOf _vehicle >> "ACE_canRepair") > 0 || + getNumber (configOf _vehicle >> "ACE_fuelCapacityCargo") > 0 ) exitWith { ["n_maint", "b_maint", "o_maint"] select ((["GUER", "WEST", "EAST"] find str _side) max 0) }; @@ -59,7 +59,7 @@ if (_vehicle isKindOf "StaticMortar") exitWith { ["n_mortar", "b_mortar", "o_mortar"] select ((["GUER", "WEST", "EAST"] find str _side) max 0) }; -if (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "artilleryScanner") == 1) exitWith { +if (getNumber (configOf _vehicle >> "artilleryScanner") == 1) exitWith { ["n_art", "b_art", "o_art"] select ((["GUER", "WEST", "EAST"] find str _side) max 0) }; @@ -68,7 +68,7 @@ if (_vehicle isKindOf "Car") exitWith { }; if (_vehicle isKindOf "Tank") exitWith { - if (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportSoldier") > 0) then { + if (getNumber (configOf _vehicle >> "transportSoldier") > 0) then { ["n_mech_inf", "b_mech_inf", "o_mech_inf"] select ((["GUER", "WEST", "EAST"] find str _side) max 0) } else { ["n_armor", "b_armor", "o_armor"] select ((["GUER", "WEST", "EAST"] find str _side) max 0) diff --git a/addons/common/functions/fnc_getName.sqf b/addons/common/functions/fnc_getName.sqf index 0bcce9d2c8..7d9dd35803 100644 --- a/addons/common/functions/fnc_getName.sqf +++ b/addons/common/functions/fnc_getName.sqf @@ -27,7 +27,7 @@ if (_unit isKindOf "CAManBase") then { if (_showEffective) then { _name = [effectiveCommander _unit, false, _useRaw] call FUNC(getName); } else { - _name = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName"); + _name = getText (configOf _unit >> "displayName"); }; }; diff --git a/addons/common/functions/fnc_getPylonTurret.sqf b/addons/common/functions/fnc_getPylonTurret.sqf index b27e6eb582..e82df1912a 100644 --- a/addons/common/functions/fnc_getPylonTurret.sqf +++ b/addons/common/functions/fnc_getPylonTurret.sqf @@ -27,7 +27,7 @@ if (!(_returnValue isEqualTo [])) then { } else { // Attempt to determine turret owner based on magazines in the vehicle private _pyMags = getPylonMagazines _vehicle; - private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]; + private _pylonConfigs = configProperties [configOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]; if (_pylonIndex >= (count _pyMags)) exitWith {ERROR("out of bounds");}; if (_pylonIndex >= (count _pylonConfigs)) exitWith {ERROR("out of bounds");}; diff --git a/addons/common/functions/fnc_getReflectorsWithSelections.sqf b/addons/common/functions/fnc_getReflectorsWithSelections.sqf index 97feca6e19..8d40642ae5 100644 --- a/addons/common/functions/fnc_getReflectorsWithSelections.sqf +++ b/addons/common/functions/fnc_getReflectorsWithSelections.sqf @@ -21,7 +21,7 @@ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _hitpoints = []; private _selections = []; diff --git a/addons/common/functions/fnc_getVehicleUAVCrew.sqf b/addons/common/functions/fnc_getVehicleUAVCrew.sqf index 45d151bc30..b1b1ae002e 100644 --- a/addons/common/functions/fnc_getVehicleUAVCrew.sqf +++ b/addons/common/functions/fnc_getVehicleUAVCrew.sqf @@ -17,4 +17,4 @@ params [["_vehicle", objNull, [objNull]]]; -crew _vehicle select {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") == "UAVPilot"} // return +crew _vehicle select {getText (configOf _x >> "simulation") == "UAVPilot"} // return diff --git a/addons/common/functions/fnc_hasHatch.sqf b/addons/common/functions/fnc_hasHatch.sqf index 90053f43d9..ab6a25035d 100644 --- a/addons/common/functions/fnc_hasHatch.sqf +++ b/addons/common/functions/fnc_hasHatch.sqf @@ -21,7 +21,7 @@ private _vehicle = vehicle _unit; if (_unit == _vehicle) exitWith {false}; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; if (getNumber (_config >> "hideProxyInCombat") != 1) exitWith {false}; diff --git a/addons/common/functions/fnc_isMedic.sqf b/addons/common/functions/fnc_isMedic.sqf index 9618a15548..43d7f6a7ea 100644 --- a/addons/common/functions/fnc_isMedic.sqf +++ b/addons/common/functions/fnc_isMedic.sqf @@ -17,6 +17,6 @@ params ["_unit"]; -private _isMedic = _unit getVariable [QEGVAR(medical,medicClass), getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "attendant")]; +private _isMedic = _unit getVariable [QEGVAR(medical,medicClass), getNumber (configOf _unit >> "attendant")]; _isMedic > 0 diff --git a/addons/common/functions/fnc_lightIntensityFromObject.sqf b/addons/common/functions/fnc_lightIntensityFromObject.sqf index 246424ae4d..e2099def69 100644 --- a/addons/common/functions/fnc_lightIntensityFromObject.sqf +++ b/addons/common/functions/fnc_lightIntensityFromObject.sqf @@ -82,7 +82,7 @@ if (_lightSource isKindOf "CAManBase") then { if (isCollisionLightOn _lightSource) then { private _markerLights = [ _lightSource, - {configProperties [configFile >> "CfgVehicles" >> typeOf _this >> "MarkerLights", "isClass _x", true]}, + {configProperties [configOf _this >> "MarkerLights", "isClass _x", true]}, uiNamespace, format [QEGVAR(cache,MarkerLights_%1), typeOf _lightSource], 1E11 diff --git a/addons/common/functions/fnc_loadPersonLocal.sqf b/addons/common/functions/fnc_loadPersonLocal.sqf index 7135e9e302..8490bf70e9 100644 --- a/addons/common/functions/fnc_loadPersonLocal.sqf +++ b/addons/common/functions/fnc_loadPersonLocal.sqf @@ -21,7 +21,7 @@ params ["_unit", "_vehicle", ["_caller", objNull]]; TRACE_3("loadPersonLocal",_unit,_vehicle,_caller); private _slotsOpen = false; -if ((_vehicle emptyPositions "cargo" > 0) && {!(_unit getVariable ['ACE_isUnconscious', false]) || {(getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "ejectDeadCargo")) == 0}}) then { +if ((_vehicle emptyPositions "cargo" > 0) && {!(_unit getVariable ['ACE_isUnconscious', false]) || {(getNumber (configOf _vehicle >> "ejectDeadCargo")) == 0}}) then { _unit moveInCargo _vehicle; TRACE_1("moveInCargo",_vehicle); _slotsOpen = true; diff --git a/addons/common/functions/fnc_moduleLSDVehicles.sqf b/addons/common/functions/fnc_moduleLSDVehicles.sqf index 97ce3833eb..2a9df4c591 100644 --- a/addons/common/functions/fnc_moduleLSDVehicles.sqf +++ b/addons/common/functions/fnc_moduleLSDVehicles.sqf @@ -24,7 +24,7 @@ if (isNil QGVAR(LSD_Vehicles)) then { }; { - _hSCount = count (getArray (configFile >> "CfgVehicles" >> typeOf _x >> "hiddenSelections")); + _hSCount = count (getArray (configOf _x >> "hiddenSelections")); if (_hSCount > 0) then { GVAR(LSD_Vehicles) pushBack [_x, _hSCount]; }; diff --git a/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf b/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf index 83ed8ceb20..03a01cf395 100644 --- a/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf +++ b/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf @@ -22,7 +22,7 @@ params ["_unit", ["_distance", 10], ["_cargoOnly", false]]; private _nearVehicles = nearestObjects [_unit, ["Car", "Air", "Tank", "Ship_F", "Pod_Heli_Transport_04_crewed_base_F"], _distance]; _nearVehicles select { // Filter cargo seats that will eject unconscious units (e.g. quad bike) - private _canSitInCargo = (!(_unit getVariable ['ACE_isUnconscious', false])) || {(getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "ejectDeadCargo")) == 0}; + private _canSitInCargo = (!(_unit getVariable ['ACE_isUnconscious', false])) || {(getNumber (configOf _x >> "ejectDeadCargo")) == 0}; ((fullCrew [_x, "", true]) findIf { _x params ["_body", "_role", "_cargoIndex"]; (isNull _body) // seat empty diff --git a/addons/concertina_wire/functions/fnc_dismount.sqf b/addons/concertina_wire/functions/fnc_dismount.sqf index b8beeb6a9e..58f04379fd 100644 --- a/addons/concertina_wire/functions/fnc_dismount.sqf +++ b/addons/concertina_wire/functions/fnc_dismount.sqf @@ -25,7 +25,7 @@ if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exit }; params ["_wire", "_unit"]; -private _config = (configFile >> "CfgVehicles" >> typeOf _unit); +private _config = (configOf _unit); private _delay = [45, 30] select ([_unit] call EFUNC(common,isEngineer) || {[_unit] call EFUNC(common,isEOD)}); // TODO: Animation? diff --git a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf index 6482ea718a..baaa8efe06 100644 --- a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf +++ b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf @@ -96,8 +96,8 @@ if (_mode == 1) then { if (canMove _vehicle) then { { private _selectionPart = "hit" + _x; - if (isText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then { - private _selection = getText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name"); + if (isText(configOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then { + private _selection = getText(configOf _vehicle >> "hitpoints" >> _selectionPart >> "name"); // TODO: Only the tires that have touched the wire should burst. _vehicle setHit [_selection, 1]; }; diff --git a/addons/cookoff/functions/fnc_getVehicleAmmo.sqf b/addons/cookoff/functions/fnc_getVehicleAmmo.sqf index 810084fe71..232e8190a1 100644 --- a/addons/cookoff/functions/fnc_getVehicleAmmo.sqf +++ b/addons/cookoff/functions/fnc_getVehicleAmmo.sqf @@ -46,7 +46,7 @@ private _totalAmmo = 0; } forEach (magazinesAmmoCargo _vehicle); // Get ammo from transportAmmo / ace_rearm -private _vehCfg = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _vehCfg = configOf _vehicle; private _configSupply = (getNumber (_vehCfg >> "transportAmmo")) max (getNumber (_vehCfg >> QEGVAR(rearm,defaultSupply))); if (_vehicle getVariable [QEGVAR(rearm,isSupplyVehicle), (_configSupply > 0)]) then { diff --git a/addons/csw/functions/fnc_ai_handleFired.sqf b/addons/csw/functions/fnc_ai_handleFired.sqf index f85c74fd20..2701b8cef8 100644 --- a/addons/csw/functions/fnc_ai_handleFired.sqf +++ b/addons/csw/functions/fnc_ai_handleFired.sqf @@ -81,8 +81,8 @@ if (_reloadSource isKindOf "CaManBase") then { }; private _timeToLoad = 1; -if (!isNull(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "ammoLoadTime")) then { - _timeToLoad = getNumber(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "ammoLoadTime"); +if (!isNull(configOf _staticWeapon >> QUOTE(ADDON) >> "ammoLoadTime")) then { + _timeToLoad = getNumber(configOf _staticWeapon >> QUOTE(ADDON) >> "ammoLoadTime"); }; TRACE_1("Reloading in progress",_timeToLoad); diff --git a/addons/csw/functions/fnc_assemble_pickupTripod.sqf b/addons/csw/functions/fnc_assemble_pickupTripod.sqf index 0167254795..4f06b6e406 100644 --- a/addons/csw/functions/fnc_assemble_pickupTripod.sqf +++ b/addons/csw/functions/fnc_assemble_pickupTripod.sqf @@ -20,7 +20,7 @@ params ["_tripod", "_player"]; TRACE_2("assemble_pickupTripod",_tripod,_player); - private _tripodClassname = getText(configFile >> "CfgVehicles" >> (typeof _tripod) >> QUOTE(ADDON) >> "disassembleTo"); + private _tripodClassname = getText(configOf _tripod >> QUOTE(ADDON) >> "disassembleTo"); private _pickupTime = getNumber(configFile >> "CfgWeapons" >> _tripodClassname >> QUOTE(ADDON) >> "pickupTime"); private _onFinish = { diff --git a/addons/csw/functions/fnc_assemble_pickupWeapon.sqf b/addons/csw/functions/fnc_assemble_pickupWeapon.sqf index eb70371b59..381cd0186a 100644 --- a/addons/csw/functions/fnc_assemble_pickupWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_pickupWeapon.sqf @@ -19,9 +19,9 @@ params ["_staticWeapon", "_player"]; TRACE_2("assemble_pickupWeapon",_staticWeapon,_player); - private _onDisassembleFunc = getText(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "disassembleFunc"); - private _carryWeaponClassname = getText(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "disassembleWeapon"); - private _turretClassname = getText(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "disassembleTurret"); + private _onDisassembleFunc = getText(configOf _staticWeapon >> QUOTE(ADDON) >> "disassembleFunc"); + private _carryWeaponClassname = getText(configOf _staticWeapon >> QUOTE(ADDON) >> "disassembleWeapon"); + private _turretClassname = getText(configOf _staticWeapon >> QUOTE(ADDON) >> "disassembleTurret"); private _pickupTime = getNumber(configFile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON) >> "pickupTime"); TRACE_4("",typeOf _staticWeapon,_carryWeaponClassname,_turretClassname,_pickupTime); if (!isClass (configFile >> "CfgWeapons" >> _carryWeaponClassname)) exitWith {ERROR_1("bad weapon classname [%1]",_carryWeaponClassname);}; diff --git a/addons/csw/functions/fnc_reload_actionsUnload.sqf b/addons/csw/functions/fnc_reload_actionsUnload.sqf index 12d2cd2f9a..24e60b1a38 100644 --- a/addons/csw/functions/fnc_reload_actionsUnload.sqf +++ b/addons/csw/functions/fnc_reload_actionsUnload.sqf @@ -24,8 +24,8 @@ private _statement = { TRACE_5("starting unload",_target,_turretPath,_player,_carryMag,_vehMag); private _timeToUnload = 1; - if (!isNull(configFile >> "CfgVehicles" >> (typeOf _target) >> QUOTE(ADDON) >> "ammoUnloadTime")) then { - _timeToUnload = getNumber(configFile >> "CfgVehicles" >> (typeOf _target) >> QUOTE(ADDON) >> "ammoUnloadTime"); + if (!isNull(configOf _target >> QUOTE(ADDON) >> "ammoUnloadTime")) then { + _timeToUnload = getNumber(configOf _target >> QUOTE(ADDON) >> "ammoUnloadTime"); }; [ diff --git a/addons/csw/functions/fnc_reload_canLoadMagazine.sqf b/addons/csw/functions/fnc_reload_canLoadMagazine.sqf index 505c920333..69f8e6c93a 100644 --- a/addons/csw/functions/fnc_reload_canLoadMagazine.sqf +++ b/addons/csw/functions/fnc_reload_canLoadMagazine.sqf @@ -26,7 +26,7 @@ if (!alive _vehicle) exitWith { [false, "", -1, false] }; // Verify unit has carry magazine if ((!isNull _unit) && {((_vehicle distance _unit) > 5) || {((magazines _unit) findIf {_x == _carryMag}) == -1}}) exitWith { [false, "", -2, false] }; -private _desiredAmmo = getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "desiredAmmo"); +private _desiredAmmo = getNumber (configOf _vehicle >> QUOTE(ADDON) >> "desiredAmmo"); if (_desiredAmmo == 0) then { _desiredAmmo = 100; }; private _ammoNeeded = _desiredAmmo min getNumber (configFile >> "CfgMagazines" >> _carryMag >> "count"); // assume it needs full carry mag private _loadedMag = ""; diff --git a/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf b/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf index b6265852c9..2b28535f0a 100644 --- a/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf +++ b/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf @@ -20,7 +20,7 @@ params ["_vehicle", "_turret", "_carryMag"]; TRACE_3("reload_getVehicleMagazine",_vehicle,_turret,_carryMag); private _carryGroupCfg = configFile >> QGVAR(groups) >> _carryMag; -private _desiredAmmo = getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "desiredAmmo"); +private _desiredAmmo = getNumber (configOf _vehicle >> QUOTE(ADDON) >> "desiredAmmo"); if (_desiredAmmo == 0) then { _desiredAmmo = 100; }; private _bestMag = "#"; diff --git a/addons/csw/functions/fnc_reload_loadMagazine.sqf b/addons/csw/functions/fnc_reload_loadMagazine.sqf index 25032a08f4..2b34d38a24 100644 --- a/addons/csw/functions/fnc_reload_loadMagazine.sqf +++ b/addons/csw/functions/fnc_reload_loadMagazine.sqf @@ -22,8 +22,8 @@ params ["_vehicle", "_turret", "_carryMag", "_unit"]; TRACE_4("loadMagazine",_vehicle,_turret,_carryMag,_unit); private _timeToLoad = 1; -if (!isNull(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "ammoLoadTime")) then { - _timeToLoad = getNumber(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "ammoLoadTime"); +if (!isNull(configOf _vehicle >> QUOTE(ADDON) >> "ammoLoadTime")) then { + _timeToLoad = getNumber(configOf _vehicle >> QUOTE(ADDON) >> "ammoLoadTime"); }; private _displayName = format [localize LSTRING(loadX), getText (configFile >> "CfgMagazines" >> _carryMag >> "displayName")]; diff --git a/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf b/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf index a1e7ca9715..e1cba376f4 100644 --- a/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf +++ b/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf @@ -20,7 +20,7 @@ params ["_staticWeapon", "_assemblyMode", "_emptyWeapon"]; TRACE_3("staticWeaponInit_unloadExtraMags",_staticWeapon,_assemblyMode,_emptyWeapon); if (!_assemblyMode) exitWith {}; -private _desiredAmmo = getNumber (configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "desiredAmmo"); +private _desiredAmmo = getNumber (configOf _staticWeapon >> QUOTE(ADDON) >> "desiredAmmo"); private _storeExtraMagazines = GVAR(handleExtraMagazines); if (_emptyWeapon) then { _desiredAmmo = 0; diff --git a/addons/dragging/functions/fnc_canCarry.sqf b/addons/dragging/functions/fnc_canCarry.sqf index b5edbd800c..2483903eef 100644 --- a/addons/dragging/functions/fnc_canCarry.sqf +++ b/addons/dragging/functions/fnc_canCarry.sqf @@ -25,6 +25,6 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; if ((_unit getHitPointDamage "HitLegs") >= 0.5) exitWith {false}; // a static weapon has to be empty for dragging (ignore UAV AI) -if (((typeOf _target) isKindOf "StaticWeapon") && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; +if (((typeOf _target) isKindOf "StaticWeapon") && {{(getText (configOf _x >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; alive _target && {vehicle _target isEqualto _target} && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})} diff --git a/addons/dragging/functions/fnc_canDrag.sqf b/addons/dragging/functions/fnc_canDrag.sqf index dbae83521b..afc679e375 100644 --- a/addons/dragging/functions/fnc_canDrag.sqf +++ b/addons/dragging/functions/fnc_canDrag.sqf @@ -21,6 +21,6 @@ params ["_unit", "_target"]; if !([_unit, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false}; // a static weapon has to be empty for dragging (ignore UAV AI) -if ((typeOf _target) isKindOf "StaticWeapon" && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; +if ((typeOf _target) isKindOf "StaticWeapon" && {{(getText (configOf _x >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; alive _target && {vehicle _target isEqualto _target} && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})} diff --git a/addons/dragging/functions/fnc_initObject.sqf b/addons/dragging/functions/fnc_initObject.sqf index 8e352a00bb..a687a52b99 100644 --- a/addons/dragging/functions/fnc_initObject.sqf +++ b/addons/dragging/functions/fnc_initObject.sqf @@ -17,7 +17,7 @@ params ["_object"]; -private _config = configFile >> "CfgVehicles" >> typeOf _object; +private _config = configOf _object; if (getNumber (_config >> QGVAR(canDrag)) == 1) then { private _position = getArray (_config >> QGVAR(dragPosition)); diff --git a/addons/dragon/functions/fnc_onFired.sqf b/addons/dragon/functions/fnc_onFired.sqf index 78d9d15b91..1fa24c1925 100644 --- a/addons/dragon/functions/fnc_onFired.sqf +++ b/addons/dragon/functions/fnc_onFired.sqf @@ -23,7 +23,7 @@ _seekerParams params ["", "", "_seekerMaxRange", "_seekerMinRange"]; _shooter setVariable [QGVAR(fired), true, true]; _shooter animate ["missile_hide", 1]; -private _config = ([_projectile] call CBA_fnc_getObjectConfig) >> "ace_missileguidance"; +private _config = configOf _projectile >> "ace_missileguidance"; private _serviceInterval = [_config >> "serviceInterval", "NUMBER", 0.33] call CBA_fnc_getConfigEntry; private _serviceChargeCount = [_config >> "serviceCharges", "NUMBER", 60] call CBA_fnc_getConfigEntry; diff --git a/addons/fastroping/XEH_postInit.sqf b/addons/fastroping/XEH_postInit.sqf index 72ded1b267..43e5de24f9 100644 --- a/addons/fastroping/XEH_postInit.sqf +++ b/addons/fastroping/XEH_postInit.sqf @@ -35,7 +35,7 @@ #ifdef DRAW_FASTROPE_INFO addMissionEventHandler ["Draw3D", { if (!(cursorObject isKindOf "Helicopter")) exitWith {}; - private _config = configFile >> "CfgVehicles" >> (typeOf cursorObject); + private _config = configOf cursorObject; private _enabled = getNumber (_config >> QGVAR(enabled)); drawIcon3D ["", [.5,.5,1,1], (ASLtoAGL getPosASL cursorObject), 0.5, 0.5, 0, format ["%1 = %2", typeOf cursorObject, _enabled], 0.5, 0.025, "TahomaB"]; if (_enabled > 0) then { diff --git a/addons/fastroping/functions/fnc_canDeployRopes.sqf b/addons/fastroping/functions/fnc_canDeployRopes.sqf index 26b514368b..4338ac0130 100644 --- a/addons/fastroping/functions/fnc_canDeployRopes.sqf +++ b/addons/fastroping/functions/fnc_canDeployRopes.sqf @@ -19,7 +19,7 @@ */ params ["_vehicle", "_player", "_ropeClass", ["_defaultOption", false]]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; (driver _vehicle != _player) && {getPos _vehicle select 2 > 2} && { diff --git a/addons/fastroping/functions/fnc_canPrepareFRIES.sqf b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf index 881996b5a1..b6068f5341 100644 --- a/addons/fastroping/functions/fnc_canPrepareFRIES.sqf +++ b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf @@ -16,7 +16,7 @@ */ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; ((getNumber (_config >> QGVAR(enabled)) == 1) || {!(isNull (_vehicle getVariable [QGVAR(FRIES), objNull]))}) && {(_vehicle getVariable [QGVAR(deploymentStage), 0]) == 0} && diff --git a/addons/fastroping/functions/fnc_canStowFRIES.sqf b/addons/fastroping/functions/fnc_canStowFRIES.sqf index 6f26fc1ed5..462799eb01 100644 --- a/addons/fastroping/functions/fnc_canStowFRIES.sqf +++ b/addons/fastroping/functions/fnc_canStowFRIES.sqf @@ -16,7 +16,7 @@ */ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; (_vehicle getVariable [QGVAR(deploymentStage), 0]) == 2 && {getText (_config >> QGVAR(onCut)) != ""} diff --git a/addons/fastroping/functions/fnc_cutRopes.sqf b/addons/fastroping/functions/fnc_cutRopes.sqf index ae1b58638a..8c4633ca8e 100644 --- a/addons/fastroping/functions/fnc_cutRopes.sqf +++ b/addons/fastroping/functions/fnc_cutRopes.sqf @@ -40,5 +40,5 @@ private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; _vehicle setVariable [QGVAR(deployedRopes), [], true]; // Set new state (0 if no FRIES, 2 if FRIES for manual stowing) -private _newState = [0, 2] select (isText (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(onCut))); +private _newState = [0, 2] select (isText (configOf _vehicle >> QGVAR(onCut))); _vehicle setVariable [QGVAR(deploymentStage), _newState, true]; diff --git a/addons/fastroping/functions/fnc_deployAI.sqf b/addons/fastroping/functions/fnc_deployAI.sqf index 8101a99dae..d769fd6723 100644 --- a/addons/fastroping/functions/fnc_deployAI.sqf +++ b/addons/fastroping/functions/fnc_deployAI.sqf @@ -26,7 +26,7 @@ if (isNull _vehicle || {!(_vehicle isKindOf "Helicopter")}) exitWith { ERROR('FUNC(deployAI): deployAI was called with an invalid or non-existant vehicle.'); }; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _configEnabled = getNumber (_config >> QGVAR(enabled)); if (_configEnabled == 0) exitWith { if (hasInterface) then { diff --git a/addons/fastroping/functions/fnc_deployRopes.sqf b/addons/fastroping/functions/fnc_deployRopes.sqf index 27ad76a0f9..17627b63f2 100644 --- a/addons/fastroping/functions/fnc_deployRopes.sqf +++ b/addons/fastroping/functions/fnc_deployRopes.sqf @@ -20,7 +20,7 @@ params ["_vehicle", ["_player", objNull], ["_ropeClass", ""]]; TRACE_3("deployRopes",_vehicle,_player,_ropeClass); -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _ropeOrigins = getArray (_config >> QGVAR(ropeOrigins)); private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; diff --git a/addons/fastroping/functions/fnc_equipFRIES.sqf b/addons/fastroping/functions/fnc_equipFRIES.sqf index 002a32364c..6dcb29e3e7 100644 --- a/addons/fastroping/functions/fnc_equipFRIES.sqf +++ b/addons/fastroping/functions/fnc_equipFRIES.sqf @@ -17,7 +17,7 @@ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; if !(isNumber (_config >> QGVAR(enabled))) then { ["%1 has not been configured for ACE_Fastroping.", getText (_config >> "displayName")] call BIS_fnc_error; } else { diff --git a/addons/fastroping/functions/fnc_prepareFRIES.sqf b/addons/fastroping/functions/fnc_prepareFRIES.sqf index c5bac4deb1..9f1c1b941a 100644 --- a/addons/fastroping/functions/fnc_prepareFRIES.sqf +++ b/addons/fastroping/functions/fnc_prepareFRIES.sqf @@ -19,7 +19,7 @@ params ["_vehicle"]; //Stage indicator: 0 - travel mode; 1 - preparing/stowing FRIES; 2 - FRIES ready; 3 - ropes deployed _vehicle setVariable [QGVAR(deploymentStage), 1, true]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _waitTime = 0; if (isText (_config >> QGVAR(onPrepare))) then { _waitTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onPrepare)))); diff --git a/addons/fastroping/functions/fnc_stowFRIES.sqf b/addons/fastroping/functions/fnc_stowFRIES.sqf index 3b18a6dbe1..297cb925d1 100644 --- a/addons/fastroping/functions/fnc_stowFRIES.sqf +++ b/addons/fastroping/functions/fnc_stowFRIES.sqf @@ -19,7 +19,7 @@ params ["_vehicle"]; //Stage indicator: 0 - travel mode; 1 - preparing/stowing FRIES; 2 - FRIES ready; 3 - ropes deployed _vehicle setVariable [QGVAR(deploymentStage), 1, true]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _waitTime = 0; if (isText (_config >> QGVAR(onCut))) then { _waitTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onCut)))); diff --git a/addons/fcs/functions/fnc_adjustRange.sqf b/addons/fcs/functions/fnc_adjustRange.sqf index cb0e00c9c1..30f9c86305 100644 --- a/addons/fcs/functions/fnc_adjustRange.sqf +++ b/addons/fcs/functions/fnc_adjustRange.sqf @@ -19,7 +19,7 @@ params ["_vehicle", "_turret", "_delta"]; -private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); +private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); private _min = getNumber (_turretConfig >> QGVAR(MinDistance)); private _max = getNumber (_turretConfig >> QGVAR(MaxDistance)); diff --git a/addons/fcs/functions/fnc_calculateSolution.sqf b/addons/fcs/functions/fnc_calculateSolution.sqf index 8ceb0c62cf..478b34f502 100644 --- a/addons/fcs/functions/fnc_calculateSolution.sqf +++ b/addons/fcs/functions/fnc_calculateSolution.sqf @@ -23,7 +23,7 @@ TRACE_4("params",_vehicle,_turret,_distance,_angleTarget); private _FCSInitSpeed = []; private _FCSMagazines = []; private _FCSElevation = []; -private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); +private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); { private _magazine = _x; diff --git a/addons/fcs/functions/fnc_canUseFCS.sqf b/addons/fcs/functions/fnc_canUseFCS.sqf index a246d51f0c..a5a1543de9 100644 --- a/addons/fcs/functions/fnc_canUseFCS.sqf +++ b/addons/fcs/functions/fnc_canUseFCS.sqf @@ -15,7 +15,7 @@ * Public: No */ -getNumber ([configFile >> "CfgVehicles" >> typeOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1 +getNumber ([configOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1 && {cameraView == "GUNNER"} && {!([ACE_player] call CBA_fnc_canUseWeapon)} //Not Turned Out && {cameraOn != (getConnectedUAV ACE_player)} //Not Controlling a UAV diff --git a/addons/fcs/functions/fnc_keyDown.sqf b/addons/fcs/functions/fnc_keyDown.sqf index 0e141c0968..2e40b64a84 100644 --- a/addons/fcs/functions/fnc_keyDown.sqf +++ b/addons/fcs/functions/fnc_keyDown.sqf @@ -18,7 +18,7 @@ params ["_vehicle", "_turret"]; -private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); +private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); // Update display for infantry rangefinders if (_vehicle == ACE_player) exitWith {[5,5500,25,true] call FUNC(getRange)}; diff --git a/addons/fcs/functions/fnc_keyUp.sqf b/addons/fcs/functions/fnc_keyUp.sqf index fb3ce99974..d96b6d5307 100644 --- a/addons/fcs/functions/fnc_keyUp.sqf +++ b/addons/fcs/functions/fnc_keyUp.sqf @@ -19,7 +19,7 @@ params ["_vehicle", "_turret", "_distance", ["_showHint", false], ["_playSound", true]]; TRACE_5("params",_vehicle,_turret,_distance,_showHint,_playSound); -private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); +private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); if (isNil "_distance") then { _distance = [ diff --git a/addons/fcs/functions/fnc_vehicleInit.sqf b/addons/fcs/functions/fnc_vehicleInit.sqf index 3314228729..b6e8eff316 100644 --- a/addons/fcs/functions/fnc_vehicleInit.sqf +++ b/addons/fcs/functions/fnc_vehicleInit.sqf @@ -18,7 +18,7 @@ params ["_vehicle"]; { - private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _x] call EFUNC(common,getTurretConfigPath); + private _turretConfig = [configOf _vehicle, _x] call EFUNC(common,getTurretConfigPath); if (getNumber (_turretConfig >> QGVAR(Enabled)) == 1) then { if (isNil QGVAR(jipID)) then { diff --git a/addons/gforces/XEH_postInit.sqf b/addons/gforces/XEH_postInit.sqf index f7d532c288..f07249c38f 100644 --- a/addons/gforces/XEH_postInit.sqf +++ b/addons/gforces/XEH_postInit.sqf @@ -12,8 +12,8 @@ GVAR(playerIsVirtual) = false; ["unit", { // Add unit changed EH to check if player is either virtual (logic) or a UAV AI params ["_unit"]; - GVAR(playerIsVirtual) = ((getNumber (configFile >> "CfgVehicles" >> (typeOf _unit) >> "isPlayableLogic")) == 1) || - {(getText (configFile >> "CfgVehicles" >> (typeOf _unit) >> "simulation")) == "UAVPilot"}; + GVAR(playerIsVirtual) = ((getNumber (configOf _unit >> "isPlayableLogic")) == 1) || + {(getText (configOf _unit >> "simulation")) == "UAVPilot"}; TRACE_3("unit changed",_unit,typeOf _unit,GVAR(playerIsVirtual)); }, true] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/goggles/functions/fnc_applyGlassesEffect.sqf b/addons/goggles/functions/fnc_applyGlassesEffect.sqf index f60eb79581..4c0b8dd1df 100644 --- a/addons/goggles/functions/fnc_applyGlassesEffect.sqf +++ b/addons/goggles/functions/fnc_applyGlassesEffect.sqf @@ -24,7 +24,7 @@ TRACE_2("applyGlassesEffect",_player,_glasses); // remove old effect call FUNC(removeGlassesEffect); -if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _player) >> "isPlayableLogic")) == 1) exitWith { +if ((getNumber (configOf _player >> "isPlayableLogic")) == 1) exitWith { TRACE_1("skipping playable logic",typeOf _player); // VirtualMan_F (placeable logic zeus / spectator) }; diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index 39ad6fb706..07b5b64fd9 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -74,7 +74,7 @@ _affected = _affected - [ACE_player]; // Affect local player, independently of distance if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then { - if ((getNumber (configFile >> "CfgVehicles" >> (typeOf ACE_player) >> "isPlayableLogic")) == 1) exitWith { + if ((getNumber (configOf ACE_player >> "isPlayableLogic")) == 1) exitWith { TRACE_1("skipping playable logic",typeOf ACE_player); // VirtualMan_F (placeable logic zeus / spectator) }; // Do effects for player diff --git a/addons/grenades/functions/fnc_incendiary.sqf b/addons/grenades/functions/fnc_incendiary.sqf index d454001031..d6f689e4f2 100644 --- a/addons/grenades/functions/fnc_incendiary.sqf +++ b/addons/grenades/functions/fnc_incendiary.sqf @@ -196,7 +196,7 @@ private _vehicle = _position nearestObject "Car"; if (!local _vehicle) exitWith {}; -private _config = _vehicle call CBA_fnc_getObjectConfig; +private _config = configOf _vehicle; // --- burn tyres private _fnc_isWheelHitPoint = { diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index 17548a973b..3b35488568 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -60,7 +60,7 @@ GVAR(lastPlayerVehicle) = objNull; }; // Don't add a new EH if the unit respawned if ((_player getVariable [QGVAR(firedEH), -1]) == -1) then { - if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _player) >> "isPlayableLogic")) == 1) exitWith { + if ((getNumber (configOf _player >> "isPlayableLogic")) == 1) exitWith { TRACE_1("skipping playable logic",typeOf _player); // VirtualMan_F (placeable logic zeus / spectator) }; private _firedEH = _player addEventHandler ["FiredNear", {call FUNC(firedNear)}]; diff --git a/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf b/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf index 9f33633462..849c0c29a1 100644 --- a/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf +++ b/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf @@ -22,10 +22,10 @@ if (isNull _vehicle) exitWith {}; private _newAttenuation = 1; if (ACE_player != _vehicle) then { private _turretPath = [ACE_player] call EFUNC(common,getTurretIndex); - private _effectType = getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "attenuationEffectType"); + private _effectType = getText (configOf _vehicle >> "attenuationEffectType"); if (!(_turretPath isEqualTo [])) then { - private _turretConfig = [(configFile >> "CfgVehicles" >> (typeOf _vehicle)), _turretPath] call EFUNC(common,getTurretConfigPath); + private _turretConfig = [(configOf _vehicle), _turretPath] call EFUNC(common,getTurretConfigPath); if ((getNumber (_turretConfig >> "disableSoundAttenuation")) == 1) then { _effectType = ""; @@ -40,7 +40,7 @@ if (ACE_player != _vehicle) then { case (_effectType == ""): {1}; case (_effectType == "CarAttenuation"); case (_effectType == "RHS_CarAttenuation"): { // Increase protection for armored cars - private _armor = getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "HitPoints" >> "HitBody" >> "armor"); + private _armor = getNumber (configOf _vehicle >> "HitPoints" >> "HitBody" >> "armor"); linearConversion [2, 8, _armor, 0.5, 0.3, true];}; case (_effectType == "OpenCarAttenuation"): {1}; case (_effectType == "TankAttenuation"): {0.1}; diff --git a/addons/hellfire/functions/fnc_setupVehicle.sqf b/addons/hellfire/functions/fnc_setupVehicle.sqf index e824542021..cf0a17a2e7 100644 --- a/addons/hellfire/functions/fnc_setupVehicle.sqf +++ b/addons/hellfire/functions/fnc_setupVehicle.sqf @@ -41,7 +41,7 @@ if (!_enabled) exitWith {TRACE_3("Not enabled",_enabled,_vehicle,_turretPath);}; // Add laser if vehicle is configured for one: -if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QGVAR(addLaserDesignator))) == 1) then { +if ((getNumber (configOf _vehicle >> QGVAR(addLaserDesignator))) == 1) then { [{ params ["_vehicle", "_turretPath"]; TRACE_3("checking for laser",_vehicle,_turretPath,_vehicle turretLocal _turretPath); diff --git a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf index 2497021e00..924e50758d 100644 --- a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf +++ b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf @@ -38,7 +38,7 @@ if ((vehicle ACE_player) != ACE_player) exitWith {}; //Make the common case fast (cursorTarget is looking at a door): if ((!isNull cursorTarget) && {cursorTarget isKindOf "Static"} && {!(cursorTarget in _housesScaned)}) then { - if (((count (configFile >> "CfgVehicles" >> (typeOf cursorTarget) >> "UserActions")) > 0) || {(count (getArray (configFile >> "CfgVehicles" >> (typeOf cursorTarget) >> "ladders"))) > 0}) then { + if (((count (configOf cursorTarget >> "UserActions")) > 0) || {(count (getArray (configOf cursorTarget >> "ladders"))) > 0}) then { _housesToScanForActions = [cursorTarget]; } else { _housesScaned pushBack cursorTarget; diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 3239badbdd..3b53bf925c 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -620,7 +620,7 @@ class CfgVehicles { condition = "true"; class ACE_OpenBox { displayName = CSTRING(OpenBox); - condition = QUOTE((alive _target) && {(getNumber (configFile >> 'CfgVehicles' >> (typeOf _target) >> 'disableInventory')) == 0}); + condition = QUOTE((alive _target) && {(getNumber (configOf _target >> 'disableInventory')) == 0}); statement = QUOTE(_player action [ARR_2(QUOTE(QUOTE(Gear)), _target)]); showDisabled = 0; }; diff --git a/addons/interaction/functions/fnc_addPassengersActions.sqf b/addons/interaction/functions/fnc_addPassengersActions.sqf index 05e5ebfd55..b4efb97bfb 100644 --- a/addons/interaction/functions/fnc_addPassengersActions.sqf +++ b/addons/interaction/functions/fnc_addPassengersActions.sqf @@ -24,7 +24,7 @@ private _actions = []; { private _unit = _x; - if (_unit != _player && {getText (configFile >> "CfgVehicles" >> typeOf _unit >> "simulation") != "UAVPilot"}) then { + if (_unit != _player && {getText (configOf _unit >> "simulation") != "UAVPilot"}) then { private _icon = [ "", "A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_driver_ca.paa", diff --git a/addons/interaction/functions/fnc_canPush.sqf b/addons/interaction/functions/fnc_canPush.sqf index 0032296a50..c8f82b65a5 100644 --- a/addons/interaction/functions/fnc_canPush.sqf +++ b/addons/interaction/functions/fnc_canPush.sqf @@ -18,5 +18,5 @@ params ["_target"]; alive _target && -{getMass _target <= 2600 || getNumber (configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(canPush)) == 1} && +{getMass _target <= 2600 || getNumber (configOf _target >> QGVAR(canPush)) == 1} && {vectorMagnitude velocity _target < 3} diff --git a/addons/interaction/functions/fnc_getVehiclePosComplex.sqf b/addons/interaction/functions/fnc_getVehiclePosComplex.sqf index 17f77922b9..a3ec0b46ee 100644 --- a/addons/interaction/functions/fnc_getVehiclePosComplex.sqf +++ b/addons/interaction/functions/fnc_getVehiclePosComplex.sqf @@ -22,7 +22,7 @@ TRACE_2("params",_target,_cameraPosASL); private _bb = boundingBoxReal _target; (_bb select 0) params ["_bbX", "_bbY", "_bbZ"]; -private _config = configFile >> "CfgVehicles" >> (typeOf _target); +private _config = configOf _target; if (isNumber (_config >> QGVAR(bodyWidth))) then {_bbX = getNumber (_config >> QGVAR(bodyWidth));}; if (isNumber (_config >> QGVAR(bodyLength))) then {_bbY = getNumber (_config >> QGVAR(bodyLength));}; diff --git a/addons/interaction/functions/fnc_openDoor.sqf b/addons/interaction/functions/fnc_openDoor.sqf index 73cf4e0a37..cffb9e2410 100644 --- a/addons/interaction/functions/fnc_openDoor.sqf +++ b/addons/interaction/functions/fnc_openDoor.sqf @@ -23,7 +23,7 @@ TRACE_2("openDoor",_house,_door); if (isNull _house) exitWith {}; -if ((configProperties [configFile >> "CfgVehicles" >> (typeOf _house) >> "UserActions"]) isEqualTo []) exitWith { +if ((configProperties [configOf _house >> "UserActions"]) isEqualTo []) exitWith { TRACE_1("Ignore houses with no UserActions",typeOf _house); // Fix problem with Shoothouse Walls }; @@ -38,8 +38,8 @@ private _lockedVariable = format ["bis_disabled_%1", _door]; // Check if the door can be locked aka have locked variable, otherwhise cant lock it if ((_house animationPhase (_animations select 0) <= 0) && {_house getVariable [_lockedVariable, 0] == 1}) exitWith { private _lockedAnimation = format ["%1_locked_source", _door]; - TRACE_3("locked",_house,_lockedAnimation,isClass (configfile >> "CfgVehicles" >> (typeOf _house) >> "AnimationSources" >> _lockedAnimation)); - if (isClass (configfile >> "CfgVehicles" >> (typeOf _house) >> "AnimationSources" >> _lockedAnimation)) then { + TRACE_3("locked",_house,_lockedAnimation,isClass (configOf _house >> "AnimationSources" >> _lockedAnimation)); + if (isClass (configOf _house >> "AnimationSources" >> _lockedAnimation)) then { // from: a3\structures_f\scripts\fn_door.sqf: - wiggles the door handle (A3 buildings) _house animateSource [_lockedAnimation, (1 - (_house animationSourcePhase _lockedAnimation))]; }; diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index a30da81a40..d837367b59 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -86,7 +86,7 @@ GVAR(vehicleLightColor) = [1,1,1,0]; ["vehicle", { params ["_unit", "_vehicle"]; if ((isNull _vehicle) || {_unit == _vehicle}) exitWith {}; - private _cfg = configfile >> "CfgVehicles" >> (typeOf _vehicle); + private _cfg = configOf _vehicle; GVAR(vehicleExteriorTurrets) = getArray (_cfg >> QGVAR(vehicleExteriorTurrets)); GVAR(vehicleLightColor) = [_cfg >> QGVAR(vehicleLightColor), "array", [1,1,1,0]] call CBA_fnc_getConfigEntry; diff --git a/addons/medical_engine/XEH_postInit.sqf b/addons/medical_engine/XEH_postInit.sqf index 0467202b88..fec92ca620 100644 --- a/addons/medical_engine/XEH_postInit.sqf +++ b/addons/medical_engine/XEH_postInit.sqf @@ -15,7 +15,7 @@ reverse _allHitPoints; if (_allHitPoints param [0, ""] != "ACE_HDBracket") then { - private _config = [_unit] call CBA_fnc_getObjectConfig; + private _config = configOf _unit; if (getText (_config >> "simulation") == "UAVPilot") exitWith {TRACE_1("ignore UAV AI",typeOf _unit);}; if (getNumber (_config >> "isPlayableLogic") == 1) exitWith {TRACE_1("ignore logic unit",typeOf _unit)}; ERROR_1("Bad hitpoints for unit type ""%1""",typeOf _unit); @@ -53,7 +53,7 @@ ["Air", "Killed", { params ["_vehicle", "_killer"]; TRACE_3("air killed",_vehicle,typeOf _vehicle,velocity _vehicle); - if ((getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "destrType")) == "") exitWith {}; + if ((getText (configOf _vehicle >> "destrType")) == "") exitWith {}; if (unitIsUAV _vehicle) exitWith {}; private _lethality = linearConversion [0, 25, (vectorMagnitude velocity _vehicle), 0.5, 1]; diff --git a/addons/medical_engine/functions/fnc_getHitpointArmor.sqf b/addons/medical_engine/functions/fnc_getHitpointArmor.sqf index 1f6f3c0550..62954a1b56 100644 --- a/addons/medical_engine/functions/fnc_getHitpointArmor.sqf +++ b/addons/medical_engine/functions/fnc_getHitpointArmor.sqf @@ -21,7 +21,7 @@ params ["_unit", "_hitpoint"]; private _uniform = uniform _unit; // If unit is naked, use its underwear class instead if (_uniform isEqualTo "") then { - _uniform = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "nakedUniform"); + _uniform = getText (configOf _unit >> "nakedUniform"); }; private _gear = [ diff --git a/addons/medical_status/XEH_preInit.sqf b/addons/medical_status/XEH_preInit.sqf index aab312470d..c6343dcb63 100644 --- a/addons/medical_status/XEH_preInit.sqf +++ b/addons/medical_status/XEH_preInit.sqf @@ -12,7 +12,7 @@ PREP_RECOMPILE_END; ["CAManBase", "init", { params ["_unit"]; - private _config = [_unit] call CBA_fnc_getObjectConfig; + private _config = configOf _unit; if (getText (_config >> "simulation") == "UAVPilot") exitWith {TRACE_1("ignore UAV AI",typeOf _unit);}; if (getNumber (_config >> "isPlayableLogic") == 1) exitWith {TRACE_1("ignore logic unit",typeOf _unit)}; diff --git a/addons/medical_treatment/functions/fnc_isMedicalVehicle.sqf b/addons/medical_treatment/functions/fnc_isMedicalVehicle.sqf index 4b06ffdb55..dda930a4f4 100644 --- a/addons/medical_treatment/functions/fnc_isMedicalVehicle.sqf +++ b/addons/medical_treatment/functions/fnc_isMedicalVehicle.sqf @@ -17,4 +17,4 @@ params ["_vehicle"]; -_vehicle getVariable [QEGVAR(medical,isMedicalVehicle), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "attendant") > 0] +_vehicle getVariable [QEGVAR(medical,isMedicalVehicle), getNumber (configOf _vehicle >> "attendant") > 0] diff --git a/addons/medical_treatment/functions/fnc_loadUnit.sqf b/addons/medical_treatment/functions/fnc_loadUnit.sqf index 74e66d517b..8b556014e1 100644 --- a/addons/medical_treatment/functions/fnc_loadUnit.sqf +++ b/addons/medical_treatment/functions/fnc_loadUnit.sqf @@ -43,7 +43,7 @@ if (isNull _vehicle) exitWith { TRACE_1("no vehicle found",_vehicle); }; params ["_unit", "_vehicle"]; TRACE_2("success",_unit,_vehicle); private _patientName = [_unit, false, true] call EFUNC(common,getName); - private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + private _vehicleName = getText (configOf _vehicle >> "displayName"); [[LSTRING(LoadedInto), _patientName, _vehicleName], 3] call EFUNC(common,displayTextStructured); }, [_patient, _vehicle], 3, { params ["_unit", "_emptyPos"]; diff --git a/addons/medical_treatment/functions/fnc_unloadUnit.sqf b/addons/medical_treatment/functions/fnc_unloadUnit.sqf index 6baeb005ca..07410493ad 100644 --- a/addons/medical_treatment/functions/fnc_unloadUnit.sqf +++ b/addons/medical_treatment/functions/fnc_unloadUnit.sqf @@ -36,7 +36,7 @@ if (_patient call EFUNC(common,isAwake)) exitWith { params ["_unit", "_vehicle"]; TRACE_2("success",_unit,_vehicle); private _patientName = [_unit, false, true] call EFUNC(common,getName); - private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + private _vehicleName = getText (configOf _vehicle >> "displayName"); [[LSTRING(UnloadedFrom), _patientName, _vehicleName], 3] call EFUNC(common,displayTextStructured); }, [_patient, vehicle _patient], 3, { params ["_unit", "_vehicle"]; diff --git a/addons/minedetector/XEH_postInit.sqf b/addons/minedetector/XEH_postInit.sqf index 1c448794cc..0b8a521155 100644 --- a/addons/minedetector/XEH_postInit.sqf +++ b/addons/minedetector/XEH_postInit.sqf @@ -24,7 +24,7 @@ addMissionEventHandler ["Draw3D", { drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [0,0,1,1], _detectorPointAGL, 1, 1, 0, "detector", 1, 0.02, "PuristaMedium"]; { private _name = format ["%1@%2", typeOf _x, (floor ((_x distance _detectorPointAGL) * 10)) / 10]; - if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> QGVAR(detectable))) == 1) then { + if ((getNumber (configOf _x >> QGVAR(detectable))) == 1) then { drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,0,0,1], (ASLtoAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"]; } else { drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,1,0,1], (ASLtoAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"]; diff --git a/addons/missileguidance/functions/fnc_SACLOS_onFired.sqf b/addons/missileguidance/functions/fnc_SACLOS_onFired.sqf index 200e398133..10c3bd5892 100644 --- a/addons/missileguidance/functions/fnc_SACLOS_onFired.sqf +++ b/addons/missileguidance/functions/fnc_SACLOS_onFired.sqf @@ -18,7 +18,7 @@ params ["_firedEH", "", "", "", "_stateParams"]; _firedEH params ["_shooter","_weapon","","","","","_projectile"]; _stateParams params ["", "_seekerStateParams"]; -private _usePilotCamera = getNumber (([_shooter] call CBA_fnc_getObjectConfig) >> "pilotCamera" >> QGVAR(usePilotCameraForTargeting)) == 1; +private _usePilotCamera = getNumber (configOf _shooter >> "pilotCamera" >> QGVAR(usePilotCameraForTargeting)) == 1; private _turretPath = [_shooter, _weapon] call CBA_fnc_turretPathWeapon; private _turretConfig = [_shooter, _turretPath] call CBA_fnc_getTurret; diff --git a/addons/missileguidance/functions/fnc_ahr_onFired.sqf b/addons/missileguidance/functions/fnc_ahr_onFired.sqf index 331484f4a2..c7a3e5561c 100644 --- a/addons/missileguidance/functions/fnc_ahr_onFired.sqf +++ b/addons/missileguidance/functions/fnc_ahr_onFired.sqf @@ -30,7 +30,7 @@ if !(_target isKindOf "AllVehicles") then { _launchParams set [0, _target]; _projectile setMissileTarget objNull; // to emulate a no launch warning -private _projectileConfig = [_projectile] call CBA_fnc_getObjectConfig; +private _projectileConfig = configOf _projectile; private _config = _projectileConfig >> "ace_missileguidance"; private _isActive = false; diff --git a/addons/missileguidance/functions/fnc_wire_onFired.sqf b/addons/missileguidance/functions/fnc_wire_onFired.sqf index 295d6a2b5a..cb4020bd0f 100644 --- a/addons/missileguidance/functions/fnc_wire_onFired.sqf +++ b/addons/missileguidance/functions/fnc_wire_onFired.sqf @@ -19,7 +19,7 @@ _firedEH params ["_shooter","_weapon","","","","","_projectile", "_gunner"]; _stateParams params ["", "", "_attackProfileStateParams"]; _seekerParams params ["", "", "_seekerMaxRange", "_seekerMinRange"]; -private _config = ([_projectile] call CBA_fnc_getObjectConfig) >> "ace_missileguidance"; +private _config = configOf _projectile >> "ace_missileguidance"; private _maxCorrectableDistance = [_config >> "correctionDistance", "NUMBER", DEFAULT_CORRECTION_DISTANCE] call CBA_fnc_getConfigEntry; private _distanceAheadOfMissile = [_config >> "missileLeadDistance", "NUMBER", DEFAULT_LEAD_DISTANCE] call CBA_fnc_getConfigEntry; private _maxDistanceSqr = _seekerMaxRange * _seekerMaxRange; diff --git a/addons/nightvision/functions/fnc_refreshGoggleType.sqf b/addons/nightvision/functions/fnc_refreshGoggleType.sqf index c367d7a2f5..6bb9e35fdb 100644 --- a/addons/nightvision/functions/fnc_refreshGoggleType.sqf +++ b/addons/nightvision/functions/fnc_refreshGoggleType.sqf @@ -31,7 +31,7 @@ if (alive ACE_player) then { // Test if we are using player's nvg or if sourced from vehicle: private _currentVehicle = vehicle ACE_player; - private _vehConfig = configFile >> "CfgVehicles" >> (typeOf _currentVehicle); + private _vehConfig = configOf _currentVehicle; if (cameraView != "GUNNER") exitWith {true}; // asume hmd usage outside of gunner view if ([ACE_player] call CBA_fnc_canUseWeapon) exitWith {true}; // FFV diff --git a/addons/pylons/functions/fnc_onButtonLoad.sqf b/addons/pylons/functions/fnc_onButtonLoad.sqf index af3183073a..f689c8bf82 100644 --- a/addons/pylons/functions/fnc_onButtonLoad.sqf +++ b/addons/pylons/functions/fnc_onButtonLoad.sqf @@ -37,7 +37,7 @@ private _fnc_setSelections = { } forEach GVAR(comboBoxes); }; -private _pylonComponent = configFile >> "CfgVehicles" >> typeOf GVAR(currentAircraft) >> "Components" >> "TransportPylonsComponent"; +private _pylonComponent = configOf GVAR(currentAircraft) >> "Components" >> "TransportPylonsComponent"; private _loadoutFound = { if (getText (_x >> "displayName") isEqualTo _loadoutName) exitWith { // Get default turrets from config diff --git a/addons/pylons/functions/fnc_showDialog.sqf b/addons/pylons/functions/fnc_showDialog.sqf index 119489f4d8..146238a1b7 100644 --- a/addons/pylons/functions/fnc_showDialog.sqf +++ b/addons/pylons/functions/fnc_showDialog.sqf @@ -48,7 +48,7 @@ if (GVAR(rearmNewPylons) || {_isCurator}) then { ctrlShow [ID_TEXT_BANNER, false]; }; -private _config = configFile >> "CfgVehicles" >> typeOf _aircraft; +private _config = configOf _aircraft; private _pylonComponent = _config >> "Components" >> "TransportPylonsComponent"; ctrlSetText [ID_PICTURE_AIRCRAFT, getText (_pylonComponent >> "uiPicture")]; diff --git a/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf b/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf index bd3157c15f..a4ccc737e7 100644 --- a/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf +++ b/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf @@ -94,7 +94,7 @@ scopeName "main"; params ["_vehicle", "_player"]; -private _vehicleConfig = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _vehicleConfig = configOf _vehicle; private _isInVehicle = _player in _vehicle; private _fullCrew = fullCrew [_vehicle, "", true]; diff --git a/addons/quickmount/functions/fnc_getInNearest.sqf b/addons/quickmount/functions/fnc_getInNearest.sqf index 7b1ac71868..341568e24a 100644 --- a/addons/quickmount/functions/fnc_getInNearest.sqf +++ b/addons/quickmount/functions/fnc_getInNearest.sqf @@ -72,7 +72,7 @@ if (!isNull _target && private _effectiveRole = toLower _role; if ((_effectiveRole in ["driver", "gunner"]) && {unitIsUAV _target}) exitWith {}; // Ignoring UAV Driver/Gunner - if ((_effectiveRole == "driver") && {(getNumber (([_target] call CBA_fnc_getObjectConfig) >> "hasDriver")) == 0}) exitWith {}; // Ignoring Non Driver (static weapons) + if ((_effectiveRole == "driver") && {(getNumber (configOf _target >> "hasDriver")) == 0}) exitWith {}; // Ignoring Non Driver (static weapons) // Seats can be locked independently of the main vehicle if ((_role == "driver") && {lockedDriver _target}) exitWith {TRACE_1("lockedDriver",_x);}; diff --git a/addons/rearm/Cfg3DEN.hpp b/addons/rearm/Cfg3DEN.hpp index 05eb3c05ff..05581e7206 100644 --- a/addons/rearm/Cfg3DEN.hpp +++ b/addons/rearm/Cfg3DEN.hpp @@ -1,5 +1,5 @@ #define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) -#define DEFAULT_REARMCARGO GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(defaultSupply),-1) +#define DEFAULT_REARMCARGO GET_NUMBER(configOf _this >> QQGVAR(defaultSupply),-1) class Cfg3DEN { diff --git a/addons/rearm/functions/fnc_addRearmActions.sqf b/addons/rearm/functions/fnc_addRearmActions.sqf index 480cc90007..4557532f56 100644 --- a/addons/rearm/functions/fnc_addRearmActions.sqf +++ b/addons/rearm/functions/fnc_addRearmActions.sqf @@ -44,7 +44,7 @@ private _vehicleActions = []; TRACE_2("can add",_x,_magazineHelper); if (!(_magazineHelper isEqualTo [])) then { - private _icon = getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Icon"); + private _icon = getText(configOf _vehicle >> "Icon"); if !((_icon select [0, 1]) == "\") then { _icon = ""; }; @@ -52,7 +52,7 @@ private _vehicleActions = []; // [Level 0] adds a single action to rearm the entire vic private _action = [ _vehicle, - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName"), + getText(configOf _vehicle >> "displayName"), _icon, {_this call FUNC(rearmEntireVehicle)}, {true}, @@ -79,7 +79,7 @@ private _vehicleActions = []; private _action = [ _vehicle, - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName"), + getText(configOf _vehicle >> "displayName"), _icon, {}, {true}, diff --git a/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf b/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf index 9dbcf463eb..19802c0140 100644 --- a/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf +++ b/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf @@ -30,7 +30,7 @@ params ["_vehicle"]; private _magazineInfo = []; // 1.70 pylons -private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]; +private _pylonConfigs = configProperties [configOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]; { private _pylonConfig = _x; diff --git a/addons/rearm/functions/fnc_getSupplyCount.sqf b/addons/rearm/functions/fnc_getSupplyCount.sqf index 892764b76f..87a1dd1ee8 100644 --- a/addons/rearm/functions/fnc_getSupplyCount.sqf +++ b/addons/rearm/functions/fnc_getSupplyCount.sqf @@ -25,8 +25,8 @@ if (GVAR(supply) != 1) exitWith { private _supply = _truck getVariable QGVAR(currentSupply); if (isNil "_supply") then { - if (isNumber (configFile >> "CfgVehicles" >> typeOf _truck >> QGVAR(defaultSupply))) then { - _supply = getNumber (configFile >> "CfgVehicles" >> typeOf _truck >> QGVAR(defaultSupply)); + if (isNumber (configOf _truck >> QGVAR(defaultSupply))) then { + _supply = getNumber (configOf _truck >> QGVAR(defaultSupply)); } else { _supply = 1200; }; diff --git a/addons/rearm/functions/fnc_isSource.sqf b/addons/rearm/functions/fnc_isSource.sqf index 175ab60f8e..c79c78308c 100644 --- a/addons/rearm/functions/fnc_isSource.sqf +++ b/addons/rearm/functions/fnc_isSource.sqf @@ -22,7 +22,7 @@ params [ if ((_target getVariable [QGVAR(currentSupply), 0]) < 0) exitWith {false}; -private _vehCfg = configFile >> "CfgVehicles" >> typeOf _target; +private _vehCfg = configOf _target; private _vanillaCargoConfig = getNumber (_vehCfg >> "transportAmmo"); private _rearmCargoConfig = getNumber (_vehCfg >> QGVAR(defaultSupply)); private _supplyVehicle = _target getVariable [QGVAR(isSupplyVehicle), false]; diff --git a/addons/rearm/functions/fnc_makeSource.sqf b/addons/rearm/functions/fnc_makeSource.sqf index c96c3a214a..36f3fba553 100644 --- a/addons/rearm/functions/fnc_makeSource.sqf +++ b/addons/rearm/functions/fnc_makeSource.sqf @@ -41,7 +41,7 @@ private _currentSupply = if (_addToCurrent) then { _source setVariable [QGVAR(currentSupply), _currentSupply + _rearmCargo, true]; -private _rearmCargoConfig = getNumber (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(defaultSupply)); +private _rearmCargoConfig = getNumber (configOf _source >> QGVAR(defaultSupply)); // already initialized because this is a config rearm vehicle if (_rearmCargoConfig > 0 || _source getVariable [QGVAR(isSupplyVehicle), false]) exitWith {}; diff --git a/addons/rearm/functions/fnc_rearm.sqf b/addons/rearm/functions/fnc_rearm.sqf index 6b5a3da12c..779ebf2d51 100644 --- a/addons/rearm/functions/fnc_rearm.sqf +++ b/addons/rearm/functions/fnc_rearm.sqf @@ -43,7 +43,7 @@ private _magazineDisplayName = _magazineClass call FUNC(getMagazineName); [_target, _unit, _turretPath, _magazineCount, _magazineClass, (REARM_COUNT select _idx), _pylon], {(_this select 0) call FUNC(rearmSuccess)}, "", - format [localize LSTRING(RearmAction), getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName"), _magazineDisplayName], + format [localize LSTRING(RearmAction), getText(configOf _target >> "displayName"), _magazineDisplayName], { param [0] params ["_target", "_unit"]; _player distance _target <= GVAR(distance); diff --git a/addons/rearm/functions/fnc_rearmEntireVehicle.sqf b/addons/rearm/functions/fnc_rearmEntireVehicle.sqf index df06d384d4..945a0c0632 100644 --- a/addons/rearm/functions/fnc_rearmEntireVehicle.sqf +++ b/addons/rearm/functions/fnc_rearmEntireVehicle.sqf @@ -25,7 +25,7 @@ TRACE_3("rearmEntireVehicle",_truck,_player,_vehicle); [_truck, _vehicle, _player], {(_this select 0) call FUNC(rearmEntireVehicleSuccess)}, "", - format [localize LSTRING(BasicRearmAction), getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], + format [localize LSTRING(BasicRearmAction), getText(configOf _vehicle >> "displayName")], { param [0] params ["", "_vehicle", "_player"]; _player distance _vehicle <= GVAR(distance); diff --git a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf index 922d25b646..282a38b4e9 100644 --- a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf +++ b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf @@ -34,7 +34,7 @@ if (_pylon > 0) exitWith { _vehicle setPylonLoadOut [_pylon, _magazineClass, true, _turretPath]; [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _rounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; + getText(configOf _vehicle >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; } else { // Fill only at most _numRounds if (_turretPath isEqualTo [-1]) then {_turretPath = [];}; // Convert back to pylon turret format @@ -45,7 +45,7 @@ if (_pylon > 0) exitWith { _vehicle setAmmoOnPylon [_pylon, _newCount]; [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _numRounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; + getText(configOf _vehicle >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; }; }; @@ -90,4 +90,4 @@ if (_ammoAdded == 0) exitWith {ERROR_1("could not load any ammo - %1",_this);}; [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _ammoAdded, _magazineClass call FUNC(getMagazineName), -getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; +getText(configOf _vehicle >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; diff --git a/addons/rearm/functions/fnc_storeAmmo.sqf b/addons/rearm/functions/fnc_storeAmmo.sqf index 18b316d601..f693724323 100644 --- a/addons/rearm/functions/fnc_storeAmmo.sqf +++ b/addons/rearm/functions/fnc_storeAmmo.sqf @@ -33,7 +33,7 @@ private _magazineClass = _attachedDummy getVariable [QGVAR(magazineClass), "#noV [_unit, true, true] call FUNC(dropAmmo); }, "", - format [localize LSTRING(StoreAmmoAction), _magazineClass call FUNC(getMagazineName), getText(configFile >> "CfgVehicles" >> (typeOf _truck) >> "displayName")], + format [localize LSTRING(StoreAmmoAction), _magazineClass call FUNC(getMagazineName), getText(configOf _truck >> "displayName")], {true}, ["isnotinside"] ] call EFUNC(common,progressBar); diff --git a/addons/rearm/functions/fnc_takeAmmo.sqf b/addons/rearm/functions/fnc_takeAmmo.sqf index 1c1e325de8..12678b48c6 100644 --- a/addons/rearm/functions/fnc_takeAmmo.sqf +++ b/addons/rearm/functions/fnc_takeAmmo.sqf @@ -30,7 +30,7 @@ REARM_HOLSTER_WEAPON; private _targetName = if (_vehicle == _unit) then { "CSW" } else { - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName") + getText(configOf _vehicle >> "displayName") }; [ diff --git a/addons/refuel/Cfg3DEN.hpp b/addons/refuel/Cfg3DEN.hpp index 3dbc91c2cf..e8ed2790f8 100644 --- a/addons/refuel/Cfg3DEN.hpp +++ b/addons/refuel/Cfg3DEN.hpp @@ -1,8 +1,8 @@ #define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) #define GET_1ST_ARRAY(config) (if (isArray (config)) then {getArray (config) select 0} else {[ARR_3(0,0,0)]}) -#define DEFAULT_FUELCARGO GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(fuelCargo),REFUEL_DISABLED_FUEL) -#define DEFAULT_HOOKS GET_1ST_ARRAY(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(hooks)) +#define DEFAULT_FUELCARGO GET_NUMBER(configOf _this >> QQGVAR(fuelCargo),REFUEL_DISABLED_FUEL) +#define DEFAULT_HOOKS GET_1ST_ARRAY(configOf _this >> QQGVAR(hooks)) class Cfg3DEN { class Object { diff --git a/addons/refuel/XEH_postInit.sqf b/addons/refuel/XEH_postInit.sqf index e6c0ad5b93..14e9b439c9 100644 --- a/addons/refuel/XEH_postInit.sqf +++ b/addons/refuel/XEH_postInit.sqf @@ -86,7 +86,7 @@ _cacheRefuelClasses params [["_staticClasses", [], [[]]], ["_dynamicClasses", [] #ifdef DRAW_HOOKS_POS addMissionEventHandler ["Draw3D", { private _source = cursorObject; - private _cfgPos = getArray (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(hooks)); + private _cfgPos = getArray (configOf _source >> QGVAR(hooks)); private _dynPos = _source getVariable [QGVAR(hooks), []]; { drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [1,1,1,1], _source modelToWorldVisual _x, 1, 1, 0, format ["Hook %1", _forEachIndex]]; diff --git a/addons/refuel/functions/fnc_getFuel.sqf b/addons/refuel/functions/fnc_getFuel.sqf index ecba330363..a51b6df411 100644 --- a/addons/refuel/functions/fnc_getFuel.sqf +++ b/addons/refuel/functions/fnc_getFuel.sqf @@ -22,7 +22,7 @@ if (isNull _source) exitWith {0}; private _fuel = _source getVariable QGVAR(currentFuelCargo); if (isNil "_fuel") then { - _fuel = getNumber (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(fuelCargo)); + _fuel = getNumber (configOf _source >> QGVAR(fuelCargo)); _source setVariable [QGVAR(currentFuelCargo), _fuel, true]; }; diff --git a/addons/refuel/functions/fnc_makeSource.sqf b/addons/refuel/functions/fnc_makeSource.sqf index 7b2179adab..5553e1a906 100644 --- a/addons/refuel/functions/fnc_makeSource.sqf +++ b/addons/refuel/functions/fnc_makeSource.sqf @@ -32,7 +32,7 @@ params [ ]; TRACE_3("makeSource",_source,_fuelCargo,_hooks); -private _fuelCargoConfig = getNumber (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(fuelCargo)); +private _fuelCargoConfig = getNumber (configOf _source >> QGVAR(fuelCargo)); if ( isNull _source diff --git a/addons/refuel/functions/fnc_onMouseButtonDown.sqf b/addons/refuel/functions/fnc_onMouseButtonDown.sqf index 2111be99e8..184ede22eb 100644 --- a/addons/refuel/functions/fnc_onMouseButtonDown.sqf +++ b/addons/refuel/functions/fnc_onMouseButtonDown.sqf @@ -45,7 +45,7 @@ if (cameraView == "EXTERNAL") then { if ( !isNull _cursorObject && {_distance < REFUEL_NOZZLE_ACTION_DISTANCE} - && {1 == getNumber (configFile >> "CfgVehicles" >> (typeOf _cursorObject) >> QGVAR(canReceive))} + && {1 == getNumber (configOf _cursorObject >> QGVAR(canReceive))} && {isNull (_cursorObject getVariable [QGVAR(nozzle), objNull])} && {!lineIntersects [eyePos _unit, _virtualPosASL, _unit]} ) then { diff --git a/addons/refuel/functions/fnc_refuel.sqf b/addons/refuel/functions/fnc_refuel.sqf index f3e042cd56..0104c45a5c 100644 --- a/addons/refuel/functions/fnc_refuel.sqf +++ b/addons/refuel/functions/fnc_refuel.sqf @@ -20,7 +20,7 @@ params [["_unit", objNull, [objNull]], ["_sink", objNull, [objNull]], ["_nozzle", objNull, [objNull]], ["_connectToPoint", [0,0,0], [[]], 3]]; -private _config = configFile >> "CfgVehicles" >> typeOf _sink; +private _config = configOf _sink; private _rate = getNumber (_config >> QGVAR(flowRate)) * GVAR(rate); private _maxFuel = getNumber (_config >> QGVAR(fuelCapacity)); diff --git a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf index 9fae9abdab..d33bb4f100 100644 --- a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf +++ b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf @@ -96,7 +96,7 @@ TRACE_2("start",_unit,_nozzle); getCursorObjectParams params ["_cursorObject", "", "_distance"]; if (!isNull _cursorObject && {_distance < REFUEL_NOZZLE_ACTION_DISTANCE}) then { if ( - 1 == getNumber (configFile >> "CfgVehicles" >> (typeOf _cursorObject) >> QGVAR(canReceive)) + 1 == getNumber (configOf _cursorObject >> QGVAR(canReceive)) && {isNull (_cursorObject getVariable [QGVAR(nozzle), objNull])} ) then { _hintLMB = localize LSTRING(Connect); diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 83e38c1be6..7ce0a9d808 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -47,7 +47,7 @@ params [ if !(_source isKindOf "AllVehicles") then { private _helper = QGVAR(helper) createVehicle [0,0,0]; [QEGVAR(common,hideObjectGlobal), [_helper, true]] call CBA_fnc_serverEvent; - if ((getText (configFile >> "CfgVehicles" >> typeOf _source >> "simulation")) isEqualTo "thingX") then { + if ((getText (configOf _source >> "simulation")) isEqualTo "thingX") then { _helper attachTo [_source, [0,0,0]]; } else { _helper setPosWorld (getPosWorld _source); @@ -57,7 +57,7 @@ params [ _nozzle setVariable [QGVAR(helper), _helper, true]; _ropeTarget = _helper; }; - private _attachPos = _source getVariable [QGVAR(hooks), getArray (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(hooks))]; + private _attachPos = _source getVariable [QGVAR(hooks), getArray (configOf _source >> QGVAR(hooks))]; if (_attachPos isEqualTo []) then { _attachPos = [[0,0,0]]; }; diff --git a/addons/repair/CfgEden.hpp b/addons/repair/CfgEden.hpp index 03614b3a2f..3edc9420b0 100644 --- a/addons/repair/CfgEden.hpp +++ b/addons/repair/CfgEden.hpp @@ -1,7 +1,7 @@ #define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) #define DEFAULT_ISENGINEER ([ARR_2(0,1)] select (_this getUnitTrait 'engineer')) -#define DEFAULT_ISREPAIRVEHICLE GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(canRepair),0) +#define DEFAULT_ISREPAIRVEHICLE GET_NUMBER(configOf _this >> QQGVAR(canRepair),0) class ctrlToolbox; diff --git a/addons/repair/dev/draw_showRepairInfo.sqf b/addons/repair/dev/draw_showRepairInfo.sqf index 3a1f0c8d0f..b5516d6b98 100644 --- a/addons/repair/dev/draw_showRepairInfo.sqf +++ b/addons/repair/dev/draw_showRepairInfo.sqf @@ -5,7 +5,7 @@ addMissionEventHandler ["Draw3D", { if !((cursorObject isKindOf "Car") || (cursorObject isKindOf "Tank") || (cursorObject isKindOf "Air")) exitWith {}; - private _config = configFile >> "CfgVehicles" >> (typeOf cursorObject); + private _config = configOf cursorObject; private _hitpointPositions = getArray (_config >> QGVAR(hitpointPositions)); private _hitpointGroups = getArray (_config >> QGVAR(hitpointGroups)); diff --git a/addons/repair/functions/fnc_canMiscRepair.sqf b/addons/repair/functions/fnc_canMiscRepair.sqf index b9fe842a19..2fc4c2b3d6 100644 --- a/addons/repair/functions/fnc_canMiscRepair.sqf +++ b/addons/repair/functions/fnc_canMiscRepair.sqf @@ -24,7 +24,7 @@ params ["_caller", "_target", "_hitPointIndex"]; if !([_caller, _target, ["isNotDragging", "isNotCarrying", "isNotSwimming", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Get hitpoint groups if available -private _hitpointGroupConfig = configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(hitpointGroups); +private _hitpointGroupConfig = configOf _target >> QGVAR(hitpointGroups); private _hitpointGroup = []; if (isArray _hitpointGroupConfig) then { private _hitPointClassname = _allHitPoints select _hitPointIndex; diff --git a/addons/repair/functions/fnc_doRepair.sqf b/addons/repair/functions/fnc_doRepair.sqf index c17858d8b3..1b6f497d8e 100644 --- a/addons/repair/functions/fnc_doRepair.sqf +++ b/addons/repair/functions/fnc_doRepair.sqf @@ -39,7 +39,7 @@ if (_hitPointNewDamage < _hitPointCurDamage) then { }; // Get hitpoint groups if available -private _hitpointGroupConfig = configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(hitpointGroups); +private _hitpointGroupConfig = configOf _vehicle >> QGVAR(hitpointGroups); if (isArray _hitpointGroupConfig) then { // Retrieve hitpoint subgroup if current hitpoint is main hitpoint of a group { diff --git a/addons/repair/functions/fnc_getPostRepairDamage.sqf b/addons/repair/functions/fnc_getPostRepairDamage.sqf index d8ed7d3804..cf0ff923bd 100644 --- a/addons/repair/functions/fnc_getPostRepairDamage.sqf +++ b/addons/repair/functions/fnc_getPostRepairDamage.sqf @@ -21,7 +21,7 @@ TRACE_1("params",_unit); //If in facility or near vehicle then complete repair of hitpoint: if (([_unit] call FUNC(isInRepairFacility) || {[_unit] call FUNC(isNearRepairVehicle)})) exitWith {0}; -private _class = _unit getVariable ["ACE_IsEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer")]; +private _class = _unit getVariable ["ACE_IsEngineer", getNumber (configOf _unit >> "engineer")]; //If advanced or more qualified than min, then use engineer threshold: if ((_class isEqualTo 2) || {[_unit, GVAR(engineerSetting_Repair) + 1] call FUNC(isEngineer)}) exitWith { (GVAR(repairDamageThreshold_Engineer) min GVAR(repairDamageThreshold)) diff --git a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf index fe072859b2..9a5d32fdd9 100644 --- a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf +++ b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf @@ -20,7 +20,7 @@ params ["_vehicle"]; TRACE_1("params",_vehicle); // get the vehicles wheel config -private _wheels = configFile >> "CfgVehicles" >> typeOf _vehicle >> "Wheels"; +private _wheels = configOf _vehicle >> "Wheels"; // exit with nothing if the vehicle has no wheels class if !(isClass _wheels) exitWith {TRACE_1("No Wheels",_wheels); [[],[]]}; diff --git a/addons/repair/functions/fnc_isInRepairFacility.sqf b/addons/repair/functions/fnc_isInRepairFacility.sqf index dcbd141fb7..1693297494 100644 --- a/addons/repair/functions/fnc_isInRepairFacility.sqf +++ b/addons/repair/functions/fnc_isInRepairFacility.sqf @@ -23,7 +23,7 @@ private _isInBuilding = false; private _checkObject = { if ( - _x getVariable ["ACE_isRepairFacility", getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(canRepair))] > 0 + _x getVariable ["ACE_isRepairFacility", getNumber (configOf _x >> QGVAR(canRepair))] > 0 && {!(_x isKindOf "AllVehicles")} // check if it's not repair vehicle && {alive _x} ) exitWith { diff --git a/addons/repair/functions/fnc_isRepairVehicle.sqf b/addons/repair/functions/fnc_isRepairVehicle.sqf index 6e7ddcab27..dd2f69f34c 100644 --- a/addons/repair/functions/fnc_isRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isRepairVehicle.sqf @@ -21,5 +21,5 @@ TRACE_1("params",_vehicle); if (_vehicle isKindOf "CAManBase") exitWith {false}; // Value can be integer or boolean -private _value = _vehicle getVariable ["ACE_isRepairVehicle", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair))]; +private _value = _vehicle getVariable ["ACE_isRepairVehicle", getNumber (configOf _vehicle >> QGVAR(canRepair))]; _value in [1, true] // return diff --git a/addons/repair/functions/fnc_normalizeHitPoints.sqf b/addons/repair/functions/fnc_normalizeHitPoints.sqf index 5a33151875..aef2b7ae21 100644 --- a/addons/repair/functions/fnc_normalizeHitPoints.sqf +++ b/addons/repair/functions/fnc_normalizeHitPoints.sqf @@ -23,7 +23,7 @@ if !(local _vehicle) exitWith {ERROR_1("Vehicle Not Local %1", _vehicle);}; (getAllHitPointsDamage _vehicle) params [["_allHitPoints", []]]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle >> "HitPoints"; +private _config = configOf _vehicle >> "HitPoints"; private _realHitPoints = []; private _dependentHitPoints = []; diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index 1c0707f7ed..826187f6cc 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -181,7 +181,7 @@ private _soundPosition = AGLToASL (_caller modelToWorldVisual (_caller selection // Get repair time private _repairTime = [ - configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(repairTimes) >> configName _config, + configOf _target >> QGVAR(repairTimes) >> configName _config, "number", -1 ] call CBA_fnc_getConfigEntry; diff --git a/addons/repair/functions/fnc_setHitPointDamage.sqf b/addons/repair/functions/fnc_setHitPointDamage.sqf index 0e8a805689..1bb98e702e 100644 --- a/addons/repair/functions/fnc_setHitPointDamage.sqf +++ b/addons/repair/functions/fnc_setHitPointDamage.sqf @@ -44,7 +44,7 @@ private _hitPointDamageRepaired = 0; //positive for repairs : newSum = (oldSum - if ((!isNil {_vehicle getHit _selectionName}) && {_x != ""}) then { _realHitpointCount = _realHitpointCount + 1; - if ((((toLower _x) find "glass") == -1) && {(getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "HitPoints" >> _x >> "depends")) in ["", "0"]}) then { + if ((((toLower _x) find "glass") == -1) && {(getText (configOf _vehicle >> "HitPoints" >> _x >> "depends")) in ["", "0"]}) then { _hitPointDamageSumOld = _hitPointDamageSumOld + (_allHitPointDamages select _forEachIndex); if (_forEachIndex == _hitPointIndex) then { _hitPointDamageRepaired = (_allHitPointDamages select _forEachIndex) - _hitPointDamage; diff --git a/addons/spectator/functions/fnc_ui_updateWidget.sqf b/addons/spectator/functions/fnc_ui_updateWidget.sqf index 32337eae3d..68a0c1fe4f 100644 --- a/addons/spectator/functions/fnc_ui_updateWidget.sqf +++ b/addons/spectator/functions/fnc_ui_updateWidget.sqf @@ -32,7 +32,7 @@ private _unitTypePicture = ""; private _vehicleTypePicture = ""; private _vehiclePositionPicture = ""; if (_focus != vehicle _focus) then { - _vehicleTypePicture = getText (configFile >> "CfgVehicles" >> typeOf vehicle _focus >> "Picture"); + _vehicleTypePicture = getText (configOf vehicle _focus >> "Picture"); _vehiclePositionPicture = switch (_focus) do { case (commander vehicle _focus): {IMG_COMMANDER}; diff --git a/addons/switchunits/functions/fnc_markAiOnMap.sqf b/addons/switchunits/functions/fnc_markAiOnMap.sqf index 6c2eb0b0d9..2de13634e8 100644 --- a/addons/switchunits/functions/fnc_markAiOnMap.sqf +++ b/addons/switchunits/functions/fnc_markAiOnMap.sqf @@ -54,7 +54,7 @@ GVAR(AllMarkerNames) = []; _markerName setMarkerTextLocal (_x getVariable [QGVAR(PlayerControlledName), ""]); } else { _markerName setMarkerColorLocal _markerColor; - _markerName setMarkerTextLocal (getText (configFile >> "CfgVehicles" >> typeOf _x >> "displayName")); + _markerName setMarkerTextLocal (getText (configOf _x >> "displayName")); }; GVAR(AllMarkerNames) pushBack _markerName; diff --git a/addons/trenches/functions/fnc_continueDiggingTrench.sqf b/addons/trenches/functions/fnc_continueDiggingTrench.sqf index 951bfa9d21..95a1d914b0 100644 --- a/addons/trenches/functions/fnc_continueDiggingTrench.sqf +++ b/addons/trenches/functions/fnc_continueDiggingTrench.sqf @@ -25,7 +25,7 @@ if(_actualProgress == 1) exitWith {}; // Mark trench as being worked on _trench setVariable [QGVAR(digging), true, true]; -private _digTime = missionNamespace getVariable [getText (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(diggingDuration)), 20]; +private _digTime = missionNamespace getVariable [getText (configOf _trench >> QGVAR(diggingDuration)), 20]; private _digTimeLeft = _digTime * (1 - _actualProgress); private _placeData = _trench getVariable [QGVAR(placeData), [[], []]]; @@ -79,7 +79,7 @@ if(_actualProgress == 0) then { _cutterPos set [2, getTerrainHeightASL _cutterPos]; _trenchGrassCutter setPosASL _cutterPos; deleteVehicle _trenchGrassCutter; - } foreach getArray (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(grassCuttingPoints)); + } foreach getArray (configOf _trench >> QGVAR(grassCuttingPoints)); }; private _progressLeft = (_actualProgress * 10) + 1; diff --git a/addons/trenches/functions/fnc_removeTrench.sqf b/addons/trenches/functions/fnc_removeTrench.sqf index 868daa738c..2cdb874846 100644 --- a/addons/trenches/functions/fnc_removeTrench.sqf +++ b/addons/trenches/functions/fnc_removeTrench.sqf @@ -25,7 +25,7 @@ if(_actualProgress == 0) exitWith {}; // Mark trench as being worked on _trench setVariable [QGVAR(digging), true, true]; -private _removeTime = missionNamespace getVariable [getText (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(removalDuration)), 12]; +private _removeTime = missionNamespace getVariable [getText (configOf _trench >> QGVAR(removalDuration)), 12]; private _removeTimeLeft = _removeTime * _actualProgress; if (isNil {_trench getVariable QGVAR(placeData)}) then { diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 6b8866aaa4..40fce2d2ee 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -21,7 +21,7 @@ params ["_logic", "_units", "_activated"]; if (_activated) then { - _explosive = gettext (configfile >> "cfgvehicles" >> typeof _logic >> "explosive"); + _explosive = gettext (configOf _logic >> "explosive"); if (_explosive != "") then { _explosive = createvehicle [_explosive,position _logic,[],0,"none"]; _explosive attachto [_logic]; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 4439ad3517..a450b105c0 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -31,7 +31,7 @@ if ({local _x} count (objectcurators _logic) > 0) then { if !(isserver) exitwith {}; if (_activated) then { - _ammo = _logic getvariable ["type",gettext (configfile >> "cfgvehicles" >> typeof _logic >> "ammo")]; + _ammo = _logic getvariable ["type",gettext (configOf _logic >> "ammo")]; if (_ammo != "") then { _cfgAmmo = configfile >> "cfgammo" >> _ammo; //if !(isclass _cfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; diff --git a/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf b/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf index 967edc9396..532d340416 100644 --- a/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf +++ b/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf @@ -32,7 +32,7 @@ if !(["ace_fastroping"] call EFUNC(common,isModLoaded)) then { if !(alive _mouseOverUnit) then { [LSTRING(OnlyAlive)] call FUNC(showMessage); } else { - private _config = configFile >> "CfgVehicles" >> typeOf _mouseOverUnit; + private _config = configOf _mouseOverUnit; private _displayName = getText (_config >> "displayName"); if !(isNumber (_config >> QEGVAR(fastroping,enabled))) then { [LSTRING(NotFastRopeCompatible), _displayName] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf index 1900e5a7a3..3c5a67de75 100644 --- a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf +++ b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf @@ -49,7 +49,7 @@ if ([_unit] call EFUNC(common,isPlayer)) exitWith { private _targetASL = _mousePosASL vectorAdd [0,0,0.6]; // mouse pos is at ground level zero, raise up a bit; private _artilleryMag = ""; - if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "artilleryScanner")) == 1) then { + if ((getNumber (configOf _vehicle >> "artilleryScanner")) == 1) then { // Artillery - Get mortar ammo type and verify in range if (isNull gunner _vehicle) exitWith {_targetASL = [];}; { diff --git a/addons/zeus/functions/fnc_moduleToggleNvg.sqf b/addons/zeus/functions/fnc_moduleToggleNvg.sqf index f8627acfe6..3f91286534 100644 --- a/addons/zeus/functions/fnc_moduleToggleNvg.sqf +++ b/addons/zeus/functions/fnc_moduleToggleNvg.sqf @@ -31,14 +31,13 @@ if (_target == -1) then { }; // Add or remove NVGs from units -private _cfgVehicles = configFile >> "CfgVehicles"; private _cfgWeapons = configFile >> "CfgWeapons"; if (_toggle) then { { if (hmd _x isEqualTo "") then { // Get NVG item and helmet from unit config - private _linkedItems = getArray (_cfgVehicles >> typeOf _x >> "linkedItems"); + private _linkedItems = getArray (configOf _x >> "linkedItems"); private _nvgItem = _linkedItems select {_x isKindOf ["NVGoggles", _cfgWeapons]}; private _nvgHelmet = _linkedItems select {!(getArray (_cfgWeapons >> _x >> "subItems") isEqualTo [])}; diff --git a/addons/zeus/functions/fnc_ui_attributeCargo.sqf b/addons/zeus/functions/fnc_ui_attributeCargo.sqf index b4fc156127..d2345e8a96 100644 --- a/addons/zeus/functions/fnc_ui_attributeCargo.sqf +++ b/addons/zeus/functions/fnc_ui_attributeCargo.sqf @@ -60,7 +60,7 @@ private _fnc_onButtonUnload = { private _class = if (_item isEqualType "") then {_item} else {typeOf _item}; private _itemName = getText (configFile >> "CfgVehicles" >> _class >> "displayName"); if ([_item, _vehicle] call EFUNC(cargo,unloadItem)) then { - private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + private _vehicleName = getText (configOf _vehicle >> "displayName"); private _message = [localize ELSTRING(cargo,UnloadedItem), "
", " "] call CBA_fnc_replace; [_message, _itemName, _vehicleName] call FUNC(showMessage); } else {