fix configFile capitalization

This commit is contained in:
commy2 2015-11-30 17:23:02 +01:00
parent 2b05f6f451
commit a8228f60c2
18 changed files with 26 additions and 26 deletions

View File

@ -41,7 +41,7 @@ uiNamespace setVariable [QGVAR(menuDisplay), _display];
lbClear _ctrl; lbClear _ctrl;
{ {
_class = if (typeName _x == "STRING") then {_x} else {typeOf _x}; _class = if (typeName _x == "STRING") then {_x} else {typeOf _x};
_ctrl lbAdd (getText(configfile >> "CfgVehicles" >> _class >> "displayName")); _ctrl lbAdd (getText(configFile >> "CfgVehicles" >> _class >> "displayName"));
true true
} count _loaded; } count _loaded;

View File

@ -62,8 +62,8 @@ if (isNumber (_magazineTrigger >> "digDistance")) then {
_canDigDown = true; _canDigDown = true;
_surfaceType = surfaceType _pos; _surfaceType = surfaceType _pos;
if ((_surfaceType select [0,1]) == "#") then {_surfaceType = _surfaceType select [1, 99];}; if ((_surfaceType select [0,1]) == "#") then {_surfaceType = _surfaceType select [1, 99];};
if ((_surfaceType != "") || {isClass (configfile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron")}) then { if ((_surfaceType != "") || {isClass (configFile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron")}) then {
_soundEnviron = getText (configfile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron"); _soundEnviron = getText (configFile >> "CfgSurfaces" >> _surfaceType >> "soundEnviron");
TRACE_2("Dig Down Surface",_surfaceType,_soundEnviron); TRACE_2("Dig Down Surface",_surfaceType,_soundEnviron);
_canDigDown = !(_soundEnviron in ["road", "tarmac", "concrete", "concrete_int", "int_concrete", "concrete_ext"]); _canDigDown = !(_soundEnviron in ["road", "tarmac", "concrete", "concrete_int", "int_concrete", "concrete_ext"]);
}; };

View File

@ -27,7 +27,7 @@ _unitMagCounts = [];
private "_xFullMagazineCount"; private "_xFullMagazineCount";
_x params ["_xClassname", "_xCount", "_xLoaded", "_xType"]; _x params ["_xClassname", "_xCount", "_xLoaded", "_xType"];
_xFullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _xClassname >> "count"); _xFullMagazineCount = getNumber (configFile >> "CfgMagazines" >> _xClassname >> "count");
//for every partial magazine, that is either in inventory or can be moved there //for every partial magazine, that is either in inventory or can be moved there
if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {_player canAdd _xClassname}}) then { if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {_player canAdd _xClassname}}) then {

View File

@ -24,7 +24,7 @@ private ["_structuredOutputText", "_picture", "_fullMags", "_partialMags", "_ful
params ["_args", "_elapsedTime", "_totalTime", "_errorCode"]; params ["_args", "_elapsedTime", "_totalTime", "_errorCode"];
_args params ["_magazineClassname", "_lastAmmoCount"]; _args params ["_magazineClassname", "_lastAmmoCount"];
_fullMagazineCount = getNumber (configfile >> "CfgMagazines" >> _magazineClassname >> "count"); _fullMagazineCount = getNumber (configFile >> "CfgMagazines" >> _magazineClassname >> "count");
//Don't show anything if player can't interact: //Don't show anything if player can't interact:
if (!([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {}; if (!([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {};

View File

@ -24,7 +24,7 @@ private ["_magazineCfg", "_fullMagazineCount", "_isBelt", "_startingAmmoCounts",
params ["_target", "_player", "_magazineClassname"]; params ["_target", "_player", "_magazineClassname"];
if (isNil "_magazineClassname" || {_magazineClassname == ""}) exitWith {ERROR("Bad Mag Classname");}; if (isNil "_magazineClassname" || {_magazineClassname == ""}) exitWith {ERROR("Bad Mag Classname");};
_magazineCfg = configfile >> "CfgMagazines" >> _magazineClassname; _magazineCfg = configFile >> "CfgMagazines" >> _magazineClassname;
// Calculate actual ammo to transfer during repack // Calculate actual ammo to transfer during repack
_fullMagazineCount = getNumber (_magazineCfg >> "count"); _fullMagazineCount = getNumber (_magazineCfg >> "count");
//Is linked belt magazine: //Is linked belt magazine:

View File

@ -16,7 +16,7 @@ private ["_config", "_marker", "_a", "_scope", "_icon", "_rgba", "_name"];
// init marker types // init marker types
if (isNil QGVAR(MarkersCache)) then { if (isNil QGVAR(MarkersCache)) then {
_config = configfile >> "CfgMarkers"; _config = configFile >> "CfgMarkers";
GVAR(MarkersCache) = []; GVAR(MarkersCache) = [];
for "_a" from 0 to (count _config - 1) do { for "_a" from 0 to (count _config - 1) do {
@ -32,7 +32,7 @@ if (isNil QGVAR(MarkersCache)) then {
// init marker colors // init marker colors
if (isNil QGVAR(MarkerColorsCache)) then { if (isNil QGVAR(MarkerColorsCache)) then {
_config = configfile >> "CfgMarkerColors"; _config = configFile >> "CfgMarkerColors";
GVAR(MarkerColorsCache) = []; GVAR(MarkerColorsCache) = [];
for "_a" from 0 to (count _config - 1) do { for "_a" from 0 to (count _config - 1) do {

View File

@ -25,6 +25,6 @@ _data = _ctrl lbValue _index;
GVAR(curSelMarkerColor) = _index; GVAR(curSelMarkerColor) = _index;
_config = (configfile >> "CfgMarkerColors") select _data; _config = (configFile >> "CfgMarkerColors") select _data;
GVAR(currentMarkerColorConfigName) = (configName _config); GVAR(currentMarkerColorConfigName) = (configName _config);

View File

@ -25,6 +25,6 @@ _data = _ctrl lbValue _index;
GVAR(curSelMarkerShape) = _index; GVAR(curSelMarkerShape) = _index;
_config = (configfile >> "CfgMarkers") select _data; _config = (configFile >> "CfgMarkers") select _data;
GVAR(currentMarkerConfigName) = (configName _config); GVAR(currentMarkerConfigName) = (configName _config);

View File

@ -29,14 +29,14 @@ TRACE_3("params",_allMapMarkers,_allMapMarkersProperties,_logic);
_data = _allMapMarkersProperties select _index; _data = _allMapMarkersProperties select _index;
_data params ["_name", "_color", "_pos", "_dir"]; _data params ["_name", "_color", "_pos", "_dir"];
_config = (configfile >> "CfgMarkers") >> _name; _config = (configFile >> "CfgMarkers") >> _name;
if (!isClass _config) then { if (!isClass _config) then {
WARNING("CfgMarker not found, changed to milDot"); WARNING("CfgMarker not found, changed to milDot");
_config == (configFile >> "CfgMarkers" >> "MilDot"); _config == (configFile >> "CfgMarkers" >> "MilDot");
}; };
_x setMarkerTypeLocal (configName _config); _x setMarkerTypeLocal (configName _config);
_config = (configfile >> "CfgMarkerColors") >> _color; _config = (configFile >> "CfgMarkerColors") >> _color;
if (!isClass _config) then { if (!isClass _config) then {
WARNING("CfgMarkerColors not found, changed to Default"); WARNING("CfgMarkerColors not found, changed to Default");
_config == (configFile >> "CfgMarkerColors" >> "Default"); _config == (configFile >> "CfgMarkerColors" >> "Default");

View File

@ -24,14 +24,14 @@ _data params ["_markerClassname", "_colorClassname", "_markerPos", "_markerDir"]
TRACE_2("params",_marker,_data); TRACE_2("params",_marker,_data);
_config = (configfile >> "CfgMarkers") >> _markerClassname; _config = (configFile >> "CfgMarkers") >> _markerClassname;
if (!isClass _config) then { if (!isClass _config) then {
WARNING("CfgMarker not found, changed to milDot"); WARNING("CfgMarker not found, changed to milDot");
_config == (configFile >> "CfgMarkers" >> "MilDot"); _config == (configFile >> "CfgMarkers" >> "MilDot");
}; };
_marker setMarkerTypeLocal (configName _config); _marker setMarkerTypeLocal (configName _config);
_config = (configfile >> "CfgMarkerColors") >> _colorClassname; _config = (configFile >> "CfgMarkerColors") >> _colorClassname;
if (!isClass _config) then { if (!isClass _config) then {
WARNING("CfgMarkerColors not found, changed to Default"); WARNING("CfgMarkerColors not found, changed to Default");
_config == (configFile >> "CfgMarkerColors" >> "Default"); _config == (configFile >> "CfgMarkerColors" >> "Default");

View File

@ -21,7 +21,7 @@ TRACE_1("params",_vehicle);
// get the vehicles wheel config // get the vehicles wheel config
private "_wheels"; private "_wheels";
_wheels = configfile >> "CfgVehicles" >> typeOf _vehicle >> "Wheels"; _wheels = configFile >> "CfgVehicles" >> typeOf _vehicle >> "Wheels";
// exit with nothing if the vehicle has no wheels class // exit with nothing if the vehicle has no wheels class
if !(isClass _wheels) exitWith {[[],[]]}; if !(isClass _wheels) exitWith {[[],[]]};

View File

@ -27,7 +27,7 @@ _activeWeaponAndMuzzle params ["_activeWeapon", "_activeMuzzle", "_activeWeaponM
if ( if (
(_activeMuzzle != "") && (_activeMuzzle != "") &&
{_activeMuzzle != _activeWeapon} && {_activeMuzzle != _activeWeapon} &&
{_activeMuzzle in getArray (configfile >> "CfgWeapons" >> _activeWeapon >> "muzzles")} {_activeMuzzle in getArray (configFile >> "CfgWeapons" >> _activeWeapon >> "muzzles")}
) then { ) then {
_unit selectWeapon _activeMuzzle; _unit selectWeapon _activeMuzzle;
} else { } else {

View File

@ -48,7 +48,7 @@ if (inputAction "nextWeapon" > 0) then {
_modes pushBack _weapon; _modes pushBack _weapon;
}; };
nil nil
} count getArray (configfile >> "CfgWeapons" >> _weapon >> "modes"); } count getArray (configFile >> "CfgWeapons" >> _weapon >> "modes");
// select last mode // select last mode
_mode = _modes select (count _modes - 1); _mode = _modes select (count _modes - 1);

View File

@ -24,6 +24,6 @@ if !("ACE_Sandbag_empty" in items _unit) exitWith {false};
private ["_surfaceClass", "_surfaceType"]; private ["_surfaceClass", "_surfaceType"];
_surfaceClass = (surfaceType getPosASL _unit) select [1]; _surfaceClass = (surfaceType getPosASL _unit) select [1];
_surfaceType = getText (configfile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron"); _surfaceType = getText (configFile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron");
!(_surfaceType in SURFACE_BLACKLIST) !(_surfaceType in SURFACE_BLACKLIST)

View File

@ -25,13 +25,13 @@ private ["_magazines", "_ammo", "_explosive"];
GVAR(GrenadesAll) append _magazines; GVAR(GrenadesAll) append _magazines;
{ {
_ammo = getText (configfile >> "CfgMagazines" >> _x >> "ammo"); _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo");
_explosive = getNumber (configfile >> "CfgAmmo" >> _ammo >> "explosive"); _explosive = getNumber (configFile >> "CfgAmmo" >> _ammo >> "explosive");
([GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select (_explosive == 0)) pushBack _x; ([GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select (_explosive == 0)) pushBack _x;
false false
} count _magazines; } count _magazines;
false false
} count getArray (configfile >> "CfgWeapons" >> "Throw" >> "muzzles"); } count getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles");
ADDON = true; ADDON = true;

View File

@ -68,7 +68,7 @@ if (_activated) then {
//--- All (including unofficial ones) //--- All (including unofficial ones)
case 3: { case 3: {
_cfgPatches = configfile >> "Cfgpatches"; _cfgPatches = configFile >> "Cfgpatches";
for "_i" from 0 to (count _cfgPatches - 1) do { for "_i" from 0 to (count _cfgPatches - 1) do {
_class = _cfgPatches select _i; _class = _cfgPatches select _i;
if (isclass _class) then {_addons set [count _addons,configname _class];}; if (isclass _class) then {_addons set [count _addons,configname _class];};

View File

@ -21,7 +21,7 @@ _units = _this select 1;
_activated = _this select 2; _activated = _this select 2;
if (_activated) then { if (_activated) then {
_explosive = gettext (configfile >> "CfgVehicles" >> typeOf _logic >> "explosive"); _explosive = gettext (configFile >> "CfgVehicles" >> typeOf _logic >> "explosive");
if (_explosive != "") then { if (_explosive != "") then {
_explosive = createvehicle [_explosive,position _logic,[],0,"none"]; _explosive = createvehicle [_explosive,position _logic,[],0,"none"];
_explosive attachto [_logic]; _explosive attachto [_logic];

View File

@ -39,9 +39,9 @@ if ({local _x} count (objectcurators _logic) > 0) then {
if !(isserver) exitWith {}; if !(isserver) exitWith {};
if (_activated) then { if (_activated) then {
_ammo = _logic getvariable ["type",gettext (configfile >> "CfgVehicles" >> typeOf _logic >> "ammo")]; _ammo = _logic getvariable ["type",gettext (configFile >> "CfgVehicles" >> typeOf _logic >> "ammo")];
if (_ammo != "") then { if (_ammo != "") then {
_CfgAmmo = configfile >> "CfgAmmo" >> _ammo; _CfgAmmo = configFile >> "CfgAmmo" >> _ammo;
//if !(isclass _CfgAmmo) exitWith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; //if !(isclass _CfgAmmo) exitWith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;};
_dirVar = _fnc_scriptname + typeOf _logic; _dirVar = _fnc_scriptname + typeOf _logic;
_logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction
@ -49,7 +49,7 @@ if (_activated) then {
_posAmmo = +_pos; _posAmmo = +_pos;
_posAmmo set [2,0]; _posAmmo set [2,0];
_dir = direction _logic; _dir = direction _logic;
_simulation = tolower gettext (configfile >> "CfgAmmo" >> _ammo >> "simulation"); _simulation = tolower gettext (configFile >> "CfgAmmo" >> _ammo >> "simulation");
_altitude = 0; _altitude = 0;
_velocity = []; _velocity = [];
_attach = false; _attach = false;