mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Various - Misc Cleanup (#9317)
* Various - Misc Cleanup * Update addons/common/functions/fnc_canDig.sqf Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
parent
7c70ded9bc
commit
8c5ab18350
@ -82,7 +82,7 @@ private _fnc_addToTabs = {
|
||||
_stat = +_finalArray;
|
||||
_stat set [0, _statName];
|
||||
|
||||
_index = _currentTab findIf {count _x < 5};
|
||||
private _index = _currentTab findIf {count _x < 5};
|
||||
|
||||
// Add to existing page if there's enough space, otherwise create a new page
|
||||
if (_index != -1) then {
|
||||
|
@ -212,7 +212,7 @@ if (is3DEN) then {
|
||||
_ctrl ctrlCommit 0;
|
||||
} forEach [IDC_buttonFace, IDC_buttonVoice, IDC_buttonInsignia];
|
||||
|
||||
_buttonCloseCtrl = _display displayCtrl IDC_menuBarClose;
|
||||
private _buttonCloseCtrl = _display displayCtrl IDC_menuBarClose;
|
||||
_buttonCloseCtrl ctrlSetText (localize "str_ui_debug_but_apply");
|
||||
} else {
|
||||
GVAR(centerNotPlayer) = GVAR(center) != player;
|
||||
|
@ -22,4 +22,4 @@ if (_currentName isEqualTo _newName) exitWith {};
|
||||
private _loadoutIndex = GVAR(defaultLoadoutsList) findIf {(_x select 0) == _currentName};
|
||||
if (_loadoutIndex isEqualTo -1) exitWith {};
|
||||
|
||||
(GVAR(defaultLoadoutsList) select _index) set [0, _newName];
|
||||
(GVAR(defaultLoadoutsList) select _loadoutIndex) set [0, _newName];
|
||||
|
@ -136,7 +136,7 @@ private _cfgVehicles = configFile >> "CfgVehicles";
|
||||
// Assigned items: Map, Compass, Watch, GPS / UAV Terminal, Radio, NVGs
|
||||
case IDX_LOADOUT_ASSIGNEDITEMS: {
|
||||
// Check if assignedItems have items that need replacing with a defined base
|
||||
_items = _x;
|
||||
private _items = _x;
|
||||
|
||||
{
|
||||
if (_x != "") then {
|
||||
|
@ -16,8 +16,8 @@
|
||||
params ["", "_config"];
|
||||
TRACE_1("statTextStatement_binoMag",_config);
|
||||
|
||||
_minZoom = getNumber (_config >> "opticsZoomMin"); // FOV, so smaller is more zoomed in
|
||||
_maxZoom = getNumber (_config >> "opticsZoomMax");
|
||||
private _minZoom = getNumber (_config >> "opticsZoomMin"); // FOV, so smaller is more zoomed in
|
||||
private _maxZoom = getNumber (_config >> "opticsZoomMax");
|
||||
|
||||
if (_minZoom == 0) exitWith {"?"};
|
||||
|
||||
|
@ -46,10 +46,10 @@ TRACE_2("searching for new vehicles",_vehicleAdded,_rangeTablesShown);
|
||||
} forEach allTurrets _vehicle;
|
||||
TRACE_3("",_vehicle,configName _vehicleCfg,_turret);
|
||||
if (isNull _turretCfg) exitWith { ERROR_1("no primaryGunner %1",configName _vehicleCfg); };
|
||||
if ((count _turret) != 1) then { WARNING_2("sub turret %1-%2",_typeOf,_turret); };
|
||||
if ((count _turret) != 1) then { WARNING_2("sub turret %1-%2",configName _vehicleCfg,_turret); };
|
||||
|
||||
private _weaponsTurret = _vehicle weaponsTurret _turret;
|
||||
if ((count _weaponsTurret) != 1) exitWith { WARNING_1("multiple weapons - %1",_typeOf); };
|
||||
if ((count _weaponsTurret) != 1) exitWith { WARNING_1("multiple weapons - %1",configName _vehicleCfg); };
|
||||
private _weapon = _weaponsTurret select 0;
|
||||
|
||||
private _turretAnimBody = getText (_turretCfg >> "animationSourceBody");
|
||||
|
@ -22,8 +22,8 @@ private _posASL = _input;
|
||||
|
||||
if ((_input isEqualType objNull) && {
|
||||
_posASL = getPosASL _input;
|
||||
(getPosATL _unit) select 2 > 0.05 || // Walking on objects, such as buildings, pavements, etc.
|
||||
{surfaceIsWater _posASL} // posATL in low water (not as low to allow awalking) is negative
|
||||
(getPosATL _input) select 2 > 0.05 || // Walking on objects, such as buildings, pavements, etc.
|
||||
{surfaceIsWater _posASL} // posATL in low water (not as low to allow walking) is negative
|
||||
}) exitWith {false};
|
||||
|
||||
private _surfaceClass = (surfaceType _posASL) select [1];
|
||||
|
@ -55,7 +55,7 @@ private _settings = configProperties [configFile >> "ACE_Settings", "(isClass _x
|
||||
|
||||
private _cbaSettingType = "";
|
||||
private _cbaValueInfo = [];
|
||||
_cbaValueInfoHint = "default value";
|
||||
private _cbaValueInfoHint = "default value";
|
||||
switch (_typeName) do {
|
||||
case ("SCALAR"): { // ACE's Scalar can be a float or an index for a list
|
||||
if (!isNumber (_config >> "value")) then {WARNING_2("Setting [%1] - value type [%2] is missing number",_varName,_typeName);};
|
||||
|
@ -29,7 +29,7 @@ if (isNil "_damageType") then {
|
||||
|
||||
// config may define an invalid damage type
|
||||
if !(_damageType in GVAR(damageTypeDetails)) then {
|
||||
WARNING_2("Damage type [%1] for ammo [%2] not found",_typeOfDamage,_typeOfProjectile);
|
||||
WARNING_2("Damage type [%1] for ammo [%2] not found",_damageType,_typeOfProjectile);
|
||||
_damageType = "unknown";
|
||||
};
|
||||
|
||||
|
@ -44,7 +44,7 @@ case (APP_MODE_INFODISPLAY): {
|
||||
(_display displayCtrl IDC_MODEDISPLAY_ELEVATIONNUM) ctrlSetText _aboveSeaLevelText;
|
||||
|
||||
//Heading:
|
||||
_compassAngleText = if (GVAR(settingUseMils)) then {
|
||||
private _compassAngleText = if (GVAR(settingUseMils)) then {
|
||||
[(floor ((6400 / 360) * (([ACE_player] call CBA_fnc_headDir) select 0))), 4, 0] call CBA_fnc_formatNumber;
|
||||
} else {
|
||||
([([ACE_player] call CBA_fnc_headDir) select 0, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
|
||||
@ -65,8 +65,8 @@ case (APP_MODE_INFODISPLAY): {
|
||||
} else {
|
||||
private _targetPosName = "";
|
||||
private _targetPosLocationASL = [];
|
||||
_bearingText = "----";
|
||||
_rangeText = "----";
|
||||
private _bearingText = "----";
|
||||
private _rangeText = "----";
|
||||
_aboveSeaLevelText = "----";
|
||||
|
||||
if (GVAR(currentWaypoint) == -2) then {
|
||||
@ -134,8 +134,8 @@ case (APP_MODE_COMPASS): {
|
||||
_targetPosLocationASL = (_waypoints select GVAR(currentWaypoint)) select 1;
|
||||
};
|
||||
|
||||
_bearingText = "---";
|
||||
_rangeText = "---";
|
||||
private _bearingText = "---";
|
||||
private _rangeText = "---";
|
||||
|
||||
if (_targetPosLocationASL isNotEqualTo []) then {
|
||||
private _bearing = [(getPosASL ACE_player), _targetPosLocationASL] call BIS_fnc_dirTo;
|
||||
|
@ -27,7 +27,7 @@ TRACE_2("addVehicleMagazinesToSupply",_truck,_vehicle);
|
||||
if (isNull _truck) exitWith {};
|
||||
if (_vehicle isEqualType objNull) then {_vehicle = typeOf _vehicle};
|
||||
if (_vehicle == "") exitWith {
|
||||
ERROR_1("VehicleType [%1] is empty in ace_rearm_fnc_addVehicleMagazinesToSupply",_string);
|
||||
ERROR_1("VehicleType [%1] is empty in ace_rearm_fnc_addVehicleMagazinesToSupply",_vehicle);
|
||||
};
|
||||
private _turrets = [_vehicle] call FUNC(getAllRearmTurrets);
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user