Skip to content

Commit

Permalink
Merge pull request #1419 from CBATeam/configOf
Browse files Browse the repository at this point in the history
Use configOf command
  • Loading branch information
PabstMirror committed Feb 13, 2021
2 parents a87dee3 + 4ace9c2 commit a6de88d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions addons/common/fnc_getObjectConfig.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ SCRIPT(getObjectConfig);

params [["_object", "", ["", objNull]]];

if (_object isEqualType objNull) then {
_object = typeOf _object;
if (_object isEqualType objNull) exitWith {
configOf _object
};

private _result = configNull;
Expand Down
2 changes: 1 addition & 1 deletion addons/common/fnc_isTurnedOut.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ params ["_unit"];

private _out = false;
private _vehicle = vehicle _unit;
private _cfg = configFile >> "CfgVehicles" >> typeOf _vehicle;
private _cfg = configOf _vehicle;

if (_vehicle != _unit) then {
if (driver _vehicle == _unit) then {
Expand Down
2 changes: 1 addition & 1 deletion addons/common/fnc_randomizeFacewear.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private _randomizationDisabled = getArray (missionConfigFile >> "disableRandomiz
if (_randomizationDisabled || {!(_unit getVariable ["BIS_enableRandomization", true])}) exitWith {true};

// Get list
private _facewearList = getArray (configFile >> "CfgVehicles" >> typeOf _unit >> "CBA_facewearList");
private _facewearList = getArray (configOf _unit >> "CBA_facewearList");
if (_facewearList isEqualTo []) exitWith {true};

// Apply
Expand Down
2 changes: 1 addition & 1 deletion addons/disposable/fnc_replaceMagazineCargo.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if (magazineCargo _box arrayIntersect GVAR(magazines) isEqualTo []) exitWith {};
private _magazines = magazinesAmmoCargo _box;
clearMagazineCargoGlobal _box;

private _isBackpack = getNumber (configFile >> "CfgVehicles" >> typeOf _box >> "isBackpack") != -1;
private _isBackpack = getNumber (configOf _box >> "isBackpack") != -1;

{
_x params ["_magazine", "_ammo"];
Expand Down
2 changes: 1 addition & 1 deletion addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD

// MINIMAL required version for the Mod. Components can specify others..
#define REQUIRED_VERSION 1.98
#define REQUIRED_VERSION 2.00

/*
// Defined DEBUG_MODE_NORMAL in a few CBA_fncs to prevent looped logging :)
Expand Down
2 changes: 1 addition & 1 deletion addons/optics/fnc_currentOptic.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private _vehicleOptic = "";

if (_vehicle != _unit) then {
// todo: turrets
_vehicleOptic = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "CBA_ScriptedOpticClass");
_vehicleOptic = getText (configOf _vehicle >> "CBA_ScriptedOpticClass");
};

if (_vehicleOptic != "") exitWith {_vehicleOptic};
Expand Down
2 changes: 1 addition & 1 deletion addons/xeh/fnc_initEvents.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ params ["_unit"];
if !(ISPROCESSED(_unit)) then {
SETPROCESSED(_unit);

private _class = configFile >> "CfgVehicles" >> typeOf _unit;
private _class = configOf _unit;
private _eventClass = _class >> "EventHandlers" >> QUOTE(XEH_CLASS);

// adds ability to disable XEH completely on a unit, by manually clearing the CBA event handler class.
Expand Down

0 comments on commit a6de88d

Please sign in to comment.