New 'overwriteZeroRange' setting

This commit is contained in:
ulteq 2016-11-16 12:55:43 +01:00 committed by ulteq
parent bb71885b42
commit dbb59c8fd1
5 changed files with 21 additions and 1 deletions

View File

@ -20,6 +20,13 @@ class ACE_Settings {
displayName = CSTRING(correctZeroing_displayName);
description = CSTRING(correctZeroing_description);
};
// Enables the use of the 'defaultZeroRange' setting to overwrite the discreteDistance[] config
class GVAR(overwriteZeroRange) {
typeName = "BOOL";
value = 0;
displayName = CSTRING(overwriteZeroRange_displayName);
description = CSTRING(overwriteZeroRange_description);
};
// Only affects scopes with elevation adjustment turrets (ACE_ScopeAdjust_Vertical != [0,0])
class GVAR(defaultZeroRange) {
typeName = "SCALAR";

View File

@ -46,6 +46,12 @@ class CfgVehicles {
typeName = "BOOL";
defaultValue = 1;
};
class overwriteZeroRange {
displayName = CSTRING(overwriteZeroRange_DisplayName);
description = CSTRING(overwriteZeroRange_Description);
typeName = "BOOL";
defaultValue = 0;
};
class defaultZeroRange {
displayName = CSTRING(defaultZeroRange_DisplayName);
description = CSTRING(defaultZeroRange_Description);

View File

@ -30,7 +30,7 @@ private _opticConfig = if (_optic != "") then {
};
private _zeroRange = currentZeroing _unit;
if (GVAR(canAdjustElevation) select _weaponIndex) then {
if (GVAR(overwriteZeroRange) && {GVAR(canAdjustElevation) select _weaponIndex}) then {
_zeroRange = GVAR(defaultZeroRange);
};
if (isNumber (_opticConfig >> "ACE_ScopeZeroRange")) then {

View File

@ -21,6 +21,7 @@ if !(_activated) exitWith {};
[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(forceUseOfAdjustmentTurrets), "forceUseOfAdjustmentTurrets"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(correctZeroing), "correctZeroing"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(overwriteZeroRange), "overwriteZeroRange"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(defaultZeroRange), "defaultZeroRange"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(zeroReferenceTemperature), "zeroReferenceTemperature"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(zeroReferenceBarometricPressure), "zeroReferenceBarometricPressure"] call EFUNC(common,readSettingFromModule);

View File

@ -22,6 +22,12 @@
<Key ID="STR_ACE_Scopes_correctZeroing_description">
<English>Corrects the zeroing of all small arms sights</English>
</Key>
<Key ID="STR_ACE_Scopes_overwriteZeroRange_displayName">
<English>Overwrite zero distance</English>
</Key>
<Key ID="STR_ACE_Scopes_overwriteZeroRange_Description">
<English>Uses the 'defaultZeroRange' setting to overwrite the zero range of high power scopes</English>
</Key>
<Key ID="STR_ACE_Scopes_defaultZeroRange_displayName">
<English>Default zero distance</English>
</Key>