diff --git a/.gibot.yml b/.gibot.yml index 442f0a9ea3..b3a565a5e4 100644 --- a/.gibot.yml +++ b/.gibot.yml @@ -8,6 +8,7 @@ stages: - status/wontfix exclude: - status/marked for cleanup + - status/accepting-pr comment: - 'Hello @{author}! There has been no activity on this ticket for over a period of {days} days. I am automatically replying to let you know we will close this ticket within 1 week due to inactivity and consider this resolved.' - 'If you believe this is in error, please reply with the requested information.' @@ -34,7 +35,7 @@ stages: remove_label: - status/marked for cleanup remind_about_old_ticket: - days: 160 + days: 365 labels: - kind/bug - kind/critical bug @@ -46,6 +47,7 @@ stages: - status/marked for cleanup - status/inactive - status/stale + - status/accepting-pr comment: - 'Hello @acemod/maintainers. This ticket has been open for over {days} days without any activity.' action: diff --git a/AUTHORS.txt b/AUTHORS.txt index 4fe978dd40..8d36de66ab 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -112,6 +112,7 @@ PaxJaromeMalues Phyma pokertour Professor +QuickDagger rakowozz ramius86 Raspu86 diff --git a/README.md b/README.md index db6119f9a3..bfe05bdd4f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

- ACE3 Version + ACE3 Version ACE3 Issues diff --git a/ace_advanced_ballistics.dll b/ace_advanced_ballistics.dll index 43698cf95b..f5686a5a3f 100644 Binary files a/ace_advanced_ballistics.dll and b/ace_advanced_ballistics.dll differ diff --git a/ace_advanced_ballistics_x64.dll b/ace_advanced_ballistics_x64.dll index 83858d86e3..f1802ce5e8 100644 Binary files a/ace_advanced_ballistics_x64.dll and b/ace_advanced_ballistics_x64.dll differ diff --git a/addons/advanced_ballistics/ACE_Settings.hpp b/addons/advanced_ballistics/ACE_Settings.hpp index 0c2265619a..c25592eb5d 100644 --- a/addons/advanced_ballistics/ACE_Settings.hpp +++ b/addons/advanced_ballistics/ACE_Settings.hpp @@ -6,43 +6,13 @@ class ACE_Settings { typeName = "BOOL"; value = 0; }; - class GVAR(simulateForSnipers) { + class GVAR(muzzleVelocityVariationEnabled) { category = CSTRING(DisplayName); - displayName = CSTRING(simulateForSnipers_DisplayName); - description = CSTRING(simulateForSnipers_Description); + displayName = CSTRING(muzzleVelocityVariationEnabled_DisplayName); + description = CSTRING(muzzleVelocityVariationEnabled_Description); typeName = "BOOL"; value = 1; - }; - class GVAR(simulateForGroupMembers) { - category = CSTRING(DisplayName); - displayName = CSTRING(simulateForGroupMembers_DisplayName); - description = CSTRING(simulateForGroupMembers_Description); - typeName = "BOOL"; - value = 0; - }; - class GVAR(simulateForEveryone) { - category = CSTRING(DisplayName); - displayName = CSTRING(simulateForEveryone_DisplayName); - description = CSTRING(simulateForEveryone_Description); - typeName = "BOOL"; - value = 0; - }; - class GVAR(disabledInFullAutoMode) { - category = CSTRING(DisplayName); - displayName = CSTRING(disabledInFullAutoMod_DisplayName); - description = CSTRING(disabledInFullAutoMod_Description); - typeName = "BOOL"; - value = 0; - }; - /* // TODO: We currently do not have firedEHs on vehicles - class GVAR(vehicleGunnerEnabled) { - category = CSTRING(DisplayName); - displayName = "Enabled For Vehicle Gunners"; - description = "Enables advanced ballistics for vehicle gunners"; - typeName = "BOOL"; - value = 0; - }; - */ + }; class GVAR(ammoTemperatureEnabled) { category = CSTRING(DisplayName); displayName = CSTRING(ammoTemperatureEnabled_DisplayName); @@ -70,12 +40,6 @@ class ACE_Settings { description = CSTRING(simulationInterval_Description); typeName = "SCALAR"; value = 0.05; - }; - class GVAR(simulationRadius) { - category = CSTRING(DisplayName); - displayName = CSTRING(simulationRadius_DisplayName); - description = CSTRING(simulationRadius_Description); - typeName = "SCALAR"; - value = 3000; + sliderSettings[] = {0, 0.2, 0.05, 2}; }; }; diff --git a/addons/advanced_ballistics/CfgVehicles.hpp b/addons/advanced_ballistics/CfgVehicles.hpp index 151972ea02..c3a2650150 100644 --- a/addons/advanced_ballistics/CfgVehicles.hpp +++ b/addons/advanced_ballistics/CfgVehicles.hpp @@ -1,7 +1,7 @@ class CfgVehicles { class ACE_Module; class GVAR(ModuleSettings): ACE_Module { - scope = 2; + scope = 1; displayName = CSTRING(DisplayName); icon = QPATHTOF(UI\Icon_Module_Wind_ca.paa); category = "ACE"; @@ -17,38 +17,12 @@ class CfgVehicles { typeName = "BOOL"; defaultValue = 0; }; - class simulateForSnipers { - displayName = CSTRING(simulateForSnipers_DisplayName); - description = CSTRING(simulateForSnipers_Description); + class muzzleVelocityVariationEnabled { + displayName = CSTRING(muzzleVelocityVariationEnabled_DisplayName); + description = CSTRING(muzzleVelocityVariationEnabled_Description); typeName = "BOOL"; defaultValue = 1; }; - class simulateForGroupMembers { - displayName = CSTRING(simulateForGroupMembers_DisplayName); - description = CSTRING(simulateForGroupMembers_Description); - typeName = "BOOL"; - defaultValue = 0; - }; - class simulateForEveryone { - displayName = CSTRING(simulateForEveryone_DisplayName); - description = CSTRING(simulateForEveryone_Description); - typeName = "BOOL"; - defaultValue = 0; - }; - class disabledInFullAutoMode { - displayName = CSTRING(disabledInFullAutoMod_DisplayName); - description = CSTRING(disabledInFullAutoMod_Description); - typeName = "BOOL"; - defaultValue = 0; - }; - /* // TODO: We currently do not have firedEHs on vehicles - class vehicleGunnerEnabled { - displayName = "Enabled For Vehicle Gunners"; - description = "Enables advanced ballistics for vehicle gunners"; - typeName = "BOOL"; - defaultValue = 0; - }; - */ class ammoTemperatureEnabled { displayName = CSTRING(ammoTemperatureEnabled_DisplayName); description = CSTRING(ammoTemperatureEnabled_Description); @@ -73,15 +47,9 @@ class CfgVehicles { typeName = "NUMBER"; defaultValue = 0.05; }; - class simulationRadius { - displayName = CSTRING(simulationRadius_DisplayName); - description = CSTRING(simulationRadius_Description); - typeName = "NUMBER"; - defaultValue = 3000; - }; }; class ModuleDescription { description = CSTRING(Description); }; }; -}; \ No newline at end of file +}; diff --git a/addons/advanced_ballistics/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf index d60feb8311..1e0e6860da 100644 --- a/addons/advanced_ballistics/XEH_postInit.sqf +++ b/addons/advanced_ballistics/XEH_postInit.sqf @@ -9,19 +9,6 @@ GVAR(ProtractorStart) = CBA_missionTime; GVAR(allBullets) = []; GVAR(currentGrid) = 0; -GVAR(extensionAvailable) = true; -/* @TODO: Remove this until versioning is in sync with cmake/build versioning -GVAR(extensionVersion) = ("ace_advanced_ballistics" callExtension "version"); -GVAR(extensionAvailable) = (GVAR(extensionVersion) == EXTENSION_REQUIRED_VERSION); -if (!GVAR(extensionAvailable)) exitWith { - if (GVAR(extensionVersion) == "") then { - diag_log text "[ACE] ERROR: ace_advanced_ballistics.dll is missing"; - } else { - diag_log text "[ACE] ERROR: ace_advanced_ballistics.dll is incompatible"; - }; -}; -*/ - if (!hasInterface) exitWith {}; ["ace_settingsInitialized", { @@ -54,4 +41,4 @@ if (!hasInterface) exitWith {}; #ifdef DEBUG_MODE_FULL call FUNC(diagnoseWeapons); -#endif \ No newline at end of file +#endif diff --git a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf index fd086d65d1..d988d5f8ed 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf @@ -19,20 +19,16 @@ params ["_muzzleVelocityShiftTable", "_temperature"]; -// Check if muzzleVelocityShiftTable is Less Than 11 Entrys +// Check if muzzleVelocityShiftTable is less than 11 Entrys if ((count _muzzleVelocityShiftTable) < 11) exitWith {0}; private _muzzleVelocityShiftTableUpperLimit = _muzzleVelocityShiftTable select 10; -if (isNil "_muzzleVelocityShiftTableUpperLimit") exitWith { 0 }; +if (isNil "_muzzleVelocityShiftTableUpperLimit") exitWith {0}; // Find exact data index required for given temperature -private _temperatureIndexFunction = (_temperature + 15) / 5; +private _temperatureIndexFunction = 0 max ((_temperature + 15) / 5) min 10; -// lower and upper data index used for interpolation -private _temperatureIndexA = (0 max (floor(_temperatureIndexFunction))) min 10; -private _temperatureIndexB = (0 max (ceil(_temperatureIndexFunction))) min 10; +// Lower and upper data index used for interpolation +private _temperatureIndexA = floor(_temperatureIndexFunction); +private _temperatureIndexB = ceil(_temperatureIndexFunction); -// Interpolation ratio -private _interpolationRatio = _temperatureIndexFunction - floor(_temperatureIndexFunction); - -// Interpolation -(_muzzleVelocityShiftTable select _temperatureIndexA) * (1 - _interpolationRatio) + (_muzzleVelocityShiftTable select _temperatureIndexB) * _interpolationRatio // Return +linearConversion [_temperatureIndexA, _temperatureIndexB, _temperatureIndexFunction, _muzzleVelocityShiftTable select _temperatureIndexA, _muzzleVelocityShiftTable select _temperatureIndexB, true] // Return diff --git a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf index 746818623a..4c5cd47a29 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf @@ -19,8 +19,6 @@ */ #include "script_component.hpp" -scopeName "main"; - params ["_barrelLength", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocity"]; TRACE_4("params",_barrelLength,_muzzleVelocityTable,_barrelLengthTable,_muzzleVelocity); @@ -31,7 +29,7 @@ private _muzzleVelocityTableCount = count _muzzleVelocityTable; private _barrelLengthTableCount = count _barrelLengthTable; // Exit if tables are different sizes, have no elements or have only one element -if (_muzzleVelocityTableCount != _barrelLengthTableCount || _muzzleVelocityTableCount == 0 || _barrelLengthTableCount == 0) exitWith { 0 }; +if (_muzzleVelocityTableCount != _barrelLengthTableCount || _muzzleVelocityTableCount == 0) exitWith { 0 }; if (_muzzleVelocityTableCount == 1) exitWith { (_muzzleVelocityTable select 0) - _muzzleVelocity }; // If we have the precise barrel length value, return result immediately @@ -43,28 +41,15 @@ if (_barrelLength in _barrelLengthTable) exitWith { if (_barrelLength <= (_barrelLengthTable select 0)) exitWith { (_muzzleVelocityTable select 0) - _muzzleVelocity }; if (_barrelLength >= (_barrelLengthTable select _barrelLengthTableCount - 1)) exitWith { (_muzzleVelocityTable select _barrelLengthTableCount - 1) - _muzzleVelocity }; -private _upperDataIndex = -1; -private _lowerDataIndex = -1; +private _upperDataIndex = 0; +private _lowerDataIndex = 1; // Find closest bordering values for barrel length { - if (_barrelLength <= _x) then { + if (_barrelLength <= _x) exitWith { _upperDataIndex = _forEachIndex; _lowerDataIndex = _upperDataIndex - 1; - breakTo "main"; }; } forEach _barrelLengthTable; -// Worst case scenario -if (_upperDataIndex == -1 || _lowerDataIndex == -1) exitWith {0}; - -private _lowerBarrelLength = _barrelLengthTable select _lowerDataIndex; -private _upperBarrelLength = _barrelLengthTable select _upperDataIndex; -private _lowerMuzzleVelocity = _muzzleVelocityTable select _lowerDataIndex; -private _upperMuzzleVelocity = _muzzleVelocityTable select _upperDataIndex; - -// Calculate interpolation ratio -private _interpolationRatio = [0, (_upperBarrelLength - _barrelLength) / (_upperBarrelLength - _lowerBarrelLength)] select (abs (_lowerBarrelLength - _upperBarrelLength) > 0); - -// Calculate interpolated muzzle velocity shift -(_lowerMuzzleVelocity + ((_upperMuzzleVelocity - _lowerMuzzleVelocity) * (1 - _interpolationRatio))) - _muzzleVelocity // Return +(linearConversion [_barrelLengthTable select _lowerDataIndex, _barrelLengthTable select _upperDataIndex, _barrelLength, _muzzleVelocityTable select _lowerDataIndex, _muzzleVelocityTable select _upperDataIndex]) - _muzzleVelocity // Return diff --git a/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf b/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf index 40d065198c..4c929ac22d 100644 --- a/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf +++ b/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf @@ -18,14 +18,23 @@ #define DEBUG_MODE_FULL #include "script_component.hpp" +private _diagnoseStartTime = diag_tickTime; +#ifdef DEBUG_INIT_SPEEDS + private _data = []; + private _weapons = []; + private _magazines = []; + private _weaponInitSpeeds = []; + private _magazineInitSpeeds = []; +#endif + private _cfgWeapons = configFile >> "CfgWeapons"; for "_i" from 0 to (count _cfgWeapons)-1 do { private _weaponConfig = _cfgWeapons select _i; if (isClass _weaponConfig) then { private _weapon = configName _weaponConfig; private _weaponType = getNumber (_weaponConfig >> "Type"); - if (_weaponType == 1) then { - // The weapon is a primary weapon + if (_weaponType in [1, 2]) then { + // The weapon is a primary weapon or a handgun weapon private _weaponInitSpeed = getNumber (_weaponConfig >> "initSpeed"); private _magazines = getArray (_weaponConfig >> "magazines"); @@ -47,16 +56,78 @@ for "_i" from 0 to (count _cfgWeapons)-1 do { // AB initial speed -------------------------------- // Get Weapon and Ammo Configurations - private _AmmoCacheEntry = _ammo call FUNC(readAmmoDataFromConfig); - private _WeaponCacheEntry = _weapon call FUNC(readWeaponDataFromConfig); - _AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable"]; + private _AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo]; + if (isNil "_AmmoCacheEntry") then { + _AmmoCacheEntry = _ammo call FUNC(readAmmoDataFromConfig); + }; + private _WeaponCacheEntry = uiNamespace getVariable format[QGVAR(%1), _weapon]; + if (isNil "_WeaponCacheEntry") then { + _WeaponCacheEntry = _weapon call FUNC(readWeaponDataFromConfig); + }; + _AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocityVariationSD"]; _WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"]; private _barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _vanillaInitialSpeed] call FUNC(calculateBarrelLengthVelocityShift); private _abInitialSpeed = _vanillaInitialSpeed + _barrelVelocityShift; // -------------------------------------------------- - diag_log text format ["ABDiagnose,%1,%2,%3,%4,%5,%6,%7",_weapon,_magazine,_ammo,_magazineInitSpeed,_weaponInitSpeed,_vanillaInitialSpeed,_abInitialSpeed]; + + if (_weapon find "_base" == -1 && _weapon find "_Base" == -1) then { +#ifdef DEBUG_INIT_SPEEDS + _data pushBack [-_forEachIndex, _abInitialSpeed, _magazine, _weapon]; +#endif + if (_barrelLength > 0 && abs(_vanillaInitialSpeed - _abInitialSpeed) > abs(_abInitialSpeed) * 0.0025) then { + diag_log text format ["AB_Diagnose_initSpeed,%1,%2,%3,%4,%5,%6,%7,%8",_weapon,_magazine,_ammo,_magazineInitSpeed,_weaponInitSpeed,_vanillaInitialSpeed,_abInitialSpeed,_abInitialSpeed/_vanillaInitialSpeed]; + }; + if (_barrelTwist == 0) then { + diag_log text format ["AB_Diagnose_barrelTwist,%1,%2,%3,%4,%5",_weapon,_magazine,_ammo,_twistDirection,_barrelTwist]; + }; + if (_barrelLength == 0) then { + diag_log text format ["AB_Diagnose_barrelLength,%1,%2,%3,%4,%5",_weapon,_magazine,_ammo,_barrelLength]; + }; + }; } forEach _magazines; }; }; }; + +#ifdef DEBUG_INIT_SPEEDS + _data sort false; + { + _x params ["_magazineIndex", "_abInitialSpeed", "_magazine", "_weapon"]; + if (_magazines find _magazine == -1) then { + private _magSpeed = _abInitialSpeed; + private _ammoRef = getText (configFile >> "CfgMagazines" >> _magazine >> "ammo"); + if (_ammoRef != "") then { + { + private _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo"); + if (_ammo == _ammoRef) exitWith { + _magSpeed = _magazineInitSpeeds select _forEachIndex; + }; + } forEach _magazines; + }; + _magazines pushBack _magazine; + _magazineInitSpeeds pushBack round(_magSpeed); + }; + if (_weapons find _weapon == -1) then { + _weapons pushBack _weapon; + _magIndex = _magazines find _magazine; + _magSpeed = _magazineInitSpeeds select _magIndex; + _weaponInitSpeeds pushBack (_abInitialSpeed / _magSpeed); + }; + } forEach _data; + { + _x params ["_magazineIndex", "_abInitialSpeed", "_magazine", "_weapon"]; + _magIndex = _magazines find _magazine; + _magSpeed = _magazineInitSpeeds select _magIndex; + _wepIndex = _weapons find _weapon; + _wepSpeed = _weaponInitSpeeds select _wepIndex; + } forEach _data; + { + diag_log text format ["AB_WeaponInitSpeed,%1,%2", _x, _weaponInitSpeeds select _forEachIndex]; + } forEach _weapons; + { + diag_log text format ["AB_MagazineInitSpeed,%1,%2", _x, _magazineInitSpeeds select _forEachIndex]; + } forEach _magazines; +#endif + +diag_log format["AdvancedBallistics: Finished 'diagnoseWeapons' in %1 seconds", (diag_tickTime - _diagnoseStartTime) toFixed 2]; diff --git a/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf b/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf index cedd846634..af13926893 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf @@ -18,20 +18,17 @@ { _x params ["_bullet","_caliber","_bulletTraceVisible","_index"]; - private _bulletVelocity = velocity _bullet; - - private _bulletSpeed = vectorMagnitude _bulletVelocity; - - if (!alive _bullet || _bulletSpeed < 100) then { + if (!alive _bullet) then { GVAR(allBullets) deleteAt (GVAR(allBullets) find _x); } else { + private _bulletVelocity = velocity _bullet; private _bulletPosition = getPosASL _bullet; - if (_bulletTraceVisible && _bulletSpeed > 500) then { + if (_bulletTraceVisible && {vectorMagnitude _bulletVelocity > BULLET_TRACE_MIN_VELOCITY}) then { drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""]; }; - _bullet setVelocity (_bulletVelocity vectorAdd (parseSimpleArray ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, CBA_missionTime toFixed 6]))); + _bullet setVelocity (_bulletVelocity vectorAdd (parseSimpleArray ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6", _index, _bulletVelocity, _bulletPosition, wind, ASLToATL(_bulletPosition) select 2, CBA_missionTime toFixed 6]))); }; nil } count +GVAR(allBullets); diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 51d6629acc..e77aad33ad 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -19,28 +19,43 @@ //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); -private _abort = false; - if (!(_ammo isKindOf "BulletBase")) exitWith {}; if (!alive _projectile) exitWith {}; -if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {}; if (underwater _unit) exitWith {}; -if (!GVAR(simulateForEveryone) && !(local _unit)) then { - // The shooter is non local - _abort = true; - if (GVAR(simulateForSnipers)) then { - if (currentWeapon _unit == primaryWeapon _unit && count primaryWeaponItems _unit > 2) then { - private _opticsName = (primaryWeaponItems _unit) select 2; + +private _abort = !local _unit; +if (_abort) then { + private _bulletVelocity = velocity _projectile; + private _muzzleVelocity = vectorMagnitude _bulletVelocity; + + private _maxRange = uiNamespace getVariable format[QGVAR(maxRange_%1), _ammo]; + if (isNil "_maxRange") then { + private _airFriction = getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction"); + private _maxRange = if (_airFriction < 0) then { + private _maxTime = ((_vanillaInitialSpeed - BULLET_TRACE_MIN_VELOCITY) / (BULLET_TRACE_MIN_VELOCITY * -_airFriction * _vanillaInitialSpeed)) max getNumber(configFile >> "CfgAmmo" >> _ammo >> "tracerEndTime"); + -ln(1 - _airFriction * _vanillaInitialSpeed * _maxTime) / _airFriction + } else { + _vanillaInitialSpeed * getNumber(configFile >> "CfgAmmo" >> _ammo >> "tracerEndTime") + }; + uiNamespace setVariable [format[QGVAR(maxRange_%1), _ammo], _maxRange]; + }; + if (ACE_player distance _unit > _maxRange && {ACE_player distance ((getPosASL _unit) vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply _maxRange)) > _maxRange}) exitWith {}; + + private _ammoCount = (_unit ammo _muzzle) + 1; + private _tracersEvery = getNumber(configFile >> "CfgMagazines" >> _magazine >> "tracersEvery"); + private _lastRoundsTracer = getNumber(configFile >> "CfgMagazines" >> _magazine >> "lastRoundsTracer"); + if (_ammoCount <= _lastRoundsTracer || {_tracersEvery > 0 && {(_ammoCount - _lastRoundsTracer) % _tracersEvery == 0}}) exitWith { _abort = false }; + + if (GVAR(bulletTraceEnabled) && {_muzzleVelocity > BULLET_TRACE_MIN_VELOCITY} && {cameraView == "GUNNER"}) then { + if (currentWeapon ACE_player == binocular ACE_player) exitWith { _abort = false }; + if (currentWeapon ACE_player == primaryWeapon ACE_player && {count primaryWeaponItems ACE_player > 2}) then { + private _opticsName = (primaryWeaponItems ACE_player) select 2; private _opticType = getNumber(configFile >> "CfgWeapons" >> _opticsName >> "ItemInfo" >> "opticType"); - _abort = _opticType != 2; // We only abort if the non local shooter is not a sniper + if (_opticType == 2) exitWith { _abort = false }; }; }; - if (GVAR(simulateForGroupMembers) && _abort) then { - _abort = (group ACE_player) != (group _unit); - }; }; -//if (!GVAR(vehicleGunnerEnabled) && !(_unit isKindOf "Man")) then { _abort = true; }; // We currently do not have firedEHs on vehicles -if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; }; +if (_abort) exitWith {}; // Get Weapon and Ammo Configurations private _AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo]; @@ -52,44 +67,37 @@ if (isNil "_WeaponCacheEntry") then { _WeaponCacheEntry = _weapon call FUNC(readWeaponDataFromConfig); }; -_AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable"]; +_AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocityVariationSD"]; _WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"]; +private _temperature = nil; // We need the variable in this scope. So we need to init it here. +private _ammoCount = _unit ammo _muzzle; private _bulletVelocity = velocity _projectile; private _muzzleVelocity = vectorMagnitude _bulletVelocity; -private _barrelVelocityShift = 0; if (GVAR(barrelLengthInfluenceEnabled)) then { - _barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift); + _muzzleVelocity = _muzzleVelocity + ([_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift)); }; - -private _ammoTemperatureVelocityShift = 0; -private _temperature = nil; //Need the variable in this scope. So we need to init it here. - if (GVAR(ammoTemperatureEnabled)) then { _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); - _ammoTemperatureVelocityShift = ([_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift)); + _muzzleVelocity = _muzzleVelocity + ([_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift)); +}; +if (GVAR(muzzleVelocityVariationEnabled)) then { + private _time = round (CBA_missionTime / 2); + // Generate seed from publicly known values (via Cantor pairing function) + private _seed = 0.5 * (_time + _ammoCount) * (_time + _ammoCount + 1) + _ammoCount; + // Generate normally distributed random number (via Box–Muller transform) + private _z = sqrt(-2.0 * ln(0.00000001 max (-_seed random 1))) * cos(_seed random 360); + + _muzzleVelocity = _muzzleVelocity * (_z * _muzzleVelocityVariationSD + 1); }; -if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then { - private _muzzleVelocityShift = _barrelVelocityShift + _ammoTemperatureVelocityShift; - TRACE_4("shift",_muzzleVelocity,_muzzleVelocityShift, _barrelVelocityShift, _ammoTemperatureVelocityShift); - if (_muzzleVelocityShift != 0) then { - _muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift; - _bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift)); - _projectile setVelocity _bulletVelocity; - }; -}; - -if (_abort || !(GVAR(extensionAvailable))) exitWith { - if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then { - EGVAR(windDeflection,trackedBullets) pushBack [_projectile, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; - }; -}; +_bulletVelocity = (vectorNormalized _bulletVelocity) vectorMultiply _muzzleVelocity; +_projectile setVelocity _bulletVelocity; private _bulletTraceVisible = false; -if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then { +if (GVAR(bulletTraceEnabled) && {_muzzleVelocity > BULLET_TRACE_MIN_VELOCITY} && {cameraView == "GUNNER"}) then { if (currentWeapon ACE_player == binocular ACE_player) then { _bulletTraceVisible = true; } else { @@ -102,7 +110,7 @@ if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then { }; private _stabilityFactor = 1.5; -if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then { +if (_caliber * _bulletLength * _bulletMass * _barrelTwist > 0) then { if (isNil "_temperature") then { _temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight); }; @@ -112,7 +120,7 @@ if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) th GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000; -"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17", GVAR(currentbulletID), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _projectile, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, CBA_missionTime toFixed 6]; +"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _ammoCount, _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _transonicStabilityCoef, getPosASL _projectile, _bulletVelocity, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), EGVAR(weather,currentOvercast), CBA_missionTime toFixed 6]; GVAR(allBullets) pushBack [_projectile, _caliber, _bulletTraceVisible, GVAR(currentbulletID)]; diff --git a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf index ced2ffbf4e..a92982db21 100644 --- a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf +++ b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf @@ -22,14 +22,10 @@ params ["_logic","_units", "_activated"]; if !(_activated) exitWith {}; [_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(muzzleVelocityVariationEnabled), "muzzleVelocityVariationEnabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(ammoTemperatureEnabled), "ammoTemperatureEnabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(barrelLengthInfluenceEnabled), "barrelLengthInfluenceEnabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(bulletTraceEnabled), "bulletTraceEnabled"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(simulateForEveryone), "simulateForEveryone"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(disabledInFullAutoMode), "disabledInFullAutoMode"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(simulateForSnipers), "simulateForSnipers"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(simulateForGroupMembers), "simulateForGroupMembers"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(simulationInterval), "simulationInterval"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(simulationRadius), "simulationRadius"] call EFUNC(common,readSettingFromModule); GVAR(simulationInterval) = 0 max GVAR(simulationInterval) min 0.2; diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf index a1f40f5d13..4b522656ff 100644 --- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf +++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf @@ -17,9 +17,8 @@ if (!hasInterface) exitWith {}; if (!GVAR(enabled)) exitWith {}; -if (!GVAR(extensionAvailable)) exitWith {}; -private _initStartTime = CBA_missionTime; +private _initStartTime = diag_tickTime; private _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize"); if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith { @@ -41,9 +40,9 @@ INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldNa _args params ["_mapGrids", "_gridCells", "_initStartTime"]; if (GVAR(currentGrid) >= _gridCells) exitWith { - INFO_2("Finished terrain initialization in %1 seconds [world: %2]", ceil(CBA_missionTime - _initStartTime), worldName); + INFO_2("Finished terrain initialization in %1 seconds [world: %2]", (diag_tickTime - _initStartTime) toFixed 2, worldName); #ifdef DEBUG_MODE_FULL - systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(CBA_missionTime - _initStartTime)]; + systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", (diag_tickTime - _initStartTime) toFixed 2]; #endif [_idPFH] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf index c3e5838be2..2a5ccb4dfa 100644 --- a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf @@ -32,15 +32,15 @@ TRACE_1("Reading Ammo Config",_this); private _ammoConfig = configFile >> "CfgAmmo" >> _this; private _airFriction = getNumber(_ammoConfig >> "airFriction"); -private _caliber = getNumber(_ammoConfig >> "ACE_caliber"); -private _bulletLength = getNumber(_ammoConfig >> "ACE_bulletLength"); -private _bulletMass = getNumber(_ammoConfig >> "ACE_bulletMass"); -private _transonicStabilityCoef = getNumber(_ammoConfig >> "ACE_transonicStabilityCoef"); +private _caliber = 0 max getNumber(_ammoConfig >> "ACE_caliber"); +private _bulletLength = 0 max getNumber(_ammoConfig >> "ACE_bulletLength"); +private _bulletMass = 0 max getNumber(_ammoConfig >> "ACE_bulletMass"); +private _transonicStabilityCoef = 0 max getNumber(_ammoConfig >> "ACE_transonicStabilityCoef") min 1; if (_transonicStabilityCoef == 0) then { _transonicStabilityCoef = 0.5; }; private _dragModel = getNumber(_ammoConfig >> "ACE_dragModel"); -if (_dragModel == 0 || !(_dragModel in [1, 2, 5, 6, 7, 8])) then { +if (!(_dragModel in [1, 2, 5, 6, 7, 8])) then { _dragModel = 1; }; private _ballisticCoefficients = getArray(_ammoConfig >> "ACE_ballisticCoefficients"); @@ -49,6 +49,10 @@ private _atmosphereModel = getText(_ammoConfig >> "ACE_standardAtmosphere"); if (_atmosphereModel isEqualTo "") then { _atmosphereModel = "ICAO"; }; +private _muzzleVelocityVariationSD = DEFAULT_MUZZLE_VELOCITY_VARIATION_SD; +if (isNumber (_ammoConfig >> "ACE_muzzleVelocityVariationSD")) then { + _muzzleVelocityVariationSD = getNumber(_ammoConfig >> "ACE_muzzleVelocityVariationSD") / 100; +}; private _ammoTempMuzzleVelocityShifts = getArray(_ammoConfig >> "ACE_ammoTempMuzzleVelocityShifts"); private _muzzleVelocityTable = getArray(_ammoConfig >> "ACE_muzzleVelocities"); private _barrelLengthTable = getArray(_ammoConfig >> "ACE_barrelLengths"); @@ -89,7 +93,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then { }; }; -private _result = [_airFriction, _caliber, _bulletLength, _bulletMass, _transonicStabilityCoef, _dragModel, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _ammoTempMuzzleVelocityShifts, _muzzleVelocityTable, _barrelLengthTable]; +private _result = [_airFriction, _caliber, _bulletLength, _bulletMass, _transonicStabilityCoef, _dragModel, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _ammoTempMuzzleVelocityShifts, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocityVariationSD]; uiNamespace setVariable [format[QGVAR(%1), _this], _result]; diff --git a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf index af31a67fca..a0fa193b6f 100644 --- a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf @@ -20,8 +20,8 @@ private _weaponConfig = (configFile >> "CfgWeapons" >> _this); -private _barrelTwist = getNumber(_weaponConfig >> "ACE_barrelTwist"); -private _twistDirection = 1; +private _barrelTwist = 0 max getNumber(_weaponConfig >> "ACE_barrelTwist"); +private _twistDirection = [0, 1] select (_barrelTwist != 0); if (isNumber (_weaponConfig >> "ACE_twistDirection")) then { _twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection"); if !(_twistDirection in [-1, 0, 1]) then { @@ -29,7 +29,7 @@ if (isNumber (_weaponConfig >> "ACE_twistDirection")) then { }; }; -private _barrelLength = getNumber(_weaponConfig >> "ACE_barrelLength"); +private _barrelLength = 0 max getNumber(_weaponConfig >> "ACE_barrelLength"); private _result = [_barrelTwist, _twistDirection, _barrelLength]; diff --git a/addons/advanced_ballistics/script_component.hpp b/addons/advanced_ballistics/script_component.hpp index 48344f8ca3..bbd659670f 100644 --- a/addons/advanced_ballistics/script_component.hpp +++ b/addons/advanced_ballistics/script_component.hpp @@ -6,6 +6,8 @@ // #define DISABLE_COMPILE_CACHE // #define ENABLE_PERFORMANCE_COUNTERS +#define DEBUG_INIT_SPEEDS + #ifdef DEBUG_ENABLED_ADVANCEDBALLISTICS #define DEBUG_MODE_FULL #endif @@ -16,7 +18,6 @@ #include "\z\ace\addons\main\script_macros.hpp" -#define GRAVITY 9.80665 #define ABSOLUTE_ZERO_IN_CELSIUS -273.15 #define KELVIN(t) (t - ABSOLUTE_ZERO_IN_CELSIUS) #define CELSIUS(t) (t + ABSOLUTE_ZERO_IN_CELSIUS) @@ -27,4 +28,9 @@ #define STD_AIR_DENSITY_ICAO 1.22498 #define STD_AIR_DENSITY_ASM 1.20885 + // Standard deviation of the default muzzle velocity variation (0.3%) +#define DEFAULT_MUZZLE_VELOCITY_VARIATION_SD 0.003 + +#define BULLET_TRACE_MIN_VELOCITY 500 + #define EXTENSION_REQUIRED_VERSION "1.0" diff --git a/addons/advanced_ballistics/stringtable.xml b/addons/advanced_ballistics/stringtable.xml index 1beff014f3..8a2ee622d1 100644 --- a/addons/advanced_ballistics/stringtable.xml +++ b/addons/advanced_ballistics/stringtable.xml @@ -76,170 +76,22 @@ Engedélyezi a fejlett ballisztikát Включает продвинутую баллистику Abilita Balistica Avanzata - アドバンスド バリスティックスを有効化 + アドバンスド バリスティックス 고급 탄도학을 적용합니다 啟用先進彈道系統 启用先进弹道系统 - - Enabled For Snipers - Activada para francotiradores - Akt. dla snajperów - Für Scharfschützen aktiviert - Povoleno pro odstřelovače - Ativar para caçadores - Activé pour les snipers - Mesterlövészeknek engedélyezve - Включена для снайперов - Abilita per Tiratori Scelti - 狙撃手へ有効化 - 저격수만 적용 - 啟用給狙擊手 - 启用给狙击手 + + Enable Muzzle Velocity Variation + Variation der Mündungsgeschwindigkeit aktivieren + 銃口初速の変化 + Abilita Variazione Velocità Volata - - Enables advanced ballistics for non local snipers (when using high power optics) - Activa la balística avanzada para francotiradores no locales (cuando se usa una mira telescópica) - Aktywuje zaawansowaną balistykę dla nielokalnych snajperów (kiedy używają optyki) - Aktiviert die erweiterte Ballistik für nicht lokale Scharfschützen (bei Benutzung von Optiken mit starker Vergrößerung) - Aktivuje pokročilou balistiku pro nelokální odstřelovače (při použití optiky) - Ativa balística avançada para caçadores não locais (quando usando miras telescópicas) - Active la balistique avancée pour les snipers non locaux (en utilisant les optiques avancées) - Engedélyezi a fejlett ballisztikát nem-helyi mesterlövészeknek (nagy-teljesítményű optika használatakor) - Включает продвинутую баллистику для нелокальных снайперов (при использовании мощной оптики) - Abilita Balistica Avanzata per Tiratori Scelti non locali (con ottiche ad alto potenziale) - 非ローカルの狙撃手 (高倍率スコープを使っている場合)へアドバンスド バリスティックスを有効化します - 고급 탄도학을 비-저격수 인원에게도 적용합니다(고성능 조준경을 사용시) - 啟用先進彈道系統給非本地狙擊手(當使用高倍率光學瞄鏡時) - 启用先进弹道系统给非本地狙击手(当使用高倍率光学瞄镜时) - - - Enabled For Group Members - Activada para miembros de grupo - Akt. dla czł. grupy - Für Gruppenmitglieder aktiviert - Povoleno pro členy skupiny - Ativada para membros do grupo - Activé pour les membres groupés - Csoporttagoknak engedélyezve - Включена для группы - Abilita per Membri del Gruppo - グループ メンバーへ有効化 - 그룹 멤버도 적용 - 啟用給小隊成員 - 启用给小队成员 - - - Enables advanced ballistics for non local group members - Activada la balística avanzada para miembros de grupo no locales - Aktywuje zaawansowaną balistykę dla nielokalnych członków grupy - Aktiviert die erweiterte Ballistik für nicht lokale Gruppenmitglieder - Aktivuje pokročilou balistiku pro nelokální členy skupiny - Ativa balística avançada para membros de grupo não locais - Active la balistique avancée pour les membres du groupe non locaux - Engedélyezi a fejlett ballisztikát nem-helyi csoporttagoknak - Включает продвинутую баллистику для нелокальных членов группы - Abilita Balistica Avanzata per Membri non locali del Gruppo - 非ローカルのグループ メンバーへアドバンスド バリスティックスを有効化します - 고급 탄도학을 비-그룹멤버에게도 적용합니다 - 啟用先進彈道系統給非本地小隊成員 - 启用先进弹道系统给非本地小队成员 - - - Enabled For Everyone - Activada para todos - Akt. dla wszystkich - Für jeden aktiviert - Povoleno pro všechny - Ativada para todos - Activé pour tout le monde - Mindenkinek engedélyezve - Включена для всех - Abilita per tutti - 全員に有効化 - 모두에게 적용 - 啟用給所有人 - 启用给所有人 - - - Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer) - Activada la balística avanzada para todos los jugadores no locales (activarlo puede degradar el rendimiento durante grandes tiroteos en multijugador). - Aktywuje zaawansowaną balistykę dla wszystkich nielokalnych graczy (aktywacja tej opcji może spodowować spory spadek wydajności podczas ciężkiej wymiany ognia) - Aktiviert die erweiterte Ballistik für alle nicht lokalen Spieler (das Aktivieren dieser Funktion kann zur Beeinträchtigung des Spielerlebnisses im Multiplayer führen) - Aktivuje pokročilou balistiku pro všechny nelokální hráče (aktivace této možnosti způsobuje pokles FPS během velké přestřelky v multiplayeru) - Ativa balística avançada para todos os jogadores não locais (ativando isso pode degradar a performance durante troca de tiros intensas no multiplayer) - Active la balistique avancée pour tous les joueurs non locaux (activer cette option peut avoir un impact sur les performance en multi durant les grands échanges de tirs) - Engedélyezi a fejlett ballisztikát az összes nem-helyi játékosnak (ez a funkció leronthatja a teljesítményt intenzív többjátékos tűzharcok alatt) - Включает продвинутую баллистику для всех нелокальных игроков (включение этой опции может снизить производительность при массовых перестрелках в мультиплеере) - Abilita Balistica Avanzata per tutti i giocatori non locali (abilitare questo parametro potrebbe ridurre le prestazioni durante scontri intensi in multiplayer) - 非ローカルの全プレイヤーへアドバンスド バリスティックスを有効化します (マルチプレイで大規模な銃撃戦がおこなわれると、動作の低下を招きます) - 고급 탄도학을 모든 비-로컬그룹에게도 적용합니다(적용 후 대규모 전투시 성능하락을 유발할 수 있습니다) - 啟用先進彈道系統給所有非本地玩家 (啟用此功能後,在多人連線大量交火時可能會降低效能) - 启用先进弹道系统给所有非本地玩家 (启用此功能后,在多人连线大量交火时可能会降低效能) - - - Always Enabled For Group Members - Zawsze akt. dla czł. grupy - Siempre activada para miembros de grupo - Für Gruppenmitglieder immer aktiviert - Vždy povoleno pro členy skupiny - Sempre ativada para membros do grupo - Toujours activer pour les membres du groupe - Mindig engedélyezve csoporttagoknak - Всегда включена для членов группы - Sempre abilitato per Membri del Gruppo - 常にグループ メンバーへ有効化 - 그룹 멤버에게 항상 적용 - 永遠啟用給小隊成員 - 永远启用给小队成员 - - - Always enables advanced ballistics when a group member fires - Aktywuje zaawansowaną balistykę dla wszystkich członków grupy - Activada la balística avanzada siempre cuando miembros de grupo disparan - Aktiviert die erweiterte Ballistik immer, wenn ein Gruppenmitglied schießt - Aktivuje pokročilou balistiku pro členy skupiny - Sempre ative balística avançada quando um membro do grupo disparar - Active tout le temps la balistique avancée quand un membre du groupe ouvre le feu - Mindig engedélyezi a fejlett ballisztikát, ha egy csoporttag tüzel - Всегда включает продвинутую баллистику когда стреляет член группы - Abilita sempre Balistica Avanzata quando un membro del gruppo spara - グループ メンバーが射撃した時、常にアドバンスド バリスティックスを有効化します - 그룹 멤버가 발사시 항상 고급 탄도학을 적용합니다 - 當小隊成員開火時,永遠啟用先進彈道系統 - 当小队成员开火时,永远启用先进弹道系统 - - - Disabled In FullAuto Mode - Wył. podczas ognia auto. - Desactivada en modo automático - Beim vollautomatischen Feuern deaktiviert - Zakázáno v automatickém režimu střelby - Desabilitar no modo automático - Désactiver en mode automatique - Automata módban letiltva - Выкл. для автомат. режима - Disabilita in modalità di fuoco automatico - フルオートでは無効化 - 조정간 자동시 비활성화 - 在全自動模式時關閉 - 在全自动模式时关闭 - - - Disables the advanced ballistics during full auto fire - Dezaktywuje zaawansowaną balistykę podczas ognia automatycznego - Desactivada la balística avanzada durante el fuego automático - Deaktiviert die erweiterte Ballistik beim vollautomatischen Feuern - Zákáže pokročilou balistiku během střelby v režimu automat - Desabilitar a balística avançada durante fogo automático - Désactive la balistique avancée pour les tirs en automatique - Letiltja a fejlett ballisztikát automata tüzelés folyamán - Выключает продвинутую баллистику при стрельбе в полностью автоматическом режиме - Disabilita Balistica Avanzata durante fuoco automatico - フルオートで射撃中ではアドバンスド バリスティックスを無効化します - 조정간 자동시 고급 탄도학을 비활성화 합니다 - 在全自動模式開火時,關閉先進彈道系統 - 在全自动模式开火时,关闭先进弹道系统 + + Simulates slight variations in muzzle velocity between each shot + Simuliert leichte Variationen der Mündungsgeschwindigkeit zwischen jedem Schuss. + 発射毎に僅かな銃口初速の変化をシミュレートします。 + Simula lievi variazioni della velocità della volata tra un colpo e l'altro Enable Ammo Temperature Simulation @@ -252,7 +104,7 @@ Lőszer-hő szimuláció engedélyezése Симуляция температуры для боеприпасов Abilita simulazione della temperatura delle munizioni - 弾薬の温度シミュレーションを有効化 + 弾薬温度シミュレーション 탄약 온도 구현 적용 啟用彈藥溫度模擬系統 启用弹药温度模拟系统 @@ -268,7 +120,7 @@ A kezdősebesség a lőszer hőmérsékletétől függően változó Начальная скорость пули зависит от температуры La velocità dello sparo varia a seconda della temperatura delle munizioni - 弾薬の温度により初速値を変化させます + 弾薬の温度により銃口初速を変化させます 탄약 온도에 비례해 총구 속도가 달라집니다 子彈初速將隨彈藥溫度而有所變化 子弹初速将随弹药温度而有所变化 @@ -284,7 +136,7 @@ Csőhossz-szimuláció engedélyezése Симуляция длины ствола Abilita simulazione della lunghezza della canna - 銃身長のシミュレーションを有効化 + 銃身長シミュレーション 총열 길이 구현 적용 啟用槍管長度模擬系統 启用枪管长度模拟系统 @@ -300,7 +152,7 @@ A kezdősebesség a cső hosszától függően változó Начальная скорость пули зависит от длины ствола La velocità di sparo varia a seconda della lunghezza della canna - 銃身長により初速値を変化させます + 銃身長により銃口初速を変化させます 총구 속도가 총열에 비례해 달라집니다 子彈初速將隨槍管長度而有所變化 子弹初速将随枪管长度而有所变化 @@ -316,7 +168,7 @@ Nyomkövető-effekt engedélyezése Следы пуль Abilita effetto dei Proiettili Traccianti - 弾丸の痕跡表示を有効化 + 弾丸の痕跡表示 예광탄 효과 적용 啟用曳光彈效果 启用曳光弹效果 @@ -354,10 +206,10 @@ 模拟间隔 - Defines the interval between every calculation step + Defines the interval between each calculation step Określa interwał pomiędzy każdym krokiem kalkulacji Define el intervalo entre cada cálculo - Legt das Intervall zwischen den Berechnungsschritten fest + Definiert das Intervall zwischen den einzelnen Simulationsschritten Určuje interval mezi každým výpočtem Define o intervalo entre cada cálculo Définit un intervalle de calcul entre deux simulations @@ -380,7 +232,7 @@ Szimuláció hatóköre Радиус симуляции Raggio Simulazione - シミュレーションの適用範囲 + シミュレーション適用範囲 구현 범위 模擬半徑 模拟半径 diff --git a/addons/advanced_fatigue/ACE_Settings.hpp b/addons/advanced_fatigue/ACE_Settings.hpp index 8abdcc5865..2d46fd5eb3 100644 --- a/addons/advanced_fatigue/ACE_Settings.hpp +++ b/addons/advanced_fatigue/ACE_Settings.hpp @@ -20,6 +20,7 @@ class ACE_Settings { description = CSTRING(PerformanceFactor_Description); typeName = "SCALAR"; value = 1; + sliderSettings[] = {0, 5, 1, 1}; }; class GVAR(recoveryFactor) { category = CSTRING(DisplayName); @@ -27,6 +28,7 @@ class ACE_Settings { description = CSTRING(RecoveryFactor_Description); typeName = "SCALAR"; value = 1; + sliderSettings[] = {0, 5, 1, 1}; }; class GVAR(loadFactor) { category = CSTRING(DisplayName); @@ -34,6 +36,7 @@ class ACE_Settings { description = CSTRING(LoadFactor_Description); typeName = "SCALAR"; value = 1; + sliderSettings[] = {0, 5, 1, 1}; }; class GVAR(terrainGradientFactor) { category = CSTRING(DisplayName); @@ -41,5 +44,6 @@ class ACE_Settings { description = CSTRING(TerrainGradientFactor_Description); typeName = "SCALAR"; value = 1; + sliderSettings[] = {0, 5, 1, 1}; }; }; diff --git a/addons/advanced_fatigue/CfgVehicles.hpp b/addons/advanced_fatigue/CfgVehicles.hpp index 83026e2167..f6cead81e1 100644 --- a/addons/advanced_fatigue/CfgVehicles.hpp +++ b/addons/advanced_fatigue/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(DisplayName); function = QFUNC(moduleSettings); - scope = 2; + scope = 1; isGlobal = 1; isTriggerActivated = 0; icon = QPATHTOF(UI\Icon_Module.paa); diff --git a/addons/advanced_fatigue/stringtable.xml b/addons/advanced_fatigue/stringtable.xml index 3eacd2eedd..95b30d3c57 100644 --- a/addons/advanced_fatigue/stringtable.xml +++ b/addons/advanced_fatigue/stringtable.xml @@ -8,6 +8,7 @@ 进阶疲劳 アドバンスド疲労 Fatica Avanzata + 고급 피로도 Performance Factor diff --git a/addons/advanced_throwing/CfgAmmo.hpp b/addons/advanced_throwing/CfgAmmo.hpp index 9bcf6c37d8..51f5d08a31 100644 --- a/addons/advanced_throwing/CfgAmmo.hpp +++ b/addons/advanced_throwing/CfgAmmo.hpp @@ -4,4 +4,8 @@ class CfgAmmo { GVAR(torqueDirection)[] = {1, 1, 0}; GVAR(torqueMagnitude) = "(50 + random 100) * selectRandom [1, -1]"; }; + class GrenadeCore: Default { + GVAR(torqueDirection)[] = {1, 1, 0}; + GVAR(torqueMagnitude) = "(50 + random 100) * selectRandom [1, -1]"; + }; }; diff --git a/addons/advanced_throwing/CfgVehicles.hpp b/addons/advanced_throwing/CfgVehicles.hpp index 8faa1698f9..c3ee134968 100644 --- a/addons/advanced_throwing/CfgVehicles.hpp +++ b/addons/advanced_throwing/CfgVehicles.hpp @@ -7,7 +7,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(Category); function = QFUNC(moduleInit); - scope = 2; + scope = 1; isGlobal = 1; icon = QPATHTOF(UI\Icon_Module_AdvancedThrowing_ca.paa); class Arguments { diff --git a/addons/advanced_throwing/functions/fnc_canPrepare.sqf b/addons/advanced_throwing/functions/fnc_canPrepare.sqf index ba3fc53796..c95ec39c49 100644 --- a/addons/advanced_throwing/functions/fnc_canPrepare.sqf +++ b/addons/advanced_throwing/functions/fnc_canPrepare.sqf @@ -33,4 +33,6 @@ GVAR(enabled) && {!(call EFUNC(common,isFeatureCameraActive))} && {[_unit, objNull, ["isNotInside", "isNotSwimming", "isNotSitting"/*, "isNotOnLadder"*/]] call EFUNC(common,canInteractWith)} && // Ladder needs positioning fixes on throw -{_unit call CBA_fnc_canUseWeapon} // Disable in non-FFV seats due to surface detection issues +{_unit call CBA_fnc_canUseWeapon} && // Disable in non-FFV seats due to surface detection issues +{"" == currentWeapon _unit || {currentWeapon _unit != secondaryWeapon _unit}} && +{0 >= _unit getVariable [QEGVAR(common,effect_blockThrow), 0]} diff --git a/addons/advanced_throwing/functions/fnc_moduleInit.sqf b/addons/advanced_throwing/functions/fnc_moduleInit.sqf index fe380d2bb5..2e7ae18e42 100644 --- a/addons/advanced_throwing/functions/fnc_moduleInit.sqf +++ b/addons/advanced_throwing/functions/fnc_moduleInit.sqf @@ -17,8 +17,6 @@ */ #include "script_component.hpp" -if (!isServer) exitWith {}; - params ["_logic", "_units", "_activated"]; if (!_activated) exitWith {}; diff --git a/addons/advanced_throwing/functions/fnc_throw.sqf b/addons/advanced_throwing/functions/fnc_throw.sqf index b7019b49dd..038390ee74 100644 --- a/addons/advanced_throwing/functions/fnc_throw.sqf +++ b/addons/advanced_throwing/functions/fnc_throw.sqf @@ -49,9 +49,20 @@ if (!(_unit getVariable [QGVAR(primed), false])) then { _newVelocity = _newVelocity vectorAdd (velocity (vehicle _unit)); }; + // Calculate torque of thrown grenade private _config = configFile >> "CfgAmmo" >> typeOf _activeThrowable; - private _torqueDir = vectorNormalized (getArray (_config >> QGVAR(torqueDirection))); + private _torqueDir = getArray (_config >> QGVAR(torqueDirection)); + _torqueDir = if (_torqueDir isEqualTypeArray [0,0,0]) then { vectorNormalized _torqueDir } else { [0,0,0] }; private _torqueMag = getNumber (_config >> QGVAR(torqueMagnitude)); + + if (_dropMode) then { + _torqueMag = _torqueMag * THROWSTYLE_DROP_TORQUE_COEF; + } else { + if (_throwType == "high") then { + _torqueMag = _torqueMag * THROWSTYLE_HIGH_TORQUE_COEF; + }; + }; + private _torque = _torqueDir vectorMultiply _torqueMag; // Drop if unit dies during throw process diff --git a/addons/advanced_throwing/script_component.hpp b/addons/advanced_throwing/script_component.hpp index 4beb0ee342..c6ce7dcb84 100644 --- a/addons/advanced_throwing/script_component.hpp +++ b/addons/advanced_throwing/script_component.hpp @@ -23,6 +23,8 @@ #define THROWSTYLE_HIGH_DIR [0, 200, 500] #define THROWSTYLE_HIGH_VEL_COEF 2 #define THROWSTYLE_DROP_VEL 2 +#define THROWSTYLE_HIGH_TORQUE_COEF .6 +#define THROWSTYLE_DROP_TORQUE_COEF .2 #define THROW_TYPE_DEFAULT "normal" #define THROW_SPEED_DEFAULT 18 diff --git a/addons/advanced_throwing/stringtable.xml b/addons/advanced_throwing/stringtable.xml index e282981030..3157e767e5 100644 --- a/addons/advanced_throwing/stringtable.xml +++ b/addons/advanced_throwing/stringtable.xml @@ -28,7 +28,7 @@ Enable Advanced Throwing Включить улучшенный бросок - アドバンスド投てきを有効化 + アドバンスド投てき Aktywuj zaawansowane rzucanie Aktiviere erweitertes Wurfsystem 고급 투척 활성화 @@ -100,7 +100,7 @@ Enable Throwables Pick Up Включить подбор гранат - 投てき物の拾い上げを有効化 + 投てき物の拾い上げ Zezwól na podnoszenie obiektów miotanych Aktiviere Aufheben von Wurfobjekten 투척물 줍기 활성화 @@ -124,7 +124,7 @@ Enable Attached Throwables Pick Up Включить подбор прикрепленных гранат - 拾い上げた投てき物の取り付けを有効化 + 拾った投てき物の取り付け Zezwól na podnoszenie przyczepionych obiektów miotanych Aktiviere erneute Aufnahme befestigter Wurfobjekte 부착 투척물 줍기 활성화 @@ -172,7 +172,7 @@ Throwable Drop Mode (Toggle) Режим броска гранаты (переключить) - 投てきモード (切り替え) + 投てきモード (切替) Tryb upuszczania ob. miotanego (przełącz) Wurfobjekt Fallmodus (umschalten) 투척물 떨어뜨리기 모드(토글) @@ -184,7 +184,7 @@ Primed Подготовлена - 起動した + 作動させた Odbezpieczony Scharf gemacht 뇌관 작동 diff --git a/addons/ai/stringtable.xml b/addons/ai/stringtable.xml index 62e206bace..f4d2a816b2 100644 --- a/addons/ai/stringtable.xml +++ b/addons/ai/stringtable.xml @@ -8,6 +8,7 @@ Posizione invalida fornita. 提供的位置無效。 提供的位置无效。 + 위치가 잘못되었습니다. No units provided. @@ -16,6 +17,7 @@ Nessuna unità fornita. 找不到可用的單位。 找不到可用的单位。 + 병력이 없습니다. There aren't enough positions to place all units. @@ -24,6 +26,7 @@ Non ci sono abbastanza posizioni per piazzare tutte le unità. 沒有足夠的位置能擺放所有單位。 没有足够的位置能摆放所有单位。 + 모든 병력을 배치 할 공간이 없습니다. No building found. @@ -32,6 +35,7 @@ Nessun edificio trovato. 沒找到建築物。 没找到建筑物。 + 건물이 없습니다. diff --git a/addons/aircraft/CfgWeapons.hpp b/addons/aircraft/CfgWeapons.hpp index 2d16223e1d..5543925b5b 100644 --- a/addons/aircraft/CfgWeapons.hpp +++ b/addons/aircraft/CfgWeapons.hpp @@ -105,10 +105,5 @@ class CfgWeapons { dispersion = 0.0064; //0.0023; multiplier = 1; }; - - class close: HighROF {}; - class short: close {}; - class medium: LowROF {}; - class far: medium {}; }; }; diff --git a/addons/arsenal/$PBOPREFIX$ b/addons/arsenal/$PBOPREFIX$ new file mode 100644 index 0000000000..fea3434f4b --- /dev/null +++ b/addons/arsenal/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\arsenal \ No newline at end of file diff --git a/addons/arsenal/CfgEventHandlers.hpp b/addons/arsenal/CfgEventHandlers.hpp new file mode 100644 index 0000000000..becf395052 --- /dev/null +++ b/addons/arsenal/CfgEventHandlers.hpp @@ -0,0 +1,18 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_postInit)); + }; +}; diff --git a/addons/arsenal/XEH_PREP.hpp b/addons/arsenal/XEH_PREP.hpp new file mode 100644 index 0000000000..576115ad68 --- /dev/null +++ b/addons/arsenal/XEH_PREP.hpp @@ -0,0 +1,45 @@ +PREP(addListBoxItem); +PREP(addVirtualItems); +PREP(buttonCargo); +PREP(buttonClearAll); +PREP(buttonExport); +PREP(buttonHide); +PREP(buttonImport); +PREP(buttonLoadoutsDelete); +PREP(buttonLoadoutsLoad); +PREP(buttonLoadoutsRename); +PREP(buttonLoadoutsSave); +PREP(buttonLoadoutsShare); +PREP(clearSearchbar); +PREP(fillLeftPanel); +PREP(fillLoadoutsList); +PREP(fillRightPanel); +PREP(handleMouse); +PREP(handleScrollWheel); +PREP(handleSearchbar); +PREP(initBox); +PREP(itemInfo); +PREP(loadoutsChangeTab); +PREP(message); +PREP(onArsenalClose); +PREP(onArsenalOpen); +PREP(onKeyDown); +PREP(onLoadoutsClose); +PREP(onLoadoutsOpen); +PREP(onMouseButtonDown); +PREP(onMouseButtonUp); +PREP(onSelChangedLeft); +PREP(onSelChangedLoadouts); +PREP(onSelChangedRight); +PREP(onSelChangedRightListnBox); +PREP(open3DEN); +PREP(openBox); +PREP(removeBox); +PREP(removeVirtualItems); +PREP(scanConfig); +PREP(showItem); +PREP(sortPanel); +PREP(updateCamPos); +PREP(updateRightPanel); +PREP(updateUniqueItemsList); +PREP(verifyLoadout); diff --git a/addons/arsenal/XEH_postInit.sqf b/addons/arsenal/XEH_postInit.sqf new file mode 100644 index 0000000000..e18afc6cc0 --- /dev/null +++ b/addons/arsenal/XEH_postInit.sqf @@ -0,0 +1,82 @@ +#include "script_component.hpp" +#include "defines.hpp" + +GVAR(EH_ID) = 0; +GVAR(lastSearchTextLeft) = ""; +GVAR(lastSearchTextRight) = ""; + +[QGVAR(initBox), {_this call FUNC(initBox)}] call CBA_fnc_addEventHandler; +[QGVAR(removeBox), {_this call FUNC(removeBox)}] call CBA_fnc_addEventHandler; + +[QGVAR(broadcastFace), { + params ["_unit", "_face"]; + + _unit setFace _face; +}] call CBA_fnc_addEventHandler; + +[QGVAR(broadcastVoice), { + params ["_unit", "_voice"]; + + _unit setSpeaker _voice; +}] call CBA_fnc_addEventHandler; + +[QGVAR(loadoutUnshared), { + params ["_contentPanelCtrl" , "_playerName", "_loadoutName"]; + + if (!(isNil QGVAR(currentLoadoutsTab)) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then { + + private _dataToCheck = _playerName + _loadoutName; + + for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do { + if ((_contentPanelCtrl lnbData [_i, 1]) == _dataToCheck) exitwith {_contentPanelCtrl lnbDeleteRow _i}; + }; + } else { + + if ( + profileName == _playerName && + {!(isNil QGVAR(currentLoadoutsTab) && {GVAR(currentLoadoutsTab) == IDC_buttonMyLoadouts})} + ) then { + + for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do { + if ((_contentPanelCtrl lnbText [_i, 1]) == _loadoutName) exitwith { + _contentPanelCtrl lnbSetPicture [[_i, 0], QPATHTOF(data\iconPublicBlank.paa)]; + _contentPanelCtrl lnbSetValue [[_i, 0], 0]; + }; + }; + }; + }; +}] call CBA_fnc_addEventHandler; + +[QGVAR(loadoutShared), { + params ["_contentPanelCtrl" ,"_loadoutArgs"]; + _loadoutArgs params ["_playerName", "_loadoutName", "_loadoutData"]; + + if (!(isNil QGVAR(currentLoadoutsTab)) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then { + + private _curSelData =_contentPanelCtrl lnbData [(lnbCurSelRow _contentPanelCtrl), 1]; + ([_loadoutData] call FUNC(verifyLoadout)) params ["_loadout", "_nullItemsAmount", "_unavailableItemsAmount"]; + + private _newRow = _contentPanelCtrl lnbAddRow [_playerName, _loadoutName]; + + ADD_LOADOUTS_LIST_PICTURES + + _contentPanelCtrl lnbSetData [[_newRow, 1], _playerName + _loadoutName]; + + if (_nullItemsAmount > 0) then { + + _contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]]; + } else { + + if (_unavailableItemsAmount > 0) then { + _contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; + }; + }; + + _contentPanelCtrl lnbSort [1, false]; + + // Select previously selected loadout + for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do { + if ((_contentPanelCtrl lnbText [_i, 1]) == _curSelData) exitwith {_contentPanelCtrl lnbSetCurSelRow _i}; + }; + }; +}] call CBA_fnc_addEventHandler; diff --git a/addons/arsenal/XEH_preInit.sqf b/addons/arsenal/XEH_preInit.sqf new file mode 100644 index 0000000000..537af9c11d --- /dev/null +++ b/addons/arsenal/XEH_preInit.sqf @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +// Arsenal +GVAR(modList) = ["","curator","kart","heli","mark","expansion","expansionpremium"]; + +[QGVAR(camInverted), "CHECKBOX", localize LSTRING(invertCameraSetting), localize LSTRING(settingCategory), false] call CBA_Settings_fnc_init; +[QGVAR(enableModIcons), "CHECKBOX", [LSTRING(modIconsSetting), LSTRING(modIconsTooltip)], localize LSTRING(settingCategory), true] call CBA_Settings_fnc_init; +[QGVAR(fontHeight), "SLIDER", [LSTRING(fontHeightSetting), LSTRING(fontHeightTooltip)], localize LSTRING(settingCategory), [1, 10, 4.5, 1]] call CBA_Settings_fnc_init; + +// Arsenal loadouts +[QGVAR(allowDefaultLoadouts), "CHECKBOX", [LSTRING(allowDefaultLoadoutsSetting), LSTRING(defaultLoadoutsTooltip)], localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init; +[QGVAR(allowSharedLoadouts), "CHECKBOX", localize LSTRING(allowSharingSetting), localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init; +[QGVAR(EnableRPTLog), "CHECKBOX", [LSTRING(printToRPTSetting), LSTRING(printToRPTTooltip)], localize LSTRING(settingCategory), false, false] call CBA_Settings_fnc_init; + +ADDON = true; diff --git a/addons/arsenal/XEH_preStart.sqf b/addons/arsenal/XEH_preStart.sqf new file mode 100644 index 0000000000..ed7f4f0345 --- /dev/null +++ b/addons/arsenal/XEH_preStart.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" + +call FUNC(scanConfig); diff --git a/addons/arsenal/config.cpp b/addons/arsenal/config.cpp new file mode 100644 index 0000000000..dcf101e172 --- /dev/null +++ b/addons/arsenal/config.cpp @@ -0,0 +1,40 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author = ECSTRING(common,ACETeam); + authors[] = {"alganthe"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +class Cfg3DEN { + class Mission { + class GVAR(DummyCategory) { + displayName="Dummy attribute, should never show up"; + class AttributeCategories { + class ACE3_Arsenal { + class Attributes { + class GVAR(DefaultLoadoutsListAttribute) { + property = QGVAR(DefaultLoadoutsListAttribute); + value=0; + expression="if !(is3DEN) then {ace_arsenal_defaultLoadoutsList = _value};"; + defaultValue="[]"; + validate="none"; + wikiType="[[Array]]"; + }; + }; + }; + }; + }; + }; +}; + +#include "ui\RscAttributes.hpp" +#include "CfgEventHandlers.hpp" \ No newline at end of file diff --git a/addons/arsenal/data/iconClearContainer.paa b/addons/arsenal/data/iconClearContainer.paa new file mode 100644 index 0000000000..cf3ad52815 Binary files /dev/null and b/addons/arsenal/data/iconClearContainer.paa differ diff --git a/addons/arsenal/data/iconPublic.paa b/addons/arsenal/data/iconPublic.paa new file mode 100644 index 0000000000..d92675e8e2 Binary files /dev/null and b/addons/arsenal/data/iconPublic.paa differ diff --git a/addons/arsenal/data/iconPublicBlank.paa b/addons/arsenal/data/iconPublicBlank.paa new file mode 100644 index 0000000000..cf37c88b02 Binary files /dev/null and b/addons/arsenal/data/iconPublicBlank.paa differ diff --git a/addons/arsenal/data/iconSecondaryMuzzle.paa b/addons/arsenal/data/iconSecondaryMuzzle.paa new file mode 100644 index 0000000000..5cc7f17daa Binary files /dev/null and b/addons/arsenal/data/iconSecondaryMuzzle.paa differ diff --git a/addons/arsenal/defines.hpp b/addons/arsenal/defines.hpp new file mode 100644 index 0000000000..0f2b3ff62a --- /dev/null +++ b/addons/arsenal/defines.hpp @@ -0,0 +1,332 @@ +// Pixel grid +#define pixelScale 0.25 +#define GRID_W (pixelW * pixelGridNoUIScale * pixelScale) +#define GRID_H (pixelH * pixelGridNoUIScale * pixelScale) + +// IDCs +#define IDD_ace_arsenal 1127001 +#define IDC_mouseArea 0 +#define IDC_arrowMinus 101 +#define IDC_arrowPlus 102 +#define IDC_blockLeftFrame 3 +#define IDC_blockLeftBackground 4 +#define IDC_blockRightFrame 5 +#define IDC_blockRighttBackground 6 +#define IDC_loadIndicator 7 +#define IDC_loadIndicatorBar 701 +#define IDC_totalWeight 8 +#define IDC_totalWeightText 801 +#define IDC_message 9 +#define IDC_menuBar 10 +#define IDC_infoBox 11 +#define IDC_infoBackground 1101 +#define IDC_infoName 1102 +#define IDC_infoAuthor 1103 +#define IDC_DLCBackground 1104 +#define IDC_DLCIcon 1105 +#define IDC_mouseBlock 12 +#define IDC_leftTabContent 13 +#define IDC_rightTabContent 14 +#define IDC_rightTabContentListnBox 15 +#define IDC_sortLeftTab 16 +#define IDC_sortRightTab 17 +#define IDC_leftSearchbar 18 +#define IDC_leftSearchbarButton 41 +#define IDC_rightSearchbar 19 +#define IDC_rightSearchbarButton 42 +#define IDC_tabLeft 20 +#define IDC_iconBackgroundPrimaryWeapon 2001 +#define IDC_buttonPrimaryWeapon 2002 +#define IDC_iconBackgroundHandgun 2003 +#define IDC_buttonHandgun 2004 +#define IDC_iconBackgroundSecondaryWeapon 2005 +#define IDC_buttonSecondaryWeapon 2006 +#define IDC_iconBackgroundHeadgear 2007 +#define IDC_buttonHeadgear 2008 +#define IDC_iconBackgroundUniform 2009 +#define IDC_buttonUniform 2010 +#define IDC_iconBackgroundVest 2011 +#define IDC_buttonVest 2012 +#define IDC_iconBackgroundBackpack 2013 +#define IDC_buttonBackpack 2014 +#define IDC_iconBackgroundGoggles 2015 +#define IDC_buttonGoggles 2016 +#define IDC_iconBackgroundNVG 2017 +#define IDC_buttonNVG 2018 +#define IDC_iconBackgroundBinoculars 2019 +#define IDC_buttonBinoculars 2020 +#define IDC_iconBackgroundMap 2021 +#define IDC_buttonMap 2022 +#define IDC_iconBackgroundGPS 2023 +#define IDC_buttonGPS 2024 +#define IDC_iconBackgroundRadio 2025 +#define IDC_buttonRadio 2026 +#define IDC_iconBackgroundCompass 2028 +#define IDC_buttonCompass 2029 +#define IDC_iconBackgroundWatch 2030 +#define IDC_buttonWatch 2031 +#define IDC_iconBackgroundFace 2032 +#define IDC_buttonFace 2033 +#define IDC_iconBackgroundVoice 2034 +#define IDC_buttonVoice 2035 +#define IDC_iconBackgroundInsigna 2036 +#define IDC_buttonInsigna 2037 +#define IDC_iconBackgroundOptic 21 +#define IDC_buttonOptic 22 +#define IDC_iconBackgroundItemAcc 23 +#define IDC_buttonItemAcc 24 +#define IDC_iconBackgroundMuzzle 25 +#define IDC_buttonMuzzle 26 +#define IDC_iconBackgroundBipod 27 +#define IDC_buttonBipod 28 +#define IDC_iconBackgroundCurrentMag 3001 +#define IDC_buttonCurrentMag 3002 +#define IDC_iconBackgroundCurrentMag2 3003 +#define IDC_buttonCurrentMag2 3004 +#define IDC_iconBackgroundMag 29 +#define IDC_buttonMag 30 +#define IDC_iconBackgroundMagALL 31 +#define IDC_buttonMagALL 32 +#define IDC_iconBackgroundThrow 33 +#define IDC_buttonThrow 34 +#define IDC_iconBackgroundPut 35 +#define IDC_buttonPut 36 +#define IDC_iconBackgroundMisc 37 +#define IDC_buttonMisc 38 +#define IDC_buttonRemoveAllSelected 39 +#define IDC_buttonRemoveAll 40 + +#define IDD_loadouts_display 1127002 +#define IDC_centerBox 3 +#define IDC_centerTitle 301 +#define IDC_contentPanel 302 +#define IDC_textEditBox 303 +#define IDC_buttonSave 304 +#define IDC_buttonLoad 305 +#define IDC_buttonShare 306 +#define IDC_buttonDelete 307 +#define IDC_buttonRename 308 +#define IDC_buttonMyLoadoutsBackground 401 +#define IDC_buttonMyLoadouts 402 +#define IDC_buttonDefaultLoadoutsBackground 403 +#define IDC_buttonDefaultLoadouts 404 +#define IDC_buttonSharedLoadoutsBackground 405 +#define IDC_buttonSharedLoadouts 406 + +#define FADE_DELAY 0.15 +#define CAM_DIS_MAX 5 + +#define RIGHT_PANEL_ACC_IDCS IDC_buttonOptic, IDC_buttonItemAcc, IDC_buttonMuzzle, IDC_buttonBipod +#define RIGHT_PANEL_ACC_BACKGROUND_IDCS IDC_iconBackgroundOptic, IDC_iconBackgroundItemAcc, IDC_iconBackgroundMuzzle, IDC_iconBackgroundBipod +#define RIGHT_PANEL_ITEMS_IDCS IDC_buttonMag, IDC_buttonMagALL, IDC_buttonThrow, IDC_buttonPut, IDC_buttonMisc +#define RIGHT_PANEL_ITEMS_BACKGROUND_IDCS IDC_iconBackgroundMag, IDC_iconBackgroundMagALL, IDC_iconBackgroundThrow, IDC_iconBackgroundPut, IDC_iconBackgroundMisc +#define ARROWS_IDCS IDC_arrowMinus, IDC_arrowPlus + +#define GETDLC\ + {\ + private _dlc = "";\ + private _addons = configsourceaddonlist _this;\ + if (count _addons > 0) then {\ + private _mods = configsourcemodlist (configfile >> "CfgPatches" >> _addons select 0);\ + if (count _mods > 0) then {\ + _dlc = _mods select 0;\ + };\ + };\ + _dlc\ + } + +#define ADDMODICON\ + {\ + private _dlcName = _this call GETDLC;\ + if (_dlcName != "") then {\ + _ctrlPanel lbsetpictureright [_lbAdd,(modParams [_dlcName,["logo"]]) param [0,""]];\ + _modID = GVAR(modList) find _dlcName;\ + if (_modID < 0) then {_modID = GVAR(modList) pushback _dlcName;};\ + _ctrlPanel lbsetvalue [_lbAdd,_modID];\ + };\ + }; + +#define ADDBINOCULARSMAG\ + private _magazines = getarray (configfile >> "cfgweapons" >> _item >> "magazines");\ + if (count _magazines > 0) then {GVAR(center) addmagazine (_magazines select 0)}; + +#define TOGGLE_RIGHT_PANEL_WEAPON\ +{\ + _x = _display displayCtrl _x;\ + _x ctrlSetFade 0;\ + _x ctrlShow true;\ + _x ctrlEnable true;\ + _x ctrlCommit FADE_DELAY;\ +} foreach [\ + IDC_blockRightFrame,\ + IDC_blockRighttBackground,\ + IDC_rightTabContent,\ + IDC_sortRightTab,\ + RIGHT_PANEL_ACC_IDCS,\ + IDC_rightSearchbar,\ + IDC_rightSearchbarButton,\ + IDC_buttonCurrentMag\ +];\ +private _buttonCurrentMag2Ctrl = _display displayCtrl IDC_buttonCurrentMag2;\ +if (GVAR(currentLeftPanel) == IDC_buttonPrimaryWeapon) then {\ + _buttonCurrentMag2Ctrl ctrlSetFade 0;\ + _buttonCurrentMag2Ctrl ctrlShow true;\ + _buttonCurrentMag2Ctrl ctrlEnable true;\ +} else {\ + _buttonCurrentMag2Ctrl ctrlSetFade 1;\ + _buttonCurrentMag2Ctrl ctrlShow false;\ + _buttonCurrentMag2Ctrl ctrlEnable false;\ +};\ +_buttonCurrentMag2Ctrl ctrlCommit FADE_DELAY;\ +{\ + _x = _display displayCtrl _x;\ + _x ctrlSetFade 1;\ + _x ctrlShow false;\ + _x ctrlEnable false;\ + _x ctrlCommit FADE_DELAY;\ +} foreach [\ + IDC_loadIndicator,\ + RIGHT_PANEL_ITEMS_IDCS,\ + IDC_rightTabContentListnBox,\ + RIGHT_PANEL_ITEMS_BACKGROUND_IDCS,\ + IDC_buttonRemoveAll\ +]; + +#define TOGGLE_RIGHT_PANEL_CONTAINER\ +{\ + _x = _display displayCtrl _x;\ + _x ctrlSetFade 0;\ + _x ctrlShow true;\ + _x ctrlEnable true;\ + _x ctrlCommit FADE_DELAY;\ +} foreach [\ + IDC_blockRightFrame, \ + IDC_blockRighttBackground,\ + IDC_loadIndicator,\ + IDC_rightTabContentListnBox,\ + IDC_sortRightTab,\ + IDC_tabRight,\ + RIGHT_PANEL_ACC_IDCS,\ + RIGHT_PANEL_ITEMS_IDCS,\ + IDC_rightSearchbar,\ + IDC_rightSearchbarButton\ +];\ +{\ + _x = _display displayCtrl _x;\ + _x ctrlSetFade 1;\ + _x ctrlShow false;\ + _x ctrlEnable false;\ + _x ctrlCommit FADE_DELAY;\ +} foreach [\ + IDC_buttonCurrentMag,\ + IDC_buttonCurrentMag2,\ + IDC_iconBackgroundCurrentMag,\ + IDC_iconBackgroundCurrentMag2\ +]; + +#define TOGGLE_RIGHT_PANEL_HIDE\ +{\ + _x = _display displayCtrl _x;\ + _x ctrlSetFade 1;\ + _x ctrlShow false;\ + _x ctrlEnable false;\ + _x ctrlCommit FADE_DELAY;\ +} foreach [\ + IDC_blockRightFrame,\ + IDC_blockRighttBackground,\ + IDC_loadIndicator,\ + IDC_rightTabContent,\ + IDC_rightTabContentListnBox,\ + IDC_sortRightTab,\ + RIGHT_PANEL_ACC_BACKGROUND_IDCS,\ + RIGHT_PANEL_ACC_IDCS,\ + RIGHT_PANEL_ITEMS_BACKGROUND_IDCS,\ + RIGHT_PANEL_ITEMS_IDCS,\ + IDC_buttonRemoveAll,\ + IDC_rightSearchbar,\ + IDC_rightSearchbarButton,\ + IDC_buttonCurrentMag,\ + IDC_buttonCurrentMag2,\ + IDC_iconBackgroundCurrentMag,\ + IDC_iconBackgroundCurrentMag2\ +]; + +#define LIST_DEFAULTS\ + [\ + [\ + (primaryweapon GVAR(center) call bis_fnc_baseWeapon),\ + (secondaryweapon GVAR(center) call bis_fnc_baseWeapon),\ + (handgunweapon GVAR(center) call bis_fnc_baseWeapon)\ + ],\ + [\ + [primaryWeaponItems GVAR(center), secondaryWeaponItems GVAR(center), handgunItems GVAR(center)],\ + [primaryWeaponMagazine GVAR(center), secondaryWeaponMagazine GVAR(center), handgunMagazine GVAR(center)]\ + ],\ + uniformItems GVAR(center) + vestItems GVAR(center) + backpackItems GVAR(center),\ + [headgear GVAR(center)],\ + [uniform GVAR(center)],\ + [vest GVAR(center)],\ + [backpack GVAR(center)],\ + [goggles GVAR(center)],\ + [hmd GVAR(center)],\ + [binocular GVAR(center)]\ +] + +#define CHECK_WEAPON_OR_ACC\ + _item in (_weaponsArray select 0) ||\ + {_item in (_weaponsArray select 1)} ||\ + {_item in (_weaponsArray select 2)} ||\ + {_item in (GVAR(virtualItems) select 9)} ||\ + {_item in (_accsArray select 0)} ||\ + {_item in (_accsArray select 1)} ||\ + {_item in (_accsArray select 2)} ||\ + {_item in (_accsArray select 3)} + +#define CHECK_ASSIGNED_ITEMS\ + _item in (GVAR(virtualItems) select 10) ||\ + {_item in (GVAR(virtualItems) select 11)} ||\ + {_item in (GVAR(virtualItems) select 12)} ||\ + {_item in (GVAR(virtualItems) select 13)} ||\ + {_item in (GVAR(virtualItems) select 14)} ||\ + {_item in (GVAR(virtualItems) select 8)} + +#define CHECK_CONTAINER\ + _item in (GVAR(virtualItems) select 4) ||\ + {_item in (GVAR(virtualItems) select 5)} ||\ + {_item in (GVAR(virtualItems) select 6)} + +#define CLASS_CHECK_ITEM\ + isClass (_weaponCfg >> _item) ||\ + {isClass (_vehcCfg >> _item)} ||\ + {isClass (_glassesCfg >> _item)} ||\ + {isClass (_magCfg >> _item)} + +#define CHECK_CONTAINER_ITEMS\ + _item in (GVAR(virtualItems) select 3) ||\ + {_item in (_accsArray select 0)} ||\ + {_item in (_accsArray select 1)} ||\ + {_item in (_accsArray select 2)} ||\ + {_item in (_accsArray select 3)} ||\ + {_item in (GVAR(virtualItems) select 4)} ||\ + {_item in (GVAR(virtualItems) select 5)} ||\ + {_item in (GVAR(virtualItems) select 6)} ||\ + {_item in (GVAR(virtualItems) select 7)} ||\ + {_item in (GVAR(virtualItems) select 8)} ||\ + {_item in (GVAR(virtualItems) select 10)} ||\ + {_item in (GVAR(virtualItems) select 11)} ||\ + {_item in (GVAR(virtualItems) select 12)} ||\ + {_item in (GVAR(virtualItems) select 13)} ||\ + {_item in (GVAR(virtualItems) select 14)} ||\ + {_item in (GVAR(virtualItems) select 15)} ||\ + {_item in (GVAR(virtualItems) select 16)} ||\ + {_item in (GVAR(virtualItems) select 17)} + +#define ADD_LOADOUTS_LIST_PICTURES\ + _contentPanelCtrl lnbSetPicture [[_newRow, 2], getText (configFile >> "cfgWeapons" >> ((_loadout select 0) select 0) >> "picture")];\ + _contentPanelCtrl lnbSetPicture [[_newRow, 3], getText (configFile >> "cfgWeapons" >> ((_loadout select 1) select 0) >> "picture")];\ + _contentPanelCtrl lnbSetPicture [[_newRow, 4], getText (configFile >> "cfgWeapons" >> ((_loadout select 2) select 0) >> "picture")];\ + _contentPanelCtrl lnbSetPicture [[_newRow, 5], getText (configFile >> "cfgWeapons" >> ((_loadout select 3) select 0) >> "picture")];\ + _contentPanelCtrl lnbSetPicture [[_newRow, 6], getText (configFile >> "cfgWeapons" >> ((_loadout select 4) select 0) >> "picture")];\ + _contentPanelCtrl lnbSetPicture [[_newRow, 7], getText (configFile >> "cfgVehicles" >> ((_loadout select 5) select 0) >> "picture")];\ + _contentPanelCtrl lnbSetPicture [[_newRow, 8], getText (configFile >> "cfgWeapons" >> (_loadout select 6) >> "picture")];\ + _contentPanelCtrl lnbSetPicture [[_newRow, 9], getText (configFile >> "cfgGlasses" >> (_loadout select 7) >> "picture")]; \ No newline at end of file diff --git a/addons/arsenal/functions/fnc_addListBoxItem.sqf b/addons/arsenal/functions/fnc_addListBoxItem.sqf new file mode 100644 index 0000000000..815e3511a8 --- /dev/null +++ b/addons/arsenal/functions/fnc_addListBoxItem.sqf @@ -0,0 +1,63 @@ +/* + * Author: Dedmen + * Add a listbox row. + * + * Arguments: + * 0: Config category (must be "CfgWeapons", "CfgVehicles", "CfgMagazines", "CfgVoice") + * 1: Classname + * 2: Panel control + * 3: Name of the picture entry in that Cfg class + * + * Return Value: + * None + * + * Public: Yes +*/ + +#include "script_component.hpp" +params ["_configCategory", "_className", "_ctrlPanel", ["_pictureEntryName", "picture", [""]]]; + +private _cacheNamespace = _ctrlPanel; //For better readability. + +private _cachedItemInfo = _cacheNamespace getVariable [_configCategory+_className, []]; + +//_cachedItemInfo == [_displayName, _itemPicture, _modPicture, _modID] +if (_cachedItemInfo isEqualTo []) then {//Not in cache. So get info and put into cache. + + private _configPath = configFile >> _configCategory >> _className; + + _cachedItemInfo set [0, getText (_configPath >> "displayName")]; + //if _pictureEntryName is empty then this item has no Icons. (Faces) + _cachedItemInfo set [1, if (_pictureEntryName isEqualTo "") then {""} else {getText (_configPath >> _pictureEntryName)}]; + + //get name of DLC + private _dlcName = ""; + private _addons = configsourceaddonlist _configPath; + if !(_addons isEqualTo []) then { + private _mods = configsourcemodlist (configfile >> "CfgPatches" >> _addons select 0); + if !(_mods isEqualTo []) then { + _dlcName = _mods select 0; + }; + }; + + if (_dlcName != "") then { + _cachedItemInfo set [2, (modParams [_dlcName,["logo"]]) param [0,""]];//mod picture + _modID = GVAR(modList) find _dlcName; + if (_modID < 0) then {_modID = GVAR(modList) pushback _dlcName;};//We keep a ordered list of all mods for sorting later. + _cachedItemInfo set [3, _modID];//mod ID + } else { + _cachedItemInfo set [2, ""];//mod picture + _cachedItemInfo set [3, 0];//mod ID + }; + _cacheNamespace setVariable [_configCategory+_className, _cachedItemInfo]; +}; + +_cachedItemInfo params ["_displayName", "_itemPicture", "_modPicture", "_modID"]; + +private _lbAdd = _ctrlPanel lbAdd _displayName; + +_ctrlPanel lbSetData [_lbAdd, _className]; +_ctrlPanel lbSetPicture [_lbAdd, _itemPicture]; +_ctrlPanel lbSetPictureRight [_lbAdd,["",_modPicture] select (GVAR(enableModIcons))]; +_ctrlPanel lbSetValue [_lbAdd,_modID]; +_ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _className]]; diff --git a/addons/arsenal/functions/fnc_addVirtualItems.sqf b/addons/arsenal/functions/fnc_addVirtualItems.sqf new file mode 100644 index 0000000000..742b305a89 --- /dev/null +++ b/addons/arsenal/functions/fnc_addVirtualItems.sqf @@ -0,0 +1,223 @@ +/* + * Author: Alganthe, Dedmen + * Add virtual items to the provided target. + * + * Arguments: + * 0: Target + * 1: Items + * 2: Add globally + * + * Return Value: + * None + * + * Example: + * [_box, ["item1", "item2", "itemN"]] call ace_arsenal_fnc_addVirtualItems + * [_box, true, false] call ace_arsenal_fnc_addVirtualItems + * + * Public: Yes +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params [["_object", objNull, [objNull]], ["_items", [], [true, []]], ["_global", false, [false]]]; + +if (_object == objNull) exitWith {}; +if (_items isEqualType [] && {count _items == 0}) exitWith {}; + +private _cargo = _object getVariable [QGVAR(virtualItems), [ + [[], [], []], // Weapons 0, primary, secondary, handgun + [[], [], [], []], // WeaponAccessories 1, optic,side,muzzle,bipod + [ ], // Magazines 2 + [ ], // Headgear 3 + [ ], // Uniform 4 + [ ], // Vest 5 + [ ], // Backpacks 6 + [ ], // Goggles 7 + [ ], // NVGs 8 + [ ], // Binoculars 9 + [ ], // Map 10 + [ ], // Compass 11 + [ ], // Radio slot 12 + [ ], // Watch slot 13 + [ ], // Comms slot 14 + [ ], // WeaponThrow 15 + [ ], // WeaponPut 16 + [ ] // InventoryItems 17 +]]; + +private _configCfgWeapons = configFile >> "CfgWeapons"; //Save this lookup in variable for perf improvement + +if (_items isEqualType true && {_items}) then { + private _configItems = uiNamespace getVariable QGVAR(configItems); + + { + (_x select 0) append (_x select 1); + (_x select 2) set [(_x select 3), (_x select 0) arrayIntersect (_x select 0)]; + } forEach [ + [(_cargo select 0 select 0),(_configItems select 0 select 0), _cargo select 0, 0], + [(_cargo select 0 select 1),(_configItems select 0 select 1), _cargo select 0, 1], + [(_cargo select 0 select 2),(_configItems select 0 select 2), _cargo select 0, 2], + [(_cargo select 1 select 0),(_configItems select 1 select 0), _cargo select 1, 0], + [(_cargo select 1 select 1),(_configItems select 1 select 1), _cargo select 1, 1], + [(_cargo select 1 select 2),(_configItems select 1 select 2), _cargo select 1, 2], + [(_cargo select 1 select 3),(_configItems select 1 select 3), _cargo select 1, 3] + ]; + + for "_index" from 2 to 17 do { + (_cargo select _index) append (_configItems select _index); + _cargo set [_index, (_cargo select _index) arrayIntersect (_cargo select _index)]; + }; + +} else { + { + if (_x isEqualType "") then { + private _configItemInfo = _configCfgWeapons >> _x >> "ItemInfo"; + private _simulationType = getText (_configCfgWeapons >> _x >> "simulation"); + switch true do { + case (isClass (_configCfgWeapons >> _x)): { + switch true do { + /* Weapon acc */ + case ( + isClass (_configItemInfo) && + {(getNumber (_configItemInfo >> "type")) in [101, 201, 301, 302]} && + {!(_x isKindOf ["CBA_MiscItem", (_configCfgWeapons)])} + ): { + switch (getNumber (_configItemInfo >> "type")) do { + case 201: { + (_cargo select 1) select 0 pushBackUnique _x; + }; + case 301: { + (_cargo select 1) select 1 pushBackUnique _x; + }; + case 101: { + (_cargo select 1) select 2 pushBackUnique _x; + }; + case 302: { + (_cargo select 1) select 3 pushBackUnique _x; + }; + }; + }; + /* Headgear */ + case (isClass (_configItemInfo) && + {getNumber (_configItemInfo >> "type") == 605}): { + (_cargo select 3) pushBackUnique _x; + }; + /* Uniform */ + case (isClass (_configItemInfo) && + {getNumber (_configItemInfo >> "type") == 801}): { + (_cargo select 4) pushBackUnique _x; + }; + /* Vest */ + case (isClass (_configItemInfo) && + {getNumber (_configItemInfo >> "type") == 701}): { + (_cargo select 5) pushBackUnique _x; + }; + /* NVgs */ + case (_simulationType == "NVGoggles"): { + (_cargo select 8) pushBackUnique _x; + }; + /* Binos */ + case (_simulationType == "Binocular" || + {(_simulationType == 'Weapon') && {(getNumber (_configCfgWeapons >> _x >> 'type') == 4096)}}): { + (_cargo select 9) pushBackUnique _x; + }; + /* Map */ + case (_simulationType == "ItemMap"): { + (_cargo select 10) pushBackUnique _x; + }; + /* Compass */ + case (_simulationType == "ItemCompass"): { + (_cargo select 11) pushBackUnique _x; + }; + /* Radio */ + case (_simulationType == "ItemRadio"): { + (_cargo select 12) pushBackUnique _x; + }; + /* Watch */ + case (_simulationType == "ItemWatch"): { + (_cargo select 13) pushBackUnique _x; + }; + /* GPS */ + case (_simulationType == "ItemGPS"): { + (_cargo select 14) pushBackUnique _x; + }; + /* UAV terminals */ + case (isClass (_configItemInfo) && + {getNumber (_configItemInfo >> "type") == 621}): { + (_cargo select 14) pushBackUnique _x; + }; + /* Weapon, at the bottom to avoid adding binos */ + case (isClass (_configCfgWeapons >> _x >> "WeaponSlotsInfo") && + {getNumber (_configCfgWeapons >> _x >> 'type') != 4096}): { + switch (getNumber (_configCfgWeapons >> _x >> "type")) do { + case 1: { + (_cargo select 0) select 0 pushBackUnique ([_x] call bis_fnc_baseWeapon); + }; + case 2: { + (_cargo select 0) select 2 pushBackUnique ([_x] call bis_fnc_baseWeapon); + }; + case 4: { + (_cargo select 0) select 1 pushBackUnique ([_x] call bis_fnc_baseWeapon); + }; + }; + }; + /* Misc items */ + case ( + isClass (_configItemInfo) && + ((getNumber (_configItemInfo >> "type")) in [101, 201, 301, 302] && + {(_x isKindOf ["CBA_MiscItem", (_configCfgWeapons)])}) || + {(getNumber (_configItemInfo >> "type")) in [401, 619, 620]} || + {(getText (_configCfgWeapons >> _x >> "simulation")) == "ItemMineDetector"} + ): { + (_cargo select 17) pushBackUnique _x; + }; + }; + }; + case (isClass (configFile >> "CfgMagazines" >> _x)): { + // Lists to check against + private _grenadeList = []; + { + _grenadeList append getArray (_configCfgWeapons >> "Throw" >> _x >> "magazines"); + false + } count getArray (_configCfgWeapons >> "Throw" >> "muzzles"); + + private _putList = []; + { + _putList append getArray (_configCfgWeapons >> "Put" >> _x >> "magazines"); + false + } count getArray (_configCfgWeapons >> "Put" >> "muzzles"); + + // Check what the magazine actually is + switch true do { + // Rifle, handgun, secondary weapons mags + case ( + (getNumber (configFile >> "CfgMagazines" >> _x >> "type") in [256,512,1536,16]) && + {!(_x in _grenadeList)} && + {!(_x in _putList)} + ): { + (_cargo select 2) pushBackUnique _x; + }; + // Grenades + case (_x in _grenadeList): { + (_cargo select 15) pushBackUnique _x; + }; + // Put + case (_x in _putList): { + (_cargo select 16) pushBackUnique _x; + }; + }; + }; + case (isClass (configFile >> "CfgVehicles" >> _x)): { + if (getText (configFile >> "CfgVehicles" >> _x >> "vehicleClass") == "Backpacks") then { + (_cargo select 6) pushBackUnique _x; + }; + }; + case (isClass (configFile >> "CfgGlasses" >> _x)): { + (_cargo select 7) pushBackUnique _x; + }; + }; + }; + } foreach _items; +}; + +_object setVariable [QGVAR(virtualItems), _cargo, _global]; diff --git a/addons/arsenal/functions/fnc_buttonCargo.sqf b/addons/arsenal/functions/fnc_buttonCargo.sqf new file mode 100644 index 0000000000..1af4008caf --- /dev/null +++ b/addons/arsenal/functions/fnc_buttonCargo.sqf @@ -0,0 +1,92 @@ +/* + * Author: Alganthe + * Add or remove item(s) when the + or - button is pressed in the right panel. + * + * Arguments: + * 0: Arsenal display + * 1: Add or remove (-1: remove, 1: Add) + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_addOrRemove"]; + +private _load = 0; +private _maxLoad = ""; +private _items = []; +private _ctrlList = (_display displayCtrl IDC_rightTabContentListnBox); +private _lnbCurSel = lnbCurSelRow _ctrlList; +private _item = _ctrlList lnbData [_lnbCurSel, 0]; + +if ((_ctrlList lnbValue [_lnbCurSel, 2]) == 1 && {_addOrRemove == 1}) exitWith {}; + +// Update item count and currentItems array +switch GVAR(currentLeftPanel) do { + + case IDC_buttonUniform : { + if (_addOrRemove > 0) then { + for "_count" from 1 to ([1, 5] select (GVAR(shiftState))) do { + GVAR(center) addItemToUniform _item; + }; + } else { + for "_count" from 1 to ([1, 5] select (GVAR(shiftState))) do { + GVAR(center) removeItemFromUniform _item; + }; + }; + + _load = loadUniform GVAR(center); + _maxLoad = gettext (configfile >> "CfgWeapons" >> uniform GVAR(center) >> "ItemInfo" >> "containerClass"); + _items = uniformItems GVAR(center); + GVAR(currentItems) set [15 ,_items]; + }; + + case IDC_buttonVest : { + if (_addOrRemove > 0) then { + for "_count" from 1 to ([1, 5] select (GVAR(shiftState))) do { + GVAR(center) addItemToVest _item; + }; + } else { + for "_count" from 1 to ([1, 5] select (GVAR(shiftState))) do { + GVAR(center) removeItemFromVest _item; + }; + }; + + _load = loadVest GVAR(center); + _maxLoad = gettext (configfile >> "CfgWeapons" >> vest GVAR(center) >> "ItemInfo" >> "containerClass"); + _items = vestItems GVAR(center); + GVAR(currentItems) set [16,_items]; + }; + + case IDC_buttonBackpack : { + if (_addOrRemove > 0) then { + for "_count" from 1 to ([1, 5] select (GVAR(shiftState))) do { + GVAR(center) addItemToBackpack _item; + }; + } else { + for "_count" from 1 to ([1, 5] select (GVAR(shiftState))) do { + GVAR(center) removeItemFromBackpack _item; + }; + }; + + _load = loadBackpack GVAR(center); + _maxLoad = backpack GVAR(center); + _items = backpackItems GVAR(center); + GVAR(currentItems) set [17,_items]; + }; +}; + +// Update progress bar status, weight info +private _loadIndicatorBarCtrl = _display displayCtrl IDC_loadIndicatorBar; +_loadIndicatorBarCtrl progressSetPosition _load; + +private _value = {_x == _item} count _items; +_ctrlList lnbSetText [[_lnbCurSel, 2],str _value]; + +[QGVAR(cargoChanged), [_display, _item, _addOrRemove, GVAR(shiftState)]] call CBA_fnc_localEvent; + +[_ctrlList, _maxLoad] call FUNC(updateRightPanel); diff --git a/addons/arsenal/functions/fnc_buttonClearAll.sqf b/addons/arsenal/functions/fnc_buttonClearAll.sqf new file mode 100644 index 0000000000..d73d777ace --- /dev/null +++ b/addons/arsenal/functions/fnc_buttonClearAll.sqf @@ -0,0 +1,62 @@ +/* + * Author: Alganthe + * Clear the current container. + * + * Arguments: + * 0: Arsenal display + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display"]; + +// Clear container +switch (GVAR(currentLeftPanel)) do { + case IDC_buttonUniform: { + {GVAR(center) removeItemFromUniform _x} foreach (uniformItems GVAR(center)); + GVAR(currentItems) set [15, []]; + }; + case IDC_buttonVest: { + {GVAR(center) removeItemFromVest _x} foreach (vestItems GVAR(center)); + GVAR(currentItems) set [16, []]; + }; + case IDC_buttonBackpack: { + {GVAR(center) removeItemFromBackpack _x} foreach (backpackItems GVAR(center)); + GVAR(currentItems) set [17, []]; + }; +}; + +// Clear number of owned items +private _ctrlList = _display displayCtrl IDC_rightTabContentListnBox; + +for "_l" from 0 to (lbSize _ctrlList - 1) do { + _ctrlList lnbSetText [[_l, 2], str 0]; +}; + +private _removeAllCtrl = _display displayCtrl IDC_buttonRemoveAll; +_removeAllCtrl ctrlSetFade 1; +_removeAllCtrl ctrlCommit FADE_DELAY; + +// Update load bar +private _loadIndicatorBarCtrl = _display displayCtrl IDC_loadIndicatorBar; +_loadIndicatorBarCtrl progressSetPosition 0; + +private _maxLoad = switch (GVAR(currentLeftPanel)) do { + case IDC_buttonUniform: { + gettext (configfile >> "CfgWeapons" >> uniform GVAR(center) >> "ItemInfo" >> "containerClass") + }; + case IDC_buttonVest: { + gettext (configfile >> "CfgWeapons" >> vest GVAR(center) >> "ItemInfo" >> "containerClass") + }; + case IDC_buttonBackpack: { + backpack GVAR(center) + }; +}; + +private _control = _display displayCtrl IDC_rightTabContentListnBox; +[_control, _maxLoad] call FUNC(updateRightPanel); diff --git a/addons/arsenal/functions/fnc_buttonExport.sqf b/addons/arsenal/functions/fnc_buttonExport.sqf new file mode 100644 index 0000000000..7bcac4c8ba --- /dev/null +++ b/addons/arsenal/functions/fnc_buttonExport.sqf @@ -0,0 +1,51 @@ +/* + * Author: Alganthe + * Export current loadout / default loadouts list to clipboard. + * + * Arguments: + * 0: Arsenal display + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" + +params ["_display"]; + +if (GVAR(shiftState)) then { + + if (isNil QGVAR(defaultLoadoutsList) || {GVAR(defaultLoadoutsList) isEqualTo []}) exitWith { + [_display, localize LSTRING(exportDefaultError)] call FUNC(message); + }; + + private _listLength = count GVAR(defaultLoadoutsList); + for "_index" from -1 to _listLength do { + + switch true do { + case (_index == -1): { + "ace_clipboard" callExtension (format ["[%1", endl]); + }; + + case (_index == _listLength): { + "ace_clipboard" callExtension "];"; + }; + + default { + "ace_clipboard" callExtension ([" ",str (GVAR(defaultLoadoutsList) select _index), [",", ""] select (_index == _listLength - 1), endl] joinString ""); + }; + }; + }; + + "ace_clipboard" callExtension "--COMPLETE--"; + + [_display, localize LSTRING(exportDefault)] call FUNC(message); +} else { + + private _export = str getUnitLoadout GVAR(center); + "ace_clipboard" callExtension (_export + ";"); + "ace_clipboard" callExtension "--COMPLETE--"; + + [_display, localize LSTRING(exportCurrent)] call FUNC(message); +}; diff --git a/addons/arsenal/functions/fnc_buttonHide.sqf b/addons/arsenal/functions/fnc_buttonHide.sqf new file mode 100644 index 0000000000..d79ff779d1 --- /dev/null +++ b/addons/arsenal/functions/fnc_buttonHide.sqf @@ -0,0 +1,52 @@ +/* + * Author: Alganthe + * Hide / show arsenal interface. + * + * Arguments: + * 0: Arsenal display + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display"]; + +private _showToggle = !ctrlShown (_display displayCtrl IDC_menuBar); + +{ + private _ctrl = _display displayctrl _x; + _ctrl ctrlshow _showToggle; + _ctrl ctrlcommit 0.15; +} foreach [ + IDC_blockLeftFrame, + IDC_blockLeftBackground, + IDC_blockRightFrame, + IDC_blockRighttBackground, + IDC_loadIndicator, + IDC_totalWeight, + IDC_menuBar, + IDC_infoBox, + IDC_leftTabContent, + IDC_rightTabContent, + IDC_rightTabContentListnBox, + IDC_sortLeftTab, + IDC_sortRightTab, + IDC_leftSearchbarButton, + IDC_rightSearchbarButton, + IDC_leftSearchbar, + IDC_rightSearchbar, + IDC_tabLeft, + RIGHT_PANEL_ACC_BACKGROUND_IDCS, + RIGHT_PANEL_ACC_IDCS, + RIGHT_PANEL_ITEMS_BACKGROUND_IDCS, + RIGHT_PANEL_ITEMS_IDCS, + IDC_buttonRemoveAll, + IDC_buttonCurrentMag, + IDC_buttonCurrentMag2, + IDC_iconBackgroundCurrentMag, + IDC_iconBackgroundCurrentMag2 +]; diff --git a/addons/arsenal/functions/fnc_buttonImport.sqf b/addons/arsenal/functions/fnc_buttonImport.sqf new file mode 100644 index 0000000000..76cd2f3a75 --- /dev/null +++ b/addons/arsenal/functions/fnc_buttonImport.sqf @@ -0,0 +1,111 @@ +/* + * Author: Alganthe + * Import loadout / default loadouts list from clipboard. + * + * Arguments: + * 0: Arsenal display + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display"]; + +private _data = call (compile copyFromClipboard); + +if (isNil "_data" || {!(_data isEqualType [])}) exitWith { + [_display, localize LSTRING(importFormatError)] call FUNC(message); +}; + +if (GVAR(shiftState) && {is3DEN}) then { + + { + if ( + count _x == 2 && + {_x select 0 isEqualType ""} && + {_x select 0 != ""} && + {_x select 1 isEqualType []} && + {count (_x select 1) == 10} + ) then { + + _x params ["_loadoutName", "_loadout"]; + + private _sameNameLoadoutsList = GVAR(defaultLoadoutsList) select {_x select 0 == _loadoutName}; + + if (count _sameNameLoadoutsList == 0) then { + GVAR(defaultLoadoutsList) pushBack [_loadoutName, _loadout]; + } else { + GVAR(defaultLoadoutsList) set [GVAR(defaultLoadoutsList) find (_sameNameLoadoutsList select 0), _loadoutName, _loadout]; + }; + }; + } foreach _data; + + [_display, localize LSTRING(importedDefault)] call FUNC(message); + set3DENMissionAttributes [[QGVAR(DummyCategory), QGVAR(DefaultLoadoutsListAttribute), GVAR(defaultLoadoutsList)]]; + +} else { + if (count _data == 10) then { + GVAR(center) setUnitLoadout _data; + + GVAR(currentItems) = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", [], [], [], [], [], []]; + for "_index" from 0 to 15 do { + switch (_index) do { + case 0; + case 1; + case 2:{ + GVAR(currentItems) set [_index, ((LIST_DEFAULTS select 0) select _index)]; + }; + case 3; + case 4; + case 5; + case 6; + case 7; + case 8; + case 9: { + GVAR(currentItems) set [_index, (LIST_DEFAULTS select _index) select 0]; + + }; + case 10: { + {(GVAR(currentItems) select 15) pushBack _x} forEach (uniformItems GVAR(center)); + }; + case 11: { + {(GVAR(currentItems) select 16) pushBack _x} forEach (vestItems GVAR(center)); + }; + case 12: { + {(GVAR(currentItems) select 17) pushBack _x} forEach (backpackItems GVAR(center)); + }; + case 13: { + GVAR(currentItems) set [18, (primaryWeaponItems GVAR(center)) + (primaryWeaponMagazine GVAR(center))]; + }; + case 14: { + GVAR(currentItems) set [19, (secondaryWeaponItems GVAR(center)) + (secondaryWeaponMagazine GVAR(center))]; + }; + case 15: { + GVAR(currentItems) set [20, (handgunItems GVAR(center)) + (handgunMagazine GVAR(center))]; + }; + }; + }; + + + { + private _simulationType = getText (configFile >> "CfgWeapons" >> _x >> "simulation"); + private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch", "itemgps"] find (tolower _simulationType)); + + GVAR(currentItems) set [_index, _x]; + } foreach (assignedItems GVAR(center)); + + call FUNC(updateUniqueItemsList); + + // Reapply insignia + [GVAR(center), ""] call bis_fnc_setUnitInsignia; + [GVAR(center), GVAR(currentInsignia)] call bis_fnc_setUnitInsignia; + + [_display, _display displayCtrl GVAR(currentLeftPanel)] call FUNC(fillLeftPanel); + + [_display, localize LSTRING(importedCurrent)] call FUNC(message); + }; +}; diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsDelete.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsDelete.sqf new file mode 100644 index 0000000000..d3621f5826 --- /dev/null +++ b/addons/arsenal/functions/fnc_buttonLoadoutsDelete.sqf @@ -0,0 +1,55 @@ +/* + * Author: Alganthe + * Delete / unshare loadout currently selected. + * + * Arguments: + * 0: Arsenal display + * 1: Button control + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_control"]; + +if !(ctrlEnabled _control) exitWith {}; + +private _contentPanelCtrl = _display displayCtrl IDC_contentPanel; +private _contentPanelCursSel = lnbCurSelRow _contentPanelCtrl; +private _loadoutName = _contentPanelCtrl lnbText [_contentPanelCursSel, 1]; + +if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then { + + if (is3DEN && {GVAR(currentLoadoutsTab) == IDC_buttonDefaultLoadouts}) then { + GVAR(defaultLoadoutsList) deleteAt (GVAR(defaultLoadoutsList) find ((GVAR(defaultLoadoutsList) select {_x select 0 == _loadoutName}) select 0)); + set3DENMissionAttributes [[QGVAR(DummyCategory), QGVAR(DefaultLoadoutsListAttribute), GVAR(defaultLoadoutsList)]]; + } else { + private _data = profileNamespace getVariable [QGVAR(saved_loadouts), []]; + _data deleteAt (_data find ((_data select {_x select 0 == _loadoutName}) select 0)); + }; + + _contentPanelCtrl setVariable [_loadoutName + str GVAR(currentLoadoutsTab), nil]; + _contentPanelCtrl lnbDeleteRow _contentPanelCursSel; + _contentPanelCtrl lnbSetCurSelRow (_contentPanelCursSel); + + [(findDisplay IDD_ace_arsenal), [localize LSTRING(loadoutDeleted), _loadoutName] joinString " "] call FUNC(message); +} else { + + private _profileName = profileName; // GVAR(center) could be a remote unit + private _loadoutVar = _profileName + _loadoutName; + private _sharedLoadoutsVars = GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars); + + GVAR(sharedLoadoutsNamespace) setVariable [_loadoutVar, nil, true]; + GVAR(sharedLoadoutsNamespace) setVariable [QGVAR(sharedLoadoutsVars), _sharedLoadoutsVars - [_loadoutVar], true]; + + _contentPanelCtrl lnbDeleteRow _contentPanelCursSel; + _contentPanelCtrl lnbSetCurSelRow (_contentPanelCursSel); + + [QGVAR(loadoutUnshared), [_contentPanelCtrl, profileName, _loadoutName]] call CBA_fnc_remoteEvent; + + [(findDisplay IDD_ace_arsenal), [localize LSTRING(loadoutUnshared), _loadoutName] joinString " "] call FUNC(message); +}; diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsLoad.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsLoad.sqf new file mode 100644 index 0000000000..9d413a233c --- /dev/null +++ b/addons/arsenal/functions/fnc_buttonLoadoutsLoad.sqf @@ -0,0 +1,90 @@ +/* + * Author: Alganthe + * Load selected loadout. + * + * Arguments: + * 0: Arsenal display + * 1: Button control + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_control"]; + +if !(ctrlEnabled _control) exitWith {}; + +private _contentPanelCtrl = _display displayCtrl IDC_contentPanel; +private _curSel = lnbCurSelRow _contentPanelCtrl; +private _loadoutName = _contentPanelCtrl lnbText [_curSel, 1]; + +private _loadout = switch GVAR(currentLoadoutsTab) do { + + case IDC_buttonMyLoadouts; + case IDC_buttonDefaultLoadouts:{ + (_contentPanelCtrl getVariable _loadoutName + str GVAR(currentLoadoutsTab)) select 0 + }; + + case IDC_buttonSharedLoadouts:{ + (GVAR(sharedLoadoutsNamespace) getVariable ((_contentPanelCtrl lnbText [_curSel, 0]) + (_contentPanelCtrl lnbText [_curSel, 1]))) select 2 + }; +}; + +GVAR(center) setUnitLoadout [_loadout, true]; + +GVAR(currentItems) = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", [], [], [], [], [], []]; +for "_index" from 0 to 15 do { + switch (_index) do { + case 0; + case 1; + case 2:{ + GVAR(currentItems) set [_index, ((LIST_DEFAULTS select 0) select _index)]; + }; + case 3; + case 4; + case 5; + case 6; + case 7; + case 8; + case 9: { + GVAR(currentItems) set [_index, (LIST_DEFAULTS select _index) select 0]; + + }; + case 10: { + {(GVAR(currentItems) select 15) pushBack _x} forEach (uniformItems GVAR(center)); + }; + case 11: { + {(GVAR(currentItems) select 16) pushBack _x} forEach (vestItems GVAR(center)); + }; + case 12: { + {(GVAR(currentItems) select 17) pushBack _x} forEach (backpackItems GVAR(center)); + }; + case 13: { + GVAR(currentItems) set [18, (primaryWeaponItems GVAR(center)) + (primaryWeaponMagazine GVAR(center))]; + }; + case 14: { + GVAR(currentItems) set [19, (secondaryWeaponItems GVAR(center)) + (secondaryWeaponMagazine GVAR(center))]; + }; + case 15: { + GVAR(currentItems) set [20, (handgunItems GVAR(center)) + (handgunMagazine GVAR(center))]; + }; + }; +}; +{ + private _simulationType = getText (configFile >> "CfgWeapons" >> _x >> "simulation"); + private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch", "itemgps"] find (tolower _simulationType)); + + GVAR(currentItems) set [_index, _x]; +} foreach (assignedItems GVAR(center)); + +call FUNC(updateUniqueItemsList); + +// Reapply insignia +[GVAR(center), ""] call bis_fnc_setUnitInsignia; +[GVAR(center), GVAR(currentInsignia)] call bis_fnc_setUnitInsignia; + +[(findDisplay IDD_ace_arsenal), [localize LSTRING(loadoutLoaded), _loadoutName] joinString " "] call FUNC(message); diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsRename.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsRename.sqf new file mode 100644 index 0000000000..5435d07279 --- /dev/null +++ b/addons/arsenal/functions/fnc_buttonLoadoutsRename.sqf @@ -0,0 +1,70 @@ +/* + * Author: Alganthe + * Rename selected loadout. + * + * Arguments: + * 0: Arsenal display + * 1: Button control + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_control"]; + +if !(ctrlEnabled _control) exitWith {}; + +// Retrieve panel data +private _contentPanelCtrl = _display displayCtrl IDC_contentPanel; +private _curSelRow = lnbCurSelRow _contentPanelCtrl; +private _loadoutName = _contentPanelCtrl lnbText [_curSelRow, 1]; + +private _editBoxCtrl = _display displayCtrl IDC_textEditBox; +private _editBoxContent = ctrlText _editBoxCtrl; + +private _data = [profileNamespace getVariable [QGVAR(saved_loadouts), []], GVAR(defaultLoadoutsList)] select (GVAR(currentLoadoutsTab) == IDC_buttonDefaultLoadouts && {is3DEN}); +private _similarLoadouts = _data select {_x select 0 == _editBoxContent}; + +if (count _similarLoadouts > 0) exitWith { + [(findDisplay IDD_ace_arsenal), localize LSTRING(renameExistError)] call FUNC(message); +}; + +// Update loadout info in profile / 3DEN and list namespaces +private _loadoutToRename = (_data select {_x select 0 == _loadoutName}) select 0; +(_contentPanelCtrl getVariable (_loadoutName + str GVAR(currentLoadoutsTab))) params ["_loadout", "_nullItemsAmount", "_unavailableItemsAmount", "_nullItemsList", "_unavailableItemsList"]; + +_data set [_data find _loadoutToRename, [_editBoxContent, (_loadoutToRename select 1)]]; +_contentPanelCtrl setVariable [_loadoutName + str GVAR(currentLoadoutsTab), nil]; +_contentPanelCtrl setVariable [_editBoxContent + str GVAR(currentLoadoutsTab), [_loadout, _nullItemsAmount, _unavailableItemsAmount, _nullItemsList, _unavailableItemsList]]; + +// Add new row +_contentPanelCtrl lnbDeleteRow _curSelRow; +private _newRow = _contentPanelCtrl lnbAddRow ["",_editBoxContent]; + +ADD_LOADOUTS_LIST_PICTURES + +if (_nullItemsAmount > 0) then { + + _contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]]; +} else { + + if (_unavailableItemsAmount > 0) then { + _contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; + }; +}; + +// Sort and select the current row +_contentPanelCtrl lnbSort [1, false]; +for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do { + if ((_contentPanelCtrl lnbText [_i, 1]) == _editBoxContent) exitwith {_contentPanelCtrl lnbSetCurSelRow _i}; +}; + +if (is3DEN && {GVAR(currentLoadoutsTab) == IDC_buttonDefaultLoadouts}) then { + set3DENMissionAttributes [[QGVAR(DummyCategory), QGVAR(DefaultLoadoutsListAttribute), GVAR(defaultLoadoutsList)]]; +}; + +[(findDisplay IDD_ace_arsenal), [_loadoutName, localize LSTRING(loadoutRenamed) ,_editBoxContent] joinString " "] call FUNC(message); diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf new file mode 100644 index 0000000000..fecb6300e3 --- /dev/null +++ b/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf @@ -0,0 +1,288 @@ +/* + * Author: Alganthe + * Save selected loadout. + * + * Arguments: + * 0: Arsenal display + * 1: Button control + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_control"]; + +if !(ctrlEnabled _control) exitWith {}; + +private _editBoxCtrl = _display displayCtrl IDC_textEditBox; +private _editBoxContent = ctrlText _editBoxCtrl; + +if (_editBoxContent == "") exitWith { + [(findDisplay IDD_ace_arsenal), localize LSTRING(saveEmptyNameBox)] call FUNC(message); +}; + +private _data = [+(profileNamespace getVariable [QGVAR(saved_loadouts),[]]), +(GVAR(defaultLoadoutsList))] select (GVAR(currentLoadoutsTab) == IDC_buttonDefaultLoadouts && {is3DEN}); +private _contentPanelCtrl = _display displayCtrl IDC_contentPanel; +private _cursSelRow = lnbCurSelRow _contentPanelCtrl; + +private _loadoutName = _contentPanelCtrl lnbText [_cursSelRow, 1]; +private _curSelLoadout = (_contentPanelCtrl getVariable (_loadoutName + str GVAR(currentLoadoutsTab))) select 0; +private _loadout = getUnitLoadout GVAR(center); + +private _sameNameLoadoutsList = _data select {_x select 0 == _editBoxContent}; +private _sharedLoadoutsVars = GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars); + +// Make sure the loadout isn't yours (public tab) or being shared (my loadouts tab) +private _similarSharedLoadout = (profileName + _editBoxContent) in _sharedLoadoutsVars; +if ((_contentPanelCtrl lnbText [_cursSelRow, 0]) == profileName) exitWith { + [(findDisplay IDD_ace_arsenal), localize LSTRING(saveAuthorError)] call FUNC(message); +}; + +if (_similarSharedLoadout) exitWith { + [(findDisplay IDD_ace_arsenal), localize LSTRING(saveSharedError)] call FUNC(message); +}; + +switch (GVAR(currentLoadoutsTab)) do { + case IDC_buttonMyLoadouts:{ + + for "_dataIndex" from 0 to 10 do { + switch (_dataIndex) do { + + case 0; + case 1; + case 2; + case 8: { + if (count (_loadout select _dataIndex) > 0) then { + + private _weapon = (_loadout select _dataIndex) select 0; + if (_weapon != "") then { + + private _baseWeapon = _weapon call BIS_fnc_baseWeapon; + if (_weapon != _baseWeapon) then { + (_loadout select _dataIndex) set [0, _baseWeapon]; + }; + }; + }; + }; + + case 3; + case 4; + case 5: { + if (count (_loadout select _dataIndex) > 0) then { + private _containerContents = (_loadout select _dataIndex) select 1; + + if (count _containerContents > 0) then { + + { + if (count _x == 2) then { + + if ((_x select 0) isEqualType "") then { + + private _item = (_x select 0); + if (_item != "") then { + + private _uniqueBaseCfgText = getText (configFile >> "CfgWeapons" >> _item >> "ace_arsenal_uniqueBase"); + if (_uniqueBaseCfgText != "") then { + + _x set [0, _uniqueBaseCfgText]; + }; + }; + } else { + private _weapon = (_x select 0) select 0; + if (_weapon != "") then { + + private _baseWeapon = _weapon call BIS_fnc_baseWeapon; + if (_weapon != _baseWeapon) then { + (_x select 0)set [0, _baseWeapon]; + }; + }; + }; + }; + } foreach _containerContents; + }; + }; + }; + + case 9: { + for "_subIndex" from 0 to 4 do { + private _item = (_loadout select _dataIndex) select _subIndex; + + if (_item != "") then { + + private _uniqueBaseCfgText = getText (configFile >> "CfgWeapons" >> _item >> "ace_arsenal_uniqueBase"); + if (_uniqueBaseCfgText != "") then { + + (_loadout select _dataIndex) set [_subIndex, _uniqueBaseCfgText]; + }; + }; + }; + }; + }; + }; + + if (count _sameNameLoadoutsList == 0) then { + _data pushBack [_editBoxContent, _loadout]; + } else { + _data set [_data find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]]; + }; + + // Delete "old" loadout row + for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do { + if ((_contentPanelCtrl lnbText [_i, 1]) == _editBoxContent) exitwith {_contentPanelCtrl lnbDeleteRow _i}; + }; + + private _newRow = _contentPanelCtrl lnbAddRow ["",_editBoxContent]; + + ADD_LOADOUTS_LIST_PICTURES + + _contentPanelCtrl setVariable [_editBoxContent + str GVAR(currentLoadoutsTab), [_loadout] call FUNC(verifyLoadout)]; + + _contentPanelCtrl lnbSort [1, false]; + + // Select newly saved loadout + for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do { + if ((_contentPanelCtrl lnbText [_i, 1]) == _editBoxContent) exitwith {_contentPanelCtrl lnbSetCurSelRow _i}; + }; + + profileNamespace setVariable [QGVAR(saved_loadouts), _data]; + }; + + case IDC_buttonDefaultLoadouts:{ + + if (is3DEN) then { + + private _sameNameLoadoutsList = _data select {_x select 0 == _editBoxContent}; + + for "_dataIndex" from 0 to 10 do { + switch (_dataIndex) do { + + case 0; + case 1; + case 2; + case 8: { + if (count (_loadout select _dataIndex) > 0) then { + + private _weapon = (_loadout select _dataIndex) select 0; + if (_weapon != "") then { + + private _baseWeapon = _weapon call BIS_fnc_baseWeapon; + if (_weapon != _baseWeapon) then { + (_loadout select _dataIndex) set [0, _baseWeapon]; + }; + }; + }; + }; + + case 3; + case 4; + case 5: { + if (count (_loadout select _dataIndex) > 0) then { + private _containerContents = (_loadout select _dataIndex) select 1; + + if (count _containerContents > 0) then { + + { + if (count _x == 2) then { + + if ((_x select 0) isEqualType "") then { + + private _item = (_x select 0); + if (_item != "") then { + + private _uniqueBaseCfgText = getText (configFile >> "CfgWeapons" >> _item >> "ace_arsenal_uniqueBase"); + if (_uniqueBaseCfgText != "") then { + + _x set [0, _uniqueBaseCfgText]; + }; + }; + } else { + private _weapon = (_x select 0) select 0; + if (_weapon != "") then { + + private _baseWeapon = _weapon call BIS_fnc_baseWeapon; + if (_weapon != _baseWeapon) then { + (_x select 0)set [0, _baseWeapon]; + }; + }; + }; + }; + } foreach _containerContents; + }; + }; + }; + + case 9: { + for "_subIndex" from 0 to 4 do { + private _item = (_loadout select _dataIndex) select _subIndex; + + if (_item != "") then { + + private _uniqueBaseCfgText = getText (configFile >> "CfgWeapons" >> _item >> "ace_arsenal_uniqueBase"); + if (_uniqueBaseCfgText != "") then { + + (_loadout select _dataIndex) set [_subIndex, _uniqueBaseCfgText]; + }; + }; + }; + }; + }; + }; + + if (count _sameNameLoadoutsList == 0) then { + GVAR(defaultLoadoutsList) pushBack [_editBoxContent, _loadout]; + } else { + GVAR(defaultLoadoutsList) set [GVAR(defaultLoadoutsList) find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]]; + }; + + for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do { + if ((_contentPanelCtrl lnbText [_i, 1]) == _editBoxContent) exitwith {_contentPanelCtrl lnbDeleteRow _i}; + }; + + private _newRow = _contentPanelCtrl lnbAddRow ["",_editBoxContent]; + + ADD_LOADOUTS_LIST_PICTURES + + _contentPanelCtrl setVariable [_editBoxContent + str GVAR(currentLoadoutsTab), [_loadout] call FUNC(verifyLoadout)]; + + _contentPanelCtrl lnbSort [1, false]; + + // Select newly saved loadout + for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do { + if ((_contentPanelCtrl lnbText [_i, 1]) == _editBoxContent) exitwith {_contentPanelCtrl lnbSetCurSelRow _i}; + }; + + set3DENMissionAttributes [[QGVAR(DummyCategory), QGVAR(DefaultLoadoutsListAttribute), GVAR(defaultLoadoutsList)]]; + } else { + + if (count _sameNameLoadoutsList == 0) then { + _data pushBack [_editBoxContent, _curSelLoadout]; + } else { + _data set [_data find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _curSelLoadout]]; + _contentPanelCtrl setVariable [_editBoxContent + str IDC_buttonMyLoadouts, [_curSelLoadout] call FUNC(verifyLoadout)]; + }; + + profileNamespace setVariable [QGVAR(saved_loadouts), _data]; + }; + }; + + case IDC_buttonSharedLoadouts :{ + + _loadout = (GVAR(sharedLoadoutsNamespace) getVariable ((_contentPanelCtrl lnbText [_cursSelRow, 0]) + (_contentPanelCtrl lnbText [_cursSelRow, 1]))) select 2; + + if (count _sameNameLoadoutsList == 0) then { + _data pushBack [_editBoxContent, _loadout]; + } else { + _data set [_data find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]]; + _contentPanelCtrl setVariable [_editBoxContent + str IDC_buttonMyLoadouts, [_loadout] call FUNC(verifyLoadout)]; + }; + + profileNamespace setVariable [QGVAR(saved_loadouts), _data]; + }; +}; +[(findDisplay IDD_ace_arsenal), [localize LSTRING(loadoutSaved), _editBoxContent] joinString " "] call FUNC(message); +private _savedLoadout = (_data select {_x select 0 == _editBoxContent}) select 0; +[QGVAR(onLoadoutSave), [_data find _savedLoadout, _savedLoadout]] call CBA_fnc_localEvent; diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsShare.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsShare.sqf new file mode 100644 index 0000000000..d167522823 --- /dev/null +++ b/addons/arsenal/functions/fnc_buttonLoadoutsShare.sqf @@ -0,0 +1,55 @@ +/* + * Author: Alganthe + * Share selected loadout. + * + * Arguments: + * 0: Arsenal display + * 1: Button control + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_control"]; + +if !(ctrlEnabled _control) exitWith {}; + +private _contentPanelCtrl = _display displayCtrl IDC_contentPanel; +private _contentPanelCursSel = lnbCurSelRow _contentPanelCtrl; +private _loadoutName = _contentPanelCtrl lnbText [_contentPanelCursSel, 1]; +private _profileName = profileName; // GVAR(center) could be a remote unit +private _loadoutVar = _profileName + _loadoutName; +private _sharedLoadoutsVars = +(GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars)); + +private _loadoutIndex = _sharedLoadoutsVars find _loadoutVar; +private _loadoutData = (_contentPanelCtrl getVariable (_loadoutName + str GVAR(currentLoadoutsTab))) select 0; + +// Loadout set to private +if (_loadoutIndex > -1) then { + GVAR(sharedLoadoutsNamespace) setVariable [_loadoutVar, nil, true]; + GVAR(sharedLoadoutsNamespace) setVariable [QGVAR(sharedLoadoutsVars), _sharedLoadoutsVars - [_loadoutVar], true]; + + _contentPanelCtrl lnbSetPicture [[_contentPanelCursSel, 0], QPATHTOF(data\iconPublicBlank.paa)]; + _contentPanelCtrl lnbSetValue [[_contentPanelCursSel, 0], 0]; + [QGVAR(loadoutUnshared), [_contentPanelCtrl, profileName, _loadoutName]] call CBA_fnc_remoteEvent; + +// Loadout set to public +} else { + GVAR(sharedLoadoutsNamespace) setVariable [_loadoutVar, [_profileName ,_loadoutName , _loadoutData], true]; + _sharedLoadoutsVars pushBackUnique _loadoutVar; + GVAR(sharedLoadoutsNamespace) setVariable [QGVAR(sharedLoadoutsVars), _sharedLoadoutsVars, true]; + + _contentPanelCtrl lnbSetPicture [[_contentPanelCursSel, 0], QPATHTOF(data\iconPublic.paa)]; + _contentPanelCtrl lnbSetValue [[_contentPanelCursSel, 0], 1]; + [QGVAR(loadoutShared), [_contentPanelCtrl, [_profileName ,_loadoutName , _loadoutData]]] call CBA_fnc_remoteEvent; +}; + +// Update share button text +_control ctrlSetText ( [ + localize LSTRING(buttonSharePrivateText), + localize LSTRING(buttonSharePublicText) +] select ((_contentPanelCtrl lnbValue [_contentPanelCursSel, 0]) == 1)); diff --git a/addons/arsenal/functions/fnc_clearSearchbar.sqf b/addons/arsenal/functions/fnc_clearSearchbar.sqf new file mode 100644 index 0000000000..c417b6d1a4 --- /dev/null +++ b/addons/arsenal/functions/fnc_clearSearchbar.sqf @@ -0,0 +1,28 @@ +/* + * Author: Alganthe + * Clear the provided searchbar. + * + * Arguments: + * 0: Arsenal display + * 1: Searchbar control + * 2: Right button state + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_control", "_rightButton"]; + +if (_rightButton != 1) exitWith {}; + +_control ctrlSetText ''; + +if (ctrlIDC _control == IDC_leftSearchbar) then { + [_display, _display displayCtrl GVAR(currentLeftPanel)] call FUNC(fillLeftPanel); +} else { + [_display, _display displayCtrl GVAR(currentRightPanel)] call FUNC(fillRightPanel); +}; diff --git a/addons/arsenal/functions/fnc_fillLeftPanel.sqf b/addons/arsenal/functions/fnc_fillLeftPanel.sqf new file mode 100644 index 0000000000..83a4336ea0 --- /dev/null +++ b/addons/arsenal/functions/fnc_fillLeftPanel.sqf @@ -0,0 +1,189 @@ +/* + * Author: Alganthe + * Fill left panel. + * + * Arguments: + * 0: Arsenal display + * 1: Tab control + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_control"]; + +private _ctrlIDC = ctrlIDC _control; + +if !(isNil QGVAR(currentLeftPanel)) then { + private _previousCtrlBackground = _display displayCtrl (GVAR(currentLeftPanel) - 1); + _previousCtrlBackground ctrlSetFade 1; + _previousCtrlBackground ctrlCommit FADE_DELAY; +}; + +private _ctrlBackground = _display displayCtrl (_ctrlIDC - 1); +private _ctrlPanel = _display displayCtrl IDC_leftTabContent; +_ctrlBackground ctrlSetFade 0; +_ctrlBackground ctrlCommit FADE_DELAY; + +_ctrlPanel lbSetCurSel -1; + +// Handle icons and filling +switch true do { + case (_ctrlIDC in [IDC_buttonPrimaryWeapon, IDC_buttonHandgun, IDC_buttonSecondaryWeapon]) : { + // Purge old data + lbClear _ctrlPanel; + private _addEmpty = _ctrlPanel lbadd format [" <%1>",localize "str_empty"]; + _ctrlPanel lbsetvalue [_addEmpty, -1]; + + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach ((GVAR(virtualItems) select 0) select ([IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find _ctrlIDC)); + }; + + case (_ctrlIDC in [IDC_buttonUniform, IDC_buttonVest, IDC_buttonBackpack]) : { + + lbClear _ctrlPanel; + private _addEmpty = _ctrlPanel lbadd format [" <%1>",localize "str_empty"]; + _ctrlPanel lbsetvalue [_addEmpty, -1]; + + // Filling + switch (_ctrlIDC) do { + case IDC_buttonUniform : { + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (GVAR(virtualItems) select 4); + }; + + case IDC_buttonVest : { + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (GVAR(virtualItems) select 5); + }; + + case IDC_buttonBackpack : { + { + ["CfgVehicles", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (GVAR(virtualItems) select 6); + }; + }; + }; + + default { + GVAR(currentRightPanel) = nil; + + lbClear _ctrlPanel; + + if !(_ctrlIDC in [IDC_buttonFace, IDC_buttonVoice]) then { + private _addEmpty = _ctrlPanel lbadd format [" <%1>",localize "str_empty"]; + _ctrlPanel lbsetvalue [_addEmpty, -1]; + }; + + switch (_ctrlIDC) do { + case IDC_buttonHeadgear: { + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (GVAR(virtualItems) select 3); + }; + case IDC_buttonGoggles : { + { + ["CfgGlasses", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (GVAR(virtualItems) select 7); + }; + case IDC_buttonNVG : { + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (GVAR(virtualItems) select 8); + }; + case IDC_buttonBinoculars : { + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (GVAR(virtualItems) select 9); + }; + case IDC_buttonMap : { + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (GVAR(virtualItems) select 10); + }; + case IDC_buttonCompass : { + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (GVAR(virtualItems) select 11); + }; + case IDC_buttonRadio : { + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (GVAR(virtualItems) select 12); + }; + case IDC_buttonWatch : { + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (GVAR(virtualItems) select 13); + }; + case IDC_buttonGPS : { + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (GVAR(virtualItems) select 14); + }; + case IDC_buttonFace : { + { + { + if ( + getnumber (_x >> "disabled") == 0 && + {getText (_x >> "head") != ""} && + {configName _x != "Default"} + ) then { + private _configName = configName _x; + private _displayName = getText (_x >> "displayName"); + private _lbAdd = _ctrlPanel lbAdd _displayName; + _ctrlPanel lbSetData [_lbAdd, _configName]; + _ctrlPanel lbSetTooltip [_lbAdd,format ["%1\n%2",_displayName, _configName]]; + _x call ADDMODICON; + }; + } foreach ("isClass _x" configClasses _x); + } foreach ("isClass _x" configClasses (configfile >> "cfgfaces")); + }; + case IDC_buttonVoice : { + private _voices = (configProperties [(configFile >> "CfgVoice"), "isClass _x && {getNumber (_x >> 'scope') == 2}", true]) - [(configfile >> "CfgVoice" >> "NoVoice")]; + { + ["CfgVoice", configName _x, _ctrlPanel, "icon"] call FUNC(addListBoxItem); + } foreach _voices; + }; + case IDC_buttonInsigna : { + { + ["CfgUnitInsignia", configName _x, _ctrlPanel, "texture"] call FUNC(addListBoxItem); + } foreach ("true" configClasses (configFile >> "CfgUnitInsignia")); + }; + }; + }; +}; + +// Done +if (GVAR(currentLeftPanel) != _ctrlIDC) then { + (_display displayCtrl IDC_leftSearchbar) ctrlSetText ""; + (_display displayCtrl IDC_rightSearchbar) ctrlSetText ""; +}; + +GVAR(currentLeftPanel) = _ctrlIDC; +[QGVAR(leftPanelFilled), [_display, _ctrlIDC, GVAR(currentRightPanel)]] call CBA_fnc_localEvent; + +// Sort +private _sortLeftCtrl = _display displayCtrl IDC_sortLeftTab; +[_sortLeftCtrl, _sortLeftCtrl lbValue (lbCurSel _sortLeftCtrl)] call FUNC(sortPanel); + +//Select current item +private _itemsToCheck = ((GVAR(currentItems) select [0,15]) + [GVAR(currentFace), GVAR(currentVoice), GVAR(currentInsignia)]) apply {tolower _x}; + +for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do { + private _currentData = _ctrlPanel lbData _lbIndex; + + if (!(_currentData isEqualTo "") && {tolower _currentData in _itemsToCheck}) exitWith { + _ctrlPanel lbSetCurSel _lbIndex; + }; +}; +if (lbCurSel _ctrlPanel < 0) then { + _ctrlPanel lbSetCurSel 0; +}; diff --git a/addons/arsenal/functions/fnc_fillLoadoutsList.sqf b/addons/arsenal/functions/fnc_fillLoadoutsList.sqf new file mode 100644 index 0000000000..118581c160 --- /dev/null +++ b/addons/arsenal/functions/fnc_fillLoadoutsList.sqf @@ -0,0 +1,118 @@ +/* + * Author: Alganthe + * Fill loadouts list. + * + * Arguments: + * 0: Loadouts display + * 1: Tab control + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_control"]; + +private _contentPanelCtrl = _display displayCtrl IDC_contentPanel; +private _textEditBoxCtrl= _display displayCtrl IDC_textEditBox; +_textEditBoxCtrl ctrlSetText ""; +private _sharingEnabled = (GVAR(allowSharedLoadouts) && {isMultiplayer}); +private _sharedLoadoutsVars = GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars); + +_contentPanelCtrl lnbSetCurSelRow -1; +lnbClear _contentPanelCtrl; + +private _data = +(profileNamespace getvariable [QGVAR(saved_loadouts),[]]); + +if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then { + + { + _x params ["_loadoutName", "_loadoutData"]; + + private _loadoutCachedInfo = _contentPanelCtrl getVariable (_loadoutName + str GVAR(currentLoadoutsTab)); + + if (isNil "_loadoutCachedInfo") then { + [_loadoutData] call FUNC(verifyLoadout) + } else { + _loadoutCachedInfo + } params ["_loadout", "_nullItemsAmount", "_unavailableItemsAmount", "_nullItemsList", "_unavailableItemsList"]; + + // Log missing / nil items to RPT + if (GVAR(EnableRPTLog) && {isNil "_loadoutCachedInfo"} && {(_nullItemsAmount > 0) || {_unavailableItemsAmount > 0}}) then { + + private _printComponent = "ACE_Arsenal - Loadout:"; + private _printNullItemsList = ["Missing items:", str _nullItemsList] joinString " "; + private _printUnavailableItemsList = ["Unavailable items:", str _unavailableItemsList] joinString " "; + + diag_log text (format ["%1%5 %2%5 %3%5 %4", _printComponent, "Name: " + _loadoutName, _printNullItemsList, _printUnavailableItemsList, endl]); + }; + + if (GVAR(currentLoadoutsTab) == IDC_buttonDefaultLoadouts || {!_sharingEnabled}) then { + _contentPanelCtrl lnbSetColumnsPos [0, 0, 0.40, 0.50, 0.60, 0.70, 0.75, 0.80, 0.85, 0.90]; + } else { + _contentPanelCtrl lnbSetColumnsPos [0, 0.05, 0.40, 0.50, 0.60, 0.70, 0.75, 0.80, 0.85, 0.90]; + }; + + private _newRow = _contentPanelCtrl lnbAddRow ["",_loadoutName]; + + ADD_LOADOUTS_LIST_PICTURES + + if (_nullItemsAmount > 0) then { + + _contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]]; + } else { + + if (_unavailableItemsAmount > 0) then { + _contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; + }; + }; + + _contentPanelCtrl setVariable [_loadoutName + str GVAR(currentLoadoutsTab), [_loadout, _nullItemsAmount, _unavailableItemsAmount, _nullItemsList, _unavailableItemsList]]; + + if ((profileName + _loadoutName) in _sharedLoadoutsVars && {GVAR(currentLoadoutsTab) == IDC_buttonMyLoadouts}) then { + _contentPanelCtrl lnbSetPicture [[_newRow, 0], QPATHTOF(data\iconPublic.paa)]; + _contentPanelCtrl lnbSetValue [[_newRow, 0], 1]; + }; + } foreach ([_data, +GVAR(defaultLoadoutsList)] select (ctrlIDC _control == IDC_buttonDefaultLoadouts)); +} else { + + { + _x params ["_playerName", "_loadoutName", "_loadoutData"]; + + if ((allPlayers apply {name _x}) find _playerName == -1) then { + + private _loadoutVar = _playerName + _loadoutName; + + GVAR(sharedLoadoutsNamespace) setVariable [_loadoutVar, nil, true]; + _sharedLoadoutsVars = _sharedLoadoutsVars - [_loadoutVar]; + GVAR(sharedLoadoutsNamespace) setVariable [QGVAR(sharedLoadoutsNamespace), _sharedLoadoutsVars, true]; + + [QGVAR(loadoutUnshared), [_contentPanelCtrl, profileName, _loadoutName]] call CBA_fnc_remoteEvent; + } else { + + ([_loadoutData] call FUNC(verifyLoadout)) params ["_loadout", "_nullItemsAmount", "_unavailableItemsAmount"]; + + _contentPanelCtrl lnbSetColumnsPos [0, 0.15, 0.40, 0.50, 0.60, 0.70, 0.75, 0.80, 0.85, 0.90]; + private _newRow = _contentPanelCtrl lnbAddRow [_playerName, _loadoutName]; + + ADD_LOADOUTS_LIST_PICTURES + + _contentPanelCtrl lnbSetData [[_newRow, 1], _playerName + _loadoutName]; + + if (_nullItemsAmount > 0) then { + + _contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]]; + } else { + + if (_unavailableItemsAmount > 0) then { + _contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; + }; + }; + }; + } foreach (_sharedLoadoutsVars apply {GVAR(sharedLoadoutsNamespace) getVariable _x}); +}; + +_contentPanelCtrl lnbSort [1, false]; diff --git a/addons/arsenal/functions/fnc_fillRightPanel.sqf b/addons/arsenal/functions/fnc_fillRightPanel.sqf new file mode 100644 index 0000000000..99194b065e --- /dev/null +++ b/addons/arsenal/functions/fnc_fillRightPanel.sqf @@ -0,0 +1,361 @@ +/* + * Author: Alganthe + * Fill right panel. + * + * Arguments: + * 0: Arsenal display + * 1: Tab control + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_control"]; + +private _ctrlIDC = ctrlIDC _control; + +// Fade old control background +if !(isNil QGVAR(currentRightPanel)) then { + private _previousCtrlBackground = _display displayCtrl (GVAR(currentRightPanel) - 1); + _previousCtrlBackground ctrlSetFade 1; + _previousCtrlBackground ctrlCommit FADE_DELAY; +}; + +// Show new control background +private _ctrlBackground = _display displayCtrl (_ctrlIDC - 1); +_ctrlBackground ctrlShow true; +_ctrlBackground ctrlSetFade 0; +_ctrlBackground ctrlCommit FADE_DELAY; + +private _searchbarCtrl = _display displayCtrl IDC_rightSearchbar; + +if (!(ctrlShown _searchbarCtrl) || {ctrlFade _searchbarCtrl > 0}) then { + _searchbarCtrl ctrlShow true; + _searchbarCtrl ctrlSetFade 0; + _searchbarCtrl ctrlCommit 0; +}; + +private _fnc_fill_right_Container = { + params ["_configCategory", "_className", "_isMagazine", ["_isUnique", false, [false]]]; + + private _cacheNamespace = _ctrlPanel; + private _cachedItemInfo = _cacheNamespace getVariable [_configCategory+_className, []]; + + // Not in cache. So get info and put into cache + if (_cachedItemInfo isEqualTo []) then { + private _configPath = configFile >> _configCategory >> _className; + + _cachedItemInfo set [0, getText (_configPath >> "displayName")]; + _cachedItemInfo set [1, getText (_configPath >> "picture")]; + _cachedItemInfo set [2, [getNumber (_configPath >> "itemInfo" >> "mass"), getNumber (_configPath >> "mass")] select _isMagazine]; + + _cacheNamespace setVariable [_configCategory+_className, _cachedItemInfo]; + }; + + _cachedItemInfo params ["_displayName","_picture", "_mass"]; + + private _lbAdd = _ctrlPanel lnbAddRow ["", _displayName, "0"]; + private _columns = count lnbGetColumnsPosition _ctrlPanel; + + _ctrlPanel lnbSetData [[_lbAdd, 0], _x]; + _ctrlPanel lnbSetPicture [[_lbAdd, 0], _picture]; + _ctrlPanel lnbSetValue [[_lbAdd, 0], _mass]; + _ctrlPanel setVariable [_x, _mass]; + _ctrlPanel lnbSetValue [[_lbAdd, 2], [0, 1] select (_isUnique)]; + _ctrlPanel lbSetTooltip [_lbAdd * _columns,format ["%1\n%2", _displayName, _x]]; +}; + +// Retrieve compatible mags +private _compatibleItems = []; +private _compatibleMagazines = [[[], []], [[], []], [[], []]]; +{ + if (_x != "") then { + private _weaponConfig = (configFile >> "CfgWeapons" >> _x); + private _index = _forEachIndex; + + { + private _subIndex = _forEachIndex; + { + // Magazine group + if !(isClass (configFile >> "CfgMagazines" >> _x)) then { + private _magazineGroups = uiNamespace getVariable [QGVAR(magazineGroups),["#CBA_HASH#",[],[],[]]]; + private _magArray = [_magazineGroups, _x] call CBA_fnc_hashGet; + {((_compatibleMagazines select _index) select _subIndex) pushBackUnique _x} forEach _magArray; + } else { + ((_compatibleMagazines select _index) select _subIndex) pushBackUnique _x + } + } foreach ([getArray (_weaponConfig >> _x >> "magazines"), getArray (_weaponConfig >> "magazines")] select (_x == "this")); + } foreach getArray (_weaponConfig >> "muzzles"); + }; +} foreach [primaryWeapon GVAR(center), handgunWeapon GVAR(center), secondaryWeapon GVAR(center)]; + +private _itemsToCheck = []; +private _compatibleMagsPrimaryMuzzle = []; +private _compatibleMagsSecondaryMuzzle = []; + +private _allCompatibleMags = []; +{ + _allCompatibleMags append (_x select 0); + _allCompatibleMags append (_x select 1); +} foreach _compatibleMagazines; + +private _ctrlPanel = _display displayCtrl IDC_rightTabContent; + +switch (GVAR(currentLeftPanel)) do { + case IDC_buttonPrimaryWeapon : { + _compatibleMagsPrimaryMuzzle = _compatibleMagazines select 0 select 0; + _compatibleMagsSecondaryMuzzle = _compatibleMagazines select 0 select 1; + _compatibleItems = (primaryWeapon GVAR(center)) call bis_fnc_compatibleItems; + _itemsToCheck = GVAR(currentItems) select 18; + }; + + case IDC_buttonHandgun : { + _compatibleMagsPrimaryMuzzle = _compatibleMagazines select 1 select 0; + _compatibleMagsSecondaryMuzzle = _compatibleMagazines select 1 select 1; + _compatibleItems = (handgunWeapon GVAR(center)) call bis_fnc_compatibleItems; + _itemsToCheck = GVAR(currentItems) select 20; + }; + + case IDC_buttonSecondaryWeapon : { + _compatibleMagsPrimaryMuzzle = _compatibleMagazines select 2 select 0; + _compatibleMagsSecondaryMuzzle = _compatibleMagazines select 2 select 1; + _compatibleItems = (secondaryWeapon GVAR(center)) call bis_fnc_compatibleItems; + _itemsToCheck = GVAR(currentItems) select 19; + }; + + case IDC_buttonUniform; + case IDC_buttonVest; + case IDC_buttonBackpack : { + _ctrlPanel = _display displayCtrl IDC_rightTabContentListnBox; + }; +}; + +_itemsToCheck = _itemsToCheck apply {toLower _x}; +_compatibleItems = _compatibleItems apply {toLower _x}; + +lbClear (_display displayCtrl IDC_rightTabContentListnBox); +lbClear (_display displayCtrl IDC_rightTabContent); + +(_display displayCtrl IDC_rightTabContentListnBox) lbSetCurSel -1; +(_display displayCtrl IDC_rightTabContent) lbSetCurSel -1; + +private _leftPanelState = GVAR(currentLeftPanel) in [IDC_buttonPrimaryWeapon, IDC_buttonHandgun, IDC_buttonSecondaryWeapon]; + +if (_ctrlIDC in [RIGHT_PANEL_ACC_IDCS, IDC_buttonCurrentMag, IDC_buttonCurrentMag2] && {_leftPanelState}) then { + private _addEmpty = _ctrlPanel lbadd format [" <%1>",localize "str_empty"]; + _ctrlPanel lbsetvalue [_addEmpty, -1]; +}; + +switch (_ctrlIDC) do { + + case IDC_buttonOptic : { + if (_leftPanelState) then { + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (_compatibleItems arrayIntersect (((GVAR(virtualItems) select 1) select 0) apply {toLower _x})); + } else { + { + ["CfgWeapons", _x, false] call _fnc_fill_right_Container; + } foreach ((GVAR(virtualItems) select 1) select 0); + { + ["CfgWeapons", _x, false, true] call _fnc_fill_right_Container; + } foreach ((GVAR(virtualItems) select 22) select 0); + }; + }; + + case IDC_buttonItemAcc : { + if (_leftPanelState) then { + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (_compatibleItems arrayIntersect (((GVAR(virtualItems) select 1) select 1) apply {toLower _x})); + } else { + { + ["CfgWeapons", _x, false] call _fnc_fill_right_Container; + } foreach ((GVAR(virtualItems) select 1) select 1); + { + ["CfgWeapons", _x, false, true] call _fnc_fill_right_Container; + } foreach ((GVAR(virtualItems) select 22) select 1); + }; + }; + + case IDC_buttonMuzzle : { + if (_leftPanelState) then { + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (_compatibleItems arrayIntersect (((GVAR(virtualItems) select 1) select 2) apply {toLower _x})); + } else { + { + ["CfgWeapons", _x, false] call _fnc_fill_right_Container; + } foreach ((GVAR(virtualItems) select 1) select 2); + { + ["CfgWeapons", _x, false, true] call _fnc_fill_right_Container; + } foreach ((GVAR(virtualItems) select 22) select 2); + }; + }; + + case IDC_buttonBipod : { + if (_leftPanelState) then { + { + ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach (_compatibleItems arrayIntersect (((GVAR(virtualItems) select 1) select 3) apply {toLower _x})); + } else { + { + ["CfgWeapons", _x, false] call _fnc_fill_right_Container; + } foreach ((GVAR(virtualItems) select 1) select 3); + { + ["CfgWeapons", _x, false, true] call _fnc_fill_right_Container; + } foreach ((GVAR(virtualItems) select 22) select 3); + }; + }; + + case IDC_buttonCurrentMag : { + if (_leftPanelState) then { + { + ["CfgMagazines", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach ((GVAR(virtualItems) select 2) arrayIntersect _compatibleMagsPrimaryMuzzle); + }; + }; + + case IDC_buttonCurrentMag2 : { + if (_leftPanelState) then { + { + ["CfgMagazines", _x, _ctrlPanel] call FUNC(addListBoxItem); + } foreach ((GVAR(virtualItems) select 2) arrayIntersect _compatibleMagsSecondaryMuzzle); + }; + }; + + case IDC_buttonMag : { + { + ["CfgMagazines", _x, true] call _fnc_fill_right_Container; + } foreach ((GVAR(virtualItems) select 2) arrayIntersect _allCompatibleMags); + { + ["CfgMagazines", _x, true, true] call _fnc_fill_right_Container; + } foreach ((GVAR(virtualItems) select 19) arrayIntersect _allCompatibleMags); + }; + + case IDC_buttonMagALL : { + { + ["CfgMagazines", _x, true] call _fnc_fill_right_Container; + } foreach (GVAR(virtualItems) select 2); + { + ["CfgMagazines", _x, true, true] call _fnc_fill_right_Container; + } foreach (GVAR(virtualItems) select 19); + }; + + case IDC_buttonThrow : { + { + ["CfgMagazines", _x, true] call _fnc_fill_right_Container; + } foreach (GVAR(virtualItems) select 15); + { + ["CfgMagazines", _x, true, true] call _fnc_fill_right_Container; + } foreach (GVAR(virtualItems) select 20); + }; + + case IDC_buttonPut : { + { + ["CfgMagazines", _x, true] call _fnc_fill_right_Container; + } foreach (GVAR(virtualItems) select 16); + { + ["CfgMagazines", _x, true, true] call _fnc_fill_right_Container; + } foreach (GVAR(virtualItems) select 21); + }; + + case IDC_buttonMisc : { + { + ["CfgWeapons", _x, false] call _fnc_fill_right_Container; + } foreach (GVAR(virtualItems) select 17); + { + ["CfgWeapons", _x, false, true] call _fnc_fill_right_Container; + } foreach (GVAR(virtualItems) select 18); + { + ["CfgVehicles", _x, false, true] call _fnc_fill_right_Container; + } foreach (GVAR(virtualItems) select 23); + { + ["CfgGlasses", _x, false, true] call _fnc_fill_right_Container; + } foreach (GVAR(virtualItems) select 24); + }; +}; + +if (GVAR(currentRightPanel) != _ctrlIDC) then { + (_display displayCtrl IDC_rightSearchbar) ctrlSetText ""; +}; + +GVAR(currentRightPanel) = _ctrlIDC; + +[QGVAR(rightPanelFilled), [_display, GVAR(currentLeftPanel), _ctrlIDC]] call CBA_fnc_localEvent; + +// Add current items and change progress bar +if (GVAR(currentLeftPanel) in [IDC_buttonUniform, IDC_buttonVest, IDC_buttonBackpack]) then { + + private _maxLoad = 0; + private _container = switch (GVAR(currentLeftPanel)) do { + case IDC_buttonUniform : { + (_display displayCtrl IDC_loadIndicatorBar) progressSetPosition (loadUniform GVAR(center)); + _maxLoad = gettext (configfile >> "CfgWeapons" >> uniform GVAR(center) >> "ItemInfo" >> "containerClass"); + uniformItems GVAR(center) + }; + case IDC_buttonVest : { + (_display displayCtrl IDC_loadIndicatorBar) progressSetPosition (loadVest GVAR(center)); + _maxLoad = gettext (configfile >> "CfgWeapons" >> vest GVAR(center) >> "ItemInfo" >> "containerClass"); + vestItems GVAR(center) + }; + case IDC_buttonBackpack : { + (_display displayCtrl IDC_loadIndicatorBar) progressSetPosition (loadBackpack GVAR(center)); + _maxLoad = backpack GVAR(center); + backpackItems GVAR(center) + }; + }; + + for "_l" from 0 to ((lnbsize _ctrlPanel select 0) - 1) do { + private _class = _ctrlPanel lnbData [_l, 0]; + _ctrlPanel lnbSetText [[_l, 2], ["0", str ({_x == _class} count _container)] select (_class in _container)]; + }; + + [_ctrlPanel, _maxLoad] call FUNC(updateRightPanel); +}; + +// Sorting +private _sortRightCtrl = _display displayCtrl IDC_sortRightTab; +private _sortRightCurSel = lbCurSel _sortRightCtrl; + +if (lbSize _sortRightCtrl == 3) then { + _sortRightCtrl lbDelete 2; +}; + +if (_leftPanelState) then { + _sortRightCtrl lbDelete 1; + _sortRightCtrl lbAdd (localize "STR_a3_rscdisplayarsenal_sort_mod"); + _sortRightCtrl lbSetValue [1, 1]; + + _sortRightCtrl lbSetCurSel ([0, _sortRightCurSel] select (_sortRightCurSel != 2)); +} else { + _sortRightCtrl lbDelete 1; + _sortRightCtrl lbAdd localize LSTRING(sortByWeightText); + _sortRightCtrl lbSetValue [1, 1]; + + _sortRightCtrl lbAdd localize LSTRING(sortByAmountText); + _sortRightCtrl lbSetValue [2, 2]; + + _sortRightCtrl lbSetCurSel _sortRightCurSel; +}; + +[_sortRightCtrl, _sortRightCtrl lbValue (lbCurSel _sortRightCtrl)] call FUNC(sortPanel); + +// Select current data if not in a container +if !(_itemsToCheck isEqualTo []) then { + for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do { + private _currentData = _ctrlPanel lbData _lbIndex; + + if ((_currentData != "") && {tolower _currentData in _itemsToCheck}) exitWith { + _ctrlPanel lbSetCurSel _lbIndex; + }; + }; + + if (lbCurSel _ctrlPanel < 0) then { + _ctrlPanel lbSetCurSel 0; + }; +}; diff --git a/addons/arsenal/functions/fnc_handleMouse.sqf b/addons/arsenal/functions/fnc_handleMouse.sqf new file mode 100644 index 0000000000..16548f3985 --- /dev/null +++ b/addons/arsenal/functions/fnc_handleMouse.sqf @@ -0,0 +1,73 @@ +/* + * Author: Karel Moricky, modified by Alganthe + * Update the camera position and pitch/bank. + * Modernized a bit, modified to fit the rewrite. + * + * Arguments: + * 0: Not used + * 1: Arguments + * 1.1: Mouse area control + * 1.2: Mouse X position + * 1.3: Mouse Y position + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["", "_args"]; + +_args params ["_control", "_mouseX", "_mouseY"]; +GVAR(cameraPosition) params ["_distance", "_dirH", "_dirV", "_helperPos"]; +GVAR(mouseButtonState) params ["_LMB", "_RMB"]; + +if (count _LMB > 0) then { + _LMB params ["_LMBcursorX", "_LMBcursorY"]; + private _dX = [(_mouseX - _LMBcursorX), (_LMBcursorX - _mouseX)] select GVAR(camInverted); + private _dY = [(_mouseY -_LMBcursorY), (_LMBcursorY - _mouseY)] select GVAR(camInverted); + GVAR(mouseButtonState) set [0,[_mouseX,_mouseY]]; + + private _centerBox = boundingboxreal GVAR(center); + private _centerSizeBottom = _centerBox select 0 select 2; + private _centerSizeUp = _centerBox select 1 select 2; + private _centerSize = sqrt ([_centerBox select 0 select 0,_centerBox select 0 select 1] distance [_centerBox select 1 select 0,_centerBox select 1 select 1]); + + _helperPos = [_helperPos, _dX * _centerSize, _dirH - 90] call bis_fnc_relpos; + _helperPos = [ + [0,0,((_helperPos select 2) - _dY * _centerSize) max _centerSizeBottom min _centerSizeUp], + ([0,0,0] distance2D _helperPos) min _centerSize, + [0,0,0] getDir _helperPos + ] call bis_fnc_relpos; + + _helperPos set [2,(_helperPos select 2) max ((boundingboxreal GVAR(center) select 0 select 2) + 0.2)]; + + //--- Do not let target go below ground + private _posZmin = 0.1; + private _targetWorldPosZ = (GVAR(center) modeltoworldvisual _helperPos) select 2; + if (_targetWorldPosZ < _posZmin) then {_helperPos set [2,(_helperPos select 2) - _targetWorldPosZ + _posZmin];}; + + GVAR(cameraPosition) set [3,_helperPos]; +}; + +if (count _RMB > 0) then { + _RMB params ["_RMBcursorX", "_RMBcursorY"]; + private _dX = (_RMBcursorX - _mouseX) * 0.75; + private _dY = (_RMBcursorY - _mouseY) * 0.75; + _helperPos = [ + [0,0,_helperPos select 2], + [0,0,0] distance2D _helperPos, + ([0,0,0] getDir _helperPos) - _dX * 360 + ] call bis_fnc_relpos; + + GVAR(cameraPosition) set [1,(_dirH - _dX * 360)]; + GVAR(cameraPosition) set [2,(_dirV - _dY * 100) max -89 min 89]; + GVAR(cameraPosition) set [3,_helperPos]; + GVAR(mouseButtonState) set [1,[_mouseX,_mouseY]]; +}; + +if (!alive (GVAR(center)) || isnull GVAR(center)) then { + (ctrlParent _control) closeDisplay 2; +}; diff --git a/addons/arsenal/functions/fnc_handleScrollWheel.sqf b/addons/arsenal/functions/fnc_handleScrollWheel.sqf new file mode 100644 index 0000000000..e7dc3bbc1e --- /dev/null +++ b/addons/arsenal/functions/fnc_handleScrollWheel.sqf @@ -0,0 +1,25 @@ +/* + * Author: Alganthe + * Handle the mouse wheel. + * + * Arguments: + * 0: Not used + * 1: Mousewheel Z position + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["", "_args"]; +_args params ["", "_zPos"]; + +private _distanceMax = ((boundingboxreal GVAR(center) select 0) vectordistance (boundingboxreal GVAR(center) select 1)) * 1.5; +private _distanceMin = _distanceMax * 0.15; +private _distance = GVAR(cameraPosition) select 0; + +_distance = (_distance - (_zPos / 10)) max _distanceMin min _distanceMax; +GVAR(cameraPosition) set [0, _distance]; diff --git a/addons/arsenal/functions/fnc_handleSearchbar.sqf b/addons/arsenal/functions/fnc_handleSearchbar.sqf new file mode 100644 index 0000000000..87b03d8c57 --- /dev/null +++ b/addons/arsenal/functions/fnc_handleSearchbar.sqf @@ -0,0 +1,92 @@ +/* + * Author: Alganthe + * Handles keyboard inputs inside the searchbars text boxes. + * + * Arguments: + * 0: Arsenal display + * 1: Searchbar control + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_control"]; + +private _textString = ctrlText _control; + +if ((ctrlIDC _control) == IDC_rightSearchbar) then { + if !(GVAR(lastSearchTextRight) isEqualTo "" || {(_textString find GVAR(lastSearchTextRight)) == 0}) then {//don't refill if there is no need + [_display, _display displayCtrl GVAR(currentRightPanel)] call FUNC(fillRightPanel); + }; + GVAR(lastSearchTextRight) = _textString; + if (count _textString == 0) exitWith {}; + + private _rightPanelState = GVAR(currentLeftPanel) in [IDC_buttonPrimaryWeapon, IDC_buttonHandgun, IDC_buttonSecondaryWeapon]; + private _rightPanelCtrl = [_display displayCtrl IDC_rightTabContentListnBox, _display displayCtrl IDC_rightTabContent] select (_rightPanelState); + + if (_rightPanelState) then { + + private _itemsToGo = lbSize _rightPanelCtrl; + private _lbIndex = 0; + while {_itemsToGo > 0} do { + private _currentData = _rightPanelCtrl lbText _lbIndex; + private _currentClassname = _rightPanelCtrl lbData _lbIndex; + + if ((_currentData isEqualTo "") || {(((toUpper _currentData) find (toUpper _textString)) == -1) && {((toUpper _currentClassname) find (toUpper _textString)) == -1}}) then { + _rightPanelCtrl lbDelete _lbIndex; + } else { + _lbIndex = _lbIndex + 1; + }; + _itemsToGo = _itemsToGo - 1; + }; + _rightPanelCtrl lbSetCurSel -1; + } else { + + private _itemsToGo = (lnbSize _rightPanelCtrl) select 0; + private _lbIndex = 0; + while {_itemsToGo > 0} do { + private _currentData = _rightPanelCtrl lnbText [_lbIndex, 1]; + private _currentClassname = _rightPanelCtrl lnbData [_lbIndex, 0]; + + if ((_currentData isEqualTo "") || {(((toUpper _currentData) find (toUpper _textString)) == -1) && {((toUpper _currentClassname) find (toUpper _textString)) == -1}}) then { + _rightPanelCtrl lnbDeleteRow _lbIndex; + } else { + _lbIndex = _lbIndex + 1; + }; + _itemsToGo = _itemsToGo - 1; + }; + _rightPanelCtrl lnbSetCurSelRow -1; + }; + + [_display, nil, nil, configNull] call FUNC(itemInfo); +} else { + + if !(GVAR(lastSearchTextLeft) isEqualTo "" || {(_textString find GVAR(lastSearchTextLeft)) == 0}) then {//don't refill if there is no need + [_display, _display displayCtrl GVAR(currentLeftPanel)] call FUNC(fillLeftPanel); + }; + GVAR(lastSearchTextLeft) = _textString; + if (count _textString == 0) exitWith {}; + + private _leftPanelCtrl = _display displayCtrl IDC_leftTabContent; + + + private _itemsToGo = (lbSize _leftPanelCtrl); + private _lbIndex = 0; + while {_itemsToGo > 0} do { + private _currentData = _leftPanelCtrl lbText _lbIndex; + private _currentClassname = _leftPanelCtrl lbData _lbIndex; + + if ((_currentData isEqualTo "") || {(((toUpper _currentData) find (toUpper _textString)) == -1) && {((toUpper _currentClassname) find (toUpper _textString)) == -1}}) then { + _leftPanelCtrl lbDelete _lbIndex; + } else { + _lbIndex = _lbIndex + 1; + }; + _itemsToGo = _itemsToGo - 1; + }; + _leftPanelCtrl lbSetCurSel -1; + [_display, nil, nil, configNull] call FUNC(itemInfo); +}; diff --git a/addons/arsenal/functions/fnc_initBox.sqf b/addons/arsenal/functions/fnc_initBox.sqf new file mode 100644 index 0000000000..55c0ab653e --- /dev/null +++ b/addons/arsenal/functions/fnc_initBox.sqf @@ -0,0 +1,61 @@ +/* + * Author: Alganthe + * Initialize a box / object for arsenal. + * + * Arguments: + * 0: Target + * 1: Items or + * 2: Initialize globally + * + * Return Value: + * None + * + * Example: + * [_box, ["MyItem1", "MyItem2", "MyItemN"]] call ace_arsenal_fnc_initBox + * [_box, true] call ace_arsenal_fnc_initBox + * + * Public: Yes +*/ +#include "script_component.hpp" + +params [["_object", objNull, [objNull]], ["_items", true, [[], true]], ["_global", true, [true]]]; + +if (isNull _object) exitWith {}; + +if (isNil QGVAR(EHIDArray)) then { + GVAR(EHIDArray) = []; +}; + +if (_global && {isMultiplayer} && {{_object in _x} count GVAR(EHIDArray) == 0}) then { + + private _ID = [QGVAR(initBox), [_object, _items, false]] call CBA_fnc_globalEventJIP; + [_ID, _object] call CBA_fnc_removeGlobalEventJIP; + + GVAR(EHIDArray) pushBack [_ID, _object]; + publicVariable QGVAR(EHIDArray); +} else { + + if ({(_x select 0) select 0 isEqualTo QGVAR(interaction)} count (_object getVariable [QEGVAR(interact_menu,actions), []]) == 0) then { + + private _action = [ + QGVAR(interaction), + localize "STR_A3_Arsenal", + "", + { + params ["_target", "_player"]; + + [{[_this select 0, _this select 1] call FUNC(openBox)}, [_target, _player]] call CBA_fnc_execNextFrame; + }, + { + params ["_target", "_player"]; + + [_player, _target, ["isNotSwimming", "isNotCarrying", "isNotDragging", "notOnMap", "isNotEscorting", "isNotOnLadder"]] call EFUNC(common,canInteractWith) + }, + {}, + [] + ] call EFUNC(interact_menu,createAction); + [_object, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToObject); + + [_object, _items, false] call FUNC(addVirtualItems); + }; +}; diff --git a/addons/arsenal/functions/fnc_itemInfo.sqf b/addons/arsenal/functions/fnc_itemInfo.sqf new file mode 100644 index 0000000000..9dcfe2ea86 --- /dev/null +++ b/addons/arsenal/functions/fnc_itemInfo.sqf @@ -0,0 +1,75 @@ +/* + * Author: Alganthe + * Update arsenal's info box. + * + * Arguments: + * 0: Arsenal display + * 1: Current panel control + * 2: Current panel selection + * 3: Item config entry + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_control", "_curSel" ,"_itemCfg"]; + +private _ctrlInfo = _display displayCtrl IDC_infoBox; + +if (isClass _itemCfg) then { + + _ctrlInfo ctrlSetFade 0; + _ctrlInfo ctrlCommit FADE_DELAY; + + // Name + author + private _ctrlInfoName = _display displayCtrl IDC_infoName; + _ctrlInfoName ctrlSetText ([_control lbText _curSel, _control lnbText [_curSel, 1]] select (ctrlType _control == 102)); + + private _ctrlInfoAuthor = _display displayctrl IDC_infoAuthor; + _ctrlInfoAuthor ctrlSetText ""; + + private _itemAuthor = getText (_itemCfg >> "author"); + _ctrlInfoAuthor ctrlSetText ([localize "STR_AUTHOR_UNKNOWN", format [localize "STR_FORMAT_AUTHOR_SCRIPTED",_itemAuthor]] select (_itemAuthor != "")); + + // DLC / mod icon + private _ctrlDLC = _display displayctrl IDC_DLCIcon; + private _ctrlDLCBackground = _display displayctrl IDC_DLCBackground; + private _dlc = _itemCfg call GETDLC; + if (_dlc != "") then { + + private _dlcParams = modParams [_dlc, ["name", "logo", "logoOver"]]; + _dlcParams params ["_name", "_logo", "_logoOver"]; + private _appId = getnumber (configfile >> "CfgMods" >> _dlc >> "appId"); + + _ctrlDLC ctrlsettooltip _name; + _ctrlDLC ctrlsettext _logo; + _ctrlDLCBackground ctrlsetfade 0; + _ctrlDLC ctrlsetfade 0; + if (_appId > 0) then { + _ctrlDLC ctrlseteventhandler ["mouseexit",format ["(_this select 0) ctrlsettext '%1';",_logo]]; + _ctrlDLC ctrlseteventhandler ["mouseenter",format ["(_this select 0) ctrlsettext '%1';",_logoOver]]; + _ctrlDLC ctrlseteventhandler [ + "buttonclick", + format ["uiNamespace setvariable ['RscDisplayDLCPreview_dlc','%1']; ctrlparent (_this select 0) createDisplay 'RscDisplayDLCPreview';", _dlc] + ]; + } else { + _ctrlDLC ctrlRemoveAllEventHandlers "buttonclick"; + _ctrlDLC ctrlRemoveAllEventHandlers "mouseexit"; + _ctrlDLC ctrlRemoveAllEventHandlers "mouseenter"; + }; + } else { + _ctrlDLC ctrlsetfade 1; + _ctrlDLCBackground ctrlsetfade 1; + }; + + _ctrlDLC ctrlcommit 0; + _ctrlDLCBackground ctrlcommit 0; + +} else { + _ctrlInfo ctrlSetFade 1; + _ctrlInfo ctrlCommit FADE_DELAY; +}; diff --git a/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf b/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf new file mode 100644 index 0000000000..7842df8704 --- /dev/null +++ b/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf @@ -0,0 +1,77 @@ +/* + * Author: Alganthe + * Handles tab changing for the loadouts display. + * + * Arguments: + * 0: Arsenal display + * 1: Tab control + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_control"]; + +if !(ctrlEnabled _control || {GVAR(currentLoadoutsTab) == ctrlIDC _control}) exitWith {}; + +private _centerBoxTitleCtrl = _display displayCtrl IDC_centerTitle; +private _shareButtonCtrl = _display displayCtrl IDC_buttonShare; +private _saveButtonCtrl = _display displayCtrl IDC_buttonSave; +private _loadButtonCtrl = _display displayCtrl IDC_buttonLoad; +private _deleteButtonCtrl = _display displayCtrl IDC_buttonDelete; +private _renameButtonCtrl = _display displayCtrl IDC_buttonRename; + +// Update UI visual elements +if (GVAR(currentLoadoutsTab) != -1) then { + + private _previousCtrlBackground = _display displayCtrl (GVAR(currentLoadoutsTab) - 1); + _previousCtrlBackground ctrlSetBackgroundColor [0, 0, 0, 0.8]; + _previousCtrlBackground ctrlCommit 0; + + private _previousCtrl = _display displayCtrl GVAR(currentLoadoutsTab); + _previousCtrl ctrlSetTextColor [1, 1, 1, 1]; + _previousCtrl ctrlCommit 0; +}; + +private _ctrlBackground = _display displayCtrl ((ctrlIDC _control) - 1); +_ctrlBackground ctrlSetBackgroundColor [1, 1, 1, 0.8]; +_ctrlBackground ctrlCommit 0; + +_control ctrlSetTextColor [0, 0, 0, 1]; +_control ctrlCommit 0; + +switch (ctrlIDC _control) do { + case IDC_buttonMyLoadouts: { + _centerBoxTitleCtrl ctrlSetText (localize LSTRING(tabMyLoadoutsText)); + + _saveButtonCtrl ctrlEnable true; + _saveButtonCtrl ctrlCommit 0; + }; + + case IDC_buttonDefaultLoadouts: { + _centerBoxTitleCtrl ctrlSetText (localize LSTRING(tabDefaultLoadoutsText)); + + _saveButtonCtrl ctrlEnable (is3DEN); + _saveButtonCtrl ctrlCommit 0; + }; + + case IDC_buttonSharedLoadouts: { + _centerBoxTitleCtrl ctrlSetText (localize LSTRING(tabSharedLoadoutsText)); + + _saveButtonCtrl ctrlEnable false; + _saveButtonCtrl ctrlCommit 0; + }; +}; + +{ + _x ctrlEnable false; + _x ctrlCommit 0; +} foreach [_shareButtonCtrl, _loadButtonCtrl, _deleteButtonCtrl, _renameButtonCtrl]; + +GVAR(currentLoadoutsTab) = ctrlIDC _control; + +[_display, _control] call FUNC(fillLoadoutsList); diff --git a/addons/arsenal/functions/fnc_message.sqf b/addons/arsenal/functions/fnc_message.sqf new file mode 100644 index 0000000000..92f922d7f9 --- /dev/null +++ b/addons/arsenal/functions/fnc_message.sqf @@ -0,0 +1,54 @@ +/* + * Author: Alganthe + * Displays messages in arsenal. + * + * Arguments: + * 0: Arsenal display + * 1: Message + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_message"]; + +private _messageBoxCtrl = _display displayCtrl IDC_message; +private _handle = _messageBoxCtrl getVariable QGVAR(messageBoxHandle); + +if !(isNil "_handle") then { + terminate _handle; +}; + +_handle = [_display, _messageBoxCtrl, time + 5, _message, FADE_DELAY] spawn { + disableSerialization; + + _this params ["_display", "_control", "_timer", "_message", "_delay"]; + + while {_timer >= time} do { + switch true do { + case (_display isEqualTo displayNull): { + terminate _thisScript; + }; + + case (round (_timer - time) == 5): { + _control ctrlSetText _message; + _control ctrlSetFade 1; + _control ctrlCommit 0; + + _control ctrlSetFade 0; + _control ctrlCommit _delay; + }; + }; + + uiSleep 1; + }; + + _control ctrlSetFade 1; + _control ctrlCommit _delay; + terminate _thisScript; +}; +_messageBoxCtrl setVariable [QGVAR(messageBoxHandle), _handle]; diff --git a/addons/arsenal/functions/fnc_onArsenalClose.sqf b/addons/arsenal/functions/fnc_onArsenalClose.sqf new file mode 100644 index 0000000000..52466f6746 --- /dev/null +++ b/addons/arsenal/functions/fnc_onArsenalClose.sqf @@ -0,0 +1,101 @@ +/* + * Author: Alganthe + * onUnLoad EH for arsenal. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" + +GVAR(camera) cameraEffect ["terminate", "back"]; +private _cameraData = [getposAtl GVAR(camera), (getposAtl GVAR(camera)) vectorFromTo (getposAtl GVAR(cameraHelper))]; + +[QGVAR(displayClosed), []] call CBA_fnc_localEvent; + +removeMissionEventHandler ["draw3D", GVAR(camPosUpdateHandle)]; + +camDestroy GVAR(camera); +GVAR(center) switchCamera GVAR(cameraView); +deleteVehicle GVAR(cameraHelper); + +if (is3DEN) then { + + private _centerOriginParent = objectParent GVAR(centerOrigin); + + if !(isNull _centerOriginParent) then { + _centerOriginParent hideObject false; + }; + + GVAR(centerOrigin) hideObject false; + + // Apply the loadout from the dummy to all selected units + { + _x setUnitLoadout (getUnitLoadout GVAR(center)); + _x setFace GVAR(currentFace); + _x setSpeaker GVAR(currentVoice); + } foreach (get3DENSelected "object"); + + save3DENInventory (get3DENSelected "object"); + + deleteVehicle GVAR(light); + deleteVehicle GVAR(center); + + GVAR(centerOrigin) = nil; + GVAR(light) = nil; + + get3DENCamera cameraEffect ["internal","back"]; + ["ShowInterface",true] call bis_fnc_3DENInterface; + GVAR(visionMode) call bis_fnc_3DENVisionMode; +} else { + // Select correct weapon + switch GVAR(selectedWeaponType) do { + case 0: {GVAR(center) selectWeapon primaryWeapon GVAR(center);}; + case 1: {GVAR(center) selectWeapon secondaryWeapon GVAR(center);}; + case 2: {GVAR(center) selectWeapon handgunWeapon GVAR(center);}; + }; +}; + +if (isMultiplayer) then { + + [QGVAR(broadcastFace), [GVAR(center), GVAR(currentFace)], QGVAR(center) + "_face"] call CBA_fnc_globalEventJIP; + [QGVAR(center) + "_face", GVAR(center)] call CBA_fnc_removeGlobalEventJIP; + + [QGVAR(broadcastVoice), [GVAR(center), GVAR(currentVoice)], QGVAR(center) + "_voice"] call CBA_fnc_globalEventJIP; + [QGVAR(center) + "_voice", GVAR(center)] call CBA_fnc_removeGlobalEventJIP; +}; + +if !(isnull curatorCamera) then { + curatorcamera setPosAtl (_cameraData select 0); + curatorcamera setVectorDir (_cameraData select 1); + curatorcamera cameraEffect ["internal","back"]; +}; + +GVAR(camera) = nil; +GVAR(cameraHelper) = nil; + +GVAR(mouseButtonState) = nil; +GVAR(currentLeftPanel) = nil; +GVAR(currentRightPanel) = nil; +GVAR(leftSearchbarFocus) = nil; +GVAR(rightSearchbarFocus) = nil; +GVAR(shiftState) = nil; +GVAR(leftTabFocus) = nil; +GVAR(rightTabFocus) = nil; +GVAR(rightTabLnBFocus) = nil; + +GVAR(selectedWeaponType) = nil; +GVAR(virtualItems) = nil; +GVAR(currentItems) = nil; +GVAR(currentFace) = nil; +GVAR(currentVoice) = nil; +GVAR(currentInsignia) = nil; +GVAR(currentAction) = nil; + +GVAR(center) = nil; + +showHUD true; diff --git a/addons/arsenal/functions/fnc_onArsenalOpen.sqf b/addons/arsenal/functions/fnc_onArsenalOpen.sqf new file mode 100644 index 0000000000..6c53882008 --- /dev/null +++ b/addons/arsenal/functions/fnc_onArsenalOpen.sqf @@ -0,0 +1,287 @@ +/* + * Author: Alganthe + * onLoad EH for arsenal. + * + * Arguments: + * 0: Ignored + * 1: Arguments + * 1.1: Arsenal display + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["", "_args"]; +_args params ["_display"]; + +//--------------- General vars +if (isNil QGVAR(center)) then { + GVAR(center) = player; +}; + +GVAR(mouseButtonState) = [[],[]]; + +if (isNil QGVAR(sharedLoadoutsNamespace)) then { + GVAR(sharedLoadoutsNamespace) = true call CBA_fnc_createNamespace; + publicVariable QGVAR(sharedLoadoutsNamespace); +}; + +if (isNil {GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars)}) then { + GVAR(sharedLoadoutsNamespace) setVariable [QGVAR(sharedLoadoutsVars), [], true]; +}; + +if (isNil QGVAR(defaultLoadoutsList)) then { + if (is3DEN) then { + GVAR(defaultLoadoutsList) = (QGVAR(DummyCategory) get3DENMissionAttribute QGVAR(DefaultLoadoutsListAttribute)); + } else { + GVAR(defaultLoadoutsList) = []; + }; +}; + +if (isNil QGVAR(virtualItems)) then { + GVAR(virtualItems) = [[[], [], []], [[], [], [], []], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []]; +}; + +GVAR(currentItems) = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", [], [], [], [], [], []]; + +GVAR(currentFace) = face GVAR(center); +GVAR(currentVoice) = speaker GVAR(center); +GVAR(currentInsignia) = GVAR(center) param [0, objNull, [objNull]] getVariable ["BIS_fnc_setUnitInsignia_class", ""]; + +GVAR(currentAction) = "Stand"; +GVAR(shiftState) = false; + +// Add the items the player has to virtualItems +for "_index" from 0 to 10 do { + switch (_index) do { + // primary, secondary, handgun weapons + case 0: { + private _array = LIST_DEFAULTS select _index; + + if !((_array select 0) isEqualTo "") then { + ((GVAR(virtualItems) select _index) select 0) pushBackUnique (_array select 0); + }; + + if !((_array select 1) isEqualTo "") then { + ((GVAR(virtualItems) select _index) select 1) pushBackUnique (_array select 1); + }; + + if !((_array select 2) isEqualTo "") then { + ((GVAR(virtualItems) select _index) select 2) pushBackUnique (_array select 2); + }; + }; + + // Accs for the weapons above + case 1: { + private _array = LIST_DEFAULTS select _index; + _array params ["_accsArray", "_magsArray"]; + + { + private _subIndex = _forEachIndex; + + { + if (_x != "") then { + (GVAR(virtualItems) select _index) select ([2, 1, 0, 3] select _forEachIndex) pushBackUnique _x; + }; + } foreach _x; + } foreach _accsArray; + + { + if !(_x isEqualTo []) then { + + if (_x select 0 != "") then { + (GVAR(virtualItems) select 2) pushBackUnique (_x select 0); + }; + + if (count _x > 1 && {_x select 1 != ""}) then { + (GVAR(virtualItems) select 2) pushBackUnique (_x select 1); + }; + }; + } foreach _magsArray; + }; + + // Inventory items + case 2: { + call FUNC(updateUniqueItemsList); + }; + + // The rest + default { + private _array = (LIST_DEFAULTS select _index) select {!(_x isEqualTo "")}; + if !(_array isEqualTo []) then { + {(GVAR(virtualItems) select _index) pushBackUnique _x} foreach _array; + }; + }; + }; +}; + +// Fill current items +for "_index" from 0 to 15 do { + switch (_index) do { + case 0; + case 1; + case 2:{ + GVAR(currentItems) set [_index, ((LIST_DEFAULTS select 0) select _index)]; + }; + case 3; + case 4; + case 5; + case 6; + case 7; + case 8; + case 9: { + GVAR(currentItems) set [_index, (LIST_DEFAULTS select _index) select 0]; + + }; + case 10: { + {(GVAR(currentItems) select 15) pushBack _x} forEach (uniformItems GVAR(center)); + }; + case 11: { + {(GVAR(currentItems) select 16) pushBack _x} forEach (vestItems GVAR(center)); + }; + case 12: { + {(GVAR(currentItems) select 17) pushBack _x} forEach (backpackItems GVAR(center)); + }; + case 13: { + GVAR(currentItems) set [18, (primaryWeaponItems GVAR(center)) + (primaryWeaponMagazine GVAR(center))]; + }; + case 14: { + GVAR(currentItems) set [19, (secondaryWeaponItems GVAR(center)) + (secondaryWeaponMagazine GVAR(center))]; + }; + case 15: { + GVAR(currentItems) set [20, (handgunItems GVAR(center)) + (handgunMagazine GVAR(center))]; + }; + }; +}; + +{ + private _simulationType = getText (configFile >> "CfgWeapons" >> _x >> "simulation"); + private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch", "itemgps"] find (tolower _simulationType)); + + GVAR(currentItems) set [_index, _x]; +} foreach (assignedItems GVAR(center)); + +GVAR(currentWeaponType) = switch true do { + case (currentWeapon GVAR(center) == GVAR(currentItems) select 0): {0}; + case (currentWeapon GVAR(center) == GVAR(currentItems) select 1): {1}; + case (currentWeapon GVAR(center) == GVAR(currentItems) select 2): {2}; + default {-1}; +}; + +[QGVAR(displayOpened), []] call CBA_fnc_localEvent; + +//--------------- Fade out unused elements +private _mouseBlockCtrl = _display displayCtrl IDC_mouseBlock; +_mouseBlockCtrl ctrlEnable false; + +{ + _x = _display displayCtrl _x; + + _x ctrlSetFade 1; + _x ctrlShow false; + _x ctrlCommit 0; +} foreach [ + IDC_blockRightFrame, + IDC_blockRighttBackground, + IDC_loadIndicator, + IDC_rightTabContent, + IDC_rightTabContentListnBox, + IDC_sortRightTab, + RIGHT_PANEL_ACC_BACKGROUND_IDCS, + RIGHT_PANEL_ACC_IDCS, + RIGHT_PANEL_ITEMS_BACKGROUND_IDCS, + RIGHT_PANEL_ITEMS_IDCS, + IDC_buttonRemoveAll, + IDC_rightSearchbar +]; + +//--------------- Camera prep +cutText ["","plain"]; +showCommandingMenu ""; + +GVAR(cameraView) = cameraView; +GVAR(center) switchCamera "internal"; +showHUD false; + +private _mouseAreaCtrl = _display displayCtrl IDC_mouseArea; +ctrlSetFocus _mouseAreaCtrl; + +// 3DEN support, lifted from BIS_fnc_arsenal +if (is3DEN) then { + + GVAR(centerOrigin) = GVAR(center); + GVAR(centerOrigin) hideObject true; + + private _centerOriginParent = objectParent GVAR(centerOrigin); + if !(isNull _centerOriginParent) then { + _centerOriginParent hideObject true; + }; + + private _centerPos = position GVAR(centerOrigin); + + GVAR(center) = createAgent [typeOf GVAR(centerOrigin), position GVAR(centerOrigin), [], 0, "none"]; + GVAR(center) setPosAtl getPosAtl GVAR(centerOrigin); + GVAR(center) setDir (getDir GVAR(centerOrigin)); + GVAR(center) switchMove animationState GVAR(centerOrigin); + GVAR(center) switchAction "playerstand"; + GVAR(center) enableSimulation false; + + GVAR(center) setUnitLoadout (getUnitLoadout GVAR(centerOrigin)); + GVAR(center) setFace GVAR(currentFace); + GVAR(center) setSpeaker GVAR(currentVoice); + + //--- Create light for night editing (code based on BIS_fnc_3DENFlashlight) + private _intensity = 1; + GVAR(light) = "#lightpoint" createVehicle _centerPos; + GVAR(light) setLightBrightness _intensity; + GVAR(light) setLightAmbient [1,1,1]; + GVAR(light) setLightColor [0,0,0]; + GVAR(light) lightAttachObject [GVAR(centerOrigin), [0, 0, -_intensity * 7]]; + + //--- Use the same vision mode as in Eden + GVAR(visionMode)= -2 call bis_fnc_3DENVisionMode; + ["ShowInterface",false] spawn bis_fnc_3DENInterface; + if (get3denactionstate "togglemap" > 0) then {do3DENAction "togglemap";}; +}; + +//--------------- Prepare the left panel +GVAR(currentLeftPanel) = nil; +GVAR(currentRightPanel) = nil; +GVAR(leftSearchbarFocus) = false; +GVAR(rightSearchbarFocus) = false; +GVAR(leftTabFocus) = false; +GVAR(rightTabFocus) = false; +GVAR(rightTabLnBFocus) = false; + +{ + private _panel = _display displayCtrl _x; + _panel ctrlSetFontHeight (GVAR(fontHeight) * GRID_H); + _panel ctrlCommit 0; +} foreach [IDC_leftTabContent, IDC_rightTabContent, IDC_rightTabContentListnBox]; + +[_display, _display displayCtrl IDC_buttonPrimaryWeapon] call FUNC(fillLeftPanel); + +//--------------- Init camera +if (isNil QGVAR(cameraPosition)) then { + GVAR(cameraPosition) = [5,0,0,[0,0,0.85]]; +}; + +GVAR(cameraHelper) = createAgent ["Logic", position GVAR(center) ,[] ,0 ,"none"]; +GVAR(cameraHelper) attachTo [GVAR(center), GVAR(cameraPosition) select 3, ""]; + +GVAR(camera) = "camera" camCreate position GVAR(center); +GVAR(camera) cameraEffect ["internal","back"]; +GVAR(camera) camPrepareFocus [-1,-1]; +GVAR(camera) camPrepareFov 0.35; +GVAR(camera) camCommitPrepared 0; + +showCinemaBorder false; +["#(argb,8,8,3)color(0,0,0,1)",false,nil,0,[0,0.5]] call bis_fnc_textTiles; + +//--------------- Reset camera pos +[nil, [controlNull,0,0]] call FUNC(handleMouse); +GVAR(camPosUpdateHandle) = addMissionEventHandler ["draw3D",{ [] call FUNC(updateCamPos) }]; diff --git a/addons/arsenal/functions/fnc_onKeyDown.sqf b/addons/arsenal/functions/fnc_onKeyDown.sqf new file mode 100644 index 0000000000..6b1916e694 --- /dev/null +++ b/addons/arsenal/functions/fnc_onKeyDown.sqf @@ -0,0 +1,140 @@ +/* + * Author: Alganthe + * Handles keyboard inputs in arsenal. + * + * Arguments: + * 0: Arsenal display + * 1: Key being pressed + * 2: Shift state + * 3: Ctrl state + * 4: Alt state + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" +#include "\A3\ui_f\hpp\defineDIKCodes.inc" + +params ["", "_args"]; +_args params ["_display", "_keyPressed", "_shiftState", "_ctrlState", "_altState"]; + +if !((findDisplay IDD_loadouts_display) isEqualTo displayNull) exitWith {}; + +GVAR(shiftState) = _shiftState; + +private _return = true; + +if (!GVAR(leftSearchbarFocus) && {!GVAR(rightSearchbarFocus)}) then { + + switch true do { + // Close button + case (_keyPressed == DIK_ESCAPE): { + _display closeDisplay 2; + }; + // Hide button + case (_keyPressed == DIK_BACKSPACE): { + [_display] call FUNC(buttonHide); + }; + // Export button + case (_keyPressed == DIK_C && {_ctrlState}): { + [_display] call FUNC(buttonExport); + }; + // Import button + case (_keyPressed == DIK_V && {_ctrlState}): { + [_display] call FUNC(buttonImport); + }; + // Search fields + case (_keyPressed == DIK_F && {_ctrlState}): { + ctrlSetFocus (_display displayCtrl IDC_leftSearchbar); + }; + // Switch vision mode + case (_keyPressed in (actionkeys "nightvision")): { + if (isNil QGVAR(visionMode)) then { + GVAR(visionMode) = 0; + }; + GVAR(visionMode) = (GVAR(visionMode) + 1) % 3; + + switch GVAR(visionMode) do { + //--- Normal + case 0: { + camusenvg false; + false setCamUseTi 0; + }; + //--- NVG + case 1: { + camusenvg true; + false setCamUseTi 0; + }; + //--- TI + default { + camusenvg false; + true setCamUseTi 0; + }; + }; + + playsound ["RscDisplayCurator_visionMode",true]; + }; + }; +} else { + switch true do { + case (_keyPressed == DIK_ESCAPE): { + _display closeDisplay 2; + }; + case (_keyPressed == DIK_BACKSPACE): { + _return = false; + }; + case (_keyPressed == DIK_NUMPADENTER); + case (_keyPressed == DIK_RETURN): { + if (GVAR(leftSearchbarFocus)) then { + [_display, _display displayCtrl IDC_leftSearchbar] call FUNC(handleSearchBar); + }; + if (GVAR(rightSearchbarFocus)) then { + [_display, _display displayCtrl IDC_rightSearchbar] call FUNC(handleSearchBar); + }; + }; + case (_keyPressed in [DIK_LEFT, DIK_RIGHT]): { + _return = false; + }; + case (_keyPressed == DIK_C && {_ctrlState}): { + _return = false; + }; + case (_keyPressed == DIK_V && {_ctrlState}): { + _return = false; + }; + case (_keyPressed == DIK_A && {_ctrlState}): { + _return = false; + }; + case (_keyPressed == DIK_X && {_ctrlState}): { + _return = false; + }; + // Search fields + case (_keyPressed == DIK_F && {_ctrlState}): { + if (GVAR(rightSearchbarFocus)) then { + ctrlSetFocus (_display displayCtrl IDC_leftSearchbar); + } else { + ctrlSetFocus (_display displayCtrl IDC_rightSearchbar); + }; + }; + }; +}; + +if (GVAR(leftTabFocus) && {_keyPressed in [DIK_UP, DIK_DOWN]}) then { + _return = false; +}; + +if (GVAR(rightTabFocus) && {_keyPressed in [DIK_UP, DIK_DOWN]}) then { + _return = false; +}; + +if (GVAR(rightTabLnBFocus) && {_keyPressed in [DIK_UP, DIK_DOWN]}) then { + _return = false; +}; + +if (GVAR(rightTabLnBFocus) && {_keyPressed in [DIK_LEFT, DIK_RIGHT]}) then { + [_display, [1, 0] select (_keyPressed == DIK_LEFT)] call FUNC(buttonCargo); +}; + +_return diff --git a/addons/arsenal/functions/fnc_onLoadoutsClose.sqf b/addons/arsenal/functions/fnc_onLoadoutsClose.sqf new file mode 100644 index 0000000000..8318b4d409 --- /dev/null +++ b/addons/arsenal/functions/fnc_onLoadoutsClose.sqf @@ -0,0 +1,29 @@ +/* + * Author: Alganthe + * onUnLoad EH for arsenal loadouts display. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +GVAR(currentLoadoutsTab) = nil; + +private _arsenalDisplay = findDisplay IDD_ace_arsenal; +private _mouseBlockCtrl = _arsenalDisplay displayCtrl IDC_mouseBlock; + +GVAR(cameraPosition) = GVAR(previousCameraPos); +GVAR(previousCameraPos) = nil; + +_mouseBlockCtrl ctrlEnable false; +_mouseBlockCtrl ctrlCommit 0; + +[_arsenalDisplay] call FUNC(buttonHide); + +[_arsenalDisplay , _arsenalDisplay displayCtrl GVAR(currentLeftPanel)] call FUNC(fillLeftPanel); diff --git a/addons/arsenal/functions/fnc_onLoadoutsOpen.sqf b/addons/arsenal/functions/fnc_onLoadoutsOpen.sqf new file mode 100644 index 0000000000..6d6dd4bb76 --- /dev/null +++ b/addons/arsenal/functions/fnc_onLoadoutsOpen.sqf @@ -0,0 +1,58 @@ +/* + * Author: Alganthe + * onLoad EH for arsenal loadouts display. + * + * Arguments: + * 0: Ignored + * 1: Arguments + * 1.1: Loadouts display + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["", "_args"]; +_args params ["_display"]; + +private _arsenalDisplay = findDisplay IDD_ace_arsenal; +private _mouseBlockCtrl = _arsenalDisplay displayCtrl IDC_mouseBlock; + +_mouseBlockCtrl ctrlEnable true; +_mouseBlockCtrl ctrlCommit 0; + +[_arsenalDisplay] call FUNC(buttonHide); + +GVAR(currentLoadoutsTab) = -1; + +GVAR(previousCameraPos) = GVAR(cameraPosition); +GVAR(cameraPosition) = [5,0,20,[-0.85,0,0.85]]; + +private _panelContentCtrl = _display displayCtrl IDC_contentPanel; +_panelContentCtrl ctrlSetFontHeight (4.5 * GRID_H); +_panelContentCtrl ctrlCommit 0; + +if !(GVAR(allowDefaultLoadouts)) then { + private _buttonDefaultLoadoutsCtrl = _display displayCtrl IDC_buttonDefaultLoadouts; + _buttonDefaultLoadoutsCtrl ctrlEnable false; + _buttonDefaultLoadoutsCtrl ctrlCommit 0; + + private _buttonDefaultLoadoutsBackgroundCtrl = _display displayCtrl IDC_buttonDefaultLoadoutsBackground; + _buttonDefaultLoadoutsBackgroundCtrl ctrlShow false; + _buttonDefaultLoadoutsBackgroundCtrl ctrlCommit 0; +}; + +if !(GVAR(allowSharedLoadouts) && {isMultiplayer}) then { + private _buttonShareLoadoutsCtrl = _display displayCtrl IDC_buttonSharedLoadouts; + _buttonShareLoadoutsCtrl ctrlEnable false; + _buttonShareLoadoutsCtrl ctrlCommit 0; + + private _buttonShareLoadoutsBackgroundCtrl = _display displayCtrl IDC_buttonSharedLoadoutsBackground; + _buttonShareLoadoutsBackgroundCtrl ctrlShow false; + _buttonShareLoadoutsBackgroundCtrl ctrlCommit 0; +}; + +[_display, _display displayCtrl IDC_buttonMyLoadouts] call FUNC(loadoutsChangeTab); diff --git a/addons/arsenal/functions/fnc_onMouseButtonDown.sqf b/addons/arsenal/functions/fnc_onMouseButtonDown.sqf new file mode 100644 index 0000000000..0cb2c856a4 --- /dev/null +++ b/addons/arsenal/functions/fnc_onMouseButtonDown.sqf @@ -0,0 +1,6 @@ +#include "script_component.hpp" + +params ["", "_args"]; +_args params ["", "_buttonPressed", "_xPos", "_yPos"]; + +GVAR(mouseButtonState) set [_buttonPressed, [_xPos, _yPos]]; diff --git a/addons/arsenal/functions/fnc_onMouseButtonUp.sqf b/addons/arsenal/functions/fnc_onMouseButtonUp.sqf new file mode 100644 index 0000000000..53848a4f8e --- /dev/null +++ b/addons/arsenal/functions/fnc_onMouseButtonUp.sqf @@ -0,0 +1,6 @@ +#include "script_component.hpp" + +params ["", "_args"]; +_args params ["", "_buttonPressed"]; + +GVAR(mouseButtonState) set [_buttonPressed, []]; diff --git a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf new file mode 100644 index 0000000000..5c4d49b5d1 --- /dev/null +++ b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf @@ -0,0 +1,413 @@ +/* + * Author: Alganthe + * Handles selection changes on the left panel. + * + * Arguments: + * 0: Left panel control + * 1: Left panel selection + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_control", "_curSel"]; + +if (_curSel < 0) exitwith {}; + +private _ctrlIDC = ctrlIDC _control; +private _display = ctrlParent _control; +private _item = [_control lnbData [_curSel, 0], _control lbData _curSel] select !(ctrlType _control == 102); + +private _weaponDefaultRightPanel = _display displayCtrl IDC_buttonOptic; +private _selectCorrectPanelWeapon = [_weaponDefaultRightPanel, _display displayCtrl GVAR(currentRightPanel)] select (!(isNil QGVAR(currentRightPanel)) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ACC_IDCS, IDC_buttonCurrentMag, IDC_buttonCurrentMag2]}); + +private _containerDefaultRightPanel = _display displayCtrl IDC_buttonMisc; +private _selectCorrectPanelContainer = [_containerDefaultRightPanel, _display displayCtrl GVAR(currentRightPanel)] select (!(isNil QGVAR(currentRightPanel)) && {GVAR(currentRightPanel) in [RIGHT_PANEL_ITEMS_IDCS]}); + +switch (GVAR(currentLeftPanel)) do { + + case IDC_buttonPrimaryWeapon : { + private _baseWeapon = ((GVAR(currentItems) select 0) call bis_fnc_baseWeapon); + + if ((GVAR(currentItems) select 0) != _item && {_baseWeapon != _item}) then { + + private _compatibleMags = getArray (configfile >> "cfgweapons" >> _baseWeapon >> "magazines"); + { + GVAR(center) removeMagazines _x; + } foreach _compatibleMags; + + GVAR(currentItems) set [15, uniformItems GVAR(center)]; + GVAR(currentItems) set [16, vestItems GVAR(center)]; + GVAR(currentItems) set [17, backpackItems GVAR(center)]; + + if (_item == "") then { + + GVAR(center) removeWeapon (primaryWeapon GVAR(center)); + GVAR(currentItems) set [18, ["", "", "", "", "", ""]]; + GVAR(currentItems) set [0, _item]; + } else { + + private _compatibleItems = (_item call bis_fnc_compatibleItems) apply {tolower _x}; + GVAR(center) addWeapon _item; + GVAR(center) addWeaponItem [_item, [(getArray (configfile >> "cfgweapons" >> _item >> "magazines")) select 0]]; + + { + if (tolower _x in _compatibleItems || {_x in _compatibleMags}) then { + GVAR(center) addPrimaryWeaponItem _x; + }; + } foreach (GVAR(currentItems) select 18); + + private _primaryMags = primaryWeaponMagazine GVAR(center); + GVAR(currentItems) set [18, (primaryWeaponItems GVAR(center)) + ([_primaryMags + [""], _primaryMags] select (count _primaryMags > 1))]; + GVAR(currentItems) set [0, _item]; + }; + }; + + if (_item == "") then { + TOGGLE_RIGHT_PANEL_HIDE + } else { + TOGGLE_RIGHT_PANEL_WEAPON + [_display, _selectCorrectPanelWeapon] call FUNC(fillRightPanel); + }; + + call FUNC(showItem); + [_display, _control, _curSel, (configFile >> "CfgWeapons" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonHandgun : { + private _baseWeapon = ((GVAR(currentItems) select 2) call bis_fnc_baseWeapon); + + if ((GVAR(currentItems) select 2) != _item && {_baseWeapon != _item}) then { + + private _compatibleMags = getArray (configfile >> "cfgweapons" >> _baseWeapon >> "magazines"); + { + GVAR(center) removeMagazines _x; + } foreach _compatibleMags; + + GVAR(currentItems) set [15, uniformItems GVAR(center)]; + GVAR(currentItems) set [16, vestItems GVAR(center)]; + GVAR(currentItems) set [17, backpackItems GVAR(center)]; + + if (_item == "") then { + + GVAR(center) removeWeapon (handgunWeapon GVAR(center)); + GVAR(currentItems) set [18, ["", "", "", "", "", ""]]; + GVAR(currentItems) set [2, _item]; + } else { + + private _compatibleItems = (_item call bis_fnc_compatibleItems) apply {tolower _x}; + GVAR(center) addWeapon _item; + GVAR(center) addWeaponItem [_item, [(getArray (configfile >> "cfgweapons" >> _item >> "magazines")) select 0]]; + + { + if (tolower _x in _compatibleItems || {_x in _compatibleMags}) then { + GVAR(center) addHandgunItem _x; + }; + } foreach (GVAR(currentItems) select 20); + + private _handgunMags = handgunMagazine GVAR(center); + GVAR(currentItems) set [20, (handgunItems GVAR(center)) + ([_handgunMags + [""], _handgunMags] select (count _handgunMags > 1))]; + GVAR(currentItems) set [2, _item]; + }; + }; + + if (_item == "") then { + TOGGLE_RIGHT_PANEL_HIDE + } else { + TOGGLE_RIGHT_PANEL_WEAPON + [_display, [_selectCorrectPanelWeapon, _weaponDefaultRightPanel] select (GVAR(currentRightPanel) == IDC_buttonCurrentMag2)] call FUNC(fillRightPanel); + }; + + call FUNC(showItem); + [_display, _control, _curSel, (configFile >> "CfgWeapons" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonSecondaryWeapon : { + private _baseWeapon = ((GVAR(currentItems) select 1) call bis_fnc_baseWeapon); + + if ((GVAR(currentItems) select 1) != _item && {_baseWeapon != _item}) then { + + private _compatibleMags = getArray (configfile >> "cfgweapons" >> _baseWeapon >> "magazines"); + { + GVAR(center) removeMagazines _x; + } foreach _compatibleMags; + + GVAR(currentItems) set [15, uniformItems GVAR(center)]; + GVAR(currentItems) set [16, vestItems GVAR(center)]; + GVAR(currentItems) set [17, backpackItems GVAR(center)]; + + if (_item == "") then { + + GVAR(center) removeWeapon (secondaryWeapon GVAR(center)); + GVAR(currentItems) set [18, ["", "", "", "", "", ""]]; + GVAR(currentItems) set [1, _item]; + } else { + + private _compatibleItems = (_item call bis_fnc_compatibleItems) apply {tolower _x}; + GVAR(center) addWeapon _item; + GVAR(center) addWeaponItem [_item, [(getArray (configfile >> "cfgweapons" >> _item >> "magazines")) select 0]]; + + { + if (tolower _x in _compatibleItems || {_x in _compatibleMags}) then { + GVAR(center) addSecondaryWeaponItem _x; + }; + } foreach (GVAR(currentItems) select 19); + + private _secondaryMags = secondaryWeaponMagazine GVAR(center); + GVAR(currentItems) set [19, (secondaryWeaponItems GVAR(center)) + ([_secondaryMags + [""], _secondaryMags] select (count _secondaryMags > 1))]; + GVAR(currentItems) set [1, _item]; + }; + }; + + if (_item == "") then { + TOGGLE_RIGHT_PANEL_HIDE + } else { + TOGGLE_RIGHT_PANEL_WEAPON + [_display, [_selectCorrectPanelWeapon, _weaponDefaultRightPanel] select (GVAR(currentRightPanel) == IDC_buttonCurrentMag2)] call FUNC(fillRightPanel); + }; + + call FUNC(showItem); + [_display, _control, _curSel, (configFile >> "CfgWeapons" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonHeadgear : { + if (_item == "") then { + removeHeadgear GVAR(center); + GVAR(currentItems) set [3, _item]; + } else { + GVAR(center) addHeadgear _item; + GVAR(currentItems) set [3, _item]; + }; + call FUNC(showItem); + TOGGLE_RIGHT_PANEL_HIDE + [_display, _control, _curSel, (configFile >> "CfgWeapons" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonUniform : { + if (_item == "") then { + + removeuniform GVAR(center); + GVAR(currentItems) set [15, []]; + GVAR(currentItems) set [4, _item]; + TOGGLE_RIGHT_PANEL_HIDE + } else { + + GVAR(center) forceAddUniform _item; + + while {count uniformItems GVAR(center) > 0} do { + GVAR(center) removeItemFromUniform (uniformItems GVAR(center) select 0); + }; //--- Remove default config contents + + {GVAR(center) addItemtoUniform _x} foreach (GVAR(currentItems) select 15); + GVAR(currentItems) set [4, _item]; + + [GVAR(center), ""] call bis_fnc_setUnitInsignia; + [GVAR(center), GVAR(currentInsignia)] call bis_fnc_setUnitInsignia; + + TOGGLE_RIGHT_PANEL_CONTAINER + [_display, _selectCorrectPanelContainer] call FUNC(fillRightPanel); + }; + + call FUNC(showItem); + [_display, _control, _curSel, (configFile >> "CfgWeapons" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonVest: { + if (_item == "") then { + + removeVest GVAR(center); + GVAR(currentItems) set [16, []]; + GVAR(currentItems) set [5, _item]; + TOGGLE_RIGHT_PANEL_HIDE + } else { + + GVAR(center) addVest _item; + while {count vestItems GVAR(center) > 0} do { + GVAR(center) removeItemFromVest (VestItems GVAR(center) select 0); + }; //--- Remove default config contents + {GVAR(center) addItemToVest _x} foreach (GVAR(currentItems) select 16); + + GVAR(currentItems) set [5, _item]; + + TOGGLE_RIGHT_PANEL_CONTAINER + [_display, _selectCorrectPanelContainer] call FUNC(fillRightPanel); + }; + + call FUNC(showItem); + [_display, _control, _curSel, (configFile >> "CfgWeapons" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonBackpack : { + if (_item == "") then { + + removeBackpack GVAR(center); + GVAR(currentItems) set [17, []]; + GVAR(currentItems) set [6, _item]; + TOGGLE_RIGHT_PANEL_HIDE + } else { + + removeBackpack GVAR(center); + GVAR(center) addBackpack _item; + while {count backpackItems GVAR(center) > 0} do { + GVAR(center) removeItemFromBackpack (backpackItems GVAR(center) select 0); + }; //--- Remove default config contents + {GVAR(center) addItemToBackpack _x} foreach (GVAR(currentItems) select 17); + + GVAR(currentItems) set [6, _item]; + + TOGGLE_RIGHT_PANEL_CONTAINER + [_display, _selectCorrectPanelContainer] call FUNC(fillRightPanel); + }; + + call FUNC(showItem); + [_display, _control, _curSel, (configFile >> "CfgVehicles" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonGoggles : { + if (_item == "") then { + removeGoggles GVAR(center); + GVAR(currentItems) set [7, _item]; + } else { + GVAR(center) addGoggles _item; + GVAR(currentItems) set [7, _item]; + }; + + call FUNC(showItem); + TOGGLE_RIGHT_PANEL_HIDE + [_display, _control, _curSel, (configFile >> "CfgGlasses" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonNVG : { + if (_item == "") then { + GVAR(center) unlinkItem (GVAR(currentItems) select 8); + GVAR(currentItems) set [8, _item]; + } else { + GVAR(center) linkItem _item; + GVAR(currentItems) set [8, _item]; + }; + + call FUNC(showItem); + TOGGLE_RIGHT_PANEL_HIDE + [_display, _control, _curSel, (configFile >> "CfgWeapons" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonBinoculars : { + if (_item == "") then { + GVAR(center) removeWeapon (binocular GVAR(center)); + GVAR(currentItems) set [9, _item]; + } else { + GVAR(center) addWeapon _item; + GVAR(currentItems) set [9, _item]; + call FUNC(showItem); + ADDBINOCULARSMAG + }; + call FUNC(showItem); + TOGGLE_RIGHT_PANEL_HIDE + [_display, _control, _curSel, (configFile >> "CfgWeapons" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonMap : { + if (_item == "") then { + GVAR(center) unlinkItem (GVAR(currentItems) select 10) select 0; + GVAR(currentItems) set [10, _item]; + } else { + GVAR(center) linkItem _item; + GVAR(currentItems) set [10, _item]; + }; + + call FUNC(showItem); + TOGGLE_RIGHT_PANEL_HIDE + [_display, _control, _curSel, (configFile >> "CfgWeapons" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonCompass : { + if (_item == "") then { + GVAR(center) unlinkItem (GVAR(currentItems) select 11) select 0; + GVAR(currentItems) set [11, _item]; + } else { + GVAR(center) linkItem _item; + GVAR(currentItems) set [11, _item]; + }; + + call FUNC(showItem); + TOGGLE_RIGHT_PANEL_HIDE + [_display, _control, _curSel, (configFile >> "CfgWeapons" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonRadio : { + if (_item == "") then { + GVAR(center) unlinkItem (GVAR(currentItems) select 12) select 0; + GVAR(currentItems) set [12, _item]; + } else { + GVAR(center) linkItem _item; + GVAR(currentItems) set [12, _item]; + }; + + call FUNC(showItem); + TOGGLE_RIGHT_PANEL_HIDE + [_display, _control, _curSel, (configFile >> "CfgWeapons" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonWatch : { + if (_item == "") then { + GVAR(center) unlinkItem (GVAR(currentItems) select 13); + GVAR(currentItems) set [13, _item]; + } else { + GVAR(center) linkItem _item; + GVAR(currentItems) set [13, _item]; + }; + + call FUNC(showItem); + TOGGLE_RIGHT_PANEL_HIDE + [_display, _control, _curSel, (configFile >> "CfgWeapons" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonGPS : { + if (_item == "") then { + GVAR(center) unlinkItem (GVAR(currentItems) select 14) select 0; + GVAR(currentItems) set [14, _item]; + } else { + GVAR(center) linkItem _item; + GVAR(currentItems) set [14, _item]; + }; + + call FUNC(showItem); + TOGGLE_RIGHT_PANEL_HIDE + [_display, _control, _curSel, (configFile >> "CfgWeapons" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonFace : { + private _face = [_item, "Default"] select (_item == ""); + + GVAR(center) setFace _face; + GVAR(currentFace) = _face; + + call FUNC(showItem); + TOGGLE_RIGHT_PANEL_HIDE + [_display, _control, _curSel, (configFile >> "CfgFaces" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonVoice : { + GVAR(center) setSpeaker _item; + GVAR(currentVoice) = _item; + + call FUNC(showItem); + TOGGLE_RIGHT_PANEL_HIDE + [_display, _control, _curSel, (configFile >> "CfgVoice" >> _item)] call FUNC(itemInfo); + }; + + case IDC_buttonInsigna : { + [GVAR(center), _item] call bis_fnc_setUnitInsignia; + GVAR(currentInsignia) = _item; + + call FUNC(showItem); + TOGGLE_RIGHT_PANEL_HIDE + [_display, _control, _curSel, (configFile >> "CfgUnitInsignia" >> _item)] call FUNC(itemInfo); + }; +}; + +(_display displayCtrl IDC_totalWeightText) ctrlSetText (format ["%1 (%2)", [GVAR(center), 2] call EFUNC(common,getWeight), [GVAR(center), 1] call EFUNC(common,getWeight)]); diff --git a/addons/arsenal/functions/fnc_onSelChangedLoadouts.sqf b/addons/arsenal/functions/fnc_onSelChangedLoadouts.sqf new file mode 100644 index 0000000000..3f4d508ae0 --- /dev/null +++ b/addons/arsenal/functions/fnc_onSelChangedLoadouts.sqf @@ -0,0 +1,103 @@ +/* + * Author: Alganthe + * Handles selection changes on loadouts panel. + * + * Arguments: + * 0: Loadouts panel control + * 1: Loadouts panel selection + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_display", "_control", "_curSel"]; + +private _shareButtonCtrl = _display displayCtrl IDC_buttonShare; +private _saveButtonCtrl = _display displayCtrl IDC_buttonSave; +private _loadButtonCtrl = _display displayCtrl IDC_buttonLoad; +private _deleteButtonCtrl = _display displayCtrl IDC_buttonDelete; +private _renameButtonCtrl = _display displayCtrl IDC_buttonRename; +private _textEditBoxCtrl= _display displayCtrl IDC_textEditBox; + +if (_curSel == -1) exitWith { + + if (GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts) then { + _saveButtonCtrl ctrlEnable false; + _saveButtonCtrl ctrlCommit 0; + }; + + _shareButtonCtrl ctrlSetText (localize LSTRING(buttonSharePrivateText)); + + { + _x ctrlEnable false; + _x ctrlCommit 0; + } foreach [_shareButtonCtrl, _loadButtonCtrl, _deleteButtonCtrl, _renameButtonCtrl]; +}; + +switch (GVAR(currentLoadoutsTab)) do { + + case IDC_buttonMyLoadouts: { + + _shareButtonCtrl ctrlEnable (GVAR(allowSharedLoadouts) && {isMultiplayer}); + _shareButtonCtrl ctrlCommit 0; + + _loadButtonCtrl ctrlEnable true; + _loadButtonCtrl ctrlCommit 0; + + _shareButtonCtrl ctrlSetText ( [ + localize LSTRING(buttonSharePrivateText), + localize LSTRING(buttonSharePublicText) + ] select ((_control lnbValue [_curSel, 0]) == 1)); + + { + _x ctrlEnable true; + _x ctrlCommit 0; + } foreach [_renameButtonCtrl, _deleteButtonCtrl]; + + _textEditBoxCtrl ctrlSetText (_control lnbText [_curSel, 1]); + }; + + case IDC_buttonDefaultLoadouts: { + + { + _x ctrlEnable true; + _x ctrlCommit 0; + } foreach [_saveButtonCtrl, _loadButtonCtrl]; + + _shareButtonCtrl ctrlEnable false; + _shareButtonCtrl ctrlCommit 0; + + { + _x ctrlEnable (is3DEN); + _x ctrlCommit 0; + } foreach [_deleteButtonCtrl, _renameButtonCtrl]; + + _textEditBoxCtrl ctrlSetText (_control lnbText [_curSel, 1]); + }; + + case IDC_buttonSharedLoadouts: { + + { + _x ctrlEnable true; + _x ctrlCommit 0; + } foreach [_saveButtonCtrl, _loadButtonCtrl]; + + _shareButtonCtrl ctrlEnable false; + _shareButtonCtrl ctrlCommit 0; + + if ((serverCommandAvailable "#logout") || {(_control lnbText [_curSel, 0]) == profileName}) then { + + _deleteButtonCtrl ctrlEnable true; + _deleteButtonCtrl ctrlCommit 0; + } else { + _deleteButtonCtrl ctrlEnable false; + _deleteButtonCtrl ctrlCommit 0; + }; + + _textEditBoxCtrl ctrlSetText (_control lnbText [_curSel, 1]); + }; +}; diff --git a/addons/arsenal/functions/fnc_onSelChangedRight.sqf b/addons/arsenal/functions/fnc_onSelChangedRight.sqf new file mode 100644 index 0000000000..7a565cd14d --- /dev/null +++ b/addons/arsenal/functions/fnc_onSelChangedRight.sqf @@ -0,0 +1,77 @@ +/* + * Author: Alganthe + * Handles selection changes on the right panel. + * + * Arguments: + * 0: Right panel control + * 1: Right panel selection + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_control", "_curSel"]; + +if (_curSel < 0) exitwith {}; + +private _ctrlIDC = ctrlIDC _control; +private _display = ctrlParent _control; +private _item = _control lbData _curSel; + + +private _fnc_selectItem = { + params ["_item", "_currentItemsIndex", "_itemIndex"]; + + switch (_currentItemsIndex) do { + case 18: { + if (_item == "") then { + GVAR(center) removePrimaryWeaponItem ((GVAR(currentItems) select 18) select _itemIndex); + private _primaryMags = primaryWeaponMagazine GVAR(center); + GVAR(currentItems) set [18, (primaryWeaponItems GVAR(center)) + ([_primaryMags + [""], _primaryMags] select (count _primaryMags > 1))]; + } else { + GVAR(center) addPrimaryWeaponItem _item; + private _primaryMags = primaryWeaponMagazine GVAR(center); + GVAR(currentItems) set [18, (primaryWeaponItems GVAR(center)) + ([_primaryMags + [""], _primaryMags] select (count _primaryMags > 1))]; + }; + [_display, _control, _curSel, (configFile >> (["CfgWeapons", "CfgMagazines"] select (_itemIndex in [4, 5]))>> _item)] call FUNC(itemInfo); + }; + + case 19: { + if (_item == "") then { + GVAR(center) removeSecondaryWeaponItem ((GVAR(currentItems) select 19) select _itemIndex); + private _secondaryMags = secondaryWeaponMagazine GVAR(center); + GVAR(currentItems) set [19, (secondaryWeaponItems GVAR(center)) + ([_secondaryMags + [""], _secondaryMags] select (count _secondaryMags > 1))]; + } else { + GVAR(center) addSecondaryWeaponItem _item; + private _secondaryMags = secondaryWeaponMagazine GVAR(center); + GVAR(currentItems) set [19, (secondaryWeaponItems GVAR(center)) + ([_secondaryMags + [""], _secondaryMags] select (count _secondaryMags > 1))]; + }; + [_display, _control, _curSel, (configFile >> (["CfgWeapons", "CfgMagazines"] select (_itemIndex in [4, 5]))>> _item)] call FUNC(itemInfo); + }; + + case 20: { + if (_item == "") then { + GVAR(center) removeHandgunItem ((GVAR(currentItems) select 20) select _itemIndex); + private _handgunMags = handgunMagazine GVAR(center); + GVAR(currentItems) set [20, (handgunItems GVAR(center)) + ([_handgunMags + [""], _handgunMags] select (count _handgunMags > 1))]; + } else { + GVAR(center) addHandgunItem _item; + private _handgunMags = handgunMagazine GVAR(center); + GVAR(currentItems) set [20, (handgunItems GVAR(center)) + ([_handgunMags + [""], _handgunMags] select (count _handgunMags > 1))]; + }; + [_display, _control, _curSel, (configFile >> (["CfgWeapons", "CfgMagazines"] select (_itemIndex in [4, 5]))>> _item)] call FUNC(itemInfo); + }; + }; +}; + +[ + _item, + 18 + ([IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find GVAR(currentLeftPanel)), + [IDC_buttonMuzzle, IDC_buttonItemAcc, IDC_buttonOptic, IDC_buttonBipod, IDC_buttonCurrentMag, IDC_buttonCurrentMag2] find GVAR(currentRightPanel) +] call _fnc_selectItem; + +(_display displayCtrl IDC_totalWeightText) ctrlSetText (format ["%1 (%2)", [GVAR(center), 2] call EFUNC(common,getWeight), [GVAR(center), 1] call EFUNC(common,getWeight)]); diff --git a/addons/arsenal/functions/fnc_onSelChangedRightListnBox.sqf b/addons/arsenal/functions/fnc_onSelChangedRightListnBox.sqf new file mode 100644 index 0000000000..29c66a79f9 --- /dev/null +++ b/addons/arsenal/functions/fnc_onSelChangedRightListnBox.sqf @@ -0,0 +1,51 @@ +/* + * Author: Alganthe + * Handles selection changes on the right panel (listnbox). + * + * Arguments: + * 0: Right panel control + * 1: Right panel selection + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_control", "_curSel"]; + +if (_curSel < 0) exitwith {}; + +private _ctrlIDC = ctrlIDC _control; +private _display = ctrlParent _control; +private _item = [_control lnbData [_curSel, 0], _control lbData _curSel] select !(ctrlType _control == 102); + +private _fnc_selectRight = { + params ["_item", "_cfgEntry"]; + + // Load remaining + private _maxLoad = switch (GVAR(currentLeftPanel)) do { + case IDC_buttonUniform: { + gettext (configfile >> "CfgWeapons" >> uniform GVAR(center) >> "ItemInfo" >> "containerClass") + }; + case IDC_buttonVest: { + gettext (configfile >> "CfgWeapons" >> vest GVAR(center) >> "ItemInfo" >> "containerClass") + }; + case IDC_buttonBackpack: { + backpack GVAR(center) + }; + }; + + [_control, _maxLoad] call FUNC(updateRightPanel); + [_display, _control, _curSel, (configFile >> _cfgEntry >> _item)] call FUNC(itemInfo); +}; + +if (GVAR(currentLeftPanel) in [IDC_buttonUniform, IDC_buttonVest, IDC_buttonBackpack]) then { + + [ + _item, + ["CfgWeapons", "CfgMagazines"] select (GVAR(currentRightPanel) in [IDC_buttonMag, IDC_buttonMagALL, IDC_buttonThrow, IDC_buttonPut]) + ] call _fnc_selectRight; +}; diff --git a/addons/arsenal/functions/fnc_open3DEN.sqf b/addons/arsenal/functions/fnc_open3DEN.sqf new file mode 100644 index 0000000000..6bb0adcaa3 --- /dev/null +++ b/addons/arsenal/functions/fnc_open3DEN.sqf @@ -0,0 +1,17 @@ +/* + * Author: Alganthe + * Replace the 3DEN "edit loadout" menu action + * + * Arguments: + * None + * + * Return Value: + * None + * + * + * Public: No +*/ +#include "script_component.hpp" + +private _entity = (uinamespace getvariable ["bis_fnc_3DENEntityMenu_data",[]]) param [1, objnull]; +[_entity, _entity, true] call FUNC(openBox); diff --git a/addons/arsenal/functions/fnc_openBox.sqf b/addons/arsenal/functions/fnc_openBox.sqf new file mode 100644 index 0000000000..4a79f95918 --- /dev/null +++ b/addons/arsenal/functions/fnc_openBox.sqf @@ -0,0 +1,53 @@ +/* + * Author: Alganthe + * Open arsenal. + * + * Arguments: + * 0: Box + * 1: Unit to open the arsenal on + * 2: Ignore virtual items and fill arsenal + * + * Return Value: + * None + * + * Example: + * [_box, player] call ace_arsenal_fnc_openBox + * + * Public: Yes +*/ +#include "script_component.hpp" + +params [["_object", objNull, [objNull]], ["_center", objNull, [objNull]], ["_mode", false, [false]]]; + +if ( + isNull _object || + {isNull _center} || + {!(_center isKindOf "Man")} || + {!(isNull objectParent _center) && {!is3DEN}} +) exitWith {}; + +if (isNil {_object getVariable [QGVAR(virtualItems), nil]} && {!_mode}) exitWith { + [localize LSTRING(noVirtualItems), false, 5, 1] call EFUNC(common,displayText); +}; + +if (canSuspend) exitWith { + [{_this call FUNC(openBox)}, _this] call CBA_fnc_directCall; +}; + +private _displayToUse = [findDisplay 46, findDIsplay 312] select (!isNull findDisplay 312); +_displayToUse = [_displayToUse, findDisplay 313] select (is3DEN); + +if (isNil "_displayToUse" || {!isnil QGVAR(camera)}) exitWith { + [localize LSTRING(CantOpenDisplay), false, 5, 1] call EFUNC(common,displayText); +}; + +if (_mode) then { + GVAR(virtualItems) = uiNamespace getVariable QGVAR(configItems); +} else { + GVAR(virtualItems) = +(_object getVariable [QGVAR(virtualItems), [ + [[], [], []], [[], [], [], []], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [] + ]]); +}; + +GVAR(center) = _center; +_displayToUse createDisplay QGVAR(display); diff --git a/addons/arsenal/functions/fnc_removeBox.sqf b/addons/arsenal/functions/fnc_removeBox.sqf new file mode 100644 index 0000000000..43fa903ca4 --- /dev/null +++ b/addons/arsenal/functions/fnc_removeBox.sqf @@ -0,0 +1,35 @@ +/* + * Author: Alganthe + * Remove arsenal from target. + * + * Arguments: + * 0: Target + * 1: Remove globally + * + * Return Value: + * None + * + * Example: + * [_box, true] call ace_arsenal_fnc_removeBox + * + * Public: Yes +*/ +#include "script_component.hpp" + +params [["_object", objNull, [objNull]], ["_global", true, [true]]]; + +if (isNull _object || {isNil QGVAR(EHIDArray)}) exitWith {}; + +if (_global && {isMultiplayer}) then { + private _ID = (GVAR(EHIDArray) select {_x select 1 == _object}) select 0; + + if !(isNil "_ID") then { + [_ID select 0] call CBA_fnc_removeGlobalEventJIP; + GVAR(EHIDArray) deleteAt (GVAR(EHIDArray) find _ID); + publicVariable QGVAR(EHIDArray); + [QGVAR(removeBox), [_object, false]] call CBA_fnc_globalEvent; + }; +} else { + _object setVariable [QGVAR(virtualItems), nil, false]; + [_object, 0, ["ACE_MainActions", QGVAR(interaction)]] call EFUNC(interact_menu,removeActionFromObject); +}; diff --git a/addons/arsenal/functions/fnc_removeVirtualItems.sqf b/addons/arsenal/functions/fnc_removeVirtualItems.sqf new file mode 100644 index 0000000000..ad96718c6d --- /dev/null +++ b/addons/arsenal/functions/fnc_removeVirtualItems.sqf @@ -0,0 +1,80 @@ +/* + * Author: Alganthe + * Remove virtual items to the provided target. + * + * Arguments: + * 0: Target + * 1: Items + * 2: Add globally + * + * Return Value: + * None + * + * Example: + * [_box, ["item1", "item2", "itemN"]] call ace_arsenal_fnc_removeVirtualItems + * [_box, true, false] call ace_arsenal_fnc_removeVirtualItems + * + * Public: Yes +*/ +#include "script_component.hpp" + +params [ ["_object", objNull, [objNull]], ["_items", [], [true, [""]]], ["_global", false, [false]] ]; + +if (_object == objNull) exitWith {}; +if (_items isEqualType [] && {count _items == 0}) exitWith {}; + +private _cargo = _object getVariable [QGVAR(virtualItems), [ + [[], [], []], // Weapons 0, primary, handgun, secondary + [[], [], [], []], // WeaponAccessories 1, optic,side,muzzle,bipod + [ ], // Magazines 2 + [ ], // Headgear 3 + [ ], // Uniform 4 + [ ], // Vest 5 + [ ], // Backpacks 6 + [ ], // Goggles 7 + [ ], // NVGs 8 + [ ], // Binoculars 9 + [ ], // Map 10 + [ ], // Compass 11 + [ ], // Radio slot 12 + [ ], // Watch slot 13 + [ ], // Comms slot 14 + [ ], // WeaponThrow 15 + [ ], // WeaponPut 16 + [ ] // InventoryItems 17 +]]; + +if (_items isEqualType true && {_items}) then { + [_object, _global] call FUNC(removeBox); + _object setVariable [QGVAR(virtualItems), nil, _global]; +} else { + + // Make sure all items are in string form + _items = _items select {_x isEqualType "" && {_x != ""}}; + + { + if (_forEachIndex isEqualTo 0) then { + _cargo set [_forEachIndex, [(_x select 0) - _items, (_x select 1) - _items, (_x select 2) - _items]]; + } else { + if (_forEachIndex isEqualTo 1) then { + _cargo set [_forEachIndex, [(_x select 0) - _items, (_x select 1) - _items, (_x select 2) - _items, (_x select 3) - _items]]; + } else { + _cargo set [_cargo find _x, _x - _items]; + }; + }; + } foreach _cargo; + + private _itemCount = { + if (_x isEqualTo (_cargo select 0) || {_x isEqualTo (_cargo select 1)}) then { + !(_x isEqualTo [[],[],[]] || {_x isEqualTo [[],[],[],[]]}) + } else { + !(_x isEqualTo []) + }; + } count _cargo; + + if (_itemCount == 0) then { + [_object, _global] call FUNC(removeBox); + } else { + _object setVariable [QGVAR(virtualItems), _cargo, _global]; + }; +}; diff --git a/addons/arsenal/functions/fnc_scanConfig.sqf b/addons/arsenal/functions/fnc_scanConfig.sqf new file mode 100644 index 0000000000..c74a368e1a --- /dev/null +++ b/addons/arsenal/functions/fnc_scanConfig.sqf @@ -0,0 +1,184 @@ +/* + * Author: Dedmen + * Cache an array of all the compatible items for arsenal. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" + +private _cargo = [ + [[], [], []], // Weapons 0, primary, secondary, handgun + [[], [], [], []], // WeaponAccessories 1, optic,side,muzzle,bipod + [ ], // Magazines 2 + [ ], // Headgear 3 + [ ], // Uniform 4 + [ ], // Vest 5 + [ ], // Backpacks 6 + [ ], // Goggles 7 + [ ], // NVGs 8 + [ ], // Binoculars 9 + [ ], // Map 10 + [ ], // Compass 11 + [ ], // Radio slot 12 + [ ], // Watch slot 13 + [ ], // Comms slot 14 + [ ], // WeaponThrow 15 + [ ], // WeaponPut 16 + [ ] // InventoryItems 17 +]; + +private _configCfgWeapons = configFile >> "CfgWeapons"; //Save this lookup in variable for perf improvement +private _magazineGroups = [[],[]] call CBA_fnc_hashCreate; + +{ + private _configItemInfo = _x >> "ItemInfo"; + private _simulationType = getText (_x >> "simulation"); + private _className = configName _x; + private _hasItemInfo = isClass (_configItemInfo); + private _itemInfoType = if (_hasItemInfo) then {getNumber (_configItemInfo >> "type")} else {0}; + + switch true do { + /* Weapon acc */ + case ( + _hasItemInfo && + {_itemInfoType in [101, 201, 301, 302]} && + {!(configName _x isKindOf ["CBA_MiscItem", (_configCfgWeapons)])} + ): { + + //Convert type to array index + (_cargo select 1) select ([201,301,101,302] find _itemInfoType) pushBackUnique _className; + }; + /* Headgear */ + case (_hasItemInfo && {_itemInfoType == 605}): { + (_cargo select 3) pushBackUnique _className; + }; + /* Uniform */\ + case (_hasItemInfo && {_itemInfoType == 801}): { + (_cargo select 4) pushBackUnique _className; + }; + /* Vest */ + case (_hasItemInfo && {_itemInfoType == 701}): { + (_cargo select 5) pushBackUnique _className; + }; + /* NVgs */ + case (_simulationType == "NVGoggles"): { + (_cargo select 8) pushBackUnique _className; + }; + /* Binos */ + case (_simulationType == "Binocular" || + ((_simulationType == 'Weapon') && {(getNumber (_x >> 'type') == 4096)})): { + (_cargo select 9) pushBackUnique _className; + }; + /* Map */ + case (_simulationType == "ItemMap"): { + (_cargo select 10) pushBackUnique _className; + }; + /* Compass */ + case (_simulationType == "ItemCompass"): { + (_cargo select 11) pushBackUnique _className; + }; + /* Radio */ + case (_simulationType == "ItemRadio"): { + (_cargo select 12) pushBackUnique _className; + }; + /* Watch */ + case (_simulationType == "ItemWatch"): { + (_cargo select 13) pushBackUnique _className; + }; + /* GPS */ + case (_simulationType == "ItemGPS"): { + (_cargo select 14) pushBackUnique _className; + }; + /* UAV terminals */ + case (_hasItemInfo && {_itemInfoType == 621}): { + (_cargo select 14) pushBackUnique _className; + }; + /* Weapon, at the bottom to avoid adding binos */ + case (isClass (_x >> "WeaponSlotsInfo") && + {getNumber (_x >> 'type') != 4096}): { + switch (getNumber (_x >> "type")) do { + case 1: { + (_cargo select 0) select 0 pushBackUnique (_className call bis_fnc_baseWeapon); + }; + case 2: { + (_cargo select 0) select 2 pushBackUnique (_className call bis_fnc_baseWeapon); + }; + case 4: { + (_cargo select 0) select 1 pushBackUnique (_className call bis_fnc_baseWeapon); + }; + }; + }; + /* Misc items */ + case ( + _hasItemInfo && + (_itemInfoType in [101, 201, 301, 302] && + {(_className isKindOf ["CBA_MiscItem", (_configCfgWeapons)])}) || + {_itemInfoType in [401, 619, 620]} || + {(getText ( _x >> "simulation")) == "ItemMineDetector"} + ): { + (_cargo select 17) pushBackUnique _className; + }; + }; +} foreach configProperties [_configCfgWeapons, "isClass _x && {getNumber (_x >> 'scope') == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true]; + +{ + private _className = configName _x; + private _grenadeList = []; + { + _grenadeList append getArray (_configCfgWeapons >> "Throw" >> _x >> "magazines"); + false + } count getArray (_configCfgWeapons >> "Throw" >> "muzzles"); + + private _putList = []; + { + _putList append getArray (_configCfgWeapons >> "Put" >> _x >> "magazines"); + false + } count getArray (_configCfgWeapons >> "Put" >> "muzzles"); + + + switch true do { + // Rifle, handgun, secondary weapons mags + case ( + (getNumber (_x >> "type") in [256,512,1536,16]) && + {!(_className in _grenadeList)} && + {!(_className in _putList)} + ): { + (_cargo select 2) pushBackUnique _className; + }; + // Grenades + case (_className in _grenadeList): { + (_cargo select 15) pushBackUnique _className; + }; + // Put + case (_className in _putList): { + (_cargo select 16) pushBackUnique _className; + }; + }; + + if (isArray (_x >> "magazineGroup")) then { + { + private _entry = [_magazineGroups, _x] call CBA_fnc_hashGet; + _entry pushBackUnique _className; + [_magazineGroups, _x, _entry] call CBA_fnc_hashSet; + } forEach getArray (_x >> "magazineGroup") + }; +} foreach configProperties [(configFile >> "CfgMagazines"), "isClass _x && {getNumber (_x >> 'scope') == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true]; + +{ + if (getText (_x >> "vehicleClass") == "Backpacks") then { + (_cargo select 6) pushBackUnique (configName _x); + }; +} foreach configProperties [(configFile >> "CfgVehicles"), "isClass _x && {getNumber (_x >> 'scope') == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true]; + +{ + (_cargo select 7) pushBackUnique (configName _x); +} foreach configProperties [(configFile >> "CfgGlasses"), "isClass _x && {getNumber (_x >> 'scope') == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true]; + +uiNamespace setVariable [QGVAR(configItems), _cargo]; +uiNamespace setVariable [QGVAR(magazineGroups), _magazineGroups]; diff --git a/addons/arsenal/functions/fnc_showItem.sqf b/addons/arsenal/functions/fnc_showItem.sqf new file mode 100644 index 0000000000..e97ebd8dd5 --- /dev/null +++ b/addons/arsenal/functions/fnc_showItem.sqf @@ -0,0 +1,75 @@ +/* + * Author: Alganthe + * Change unit animation / play sound preview. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + + + +private _nextAction = switch (GVAR(currentLeftPanel)) do { + + case IDC_buttonPrimaryWeapon : { + ["Civil", "PrimaryWeapon"] select ((GVAR(currentItems) select 0) != "") + }; + case IDC_buttonSecondaryWeapon : { + ["Civil", "SecondaryWeapon"] select (GVAR(currentItems) select 1 != "") + }; + case IDC_buttonHandgun : { + ["Civil", "HandGunOn"] select (GVAR(currentItems) select 2 != "") + }; + case IDC_buttonHeadgear; + case IDC_buttonUniform; + case IDC_buttonVest; + case IDC_buttonBackpack; + case IDC_buttonGoggles; + case IDC_buttonMap; + case IDC_buttonGPS; + case IDC_buttonRadio; + case IDC_buttonCompass; + case IDC_buttonWatch; + case IDC_buttonFace; + case IDC_buttonNVG : { + "Civil" + }; + case IDC_buttonBinoculars : { + ["Civil", "Binoculars"] select (GVAR(currentItems) select 9 != "") + }; + case IDC_buttonInsigna : { + "Salute" + }; + case IDC_buttonVoice : { + GVAR(center) directSay "CuratorObjectPlaced"; + "Civil" + }; +}; + +if (_nextAction != GVAR(currentAction)) then { + switch (_nextAction) do { + case "PrimaryWeapon": { + GVAR(selectedWeaponType) = 0; + }; + case "SecondaryWeapon": { + GVAR(selectedWeaponType) = 1; + }; + case "HandGunOn": { + GVAR(selectedWeaponType) = 2; + }; + }; + + if (simulationEnabled GVAR(center)) then { + GVAR(center) playActionNow _nextAction; + } else { + GVAR(center) switchAction _nextAction; + }; + + GVAR(currentAction) = _nextAction; +}; diff --git a/addons/arsenal/functions/fnc_sortPanel.sqf b/addons/arsenal/functions/fnc_sortPanel.sqf new file mode 100644 index 0000000000..c8bf02777f --- /dev/null +++ b/addons/arsenal/functions/fnc_sortPanel.sqf @@ -0,0 +1,64 @@ +/* + * Author: Alganthe, Dedmen + * Sort arsenal panel. + * + * Arguments: + * 0: Panel's control to sort + * 1: Sorting mode + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_control", "_mode"]; + +private _display = ctrlParent _control; +private ["_panel", "_curSel", "_selected"]; + +// Right panel +if (ctrlIDC _control == 17 && {GVAR(currentLeftPanel) in [IDC_buttonUniform ,IDC_buttonVest, IDC_buttonBackpack]}) then { + _panel = _display displayCtrl IDC_rightTabContentListnBox; + _curSel = lnbCurSelRow _panel; + _selected = _panel lnbData [_curSel, 0]; + + switch (_mode) do { + case 0: { + _panel lnbSort [1, false]; + }; + + case 1: { + _panel lnbSortByValue [0, false]; + }; + + case 2: { + _panel lnbSort [2, true]; + }; + }; + + if (_cursel >= 0) then { + for '_i' from 0 to (((lnbsize _panel) select 0) - 1) do { + if ((_panel lnbdata [_i, 0]) == _selected) exitwith {_panel lnbSetCurSelRow _i}; + }; + }; +// Left panel +} else { + _panel = _display displayCtrl ([IDC_leftTabContent, IDC_rightTabContent] select (ctrlIDC _control == 17)); + _curSel = lbCurSel _panel; + _selected = _panel lbData _curSel; + + if (_mode > 0) then { + lbSortByValue _panel; + } else { + lbsort _panel; + }; + + if (_cursel >= 0) then { + for '_i' from 0 to (lbsize _panel - 1) do { + if ((_panel lbdata _i) == _selected) exitwith {_panel lbSetCurSel _i}; + }; + }; +}; diff --git a/addons/arsenal/functions/fnc_updateCamPos.sqf b/addons/arsenal/functions/fnc_updateCamPos.sqf new file mode 100644 index 0000000000..f8b6b91a15 --- /dev/null +++ b/addons/arsenal/functions/fnc_updateCamPos.sqf @@ -0,0 +1,27 @@ +/* + * Author: Karel Moricky, modified by Alganthe + * Update camera position + * Modernized a bit, modified vars to fit arsenal rewrite. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: Yes +*/ +#include "script_component.hpp" + +GVAR(cameraPosition) params ["_distance", "_dirH", "_dirV"]; +[GVAR(cameraHelper), [_dirH + 180, - _dirV, 0]] call bis_fnc_setobjectrotation; +GVAR(cameraHelper) attachTo [GVAR(center), GVAR(cameraPosition) select 3, ""]; //--- Reattach for smooth movement + +GVAR(camera) setPos (GVAR(cameraHelper) modelToWorld [0, -_distance, 0]); +GVAR(camera) setVectorDirAndUp [vectorDir GVAR(cameraHelper), vectorUp GVAR(cameraHelper)]; + +//--- Make sure the camera is not underground +if ((getPosAsl GVAR(camera) select 2) < (getPosAsl GVAR(center) select 2)) then { + private _disCoef = ((getPosAsl GVAR(cameraHelper) select 2) - (getPosAsl GVAR(center) select 2)) / ((getPosAsl GVAR(cameraHelper) select 2) - (getPosAsl GVAR(camera) select 2) + 0.001); + GVAR(camera) setPos (GVAR(cameraHelper) modelToWorldVisual [0, -_distance * _disCoef, 0]); +}; diff --git a/addons/arsenal/functions/fnc_updateRightPanel.sqf b/addons/arsenal/functions/fnc_updateRightPanel.sqf new file mode 100644 index 0000000000..41c7c68483 --- /dev/null +++ b/addons/arsenal/functions/fnc_updateRightPanel.sqf @@ -0,0 +1,57 @@ +/* + * Author: Alganthe + * Update the right panel (listnbox). + * + * Arguments: + * 0: Right panel control + * 1: Max load of the current container + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_control", "_maxLoad"]; + +private _loadIndicatorBarCtrl = _display displayCtrl IDC_loadIndicatorBar; +private _curSel = lnbCurSelRow _control; + +(lnbSize _control) params ["_rows"]; + +_maxLoad = getnumber (configfile >> "CfgVehicles" >> _maxLoad >> "maximumLoad"); +_maxLoad = _maxLoad * (1 - (progressPosition _loadIndicatorBarCtrl)); +_maxLoad = parseNumber (_maxLoad toFixed 2); // Required to avoid an issue where even though the typename returns "SCALAR" it doesn't act as one. + +// Grey out items too big +for "_r" from 0 to (_rows - 1) do { + private _mass = _control getVariable (_control lnbData [_r, 0]); + private _class = _control lnbText [_r, 1]; + + private _alpha = [0.25, 1.0] select (_mass <= _maxLoad); + private _color = [1, 1, 1, _alpha]; + _control lnbSetColor [[_r, 1],_color]; + _control lnbSetColor [[_r, 2],_color]; +}; + +// Remove all from container show / hide +private _removeAllCtrl = _display displayCtrl IDC_buttonRemoveAll; + +if (progressPosition _loadIndicatorBarCtrl > 0) then { + + _removeAllCtrl ctrlSetFade 0; + _removeAllCtrl ctrlShow true; + _removeAllCtrl ctrlEnable true; + _removeAllCtrl ctrlCommit FADE_DELAY; +}; + +(_display displayCtrl IDC_totalWeightText) ctrlSetText (format ["%1 (%2)", [GVAR(center), 2] call EFUNC(common,getWeight), [GVAR(center), 1] call EFUNC(common,getWeight)]); + +// change button color if unique or too big +if (_curSel != -1) then { + private _plusButtonCtrl = _display displayCtrl IDC_arrowPlus; + _plusButtonCtrl ctrlEnable !((_control lnbValue [_curSel, 2]) == 1 || {(_control getVariable (_control lnbData [_curSel, 0])) > _maxLoad}); + _plusButtonCtrl ctrlCommit FADE_DELAY; +}; diff --git a/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf b/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf new file mode 100644 index 0000000000..7a037d987d --- /dev/null +++ b/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf @@ -0,0 +1,118 @@ +/* + * Author: Alganthe + * Update the list of unique items. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +GVAR(virtualItems) set [18, []]; +GVAR(virtualItems) set [19, []]; +GVAR(virtualItems) set [20, []]; +GVAR(virtualItems) set [21, []]; +GVAR(virtualItems) set [22, [[], [], [], []]]; +GVAR(virtualItems) set [23, []]; +GVAR(virtualItems) set [24, []]; + +private _array = LIST_DEFAULTS select 2; +private _itemsCache = uiNamespace getVariable QGVAR(configItems); + +private _configCfgWeapons = configFile >> "CfgWeapons"; +private _configMagazines = configFile >> "CfgMagazines"; +private _configVehicles = configFile >> "CfgVehicles"; +private _configGlasses = configFile >> "CfgGlasses"; + +{ + switch true do { + // Weapon mag + case ( + isClass (_configMagazines >> _x) && + {_x in (_itemsCache select 2)} && + {!(_x in (GVAR(virtualItems) select 2))} + ): { + (GVAR(virtualItems) select 19) pushBackUnique _x; + }; + + // Mag throw + case ( + isClass (_configMagazines >> _x) && + {_x in (_itemsCache select 15)} && + {!(_x in (GVAR(virtualItems) select 15))} + ): { + (GVAR(virtualItems) select 20) pushBackUnique _x; + }; + + // Mag put + case ( + isClass (_configMagazines >> _x) && + {_x in (_itemsCache select 16)} && + {!(_x in (GVAR(virtualItems) select 16))} + ): { + (GVAR(virtualItems) select 21) pushBackUnique _x; + }; + + // acc + case ( + isClass (_configCfgWeapons >> _x) && + {!(_x in ((GVAR(virtualItems) select 1) select 0))} && + {_x in ((_itemsCache select 1) select 0)} + ): { + ((GVAR(virtualItems) select 22) select 0) pushBackUnique _x; + }; + + // acc + case ( + isClass (_configCfgWeapons >> _x) && + {!(_x in ((GVAR(virtualItems) select 1) select 1))} && + {_x in ((_itemsCache select 1) select 1)} + ): { + ((GVAR(virtualItems) select 22) select 1) pushBackUnique _x; + }; + + // acc + case ( + isClass (_configCfgWeapons >> _x) && + {!(_x in ((GVAR(virtualItems) select 1) select 2))} && + {_x in ((_itemsCache select 1) select 2)} + ): { + ((GVAR(virtualItems) select 22) select 2) pushBackUnique _x; + }; + // acc + case ( + isClass (_configCfgWeapons >> _x) && + {!(_x in ((GVAR(virtualItems) select 1) select 3))} && + {_x in ((_itemsCache select 1) select 3)} + ): { + ((GVAR(virtualItems) select 22) select 3) pushBackUnique _x; + }; + + // Misc + case ( + isClass (_configCfgWeapons >> _x) && + {!(_x in (GVAR(virtualItems) select 17))} && + {!(_x in ((_itemsCache select 1) select 0))} && + {!(_x in ((_itemsCache select 1) select 1))} && + {!(_x in ((_itemsCache select 1) select 2))} && + {!(_x in ((_itemsCache select 1) select 3))} + ): { + (GVAR(virtualItems) select 18) pushBackUnique _x; + }; + + // Backpacks + case (isClass (_configVehicles >> _x)): { + (GVAR(virtualItems) select 23) pushBackUnique _x; + }; + + // Facewear + case (isClass (_configGlasses >> _x)): { + (GVAR(virtualItems) select 24) pushBackUnique _x; + }; + }; +} foreach _array; diff --git a/addons/arsenal/functions/fnc_verifyLoadout.sqf b/addons/arsenal/functions/fnc_verifyLoadout.sqf new file mode 100644 index 0000000000..e7946b8b10 --- /dev/null +++ b/addons/arsenal/functions/fnc_verifyLoadout.sqf @@ -0,0 +1,239 @@ +/* + * Author: Alganthe + * Verify the provided loadout. + * + * Arguments: + * 0: Loadout (getUnitLoadout format) + * + * Return Value: + * Verified loadout and missing / unavailable items list and count + * + * Public: No +*/ +#include "script_component.hpp" +#include "..\defines.hpp" + +params ["_loadout"]; + +private _weaponCfg = configFile >> "CfgWeapons"; +private _magCfg = configFile >> "CfgMagazines"; +private _vehcCfg = configFile >> "CfgVehicles"; +private _glassesCfg = configFile >> "CfgGlasses"; +private _weaponsArray = GVAR(virtualItems) select 0; +private _accsArray = GVAR(virtualItems) select 1; + +private _nullItemsAmount = 0; +private _unavailableItemsAmount = 0; +private _nullItemsList = []; +private _unavailableItemsList = []; + +private _fnc_weaponCheck = { + params ["_dataPath"]; + + if (count _dataPath != 0) then { + { + if (_x isEqualType "") then { + + private _item = _x; + + if (_item != "") then { + if (isClass (_weaponCfg >> _item)) then { + if !(CHECK_WEAPON_OR_ACC) then { + + _unavailableItemsList pushBackUnique _item; + _dataPath set [_forEachIndex, ""]; + _unavailableItemsAmount = _unavailableItemsAmount + 1; + }; + } else { + + _nullItemsList pushBackUnique _item; + _dataPath set [_forEachIndex, ""]; + _nullItemsAmount = _nullItemsAmount + 1; + }; + }; + + } else { + + if (count _x != 0) then { + private _mag = _x select 0; + + if (isClass (_magCfg >> _mag)) then { + if !(_mag in (GVAR(virtualItems) select 2)) then { + + _unavailableItemsList pushBackUnique _item; + _dataPath set [_forEachIndex, []]; + _unavailableItemsAmount = _unavailableItemsAmount + 1; + }; + } else { + + _nullItemsList pushBackUnique _item; + _dataPath set [_forEachIndex, []]; + _nullItemsAmount = _nullItemsAmount + 1; + }; + }; + }; + } foreach _dataPath; + }; +}; + +for "_dataIndex" from 0 to 9 do { + switch (_dataIndex) do { + case 0; + case 1; + case 2; + case 8: { + [_loadout select _dataIndex] call _fnc_weaponCheck; + }; + + case 3; + case 4; + case 5: { + private _containerArray = (_loadout select _dataIndex); + + if (count _containerArray != 0) then { + + _containerArray params ["_item", "_containerItems"]; + + if (isClass (_vehcCfg >> _item) || {isClass (_weaponCfg >> _item)}) then { + if !(CHECK_CONTAINER) then { + + _unavailableItemsList pushBackUnique _item; + _loadout set [_dataIndex, []]; + _unavailableItemsAmount = _unavailableItemsAmount + 1; + } else { + + if (count _containerItems != 0) then { + { + private _currentIndex = _forEachIndex; + + switch (count _x) do { + case 2: { + + if ((_x select 0) isEqualType "") then { + + private _item = _x select 0; + + if (CLASS_CHECK_ITEM) then { + if !(CHECK_CONTAINER_ITEMS) then { + + _unavailableItemsList pushBackUnique _item; + ((_loadout select _dataIndex) select 1) set [_currentIndex, []]; + _unavailableItemsAmount = _unavailableItemsAmount + 1; + }; + } else { + + _nullItemsList pushBackUnique _item; + ((_loadout select _dataIndex) select 1) set [_currentIndex, []]; + _nullItemsAmount = _nullItemsAmount + 1; + }; + } else { + + [(((_loadout select _dataIndex) select 1) select _currentIndex) select 0] call _fnc_weaponCheck; + }; + }; + + case 3: { + private _item = _x select 0; + + if (isClass (_magCfg >> _item)) then { + if !( + _item in (GVAR(virtualItems) select 2) || + _item in (GVAR(virtualItems) select 15) || + _item in (GVAR(virtualItems) select 16) + ) then { + + _unavailableItemsList pushBackUnique _item; + ((_loadout select _dataIndex) select 1) set [_currentIndex, []]; + _unavailableItemsAmount = _unavailableItemsAmount + 1; + }; + } else { + + _nullItemsList pushBackUnique _item; + ((_loadout select _dataIndex) select 1) set [_currentIndex, []]; + _nullItemsAmount = _nullItemsAmount + 1; + }; + }; + }; + } foreach _containerItems; + }; + }; + } else { + + _nullItemsList pushBackUnique _item; + _loadout set [_dataIndex, []]; + _nullItemsAmount = _nullItemsAmount + 1; + }; + }; + }; + + case 6: { + private _item = _loadout select _dataIndex; + + if (_item != "") then { + + if (isClass (_weaponCfg >> _item)) then { + + if !(_item in (GVAR(virtualItems) select 3)) then { + + _unavailableItemsList pushBackUnique _item; + _loadout set [_dataIndex, ""]; + _unavailableItemsAmount = _unavailableItemsAmount + 1; + }; + } else { + + _nullItemsList pushBackUnique _item; + _loadout set [_dataIndex, ""]; + _nullItemsAmount = _nullItemsAmount + 1; + }; + }; + }; + + case 7: { + private _item = _loadout select _dataIndex; + + if (_item != "") then { + + if (isClass (_glassesCfg >> _item)) then { + + if !(_item in (GVAR(virtualItems) select 7)) then { + + _unavailableItemsList pushBackUnique _item; + _loadout set [_dataIndex, ""]; + _unavailableItemsAmount = _unavailableItemsAmount + 1; + }; + } else { + + _nullItemsList pushBackUnique _item; + _loadout set [_dataIndex, ""]; + _nullItemsAmount = _nullItemsAmount + 1; + }; + }; + }; + + case 9: { + for "_subIndex" from 0 to 4 do { + private _item = (_loadout select _dataIndex) select _subIndex; + + if (_item != "") then { + + if (isClass (_weaponCfg >> _item)) then { + + if !(CHECK_ASSIGNED_ITEMS) then { + + _unavailableItemsList pushBackUnique _item; + (_loadout select _dataIndex) set [_subIndex, ""]; + _unavailableItemsAmount = _unavailableItemsAmount + 1; + }; + } else { + + _nullItemsList pushBackUnique _item; + (_loadout select _dataIndex) set [_subIndex, ""]; + _nullItemsAmount = _nullItemsAmount + 1; + }; + }; + }; + }; + }; +}; + +[_loadout, _nullItemsAmount, _unavailableItemsAmount, _nullItemsList, _unavailableItemsList] diff --git a/addons/arsenal/functions/script_component.hpp b/addons/arsenal/functions/script_component.hpp new file mode 100644 index 0000000000..523addf768 --- /dev/null +++ b/addons/arsenal/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\arsenal\script_component.hpp" \ No newline at end of file diff --git a/addons/arsenal/script_component.hpp b/addons/arsenal/script_component.hpp new file mode 100644 index 0000000000..2eb9c3f170 --- /dev/null +++ b/addons/arsenal/script_component.hpp @@ -0,0 +1,17 @@ +#define COMPONENT arsenal +#define COMPONENT_BEAUTIFIED Arsenal +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_ARSENAL + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_ARSENAL + #define DEBUG_SETTINGS DEBUG_SETTINGS_ARSENAL +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/arsenal/stringtable.xml b/addons/arsenal/stringtable.xml new file mode 100644 index 0000000000..0c28240b9b --- /dev/null +++ b/addons/arsenal/stringtable.xml @@ -0,0 +1,437 @@ + + + + + Hide + Cacher + Verstecken + Ukryj + 非表示 + Nascondere + + + Hide interface + Cache l'interface + Oberfläche verstecken + Ukryj interfejs + インターフェイスを隠す + Nascondi interfaccia + + + Loadouts + Équipements + Ausrüstungen + Zestawy wyposażenia + 装備 + Equipaggiamenti + + + Export + Exporter + Exportieren + Eksportuj + 出力 + Esporta + + + Import + Importer + Importieren + Importuj + 取込 + Importa + + + Close + Fermer + Schließen + Zamknij + 閉じる + Chiudi + + + No virtual item available + Aucun objet virtuel disponible + Kein virtuelles Objekt verfügbar + Brak dostępnych przedmiotów wirtualnych + 利用可能なバーチャル アイテムは無し + Nessun oggetto virtuale disponibile + + + Save + Enregister + Speichern + Zapisz + 保存 + Salva + + + Save the current loadout + Enregistre l'équipement actuel + Ausgewählte Ausrüstung speichern + Zapisz obecny zestaw + 現在の装備を保存します + Salva l'equipaggiamento corrente + + + Rename + Renommer + Umbenennen + Zmień nazwę + 改名 + Rinomina + + + Rename the selected loadout + Renomme l'équipement sélectionné + Ausgewählte Ausrüstung umbenennen + Zmień nazwę wybranego zestawu + 現在選択中の装備を改名します + Rinomina l'equipaggiamento selezionato + + + Load + Charger + Laden + Wczytaj + 読み込む + Carica + + + Load the selected loadout + Charger l'équipement sélectionné + Ausgewählte Ausrüstung laden + Wczytaj wybrany zestaw + 現在選択中の装備を読み込みます + Carica l'equipaggiamento selezionato + + + Delete + Supprimer + Entfernen + Skasuj + 削除 + Elimina + + + Delete the selected loadout + Supprimer l'équipement sélectionné + Ausgewählte Ausrüstung entfernen + Skasuj wybrany zestaw + 現在選択中の装備を削除します + Elimina l'equipaggiamento selezionato + + + My loadouts + Mes équipements + Meine Ausrüstungen + Moje zestawy + 自分の装備 + I miei equipaggiamenti + + + Loadouts saved in your profile + Équipements enregistrés dans votre profil + Ausrüstungen, die in deinem Profil gespeichert sind + Zestawy zapisane w Twoim profilu + 自プロフィールに保存された装備です + Gli equipaggiamenti salvati nel tuo profilo + + + Default loadouts + Équipements de base + Standard-Ausrüstungen + Domyślne zestawy + 標準の装備 + Equipaggiamenti standard + + + Loadouts made available by the mission maker + Équipements faits par l'auteur de la mission + Ausrüstungen, die durch den Missionsersteller zur Verfügung gestellt worden sind + Zestawy udostępnione przez twórcę misji + 装備はミッション著者によって利用できます + Equipaggiamenti resi disponibili dal creatore della missione + + + Public loadouts + Équipements publics + Veröffentlichte Ausrüstungen + Publiczne zestawy + 公開装備 + Equipaggiamenti pubblici + + + Loadouts shared by you and other players + Équipements mis à disposition par vous ou les autres joueurs + Ausrüstungen, die von dir und anderen Spielern geteilt wurden + Zestawy udostępnione przez Ciebie i innych graczy + 自分か他人によって共有された装備です + Equipaggiamenti condivisi da te e da altri giocatori + + + Sort by weight + Trier par poids + Nach Gewicht sortieren + Sortuj wg wagi + 重量で並び替え + Ordina per peso + + + Sort by amount + Trier par quantité + Nach Menge sortieren + Sortuj wg ilości + 量で並び替え + Ordina per quantitativo + + + Share or stop sharing the selected loadout + Partager ou arrêter de partager cet équipement + Ausgewählte Ausrüstung teilen oder nicht mehr teilen + Udostępnij lub przestań udostępniać wybrany zestaw + 選択した装備の共有設定 + Condividi o smetti di condividere l'equipaggiamento selezionato + + + Private + Privé + Privat + Prywatny + 非公開 + Privato + + + Public + Public + Öffentlich + Publiczny + 公開 + Pubblico + + + The default loadouts list is empty! + La liste d'équipements de base est vide ! + Die Standard-Ausrüstungen-Liste ist leer! + Lista domyślnych zestawów jest pusta! + 標準の装備一欄が空です! + La lista degli equipaggiamenti standard è vuota! + + + Default loadouts list exported to clipboard + Liste d'équipements de base exportée dans le presse papier + Standard-Ausrüstungen-Liste in die Zwischenablage exportiert + Lista domyślnych zestawów została eksportowana do schowka + 標準の装備一欄はクリップボードへ出力されました + La lista degli equipaggiamenti standard è stata esportata negli appunti + + + Current loadout exported to clipboard + Équipement actuel exporté dans le presse papier + Derzeitige Ausrüstung in die Zwischenablage exportiert + Obecny zestaw został eksportowany do schowka + 現在の装備はクリップボードへ出力されました + Equipaggiamento corrente esportato negli appunti + + + Wrong format provided + Mauvais format fourni + Falsches Format verwendet + Podano zły format + 間違ったフォーマットが入力されました + Formato fornito sbagliato + + + Default loadouts list imported from clipboard + Liste d'équipements de base importée depuis le presse papier + Standard-Ausrüstungen-Liste aus der Zwischenablage importiert + Lista domyślnych zestawów została importowana ze schowka + 標準の装備一欄はクリップボードから取込されました + La lista degli equipaggiamenti standard è stata importata dagli appunti + + + Loadout imported from clipboard + Équipement importé depuis le presse papier + Ausrüstung aus der Zwischenablage importiert + Zestaw został importowany ze schowka + 装備はクリップボードから取込されました + Equipaggiamento importato dagli appunti + + + The following loadout was deleted: + L'équipement suivant fut supprimé: + Folgende Ausrüstung wurde entfernt: + Następujący zestaw został skasowany: + 次の装備は削除されました: + Il seguente equipaggiamento è stato eliminato: + + + The following loadout is not public anymore: + L'équipement suivant n'est plus public: + Folgende Ausrüstung ist nicht mehr öffentlich: + Następujący zestaw nie jest już publiczny: + 次の装備は非公開になりました: + Il seguente eequipaggiamento non è più pubblico: + + + The name field is empty! + Le champ nom est vide ! + Das Feld "Name" ist leer! + Pole nazwy jest puste! + 名前欄が空白です! + Il campo del nome è vuoto! + + + You are the author of this loadout + Vous êtes l'auteur de cet équipement + Du bist der Ersteller dieser Ausrüstung + Jesteś autorem tego zestawu + あなたはこの装備の作者です + Sei l'autore di questo equipaggiamento + + + A loadout of yours with the same name is public + Un de vos équipements avec le même nom est public + Eine deiner Ausrüstungen mit dem gleichen Namen ist öffentlich + Jeden z Twoich zestawów nazwany tak samo jest już publiczny + あなたの装備は既に公開されているものと同名です + Un tuo equipaggiamento con lo stesso nome è pubblico + + + The following loadout was saved: + L'équipement suivant fut enregistré: + Folgende Ausrüstung wurde gespeichert: + Następujący zestaw został zapisany: + 次の装備は保存されました: + Il seguente equipaggiamento è stato salvato: + + + The following loadout was loaded: + L'équipement suivant fut chargé: + Folgene Ausrüstung wurde geladen: + Następujący zestaw został wczytany: + 次の装備が読み込みされました: + Il seguente equipaggiamento è stato caricato: + + + A loadout with the same name already exist! + Un équipement avec le même nom existe déjà ! + Eine Ausrüstung mit dem gleichen Namen existiert bereits! + Zestaw z tą nazwą już istnieje! + 既にその名前は装備に使われています! + Un equipaggiamento con lo stesso nome è gia esistente! + + + was renamed to + fut renommé en + wurde umbenannt in + zmienił nazwę na + 次の名前に改名されました + E' stato rinominato in + + + Invert camera controls + Inverser les contrôles de la caméra + Kamerasteuerung invertieren + Odwróć sterowanie kamerą + カメラ操作を反転 + Inverti comandi camera + + + Enable mod icons + Afficher les icônes de mod + Aktiviert Mod-Icons + Włącz ikony modów + MOD アイコンを表示 + Abilita icone mod + + + Panel font height + taille de police des panneaux + Schrifthöhe für die linke und rechte Liste + Wysokość czcionki + パネルにあるフォントの高さ + Altezza carattere del pannello + + + Allow default loadouts + Activer l'onglet équipement de base + Erlaubt die Benutzung des Standard-Ausrüstungen-Reiters + Zezwól na użycie domyślnych zestawów + 標準の装備を許可 + Consenti equipaggiamenti standard + + + Allow loadout sharing + Autoriser le partage d'équipement + Erlaubt das Teilen von Ausrüstungen + Zezwól na udostępnianie zestawów + 装備の共有を許可 + Consenti condivisione equipaggiamenti + + + Log missing / unavailable items + Enregistrer les objets manquants + Aktiviert die Aufzeichnung fehlender Gegenstände in der RPT + Rejestruj brakujące / niedostępne przedmioty + 欠落 / 利用不可アイテムを記録 + Log mancante / oggetto non disponibile + + + Primary magazine + Chargeur principal + Główny magazynek + プライマリ弾倉 + Caricatore primario + + + Secondary magazine + Chargeur secondaire + Dodatkowy magazynek + セカンダリ弾倉 + Caricatore secondario + + + ACE Arsenal + ACE Arsenal + ACE Arsenał + ACE 武器庫 + Arsenale ACE + + + Allow the use of the default loadouts tab + Autorise l'usage de l'onglet équipements de base + Zezwól na użycie zakładki domyślnych zestawów + 標準の装備タブの使用を許可します + Consenti l'uso della sezione per gli equipaggiamenti standard + + + Show / hide mod icons for the left panel + Montrer / cacher les icones de mod pour le panneau de gauche + Pokaż / ukryj ikony modów w lewym panelu + 左パネルにある MOD アイコンの表示 / 非表示をします + Mostra / nascondi le icone delle mod dal pannello sinistro + + + Change the font height for text in the left / right panels + Change la taille de police du texte des panneaux gauche / droite + Zmień wysokość czcionki dla tekstu lewego i prawego panelu + 右か左パネルにあるフォントの高さを変更します。 + Cambia l'altezza del font per il testo sul pannello sinistro / destro + + + Log missing / unavailable items in the RPT + Enregistre les objets manquants / indisponibles dans le RPT + Rejestruj brakujące / niedostępne przedmioty do pliku RPT + PRT で欠落 / 利用不可アイテムを記録します + Log mancante / oggetto non disponibile nell' RPT + + + Unable to open ACE arsenal + Impossible d'ouvrir ACE arsenal + Kann ACE Arsenal nicht anzeigen + Impossibile aprire l'arsenale ACE + ACE 武器庫を開けません + + + diff --git a/addons/arsenal/ui/RscAttributes.hpp b/addons/arsenal/ui/RscAttributes.hpp new file mode 100644 index 0000000000..b1faccfd70 --- /dev/null +++ b/addons/arsenal/ui/RscAttributes.hpp @@ -0,0 +1,898 @@ +#include "RscCommon.hpp" +#include "..\defines.hpp" + +class GVAR(display) { + idd = IDD_ace_arsenal; + enableSimulation=1; + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(display))] call FUNC(onArsenalOpen)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(display))] call FUNC(onArsenalClose)); + onKeyDown = QUOTE([ARR_3('onKeyDown', _this, QQGVAR(display))] call FUNC(onKeyDown)); + onKeyUp = QUOTE(GVAR(shiftState) = _this select 2); + onMouseButtonDown = QUOTE([ARR_3('onMouseButtonDown', _this, QQGVAR(display))] call FUNC(onMouseButtonDown)); + onMouseButtonUp = QUOTE([ARR_3('onMouseButtonUp', _this, QQGVAR(display))] call FUNC(onMouseButtonUp)); + icon="\A3\Ui_f\data\Logos\a_64_ca.paa"; + logo="\A3\Ui_f\data\Logos\arsenal_1024_ca.paa"; + class ControlsBackground { + class blackLeft: ctrlStatic { + colorBackground[]={0,0,0,1}; + x = QUOTE(safezoneXAbs); + y = QUOTE(safezoneY); + w = QUOTE(safezoneXAbs - safezoneX); + h = QUOTE(safezoneH); + }; + + class blackRight: blackLeft { + x = QUOTE(safezoneX + safezoneW); + }; + + class mouseArea: ctrlStatic { + idc = IDC_mouseArea; + style = 16; + onMouseMoving = QUOTE([ARR_3('onMouseMoving', _this, GVAR(display))] call FUNC(handleMouse)); + onMouseHolding = QUOTE([ARR_3('onMouseHolding', _this, GVAR(display))] call FUNC(handleMouse)); + onMouseZChanged = QUOTE([ARR_3('onMouseZChanged', _this, GVAR(display))] call FUNC(handleScrollWheel)); + x = QUOTE(safezoneX); + y = QUOTE(safezoneY); + w = QUOTE(safezoneW); + h = QUOTE(safezoneH); + }; + }; + class controls { + class ArrowLeft: ctrlButton { + idc = IDC_arrowMinus; + text = "-"; + colorBackground[]={0,0,0,0.8}; + onButtonClick = QUOTE([ARR_2(ctrlparent (_this select 0), -1)] call FUNC(buttonCargo)); + fade = 1; + enable = 0; + x = 0.5; + y = 0.5; + w = QUOTE(1 * GRID_W); + h = QUOTE(1 * GRID_H); + sizeEx = QUOTE(7 * GRID_H); + }; + class ArrowRight: ArrowLeft { + idc = IDC_arrowPlus; + onButtonClick = QUOTE([ARR_2(ctrlparent (_this select 0), 1)] call FUNC(buttonCargo)); + text="+"; + }; + class blockLeftFrame: RscFrame { + idc = IDC_blockLeftFrame; + x = QUOTE(safezoneX + 13 * GRID_W); + y = QUOTE(safezoneY + 14 * GRID_H); + w = QUOTE(80 * GRID_W); + h = QUOTE(safezoneH - 24 * GRID_H); + colorText[] = {0,0,0,1}; + }; + class blockLeftBackground: ctrlStaticBackground { + idc = IDC_blockLeftBackground; + x = QUOTE(safezoneX + 13 * GRID_W); + y = QUOTE(safezoneY + 14 * GRID_H); + w = QUOTE(80 * GRID_W); + h = QUOTE(safezoneH - 24 * GRID_H); + colorBackground[] = {0,0,0,0.5}; + }; + class blockRightFrame: blockLeftFrame { + idc = IDC_blockRightFrame; + x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); + h = QUOTE(safezoneH - 34 * GRID_H); + }; + class blockRighttBackground: blockLeftBackground { + idc = IDC_blockRighttBackground; + x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); + h = QUOTE(safezoneH - 34 * GRID_H); + }; + class loadIndicator: RscControlsGroupNoScrollbars { + idc = IDC_loadIndicator; + x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); + y = QUOTE(safeZoneH + safezoneY - 20 * GRID_H); + w = QUOTE(80 * GRID_W); + h = QUOTE(6 * GRID_H); + class controls { + class loadIndicatorBackground: ctrlStaticBackground { + idc = -1; + colorBackground[] = {0,0,0,0.5}; + x = 0; + y = 0; + w = QUOTE(80 * GRID_W); + h = QUOTE(6 * GRID_H); + }; + class loadIndicatorBar: ctrlProgress { + idc = IDC_loadIndicatorBar; + style = 0; + texture = "#(argb,8,8,3)color(1,1,1,1)"; + colorBar[] = {1,1,1,1}; + colorFrame[] = {0,0,0,1}; + x = 0; + y = 0; + w = QUOTE(80 * GRID_W); + h = QUOTE(6 * GRID_H); + }; + }; + }; + class totalWeight: RscControlsGroupNoScrollbars { + idc = IDC_totalWeight; + x = QUOTE(safezoneX + 13 * GRID_W); + y = QUOTE(safeZoneH + safezoneY - 10 * GRID_H); + w = QUOTE(80 * GRID_W); + h = QUOTE(8 * GRID_H); + class controls { + class totalWeightBackground: ctrlStaticBackground { + idc = -1; + colorBackground[] = {0,0,0,0.8}; + x = 0; + y = 0; + w = QUOTE(80 * GRID_W); + h = QUOTE(8 * GRID_H); + }; + class totalWeightTitle: RscText { + idc = -1; + text = ECSTRING(common,Weight); + x = 0; + y = 0; + w = QUOTE(40 * GRID_W); + h = QUOTE(8 * GRID_H); + sizeEx = QUOTE(7 * GRID_H); + }; + class totalWeightText: RscText { + idc = IDC_totalWeightText; + style = ST_RIGHT; + text = ""; + x = QUOTE(40 * GRID_W); + y = 0; + w = QUOTE(40 * GRID_W); + h = QUOTE(8 * GRID_H); + sizeEx = QUOTE(7 * GRID_H); + }; + }; + }; + class message: RscText { + idc = IDC_message; + fade = 1; + style=2; + shadow=0; + colorBackground[]={0,0,0,0.69999999}; + text=""; + x = QUOTE(safezoneX + safezoneW * 0.50 - 80 * GRID_W); + y = QUOTE(safeZoneH + safezoneY - 25 * GRID_H); + w = QUOTE(160 * GRID_W); + h = QUOTE(10 * GRID_H); + sizeEx = QUOTE(5 * GRID_H); + }; + class menuBar: RscControlsGroupNoScrollbars { + idc = IDC_menuBar; + x = QUOTE((safezoneX + safezoneW * 0.50) - (105 * GRID_W)); + y = QUOTE(safezoneH + safezoneY - 9 * GRID_H); + w = QUOTE(210 * GRID_W); + h = QUOTE(7 * GRID_H); + class controls { + class buttonHide: ctrlButton { + idc = -1; + colorBackground[] = {0,0,0,0.8}; + x = QUOTE(0 * GRID_W); + y = QUOTE(0); + w = QUOTE(40 * GRID_W); + h = QUOTE(7 * GRID_H); + text = CSTRING(buttonHideText); + shortcuts[] = {"0x0E"}; + tooltip = CSTRING(buttonHideTooltip); + onButtonClick = QUOTE([ctrlparent (_this select 0)] call FUNC(buttonHide)); + }; + class buttonLoadouts: buttonHide { + idc = -1; + x = QUOTE(42.5 * GRID_W); + text = CSTRING(buttonLoadoutsText); + onButtonClick = QUOTE(createDialog QQGVAR(loadoutsDisplay)); + }; + class buttonExport: buttonHide { + idc = -1; + x = QUOTE(85 * GRID_W); + text = CSTRING(buttonExportText); + onButtonClick = QUOTE([ctrlparent (_this select 0)] call FUNC(buttonExport)); + }; + class buttonImport: buttonHide { + idc = -1; + x = QUOTE(127.5 * GRID_W); + text = CSTRING(buttonImportText); + onButtonClick = QUOTE([ctrlparent (_this select 0)] call FUNC(buttonImport)); + }; + class buttonClose: ctrlButtonClose { + idc = -1; + colorBackground[] = {0,0,0,0.8}; + x = QUOTE(170 * GRID_W); + y = QUOTE(0); + w = QUOTE(40 * GRID_W); + h = QUOTE(7 * GRID_H); + text = CSTRING(buttonCloseText); + shortcuts[]= {"0x01"}; + onButtonClick = QUOTE(ctrlparent (_this select 0) closeDisplay 2); + }; + }; + }; + class infoBox: RscControlsGroupNoScrollbars { + idc = IDC_infoBox; + fade = 1; + x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); + y = QUOTE(safeZoneH + safezoneY - 14 * GRID_H); + w = QUOTE(92 * GRID_W); + h = QUOTE(12 * GRID_H); + class controls { + class infoBackground: ctrlStaticBackground { + idc = IDC_infoBackground; + x = QUOTE(0 * GRID_W); + y = QUOTE(0); + w = QUOTE(80 * GRID_W); + h = QUOTE(12 * GRID_H); + colorBackground[] = {0,0,0,0.8}; + }; + class infoName: RscText { + idc = IDC_infoName; + x = QUOTE(0 * GRID_W); + y = QUOTE(0); + w = QUOTE(80 * GRID_W); + h = QUOTE(7 * GRID_H); + sizeEx = QUOTE(5.5 * GRID_H); + }; + class infoAuthor: RscText { + idc = IDC_infoAuthor; + colorText[] = {1,1,1,0.5}; + x = QUOTE(0 * GRID_W); + y = QUOTE(6 * GRID_H); + w = QUOTE(80 * GRID_W); + h = QUOTE(5 * GRID_H); + sizeEx = QUOTE(5 * GRID_H); + }; + class DLCBackground: ctrlStaticBackground { + idc = IDC_DLCBackground; + fade = 1; + x = QUOTE(80 * GRID_W); + y = QUOTE(0); + w = QUOTE(12 * GRID_W); + h = QUOTE(12 * GRID_H); + }; + class DLCIcon: RscActivePicture { + idc = IDC_DLCIcon; + enabled = 0; + fade = 1; + color[] = {1,1,1,1}; + colorActive[] = {1,1,1,1}; + text="#(argb,8,8,3)color(1,1,1,1)"; + x = QUOTE(80 * GRID_W); + y = QUOTE(0); + w = QUOTE(12 * GRID_W); + h = QUOTE(12 * GRID_H); + }; + }; + }; + class mouseBlock: RscText { + idc = IDC_mouseBlock; + style = 16; + x = QUOTE(safezoneX); + y = QUOTE(safezoneY); + w = QUOTE(safezoneW); + h = QUOTE(safezoneH); + }; + class leftTabContent: RscListBox { + idc = IDC_leftTabContent; + colorBackground[]={0,0,0,0}; + colorSelectBackground[]={1,1,1,0.5}; + colorSelectBackground2[]={1,1,1,0.5}; + colorPictureSelected[]={1,1,1,1}; + colorSelect[]={1,1,1,1}; + colorSelect2[]={1,1,1,1}; + colorPictureRightSelected[]={1,1,1,1}; + onLBSelChanged = QUOTE(_this call FUNC(onSelChangedLeft)); + onSetFocus = QUOTE(GVAR(leftTabFocus) = true); + onKillFocus = QUOTE(GVAR(leftTabFocus) = false); + x = QUOTE(safezoneX + 13 * GRID_W); + y = QUOTE(safezoneY + 14 * GRID_H); + w = QUOTE(80 * GRID_W); + h = QUOTE(safezoneH - 24.5 * GRID_H); + sizeEx = QUOTE(7 * GRID_H); + }; + class rightTabContent: leftTabContent { + idc = IDC_rightTabContent; + drawSideArrows=1; + disableOverflow=1; + onLBSelChanged = QUOTE(_this call FUNC(onSelChangedRight)); + onSetFocus = QUOTE(GVAR(rightTabFocus) = true); + onKillFocus = QUOTE(GVAR(rightTabFocus) = false); + x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); + h = QUOTE(safezoneH - 34.5 * GRID_H); + }; + class rightTabContentListnBox : RscListNBox { + idc = IDC_rightTabContentListnBox; + colorBackground[]={0,0,0,0}; + colorSelectBackground[]={1,1,1,0.5}; + colorSelectBackground2[]={1,1,1,0.5}; + colorPictureSelected[]={1,1,1,1}; + colorSelect[]={1,1,1,1}; + colorSelect2[]={1,1,1,1}; + colorPictureRightSelected[]={1,1,1,1}; + columns[]={0.07, 0.15, 0.75}; + idcLeft = IDC_arrowMinus; + idcRIght = IDC_arrowPlus; + drawSideArrows=1; + disableOverflow=1; + onLBSelChanged = QUOTE(_this call FUNC(onSelChangedRightListnBox)); + onSetFocus = QUOTE(GVAR(rightTabLnBFocus) = true); + onKillFocus = QUOTE(GVAR(rightTabLnBFocus) = false); + x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); + y = QUOTE(safezoneY + 14 * GRID_H); + w = QUOTE(80 * GRID_W); + h = QUOTE(safezoneH - 34.5 * GRID_H); + sizeEx = QUOTE(7 * GRID_H); + }; + class sortLeftTab: RscCombo { + idc = IDC_sortLeftTab; + x = QUOTE(safezoneX + 13 * GRID_W); + y = QUOTE(safezoneY + 8 * GRID_H); + w = QUOTE(80 * GRID_W); + h = QUOTE(6 * GRID_H); + onLBSelChanged = QUOTE(_this call FUNC(sortPanel)); + class Items { + class Alphabet { + text="$STR_a3_rscdisplayarsenal_sort_alphabet"; + default=1; + value= 0; + }; + class Mod { + text="$STR_a3_rscdisplayarsenal_sort_mod"; + value= 1; + }; + }; + }; + class sortRightTab: sortLeftTab { + idc = IDC_sortRightTab; + x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); + class Items { + class Alphabet { + text="$STR_a3_rscdisplayarsenal_sort_alphabet"; + default=1; + value= 0; + }; + class Weight { + text="$STR_a3_rscdisplayarsenal_sort_mod"; + value= 1; + }; + }; + }; + class leftSearchbar: ctrlEdit { + idc = IDC_leftSearchbar; + onSetFocus = QUOTE(GVAR(leftSearchbarFocus) = true); + onKillFocus = QUOTE(GVAR(leftSearchbarFocus) = false); + onMouseButtonClick = QUOTE([ARR_3(ctrlParent (_this select 0), _this select 0, _this select 1)] call FUNC(clearSearchbar)); + x = QUOTE(safezoneX + 13 * GRID_W); + y = QUOTE(safezoneY + 1.8 * GRID_H); + w = QUOTE(74 * GRID_W); + h = QUOTE(6 * GRID_H); + }; + class leftSearchbarButton: ctrlButtonPicture { + idc = IDC_leftSearchbarButton; + text = "\a3\Ui_f\data\GUI\RscCommon\RscButtonSearch\search_start_ca.paa"; + colorBackground[]={0,0,0,0.5}; + onButtonClick = QUOTE([ARR_2(ctrlparent (_this select 0), ctrlparent (_this select 0) displayCtrl IDC_leftSearchbar)] call FUNC(handleSearchbar)); + x = QUOTE(safezoneX + 87 * GRID_W); + y = QUOTE(safezoneY + 1.8 * GRID_H); + w = QUOTE(6 * GRID_W); + h = QUOTE(6 * GRID_H); + }; + class rightSearchbar: leftSearchBar { + idc = IDC_rightSearchbar; + onSetFocus = QUOTE(GVAR(rightSearchbarFocus) = true); + onKillFocus = QUOTE(GVAR(rightSearchbarFocus) = false); + x = QUOTE(safezoneX + safezoneW - 87 * GRID_W); + }; + class rightSearchbarButton: leftSearchbarButton { + idc = IDC_rightSearchbarButton; + onButtonClick = QUOTE([ARR_2(ctrlparent (_this select 0), ctrlparent (_this select 0) displayCtrl IDC_rightSearchbar)] call FUNC(handleSearchbar)); + x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); + }; + class tabLeft: RscControlsGroupNoScrollbars { + idc = IDC_tabLeft; + x = QUOTE(safezoneX + 1 * GRID_W); + y = QUOTE(safezoneY + 8 * GRID_H); + w = QUOTE(12 * GRID_W); + h = QUOTE(200 * GRID_H); + class controls { + class iconBackgroundPrimaryWeapon: ctrlStaticBackground { + idc = IDC_iconBackgroundPrimaryWeapon; + fade=1; + enable=0; + colorBackground[]={0,0,0,1}; + x = QUOTE(0); + y = QUOTE(0 * GRID_H); + w = QUOTE(12 * GRID_W); + h = QUOTE(9 * GRID_H); + }; + class buttonPrimaryWeapon: RscButtonArsenal { + idc = IDC_buttonPrimaryWeapon; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\PrimaryWeapon_ca.paa"; + tooltip="$STR_A3_RscDisplayArsenal_tab_PrimaryWeapon"; + onButtonClick = QUOTE([ARR_2(ctrlparent (_this select 0), _this select 0)] call FUNC(fillLeftPanel)); + colorBackground[]={0,0,0,0.5}; + x = QUOTE(0 * GRID_W); + y = QUOTE(0 * GRID_H); + w = QUOTE(9 * GRID_W); + h = QUOTE(9 * GRID_H); + }; + class iconBackgroundHandgun: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundHandgun; + y = QUOTE(10 * GRID_H); + }; + class buttonHandgun: buttonPrimaryWeapon { + idc = IDC_buttonHandgun; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Handgun_ca.paa"; + tooltip="$STR_A3_RscDisplayArsenal_tab_Handgun"; + y = QUOTE(10 * GRID_H); + }; + class iconBackgroundSecondaryWeapon: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundSecondaryWeapon; + y = QUOTE(20 * GRID_H); + }; + class buttonSecondaryWeapon: buttonPrimaryWeapon { + idc = IDC_buttonSecondaryWeapon; + tooltip="$STR_A3_RscDisplayArsenal_tab_SecondaryWeapon"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\SecondaryWeapon_ca.paa"; + y = QUOTE(20 * GRID_H); + }; + class iconBackgroundHeadgear: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundHeadgear; + y = QUOTE(30 * GRID_H); + }; + class buttonHeadgear: buttonPrimaryWeapon { + idc = IDC_buttonHeadgear; + tooltip="$STR_A3_RscDisplayArsenal_tab_Headgear"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Headgear_ca.paa"; + y = QUOTE(30 * GRID_H); + }; + class iconBackgroundUniform: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundUniform; + y = QUOTE(40 * GRID_H); + }; + class buttonUniform: buttonPrimaryWeapon { + idc = IDC_buttonUniform; + tooltip="$STR_A3_RscDisplayArsenal_tab_Uniform"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Uniform_ca.paa"; + y = QUOTE(40 * GRID_H); + }; + class iconBackgroundVest: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundVest; + y = QUOTE(50 * GRID_H); + }; + class buttonVest: buttonPrimaryWeapon { + idc = IDC_buttonVest; + tooltip="$STR_A3_RscDisplayArsenal_tab_Vest"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Vest_ca.paa"; + y = QUOTE(50 * GRID_H); + }; + class iconBackgroundBackpack: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundBackpack; + y = QUOTE(60 * GRID_H); + }; + class buttonBackpack: buttonPrimaryWeapon { + idc = IDC_buttonBackpack; + tooltip="$STR_A3_RscDisplayArsenal_tab_Backpack"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Backpack_ca.paa"; + y = QUOTE(60 * GRID_H); + }; + class iconBackgroundGoggles: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundGoggles; + y = QUOTE(70 * GRID_H); + }; + class buttonGoggles: buttonPrimaryWeapon { + idc = IDC_buttonGoggles; + tooltip="$STR_A3_RscDisplayArsenal_tab_Goggles"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Goggles_ca.paa"; + y = QUOTE(70 * GRID_H); + }; + class iconBackgroundNVG: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundNVG; + y = QUOTE(80 * GRID_H); + }; + class buttonNVG: buttonPrimaryWeapon { + idc = IDC_buttonNVG; + tooltip="$STR_A3_RscDisplayArsenal_tab_NVGs"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\NVGs_ca.paa"; + y = QUOTE(80 * GRID_H); + }; + class iconBackgroundBinoculars: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundBinoculars; + y = QUOTE(90 * GRID_H); + }; + class buttonBinoculars: buttonPrimaryWeapon { + idc = IDC_buttonBinoculars; + tooltip="$STR_A3_RscDisplayArsenal_tab_Binoculars"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Binoculars_ca.paa"; + y = QUOTE(90 * GRID_H); + }; + class iconBackgroundMap: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundMap; + y = QUOTE(100 * GRID_H); + }; + class buttonMap: buttonPrimaryWeapon { + idc = IDC_buttonMap; + tooltip="$STR_A3_RscDisplayArsenal_tab_Map"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Map_ca.paa"; + y = QUOTE(100 * GRID_H); + }; + class iconBackgroundGPS: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundGPS; + y = QUOTE(110 * GRID_H); + }; + class buttonGPS: buttonPrimaryWeapon { + idc = IDC_buttonGPS; + tooltip="$STR_A3_RscDisplayArsenal_tab_GPS"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\GPS_ca.paa"; + y = QUOTE(110 * GRID_H); + }; + class iconBackgroundRadio: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundRadio; + y = QUOTE(120 * GRID_H); + }; + class buttonRadio: buttonPrimaryWeapon { + idc = IDC_buttonRadio; + tooltip="$STR_A3_RscDisplayArsenal_tab_Radio"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Radio_ca.paa"; + y = QUOTE(120 * GRID_H); + }; + class iconBackgroundCompass: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundCompass; + y = QUOTE(130 * GRID_H); + }; + class buttonCompass: buttonPrimaryWeapon { + idc = IDC_buttonCompass; + tooltip="$STR_A3_RscDisplayArsenal_tab_Compass"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Compass_ca.paa"; + y = QUOTE(130 * GRID_H); + }; + class iconBackgroundWatch: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundWatch; + y = QUOTE(140 * GRID_H); + }; + class buttonWatch: buttonPrimaryWeapon { + idc = IDC_buttonWatch; + tooltip="$STR_A3_RscDisplayArsenal_tab_Watch"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Watch_ca.paa"; + y = QUOTE(140 * GRID_H); + }; + class iconBackgroundFace: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundFace; + y = QUOTE(150 * GRID_H); + }; + class buttonFace: buttonPrimaryWeapon { + idc = IDC_buttonFace; + tooltip="$STR_A3_RscDisplayArsenal_tab_Face"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Face_ca.paa"; + y = QUOTE(150 * GRID_H); + }; + class iconBackgroundVoice: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundVoice; + y = QUOTE(160 * GRID_H); + }; + class buttonVoice: buttonPrimaryWeapon { + idc = IDC_buttonVoice; + tooltip="$STR_A3_RscDisplayArsenal_tab_Voice"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Voice_ca.paa"; + y = QUOTE(160 * GRID_H); + }; + class iconBackgroundInsigna: IconBackgroundPrimaryWeapon { + idc = IDC_iconBackgroundInsigna; + y = QUOTE(170 * GRID_H); + }; + class buttonInsigna: buttonPrimaryWeapon { + idc = IDC_buttonInsigna; + tooltip="$STR_A3_RscDisplayArsenal_tab_Insignia"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\Insignia_ca.paa"; + y = QUOTE(170 * GRID_H); + }; + }; + }; + class iconBackgroundOptic: ctrlStaticBackground { + idc = IDC_iconBackgroundOptic; + colorBackground[]={0,0,0,1}; + fade=1; + enable=0; + x = QUOTE(safezoneW + safezoneX - 13 * GRID_W); + y = QUOTE(safezoneY + 8 * GRID_H); + w = QUOTE(12 * GRID_W); + h = QUOTE(9 * GRID_H); + }; + class buttonOptic: RscButtonArsenal { + idc = IDC_buttonOptic; + tooltip="$STR_A3_RscDisplayArsenal_tab_ItemOptic"; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemOptic_ca.paa"; + onButtonClick = QUOTE([ARR_2(ctrlparent (_this select 0), _this select 0)] call FUNC(fillRightPanel)); + colorBackground[]={0,0,0,0.5}; + x = QUOTE(safezoneW + safezoneX - 10 * GRID_W); + y = QUOTE(safezoneY + 8 * GRID_H); + w = QUOTE(9 * GRID_W); + h = QUOTE(9 * GRID_H); + }; + class iconBackgroundItemAcc: iconBackgroundOptic { + idc = IDC_iconBackgroundItemAcc; + y = QUOTE(safezoneY + 18 * GRID_H); + }; + class buttonItemAcc: buttonOptic { + idc = IDC_buttonItemAcc; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemAcc_ca.paa"; + tooltip="$STR_A3_RscDisplayArsenal_tab_ItemAcc"; + y = QUOTE(safezoneY + 18 * GRID_H); + }; + class iconBackgroundMuzzle: iconBackgroundOptic { + idc = IDC_iconBackgroundMuzzle; + y = QUOTE(safezoneY + 28 * GRID_H); + }; + class buttonMuzzle: buttonOptic { + idc = IDC_buttonMuzzle; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemMuzzle_ca.paa"; + tooltip="$STR_A3_RscDisplayArsenal_tab_ItemMuzzle"; + y = QUOTE(safezoneY + 28 * GRID_H); + }; + class iconBackgroundBipod: iconBackgroundOptic { + idc = IDC_iconBackgroundBipod; + y = QUOTE(safezoneY + 38 * GRID_H); + }; + class buttonBipod: buttonOptic { + idc = IDC_buttonBipod; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\ItemBipod_ca.paa"; + tooltip="$STR_A3_RscDisplayArsenal_tab_ItemBipod"; + y = QUOTE(safezoneY + 38 * GRID_H); + }; + class iconBackgroundCurrentMag: iconBackgroundOptic { + idc = IDC_iconBackgroundCurrentMag; + y = QUOTE(safezoneY + 48 * GRID_H); + }; + class buttonCurrentMag: buttonOptic { + idc = IDC_buttonCurrentMag; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMag_ca.paa"; + tooltip= CSTRING(buttonCurrentMagTooltip); + y = QUOTE(safezoneY + 48 * GRID_H); + }; + class iconBackgroundCurrentMag2: iconBackgroundOptic { + idc = IDC_iconBackgroundCurrentMag2; + y = QUOTE(safezoneY + 58 * GRID_H); + }; + class buttonCurrentMag2: buttonOptic { + idc = IDC_buttonCurrentMag2; + text= QPATHTOF(data\iconSecondaryMuzzle); + tooltip= CSTRING(buttonCurrentMag2Tooltip); + y = QUOTE(safezoneY + 58 * GRID_H); + }; + class iconBackgroundMag: iconBackgroundOptic { + idc = IDC_iconBackgroundMag; + y = QUOTE(safezoneY + 48 * GRID_H); + }; + class buttonMag: buttonOptic { + idc = IDC_buttonMag; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMag_ca.paa"; + tooltip="$STR_A3_RscDisplayArsenal_tab_CargoMag"; + y = QUOTE(safezoneY + 48 * GRID_H); + }; + class iconBackgroundMagALL: iconBackgroundOptic { + idc = IDC_iconBackgroundMagALL; + y = QUOTE(safezoneY + 58 * GRID_H); + }; + class buttonMagALL: buttonOptic { + idc = IDC_buttonMagALL; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMagAll_ca.paa"; + tooltip="$STR_A3_RscDisplayArsenal_tab_CargoMagAll"; + y = QUOTE(safezoneY + 58 * GRID_H); + }; + class iconBackgroundThrow: iconBackgroundOptic { + idc = IDC_iconBackgroundThrow; + y = QUOTE(safezoneY + 68 * GRID_H); + }; + class buttonThrow: buttonOptic { + idc = IDC_buttonThrow; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoThrow_ca.paa"; + tooltip="$STR_A3_RscDisplayArsenal_tab_CargoThrow"; + y = QUOTE(safezoneY + 68 * GRID_H); + }; + class iconBackgroundPut: iconBackgroundOptic { + idc = IDC_iconBackgroundPut; + y = QUOTE(safezoneY + 78 * GRID_H); + }; + class buttonPut: buttonOptic { + idc = IDC_buttonPut; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoPut_ca.paa"; + tooltip="$STR_A3_RscDisplayArsenal_tab_CargoPut"; + y = QUOTE(safezoneY + 78 * GRID_H); + }; + class iconBackgroundMisc: iconBackgroundOptic { + idc = IDC_iconBackgroundMisc; + y = QUOTE(safezoneY + 88 * GRID_H); + }; + class buttonMisc: buttonOptic { + idc = IDC_buttonMisc; + text="\A3\Ui_f\data\GUI\Rsc\RscDisplayArsenal\CargoMisc_ca.paa"; + tooltip="$STR_A3_RscDisplayArsenal_tab_CargoMisc"; + y = QUOTE(safezoneY + 88 * GRID_H); + }; + class buttonRemoveAll: ctrlButtonPicture { + idc = IDC_buttonRemoveAll; + text = QPATHTOF(data\iconClearContainer.paa); + colorBackground[]={0,0,0,0.5}; + onButtonClick = QUOTE(ctrlParent (_this select 0) call FUNC(buttonClearAll)); + fade=1; + enable=0; + x = QUOTE(safezoneW + safezoneX - 11 * GRID_W); + y = QUOTE(safeZoneH + safezoneY - 29 * GRID_H); + w = QUOTE(9 * GRID_W); + h = QUOTE(9 * GRID_H); + }; + }; +}; + +class GVAR(loadoutsDisplay) { + idd = IDD_loadouts_display; + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(loadoutsDisplay))] call FUNC(onLoadoutsOpen)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(loadoutsDisplay))] call FUNC(onLoadoutsClose)); + class controls { + class centerBox: ctrlControlsGroupNoScrollbars { + idc = IDC_centerBox; + x = QUOTE(safezoneW + safezoneX - (180 * GRID_W)); + y = QUOTE(safezoneY + (5 * GRID_H)); + w = QUOTE(160 * GRID_W); + h = QUOTE(safezoneH - (34 * GRID_H)); + class controls { + class centerFrame: RscFrame { + idc = -1; + x = QUOTE(0 * GRID_W); + y = QUOTE(0 * GRID_H); + w = QUOTE(160 * GRID_W); + h = QUOTE(safezoneH - (45 * GRID_H)); + colorText[] = {0,0,0,1}; + }; + class centerBackground: ctrlStaticBackground { + idc = -1; + x = QUOTE(0); + y = QUOTE(0); + w = QUOTE(160 * GRID_W); + h = QUOTE(safezoneH - (45 * GRID_H)); + colorBackground[] = {0.13,0.13,0.13,0.9}; + }; + class centerTitle: ctrlStaticTitle { + idc = IDC_centerTitle; + style = ST_CENTER; + text = ""; + x = QUOTE(0); + y = QUOTE(0); + w = QUOTE(160 * GRID_W); + h = QUOTE(5 * GRID_H); + }; + class contentPanel: RscListnBox { + idc = IDC_contentPanel; + columns[]={0, 0.05, 0.40, 0.50, 0.60, 0.70, 0.75, 0.80, 0.85, 0.90}; + drawSideArrows=0; + disableOverflow=1; + onLBSelChanged = QUOTE([ARR_3(ctrlParent (_this select 0), _this select 0, _this select 1)] call FUNC(onSelChangedLoadouts)); + onLBDblClick = QUOTE([ARR_2(ctrlparent (_this select 0), (ctrlParent (_this select 0)) displayCtrl IDC_buttonLoad)] call FUNC(buttonLoadoutsLoad)); + x = QUOTE(0); + y = QUOTE(5 * GRID_H); + w = QUOTE(160 * GRID_W); + h = QUOTE(safezoneH - (57 * GRID_H)); + sizeEx = QUOTE(7 * GRID_H); + }; + class textTitle: RscText { + idc= -1; + text="$STR_DISP_GAME_NAME"; + x = QUOTE(1 * GRID_W); + y = QUOTE(safezoneH - (51 * GRID_H)); + w = QUOTE(15 * GRID_W); + h = QUOTE(5 * GRID_H); + colorBackground[]={0,0,0,0.2}; + }; + class textEditBox: ctrlEdit { + idc= IDC_textEditBox; + x = QUOTE(16 * GRID_W); + y = QUOTE(safezoneH - (51 * GRID_H)); + w = QUOTE(80 * GRID_W); + h = QUOTE(5 * GRID_H); + }; + class buttonSave: ctrlButton { + idc = IDC_buttonSave; + x = QUOTE(0 * GRID_W); + y = QUOTE(safezoneH - (44 * GRID_H)); + w = QUOTE(30 * GRID_W); + h = QUOTE(10 * GRID_H); + text= CSTRING(buttonSaveText); + tooltip= CSTRING(buttonSaveTooltip); + onButtonClick = QUOTE([ARR_2(ctrlparent (_this select 0), _this select 0)] call FUNC(buttonLoadoutsSave)); + colorBackground[] = {0,0,0,0.8}; + }; + class buttonRename: buttonSave { + idc = IDC_buttonRename; + x = QUOTE(32.5 * GRID_W); + text= CSTRING(buttonRenameText); + tooltip= CSTRING(buttonRenameTooltip); + onButtonClick = QUOTE([ARR_2(ctrlparent (_this select 0), _this select 0)] call FUNC(buttonLoadoutsRename)); + }; + class buttonLoad: buttonSave { + idc = IDC_buttonLoad; + x = QUOTE(65 * GRID_W); + text= CSTRING(buttonLoadText); + tooltip= CSTRING(buttonLoadTooltip); + onButtonClick = QUOTE([ARR_2(ctrlparent (_this select 0), _this select 0)] call FUNC(buttonLoadoutsLoad)); + }; + class buttonShare: buttonSave { + idc = IDC_buttonShare; + x = QUOTE(97.5 * GRID_W); + text= CSTRING(buttonSharePrivateText); + tooltip= CSTRING(buttonShareTooltip); + onButtonClick = QUOTE([ARR_2(ctrlparent (_this select 0), _this select 0)] call FUNC(buttonLoadoutsShare)); + }; + class buttonDelete: buttonSave { + idc = IDC_buttonDelete; + x = QUOTE(130 * GRID_W); + text= CSTRING(buttonDeleteText); + tooltip= CSTRING(buttonDeleteTooltip); + colorBackgroundActive[] = {0.5,0,0,1}; + onButtonClick = QUOTE([ARR_2(ctrlparent (_this select 0), _this select 0)] call FUNC(buttonLoadoutsDelete)); + }; + }; + }; + + class buttonClose: ctrlButton { + idc = -1; + x = QUOTE(safezoneW + safezoneX - 32 * GRID_W); + y = QUOTE(safezoneH + safezoneY - 9 * GRID_H); + w = QUOTE(30 * GRID_W); + h = QUOTE(7 * GRID_H); + sizeEx = QUOTE(4 * GRID_H); + text= CSTRING(buttonCloseText); + shortcuts[]= {"0x01"}; + tooltip= ""; + onButtonClick = QUOTE(ctrlparent (_this select 0) closeDisplay 2); + }; + class buttonBar: ctrlControlsGroupNoScrollbars { + idc = -1; + x = QUOTE((safezoneW * 0.5) + safezoneX - (80.5 * GRID_W)); + y = QUOTE(safezoneH + safezoneY - 9 * GRID_H); + w = QUOTE(161 * GRID_W); + h = QUOTE(7 * GRID_H); + class controls { + class buttonMyLoadoutsBackground: ctrlStaticBackground { + idc = IDC_buttonMyLoadoutsBackground; + x = QUOTE(0); + y = QUOTE(0); + w = QUOTE(52 * GRID_W); + h = QUOTE(7 * GRID_H); + colorBackground[] = {0,0,0,0.7}; + }; + class buttonMyLoadouts: ctrlButton { + idc = IDC_buttonMyLoadouts; + colorBackground[] = {0,0,0,0}; + x = QUOTE(0 * GRID_W); + y = QUOTE(0 * GRID_H); + w = QUOTE(52 * GRID_W); + h = QUOTE(7 * GRID_H); + sizeEx = QUOTE(4 * GRID_H); + text= CSTRING(tabMyLoadoutsText); + tooltip= CSTRING(tabMyLoadoutsTooltip); + onButtonClick = QUOTE([ARR_2(ctrlparent (_this select 0), _this select 0)] call FUNC(loadoutsChangeTab)); + }; + class buttonDefaultLoadoutsBackground: buttonMyLoadoutsBackground { + idc = IDC_buttonDefaultLoadoutsBackground; + x = QUOTE(54.5 * GRID_W); + }; + class buttonDefaultLoadouts: buttonMyLoadouts { + idc = IDC_buttonDefaultLoadouts; + x = QUOTE(54.5 * GRID_W); + text= CSTRING(tabDefaultLoadoutsText); + tooltip= CSTRING(tabDefaultLoadoutsTooltip); + }; + class buttonSharedLoadoutsBackground: buttonMyLoadoutsBackground { + idc = IDC_buttonSharedLoadoutsBackground; + x = QUOTE(109 * GRID_W); + }; + class buttonSharedLoadouts: buttonMyLoadouts { + idc = IDC_buttonSharedLoadouts; + x = QUOTE(109 * GRID_W); + text= CSTRING(tabSharedLoadoutsText); + tooltip= CSTRING(tabSharedLoadoutsTooltip); + }; + }; + }; + }; +}; diff --git a/addons/arsenal/ui/RscCommon.hpp b/addons/arsenal/ui/RscCommon.hpp new file mode 100644 index 0000000000..2a88204d7b --- /dev/null +++ b/addons/arsenal/ui/RscCommon.hpp @@ -0,0 +1,278 @@ +// Control types +#define CT_STATIC 0 +#define CT_BUTTON 1 +#define CT_EDIT 2 +#define CT_SLIDER 3 +#define CT_COMBO 4 +#define CT_LISTBOX 5 +#define CT_TOOLBOX 6 +#define CT_CHECKBOXES 7 +#define CT_PROGRESS 8 +#define CT_HTML 9 +#define CT_STATIC_SKEW 10 +#define CT_ACTIVETEXT 11 +#define CT_TREE 12 +#define CT_STRUCTURED_TEXT 13 +#define CT_CONTEXT_MENU 14 +#define CT_CONTROLS_GROUP 15 +#define CT_SHORTCUTBUTTON 16 +#define CT_HITZONES 17 +#define CT_XKEYDESC 40 +#define CT_XBUTTON 41 +#define CT_XLISTBOX 42 +#define CT_XSLIDER 43 +#define CT_XCOMBO 44 +#define CT_ANIMATED_TEXTURE 45 +#define CT_OBJECT 80 +#define CT_OBJECT_ZOOM 81 +#define CT_OBJECT_CONTAINER 82 +#define CT_OBJECT_CONT_ANIM 83 +#define CT_LINEBREAK 98 +#define CT_USER 99 +#define CT_MAP 100 +#define CT_MAP_MAIN 101 +#define CT_LISTNBOX 102 +#define CT_ITEMSLOT 103 +#define CT_CHECKBOX 77 + +// Static styles +#define ST_POS 0x0F +#define ST_HPOS 0x03 +#define ST_VPOS 0x0C +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 +#define ST_DOWN 0x04 +#define ST_UP 0x08 +#define ST_VCENTER 0x0C + +#define ST_TYPE 0xF0 +#define ST_SINGLE 0x00 +#define ST_MULTI 0x10 +#define ST_TITLE_BAR 0x20 +#define ST_PICTURE 0x30 +#define ST_FRAME 0x40 +#define ST_BACKGROUND 0x50 +#define ST_GROUP_BOX 0x60 +#define ST_GROUP_BOX2 0x70 +#define ST_HUD_BACKGROUND 0x80 +#define ST_TILE_PICTURE 0x90 +#define ST_WITH_RECT 0xA0 +#define ST_LINE 0xB0 +#define ST_UPPERCASE 0xC0 +#define ST_LOWERCASE 0xD0 + +#define ST_SHADOW 0x100 +#define ST_NO_RECT 0x200 +#define ST_KEEP_ASPECT_RATIO 0x800 + +// Slider styles +#define SL_DIR 0x400 +#define SL_VERT 0 +#define SL_HORZ 0x400 + +#define SL_TEXTURES 0x10 + +// progress bar +#define ST_VERTICAL 0x01 +#define ST_HORIZONTAL 0 + +// Listbox styles +#define LB_TEXTURES 0x10 +#define LB_MULTI 0x20 + +// Tree styles +#define TR_SHOWROOT 1 +#define TR_AUTOCOLLAPSE 2 + +// Default grid +#define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2) +#define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2) +#define GUI_GRID_W (GUI_GRID_WAbs / 40) +#define GUI_GRID_H (GUI_GRID_HAbs / 25) +#define GUI_GRID_X (safezoneX) +#define GUI_GRID_Y (safezoneY + safezoneH - GUI_GRID_HAbs) + +// Default text sizes +#define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8) +#define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1) +#define GUI_TEXT_SIZE_LARGE (GUI_GRID_H * 1.2) + +class ScrollBar; +class RscObject; +class RscText; +class RscTextSmall; +class RscTitle; +class RscProgress; +class RscProgressNotFreeze; +class RscPicture; +class RscLadderPicture; +class RscPictureKeepAspect; +class RscHTML; +class RscButton; +class RscShortcutButton; +class RscButtonSmall; +class RscEdit; +class RscCombo; +class RscListBox; +class RscListNBox; +class RscXListBox; +class RscTree; +class RscSlider; +class RscSliderH; +class RscXSliderH; +class RscActiveText; +class RscStructuredText; +class RscControlsGroup; +class RscToolbox; +class RscMapControl; +class RscCheckBox; +class RscFrame; +class ctrlDefault; +class ctrlControlsGroup; +class ctrlDefaultText; +class ctrlDefaultButton; +class RscBackgroundStripeTop; +class RscBackgroundStripeBottom; +class RscIGText; +class RscIGProgress; +class RscListBoxKeys; +class RscControlsGroupNoScrollbars; +class RscControlsGroupNoHScrollbars; +class RscControlsGroupNoVScrollbars; +class RscLine; +class RscActivePicture; +class RscButtonTextOnly; +class RscShortcutButtonMain; +class RscButtonEditor; +class RscIGUIShortcutButton; +class RscGearShortcutButton; +class RscButtonMenu; +class RscButtonMenuOK; +class RscButtonMenuCancel; +class RscButtonMenuSteam; +class RscLoadingText; +class RscIGUIListBox; +class RscIGUIListNBox; +class RscBackground; +class RscBackgroundGUI; +class RscBackgroundGUILeft; +class RscBackgroundGUIRight; +class RscBackgroundGUIBottom; +class RscBackgroundGUITop; +class RscBackgroundGUIDark; +class RscBackgroundLogo; +class RscMapControlEmpty; +class RscVignette; +class CA_Mainback; +class CA_Back; +class CA_Title_Back; +class CA_Black_Back; +class CA_Title; +class CA_Logo; +class CA_Logo_Small; +class CA_RscButton; +class CA_RscButton_dialog; +class CA_Ok; +class CA_Ok_image; +class CA_Ok_image2; +class CA_Ok_text; +class ctrlCheckbox; +class ctrlCheckboxBaseline; +class ctrlStatic; +class ctrlControlsGroupNoScrollbars; +class ctrlStructuredText; +class RscTextMulti; +class RscTreeSearch; +class RscVideo; +class RscVideoKeepAspect; +class RscActivePictureKeepAspect; +class RscEditMulti; +class RscMapSignalBackground; +class RscMapSignalPicture; +class RscMapSignalText; +class RscColorPicker; +class RscInterlacingScreen; +class RscFeedback; +class RscTrafficLight; +class RscButtonSearch; +class RscIGUIText; +class RscOpticsText; +class RscOpticsValue; +class RscIGUIValue; +class RscButtonMenuMain; +class RscButtonTestCentered; +class RscDisplaySingleMission_ChallengeOverviewGroup; +class RscDisplayDebriefing_RscTextMultiline; +class RscDisplayDebriefing_ListGroup; +class RscButtonArsenal; +class RscTextNoShadow; +class RscButtonNoColor; +class RscToolboxButton; +class ctrlStaticPicture; +class ctrlStaticPictureKeepAspect; +class ctrlStaticPictureTile; +class ctrlStaticFrame; +class ctrlStaticLine; +class ctrlStaticMulti; +class ctrlStaticBackground; +class ctrlStaticOverlay; +class ctrlStaticTitle; +class ctrlStaticFooter; +class ctrlStaticBackgroundDisable; +class ctrlStaticBackgroundDisableTiles; +class ctrlButton; +class ctrlButtonPicture; +class ctrlButtonPictureKeepAspect; +class ctrlButtonOK; +class ctrlButtonCancel; +class ctrlButtonClose; +class ctrlButtonToolbar; +class ctrlButtonSearch; +class ctrlButtonExpandAll; +class ctrlButtonCollapseAll; +class ctrlButtonFilter; +class ctrlEdit; +class ctrlEditMulti; +class ctrlSliderV; +class ctrlSliderH; +class ctrlCombo; +class ctrlComboToolbar; +class ctrlListbox; +class ctrlToolbox; +class ctrlToolboxPicture; +class ctrlToolboxPictureKeepAspect; +class ctrlCheckboxes; +class ctrlCheckboxesCheckbox; +class ctrlProgress; +class ctrlHTML; +class ctrlActiveText; +class ctrlActivePicture; +class ctrlActivePictureKeepAspect; +class ctrlTree; +class ctrlControlsGroupNoHScrollbars; +class ctrlControlsGroupNoVScrollbars; +class ctrlShortcutButton; +class ctrlShortcutButtonOK; +class ctrlShortcutButtonCancel; +class ctrlShortcutButtonSteam; +class ctrlXListbox; +class ctrlXSliderV; +class ctrlXSliderH; +class ctrlMenu; +class ctrlMenuStrip; +class ctrlMap; +class ctrlMapEmpty; +class ctrlMapMain; +class ctrlListNBox; +class ctrlCheckboxToolbar; + +class Display3DEN { + class ContextMenu :ctrlMenu { + class Items { + class Arsenal { + action= QUOTE(call FUNC(open3DEN)); + }; + }; + }; +}; diff --git a/addons/arsenal/ui/script_component.hpp b/addons/arsenal/ui/script_component.hpp new file mode 100644 index 0000000000..523addf768 --- /dev/null +++ b/addons/arsenal/ui/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\arsenal\script_component.hpp" \ No newline at end of file diff --git a/addons/atragmx/XEH_PREP.hpp b/addons/atragmx/XEH_PREP.hpp index c77b7e0655..b61258c008 100644 --- a/addons/atragmx/XEH_PREP.hpp +++ b/addons/atragmx/XEH_PREP.hpp @@ -27,6 +27,7 @@ PREP(init); PREP(initGunList); PREP(insert_c1_ballistic_coefficient_data); PREP(insert_muzzle_velocity_data); +PREP(lookup_c1_ballistic_coefficient); PREP(parse_input); PREP(read_gun_list_entries_from_config); PREP(recalculate_c1_ballistic_coefficient); diff --git a/addons/atragmx/functions/fnc_calculate_range_card.sqf b/addons/atragmx/functions/fnc_calculate_range_card.sqf index 837a46079f..9201861351 100644 --- a/addons/atragmx/functions/fnc_calculate_range_card.sqf +++ b/addons/atragmx/functions/fnc_calculate_range_card.sqf @@ -27,4 +27,9 @@ _solutionInput set [ 8, round(_solutionInput select 4)]; _solutionInput set [13, _targetRange]; _solutionInput set [17, true]; +if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { + private _c1 = [_targetRange] call FUNC(lookup_c1_ballistic_coefficient); + _solutionInput set [14, _c1]; +}; + private _result = _solutionInput call FUNC(calculate_solution); diff --git a/addons/atragmx/functions/fnc_calculate_solution.sqf b/addons/atragmx/functions/fnc_calculate_solution.sqf index a37156de28..a7928d1ef0 100644 --- a/addons/atragmx/functions/fnc_calculate_solution.sqf +++ b/addons/atragmx/functions/fnc_calculate_solution.sqf @@ -58,7 +58,7 @@ private _bulletPos = [0, 0, 0]; private _bulletVelocity = [0, 0, 0]; private _bulletAccel = [0, 0, 0]; private _bulletSpeed = 0; -private _gravity = [0, sin(_scopeBaseAngle + _inclinationAngle) * -9.80665, cos(_scopeBaseAngle + _inclinationAngle) * -9.80665]; +private _gravity = [0, sin(_scopeBaseAngle + _inclinationAngle) * -GRAVITY, cos(_scopeBaseAngle + _inclinationAngle) * -GRAVITY]; private _deltaT = 1 / _simSteps; private _elevation = 0; @@ -95,7 +95,7 @@ if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) t private _eoetvoesMultiplier = 0; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - _eoetvoesMultiplier = 2 * (0.0000729 * _muzzleVelocity / -9.80665) * cos(_latitude) * sin(_directionOfFire); + _eoetvoesMultiplier = 2 * (0.0000729 * _muzzleVelocity / -GRAVITY) * cos(_latitude) * sin(_directionOfFire); }; _bulletPos set [0, 0]; diff --git a/addons/atragmx/functions/fnc_change_target_slot.sqf b/addons/atragmx/functions/fnc_change_target_slot.sqf index 158e31ad87..6fd3889309 100644 --- a/addons/atragmx/functions/fnc_change_target_slot.sqf +++ b/addons/atragmx/functions/fnc_change_target_slot.sqf @@ -15,10 +15,9 @@ */ #include "script_component.hpp" -private _target = 0 max _this min 3; +GVAR(currentTarget) = 0 max _this min 3; -[] call FUNC(parse_input); +GVAR(targetRangeDirtyFlag) = true; -GVAR(currentTarget) = _target; call FUNC(update_target_selection); call FUNC(calculate_target_solution); diff --git a/addons/atragmx/functions/fnc_init.sqf b/addons/atragmx/functions/fnc_init.sqf index a574e946f8..28b5202670 100644 --- a/addons/atragmx/functions/fnc_init.sqf +++ b/addons/atragmx/functions/fnc_init.sqf @@ -84,6 +84,8 @@ GVAR(truingDropMuzzleVelocity) = 0; GVAR(targetSolutionInput) = nil; +GVAR(targetRangeDirtyFlag) = false; + GVAR(showMainPage) = true; GVAR(showAddNewGun) = false; GVAR(showAtmoEnvData) = false; diff --git a/addons/atragmx/functions/fnc_initGunList.sqf b/addons/atragmx/functions/fnc_initGunList.sqf index 6c61aee16b..2e2bbd15bd 100644 --- a/addons/atragmx/functions/fnc_initGunList.sqf +++ b/addons/atragmx/functions/fnc_initGunList.sqf @@ -41,42 +41,42 @@ if (_resetGunList) then { [".50 Beowulf" , 562, 100, 0.1425100, -0.00205896, 6.60, 0, 2, 10, 120, 0, 0, 21.71, 12.7, 50.80, 0.210, 1, "ASM" , [[-15,560],[0,561],[10,562],[15,562],[25,564],[30,565],[35,566]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - [".408 CheyTac 305gr", 1059, 100, 0.0686329, -0.00065414, 7.37, 0, 2, 10, 120, 0, 0, 19.76, 10.4, 33.02, 0.569, 1, "ICAO", [[-15,1040],[0,1047],[10,1054],[15,1059],[25,1073],[30,1082],[35,1093]], [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - [".408 CheyTac 419gr", 859, 100, 0.0816039, -0.00046249, 7.37, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.866, 1, "ICAO", [[-15,840],[0,847],[10,854],[15,859],[25,873],[30,882],[35,893]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], + [".408 CheyTac 305gr", 1059, 100, 0.0686329, -0.00065414, 7.37, 0, 2, 10, 120, 0, 0, 19.76, 10.4, 33.02, 0.569, 1, "ICAO", [[-15,1040],[0,1047],[10,1054],[15,1059],[25,1073],[30,1082],[35,1093]], [[0, 0.605], [1110, 0.569], [1500, 0.560], [1790, 0.551], [1990, 0.547], [2140, 0.545], [2300, 0.544]], true], + [".408 CheyTac 419gr", 859, 100, 0.0816039, -0.00046249, 7.37, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.866, 1, "ICAO", [[-15,840],[0,847],[10,854],[15,859],[25,873],[30,882],[35,893]] , [[0, 0.872], [1440, 0.862], [1630, 0.859], [1870, 0.852], [2090, 0.843], [2230, 0.838], [2420, 0.833]], true], ["9.3×64mm" , 862, 100, 0.0875873, -0.00110727, 8.13, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" , [[-15,843],[0,850],[10,857],[15,862],[25,876],[30,885],[35,896]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - [".338LM 250gr" , 872, 100, 0.0809096, -0.00060841, 7.37, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.645, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - [".338LM 300gr" , 792, 100, 0.0890193, -0.00055706, 7.37, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.759, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - [".338LM API526" , 872, 100, 0.0810834, -0.00069220, 7.37, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.580, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], + [".338LM 250gr" , 872, 100, 0.0809096, -0.00060841, 7.37, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.645, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0, 0.656], [1300, 0.64], [1460, 0.636], [1770, 0.625], [1920, 0.621], [2030, 0.619], [2190, 0.618]], true], + [".338LM 300gr" , 792, 100, 0.0890193, -0.00055706, 7.37, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.759, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0, 0.734], [1300, 0.726], [1500, 0.720], [1770, 0.708], [1880, 0.705], [2000, 0.702], [2110, 0.700]], true], + [".338LM API526" , 872, 100, 0.0810834, -0.00069220, 7.37, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.580, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0, 0.590], [1180, 0.576], [1320, 0.572], [1570, 0.563], [1690, 0.560], [1860, 0.557], [2050, 0.555]], true], - [".300WM Mk248 Mod0" , 857, 100, 0.0825862, -0.00072468, 7.37, 0, 2, 10, 120, 0, 0, 12.31, 7.80, 25.40, 0.537, 1, "ICAO", [[-15,838],[0,845],[10,852],[15,857],[25,871],[30,880],[35,891]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - [".300WM Mk248 Mod1" , 839, 100, 0.0841417, -0.00063027, 7.37, 0, 2, 10, 120, 0, 0, 14.26, 7.80, 25.40, 0.619, 1, "ICAO", [[-15,820],[0,827],[10,834],[15,839],[25,853],[30,862],[35,873]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - [".300WM Berger OTM" , 792, 100, 0.0891300, -0.00055262, 7.37, 0, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.715, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], + [".300WM Mk248 Mod0" , 857, 100, 0.0825862, -0.00072468, 7.37, 0, 2, 10, 120, 0, 0, 12.31, 7.80, 25.40, 0.537, 1, "ICAO", [[-15,838],[0,845],[10,852],[15,857],[25,871],[30,880],[35,891]] , [[0, 0.546], [1210, 0.529], [1470, 0.520], [1570, 0.518], [1730, 0.515], [1880, 0.513], [1970, 0.513]], true], + [".300WM Mk248 Mod1" , 839, 100, 0.0841417, -0.00063027, 7.37, 0, 2, 10, 120, 0, 0, 14.26, 7.80, 25.40, 0.619, 1, "ICAO", [[-15,820],[0,827],[10,834],[15,839],[25,853],[30,862],[35,873]] , [[0, 0.623], [1150, 0.614], [1330, 0.609], [1620, 0.598], [1770, 0.595], [1970, 0.592], [2030, 0.591]], true], + [".300WM Berger OTM" , 792, 100, 0.0891300, -0.00055262, 7.37, 0, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.715, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0, 0.721], [1400, 0.708], [1570, 0.703], [1860, 0.692], [1990, 0.689], [2140, 0.686], [2220, 0.685]], true], - ["7.62x54mmR" , 812, 100, 0.0868171, -0.00102329, 7.11, 0, 2, 10, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO", [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], + ["7.62x54mmR" , 828, 100, 0.0853677, -0.00103739, 7.11, 0, 2, 10, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO", [[-15,809],[0,816],[10,823],[15,828],[25,842],[30,851],[35,862]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["7.62x51mm M80" , 802, 100, 0.0909184, -0.00103711, 7.62, 0, 2, 10, 120, 0, 0, 9.461, 7.82, 25.40, 0.398, 1, "ICAO", [[-15,783],[0,790],[10,797],[15,802],[25,816],[30,825],[35,836]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["7.62x51mm M118LR" , 757, 100, 0.0958841, -0.00085157, 7.62, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.482, 1, "ICAO", [[-15,738],[0,745],[10,752],[15,757],[25,771],[30,780],[35,791]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["7.62x51mm Mk316" , 781, 100, 0.0928267, -0.00084311, 7.62, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.483, 1, "ICAO", [[-15,777],[0,778],[10,779],[15,781],[25,783],[30,785],[35,787]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], + ["7.62x51mm M80" , 802, 100, 0.0909184, -0.00103711, 7.62, 0, 2, 10, 120, 0, 0, 9.461, 7.82, 25.40, 0.398, 1, "ICAO", [[-15,783],[0,790],[10,797],[15,802],[25,816],[30,825],[35,836]] , [[0, 0.399], [810, 0.392], [1030, 0.383], [1120, 0.381], [1270, 0.380], [1410, 0.379], [1530, 0.379]], true], + ["7.62x51mm M118LR" , 757, 100, 0.0958841, -0.00085157, 7.62, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.482, 1, "ICAO", [[-15,738],[0,745],[10,752],[15,757],[25,771],[30,780],[35,791]] , [[0, 0.483], [790, 0.479], [920, 0.475], [1130, 0.465], [1230, 0.462], [1420, 0.460], [1630, 0.459]], true], + ["7.62x51mm Mk316" , 781, 100, 0.0928267, -0.00084311, 7.62, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.483, 1, "ICAO", [[-15,777],[0,778],[10,779],[15,781],[25,783],[30,785],[35,787]] , [[0, 0.484], [830, 0.479], [950, 0.475], [1130, 0.467], [1260, 0.463], [1430, 0.461], [1660, 0.459]], true], ["7.62x51mm Mk319" , 900, 100, 0.0811838, -0.00104515, 7.62, 0, 2, 10, 120, 0, 0, 8.424, 7.82, 25.40, 0.377, 1, "ICAO", [[-15,898],[0,899],[10,900],[15,900],[25,902],[30,903],[35,904]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], ["7.62x51mm M993" , 912, 100, 0.0803840, -0.00109390, 7.62, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 25.40, 0.359, 1, "ICAO", [[-15,893],[0,900],[10,907],[15,912],[25,926],[30,935],[35,946]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["7.62x51mm Subsonic", 314, 100, 0.3344490, -0.00060194, 6.86, 0, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.502, 1, "ICAO", [[-15,312],[0,313],[10,314],[15,314],[25,316],[30,317],[35,318]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], + ["7.62x51mm Subsonic", 314, 100, 0.3344490, -0.00060194, 6.86, 0, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.502, 1, "ICAO", [[-15,312],[0,313],[10,314],[15,314],[25,316],[30,317],[35,318]] , [[0, 0.303], [250, 0.409], [320, 0.427], [420, 0.445], [550, 0.460], [650, 0.467], [730, 0.470]], true], ["7.62x39mm" , 708, 100, 0.1066160, -0.00154815, 7.62, 0, 2, 10, 120, 0, 0, 7.970, 7.82, 25.40, 0.275, 1, "ICAO", [[-15,689],[0,696],[10,703],[15,708],[25,722],[30,731],[35,742]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["6.5x39mm" , 766, 100, 0.0872025, -0.00077363, 6.35, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.524, 1, "ICAO", [[-15,747],[0,754],[10,761],[15,766],[25,780],[30,789],[35,800]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["6.5x47mm Lapua" , 767, 100, 0.0868248, -0.00069003, 6.35, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.577, 1, "ICAO", [[-15,748],[0,755],[10,762],[15,767],[25,781],[30,790],[35,801]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["6.5mm Creedmor" , 822, 100, 0.0800956, -0.00062437, 6.35, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.632, 1, "ICAO", [[-15,803],[0,810],[10,817],[15,822],[25,836],[30,845],[35,856]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], + ["6.5x39mm" , 766, 100, 0.0872025, -0.00077363, 6.35, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.524, 1, "ICAO", [[-15,747],[0,754],[10,761],[15,766],[25,780],[30,789],[35,800]] , [[0, 0.525], [910, 0.520], [1050, 0.515], [1270, 0.506], [1390, 0.503], [1570, 0.500], [1770, 0.498]], true], + ["6.5x47mm Lapua" , 767, 100, 0.0868248, -0.00069003, 6.35, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.577, 1, "ICAO", [[-15,748],[0,755],[10,762],[15,767],[25,781],[30,790],[35,801]] , [[0, 0.578], [970, 0.574], [1140, 0.569], [1430, 0.557], [1610, 0.553], [1750, 0.551], [1860, 0.550]], true], + ["6.5mm Creedmor" , 822, 100, 0.0800956, -0.00062437, 6.35, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.632, 1, "ICAO", [[-15,803],[0,810],[10,817],[15,822],[25,836],[30,845],[35,856]] , [[0, 0.635], [1150, 0.627], [1350, 0.621], [1630, 0.611], [1760, 0.607], [1860, 0.606], [2020, 0.604]], true], - ["5.8x42mm DBP87" , 942, 100, 0.0916742, -0.00121087, 9.91, 0, 2, 10, 120, 0, 0, 4.150, 5.99, 24.40, 0.313, 1, "ICAO", [[-15,923],[0,930],[10,937],[15,942],[25,956],[30,965],[35,976]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], + ["5.8x42mm DBP87" , 942, 100, 0.0916742, -0.00121087, 9.91, 0, 2, 10, 120, 0, 0, 4.150, 5.99, 24.40, 0.313, 1, "ICAO", [[-15,923],[0,930],[10,937],[15,942],[25,956],[30,965],[35,976]] , [[0, 0.323], [760, 0.309], [970, 0.303], [1030, 0.302], [1130, 0.301], [1210, 0.300], [1510, 0.299]], true], - ["5.56x45mm M855" , 862, 100, 0.0825404, -0.00130094, 7.11, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.302, 1, "ASM" , [[-15,843],[0,849],[10,857],[15,862],[25,876],[30,885],[35,898]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], + ["5.56x45mm M855" , 862, 100, 0.0825404, -0.00130094, 7.11, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.302, 1, "ASM" , [[-15,843],[0,849],[10,857],[15,862],[25,876],[30,885],[35,898]] , [[0, 0.306], [670, 0.298], [880, 0.291], [1000, 0.289], [1150, 0.288], [1340, 0.288], [1410, 0.288]], true], ["5.56x45mm Mk262" , 812, 100, 0.0872422, -0.00111805, 7.11, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" , [[-15,793],[0,800],[10,807],[15,812],[25,826],[30,835],[35,846]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], ["5.56x45mm Mk318" , 872, 100, 0.0814490, -0.00125880, 7.11, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" , [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], ["5.56x45mm M995" , 861, 100, 0.0825279, -0.00126182, 7.11, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" , [[-15,842],[0,849],[10,856],[15,861],[25,875],[30,884],[35,895]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true], - ["5.45x39mm 7N6M" , 727, 100, 0.0802286, -0.00119458, 3.81, 0, 2, 10, 120, 0, 0, 3.428, 5.59, 16.00, 0.336, 1, "ICAO", [[-15,708],[0,715],[10,722],[15,727],[25,741],[30,750],[35,761]], [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true]]; + ["5.45x39mm 7N6M" , 727, 100, 0.0802286, -0.00119458, 3.81, 0, 2, 10, 120, 0, 0, 3.428, 5.59, 16.00, 0.336, 1, "ICAO", [[-15,708],[0,715],[10,722],[15,727],[25,741],[30,750],[35,761]], [[0, 0.339], [730, 0.331], [960, 0.323], [1100, 0.321], [1220, 0.320], [1380, 0.320], [1480, 0.320]], true]]; [] call FUNC(clear_user_data); profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)]; diff --git a/addons/atragmx/functions/fnc_lookup_c1_ballistic_coefficient.sqf b/addons/atragmx/functions/fnc_lookup_c1_ballistic_coefficient.sqf new file mode 100644 index 0000000000..43b6da006f --- /dev/null +++ b/addons/atragmx/functions/fnc_lookup_c1_ballistic_coefficient.sqf @@ -0,0 +1,43 @@ +/* + * Author: Ruthberg + * Lookup the correct C1 ballistic coefficient in the c1 ballistic coefficient vs. distance interpolation table + * + * Arguments: + * Target Range + * + * Return Value: + * C1 ballistic coefficient 0) then { + _lookupTable pushBack _x; + }; +} forEach (GVAR(workingMemory) select 19); + +private _lookupTableSize = count _lookupTable; +if (_lookupTableSize < 2) exitWith { (GVAR(workingMemory) select 15) }; +_lookupTable sort true; + +private _lowerIndex = 0; +private _upperIndex = 1; + +for "_index" from 1 to (_lookupTableSize - 1) do { + _upperIndex = _index; + _lowerIndex = _upperIndex - 1; + if (((_lookupTable select _index) select 0) >= _targetRange) exitWith {}; +}; + +(_lookupTable select _lowerIndex) params ["_lowerDistance", "_lowerC1"]; +(_lookupTable select _upperIndex) params ["_upperDistance", "_upperC1"]; + +(0.1 max (linearConversion [_lowerDistance, _upperDistance, _targetRange, _lowerC1, _upperC1]) min 2.0) diff --git a/addons/atragmx/functions/fnc_parse_input.sqf b/addons/atragmx/functions/fnc_parse_input.sqf index 05615d04e4..3ff40bbbcc 100644 --- a/addons/atragmx/functions/fnc_parse_input.sqf +++ b/addons/atragmx/functions/fnc_parse_input.sqf @@ -99,6 +99,7 @@ if (GVAR(currentUnit) == 1) then { } else { _targetRange = 25 max _targetRange min 3700; }; +GVAR(targetRangeDirtyFlag) = GVAR(targetRangeDirtyFlag) || {_targetRange != GVAR(targetRange) select GVAR(currentTarget)}; GVAR(latitude) set [GVAR(currentTarget), -90 max Round(parseNumber(ctrlText 140000)) min 90]; GVAR(directionOfFire) set [GVAR(currentTarget), 0 max abs(Round(parseNumber(ctrlText 140010))) min 359]; GVAR(windSpeed1) set [GVAR(currentTarget), _windSpeed1]; @@ -173,6 +174,11 @@ if (_muzzleVelocity != GVAR(workingMemory) select 1) then { GVAR(workingMemory) set [1, _muzzleVelocity]; GVAR(workingMemory) set [2, _zeroRange]; +if (GVAR(targetRangeDirtyFlag) && missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { + [false, false] call FUNC(recalculate_c1_ballistic_coefficient); + GVAR(targetRangeDirtyFlag) = false; +}; + [] call FUNC(update_gun); [] call FUNC(update_gun_ammo_data); [] call FUNC(update_atmosphere); diff --git a/addons/atragmx/functions/fnc_recalculate_c1_ballistic_coefficient.sqf b/addons/atragmx/functions/fnc_recalculate_c1_ballistic_coefficient.sqf index ee67a6b93c..e8bd219159 100644 --- a/addons/atragmx/functions/fnc_recalculate_c1_ballistic_coefficient.sqf +++ b/addons/atragmx/functions/fnc_recalculate_c1_ballistic_coefficient.sqf @@ -1,6 +1,6 @@ /* * Author: Ruthberg - * Recalculates the c1 ballistic coefficient based on the c1 ballistic coefficient vs. distance interpolation input + * Recalculates the c1 ballistic coefficient based on the current target range * * Arguments: * parse input @@ -22,36 +22,7 @@ if (_parseInput) then { [] call FUNC(parse_input); }; -private _lookupTable = []; -{ - if ((_x select 1) > 0) then { - _lookupTable pushBack _x; - }; -} forEach (GVAR(workingMemory) select 19); - -private _lookupTableSize = count _lookupTable; -if (_lookupTableSize < 2) exitWith {}; -_lookupTable sort true; - -private _lowerIndex = -1; -private _upperIndex = -1; - -for "_index" from 1 to (_lookupTableSize - 1) do { - _upperIndex = _index; - _lowerIndex = _upperIndex - 1; - if (((_lookupTable select _index) select 0) >= (GVAR(targetRange) select GVAR(currentTarget))) exitWith {}; -}; - -private _lowerDistance = (_lookupTable select _lowerIndex) select 0; -private _upperDistance = (_lookupTable select _upperIndex) select 0; -private _lowerC1 = (_lookupTable select _lowerIndex) select 1; -private _upperC1 = (_lookupTable select _upperIndex) select 1; -private _c1 = _lowerC1; -if (_lowerDistance != _upperDistance) then { - private _slope = (_upperC1 - _lowerC1) / (_upperDistance - _lowerDistance); - _c1 = _lowerC1 + ((GVAR(targetRange) select GVAR(currentTarget)) - _lowerDistance) * _slope; -}; -_c1 = 0.1 max _c1 min 2.0; +private _c1 = [GVAR(targetRange) select GVAR(currentTarget)] call FUNC(lookup_c1_ballistic_coefficient); if (_c1 != GVAR(workingMemory) select 15) then { GVAR(workingMemory) set [15, _c1]; diff --git a/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf b/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf index e4e3cd70c6..aa1ab6d23f 100644 --- a/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf +++ b/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf @@ -33,24 +33,19 @@ private _lookupTableSize = count _lookupTable; if (_lookupTableSize < 2) exitWith {}; _lookupTable sort true; -private _lowerIndex = -1; -private _upperIndex = -1; +private _lowerIndex = 0; +private _upperIndex = 1; + for "_index" from 1 to (_lookupTableSize - 1) do { _upperIndex = _index; _lowerIndex = _upperIndex - 1; if (((_lookupTable select _index) select 0) >= GVAR(temperature)) exitWith {}; }; -private _lowerTemperature = (_lookupTable select _lowerIndex) select 0; -private _upperTemperature = (_lookupTable select _upperIndex) select 0; -private _lowerMuzzleVelocity = (_lookupTable select _lowerIndex) select 1; -private _upperMuzzleVelocity = (_lookupTable select _upperIndex) select 1; -private _muzzleVelocity = _lowerMuzzleVelocity; -if (_lowerTemperature != _upperTemperature) then { - private _slope = (_upperMuzzleVelocity - _lowerMuzzleVelocity) / (_upperTemperature - _lowerTemperature); - _muzzleVelocity = _lowerMuzzleVelocity + (GVAR(temperature) - _lowerTemperature) * _slope; -}; -_muzzleVelocity = 100 max _muzzleVelocity min 1400; +(_lookupTable select _lowerIndex) params ["_lowerDistance", "_lowerMuzzleVelocity"]; +(_lookupTable select _upperIndex) params ["_upperDistance", "_upperMuzzleVelocity"]; + +_muzzleVelocity = 100 max (linearConversion [_lowerDistance, _upperDistance, GVAR(temperature), _lowerMuzzleVelocity, _upperMuzzleVelocity]) min 1400; if (_muzzleVelocity != GVAR(workingMemory) select 1) then { GVAR(workingMemory) set [1, _muzzleVelocity]; diff --git a/addons/atragmx/functions/fnc_sord.sqf b/addons/atragmx/functions/fnc_sord.sqf index 792d727c70..c6f77f748b 100644 --- a/addons/atragmx/functions/fnc_sord.sqf +++ b/addons/atragmx/functions/fnc_sord.sqf @@ -21,6 +21,8 @@ if (!GVAR(initialised)) exitWith {}; params ["_slopeDistance", "_azimuth", "_inclination"]; +GVAR(targetRangeDirtyFlag) = (round(_slopeDistance) != (GVAR(targetRange) select GVAR(currentTarget))); + GVAR(inclinationAngle) set [GVAR(currentTarget), round(_inclination)]; GVAR(directionOfFire) set [GVAR(currentTarget), round(_azimuth)]; GVAR(targetRange) set [GVAR(currentTarget), round(_slopeDistance)]; diff --git a/addons/atragmx/functions/fnc_update_range_card.sqf b/addons/atragmx/functions/fnc_update_range_card.sqf index 4bcf4c3e42..2f4aa3c7a2 100644 --- a/addons/atragmx/functions/fnc_update_range_card.sqf +++ b/addons/atragmx/functions/fnc_update_range_card.sqf @@ -45,9 +45,9 @@ private _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSou switch (GVAR(currentScopeUnit)) do { case 0: { - _elevation = MRAD_TO_MOA(_elevation); - _windage1 = MRAD_TO_MOA(_windage1); - _windage2 = MRAD_TO_MOA(_windage2); + _elevation = MOA_TO_MRAD(_elevation); + _windage1 = MOA_TO_MRAD(_windage1); + _windage2 = MOA_TO_MRAD(_windage2); }; case 2: { _elevation = _elevation * 1.047; @@ -55,7 +55,7 @@ private _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSou _windage2 = _windage2 * 1.047; }; case 3: { - private _clickSize = [1, 1 / 1.047, MOA_TO_MRAD(1)] select (GVAR(workingMemory) select 7); + private _clickSize = [1, 1 / 1.047, MRAD_TO_MOA(1)] select (GVAR(workingMemory) select 7); private _clickNumber = GVAR(workingMemory) select 8; private _clickInterval = _clickSize / _clickNumber; diff --git a/addons/atragmx/functions/fnc_update_result.sqf b/addons/atragmx/functions/fnc_update_result.sqf index 0f69d742dc..1dc2c6204e 100644 --- a/addons/atragmx/functions/fnc_update_result.sqf +++ b/addons/atragmx/functions/fnc_update_result.sqf @@ -41,16 +41,16 @@ private _lead = GVAR(leadOutput) select GVAR(currentTarget); switch (GVAR(currentScopeUnit)) do { case 0: { - _elevationAbs = MRAD_TO_MOA(_elevationAbs); - _windageAbs = MRAD_TO_MOA(_windageAbs); + _elevationAbs = MOA_TO_MRAD(_elevationAbs); + _windageAbs = MOA_TO_MRAD(_windageAbs); - _wind2 = MRAD_TO_MOA(_wind2); + _wind2 = MOA_TO_MRAD(_wind2); - _elevationRel = MRAD_TO_MOA(_elevationRel); - _windageRel = MRAD_TO_MOA(_windageRel); + _elevationRel = MOA_TO_MRAD(_elevationRel); + _windageRel = MOA_TO_MRAD(_windageRel); - _elevationCur = MRAD_TO_MOA(_elevationCur); - _windageCur = MRAD_TO_MOA(_windageCur); + _elevationCur = MOA_TO_MRAD(_elevationCur); + _windageCur = MOA_TO_MRAD(_windageCur); }; case 2: { _elevationAbs = _elevationAbs * 1.047; @@ -65,7 +65,7 @@ switch (GVAR(currentScopeUnit)) do { _windageCur = _windageCur * 1.047; }; case 3: { - private _clickSize = [1, 1 / 1.047, MOA_TO_MRAD(1)] select (GVAR(workingMemory) select 7); + private _clickSize = [1, 1 / 1.047, MRAD_TO_MOA(1)] select (GVAR(workingMemory) select 7); private _clickNumber = GVAR(workingMemory) select 8; private _clickInterval = _clickSize / _clickNumber; diff --git a/addons/atragmx/functions/fnc_update_truing_drop_data.sqf b/addons/atragmx/functions/fnc_update_truing_drop_data.sqf index c546e78d41..cd1fa9de68 100644 --- a/addons/atragmx/functions/fnc_update_truing_drop_data.sqf +++ b/addons/atragmx/functions/fnc_update_truing_drop_data.sqf @@ -42,9 +42,9 @@ private _dropData = +GVAR(truingDropDropData); switch (_dropUnit) do { case 0: { - _dropData set [0, MRAD_TO_MOA(_dropData select 0)]; - _dropData set [1, MRAD_TO_MOA(_dropData select 1)]; - _dropData set [2, MRAD_TO_MOA(_dropData select 2)]; + _dropData set [0, MOA_TO_MRAD(_dropData select 0)]; + _dropData set [1, MOA_TO_MRAD(_dropData select 1)]; + _dropData set [2, MOA_TO_MRAD(_dropData select 2)]; }; case 2: { _dropData set [0, (_dropData select 0) * 1.047]; diff --git a/addons/atragmx/functions/fnc_update_zero_range.sqf b/addons/atragmx/functions/fnc_update_zero_range.sqf index d849fa76c3..8a41e1c38e 100644 --- a/addons/atragmx/functions/fnc_update_zero_range.sqf +++ b/addons/atragmx/functions/fnc_update_zero_range.sqf @@ -36,10 +36,10 @@ if (!GVAR(atmosphereModeTBH)) then { }; private _scopeBaseAngle = if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) then { - private _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngleVanilla:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight]; + private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZero:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight]; (parseNumber _zeroAngle) } else { - private _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngle:%1:%2:%3:%4:%5:%6:%7:%8:%9", _zeroRange, _muzzleVelocity, _boreHeight, _temperature, _barometricPressure, _relativeHumidity, _bc, _dragModel, _atmosphereModel]; + private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZeroAB:%1:%2:%3:%4:%5:%6:%7:%8:%9", _zeroRange, _muzzleVelocity, _boreHeight, _temperature, _barometricPressure, _relativeHumidity, _bc, _dragModel, _atmosphereModel]; (parseNumber _zeroAngle) }; diff --git a/addons/atragmx/script_component.hpp b/addons/atragmx/script_component.hpp index 7b6aaa74cd..ad25ee5b09 100644 --- a/addons/atragmx/script_component.hpp +++ b/addons/atragmx/script_component.hpp @@ -16,11 +16,4 @@ #include "\z\ace\addons\main\script_macros.hpp" -#define MOA_TO_MRAD(d) (d * 3.43774677) // Conversion factor: 54 / (5 * PI) -#define MRAD_TO_MOA(d) (d * 0.29088821) // Conversion factor: (5 * PI) / 54 -#define DEG_TO_MOA(d) (d * 60) // Conversion factor: 60 -#define MOA_TO_DEG(d) (d / 60) // Conversion factor: 1 / 60 -#define DEG_TO_MRAD(d) (d * 17.45329252) // Conversion factor: (50 * PI) / 9 -#define MRAD_TO_DEG(d) (d / 17.45329252) // Conversion factor: 9 / (50 * PI) - -#define ATRAGMX_PROFILE_NAMESPACE_VERSION 2.1 +#define ATRAGMX_PROFILE_NAMESPACE_VERSION 2.2 diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index d91102ee5f..e7a8630ac9 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -41,13 +41,14 @@ if (_unit == _attachToVehicle) then { //Self Attachment _attachedItem attachTo [_unit, [0.05, -0.09, 0.1], "leftshoulder"]; if (!_silentScripted) then { _unit removeItem _itemClassname; // Remove item - [_onAttachText] call EFUNC(common,displayTextStructured); + [_onAttachText, 2] call EFUNC(common,displayTextStructured); }; _unit setVariable [QGVAR(attached), [[_attachedItem, _itemClassname]], true]; } else { GVAR(placeAction) = PLACE_WAITING; [_unit, "forceWalk", "ACE_Attach", true] call EFUNC(common,statusEffect_set); + [_unit, "blockThrow", "ACE_Attach", true] call EFUNC(common,statusEffect_set); [{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call CBA_fnc_execNextFrame; _unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)]; @@ -85,6 +86,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment [_idPFH] call CBA_fnc_removePerFrameHandler; [_unit, "forceWalk", "ACE_Attach", false] call EFUNC(common,statusEffect_set); + [_unit, "blockThrow", "ACE_Attach", false] call EFUNC(common,statusEffect_set); [] call EFUNC(interaction,hideMouseHint); [_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler); _unit removeAction _actionID; diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index b3d565570f..91763c0c4d 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -83,4 +83,4 @@ if (_itemDisplayName == "") then { _itemDisplayName = getText (configFile >> "CfgMagazines" >> _itemName >> "displayName"); }; -[format [localize LSTRING(Item_Detached), _itemDisplayName]] call EFUNC(common,displayTextStructured); +[format [localize LSTRING(Item_Detached), _itemDisplayName], 2] call EFUNC(common,displayTextStructured); diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf index dea5c7b3ab..9679e55ad2 100644 --- a/addons/attach/functions/fnc_placeApprove.sqf +++ b/addons/attach/functions/fnc_placeApprove.sqf @@ -101,4 +101,4 @@ private _attachList = _attachToVehicle getVariable [QGVAR(attached), []]; _attachList pushBack [_attachedObject, _itemClassname]; _attachToVehicle setVariable [QGVAR(attached), _attachList, true]; -[_onAttachText] call EFUNC(common,displayTextStructured); +[_onAttachText, 2] call EFUNC(common,displayTextStructured); diff --git a/addons/ballistics/CfgAmmo.hpp b/addons/ballistics/CfgAmmo.hpp index acbb8a5953..5b25f70f71 100644 --- a/addons/ballistics/CfgAmmo.hpp +++ b/addons/ballistics/CfgAmmo.hpp @@ -27,6 +27,7 @@ class CfgAmmo { ACE_caliber=5.69; ACE_bulletLength=23.012; ACE_bulletMass=4.9896; + ACE_muzzleVelocityVariationSD=0.4; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; ACE_ballisticCoefficients[]={0.361}; ACE_velocityBoundaries[]={}; @@ -123,6 +124,7 @@ class CfgAmmo { ACE_caliber=6.706; ACE_bulletLength=34.646; ACE_bulletMass=9.0072; + ACE_muzzleVelocityVariationSD=0.35; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; ACE_ballisticCoefficients[]={0.290}; ACE_velocityBoundaries[]={}; @@ -137,6 +139,7 @@ class CfgAmmo { ACE_caliber=6.706; ACE_bulletLength=36.22; ACE_bulletMass=9.072; + ACE_muzzleVelocityVariationSD=0.3; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; ACE_ballisticCoefficients[]={0.317}; ACE_velocityBoundaries[]={}; @@ -177,6 +180,7 @@ class CfgAmmo { ACE_caliber=7.823; ACE_bulletLength=31.496; ACE_bulletMass=11.34; + ACE_muzzleVelocityVariationSD=0.4; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; ACE_ballisticCoefficients[]={0.243}; ACE_velocityBoundaries[]={}; @@ -193,6 +197,7 @@ class CfgAmmo { ACE_caliber=7.823; ACE_bulletLength=31.496; ACE_bulletMass=11.34; + ACE_muzzleVelocityVariationSD=0.45; ACE_ammoTempMuzzleVelocityShifts[]={-5.3, -5.1, -4.6, -4.2, -3.4, -2.6, -1.4, -0.3, 1.4, 3.0, 5.2}; ACE_ballisticCoefficients[]={0.243}; ACE_velocityBoundaries[]={}; @@ -209,6 +214,7 @@ class CfgAmmo { ACE_caliber=7.823; ACE_bulletLength=31.496; ACE_bulletMass=8.424; + ACE_muzzleVelocityVariationSD=0.45; ACE_ammoTempMuzzleVelocityShifts[]={-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; ACE_ballisticCoefficients[]={0.377}; ACE_velocityBoundaries[]={}; @@ -257,6 +263,7 @@ class CfgAmmo { ACE_caliber=7.823; ACE_bulletLength=34.366; ACE_bulletMass=12.312; + ACE_muzzleVelocityVariationSD=0.45; ACE_ammoTempMuzzleVelocityShifts[]={-5.3, -5.1, -4.6, -4.2, -3.4, -2.6, -1.4, -0.3, 1.4, 3.0, 5.2}; ACE_ballisticCoefficients[]={0.268}; ACE_velocityBoundaries[]={}; @@ -273,6 +280,7 @@ class CfgAmmo { ACE_caliber=7.823; ACE_bulletLength=37.821; ACE_bulletMass=14.256; + ACE_muzzleVelocityVariationSD=0.45; ACE_ammoTempMuzzleVelocityShifts[]={-5.3, -5.1, -4.6, -4.2, -3.4, -2.6, -1.4, -0.3, 1.4, 3.0, 5.2}; ACE_ballisticCoefficients[]={0.310}; ACE_velocityBoundaries[]={}; @@ -289,6 +297,7 @@ class CfgAmmo { ACE_caliber=7.823; ACE_bulletLength=40.691; ACE_bulletMass=14.904; + ACE_muzzleVelocityVariationSD=0.35; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; ACE_ballisticCoefficients[]={0.368}; ACE_velocityBoundaries[]={}; @@ -298,7 +307,8 @@ class CfgAmmo { ACE_barrelLengths[]={508.0, 609.6, 660.4}; }; class B_762x54_Ball: B_762x51_Ball { - airFriction=-0.00102329; + airFriction=-0.00101071; + typicalSpeed=835; ACE_caliber=7.925; ACE_bulletLength=28.956; ACE_bulletMass=9.8496; @@ -307,12 +317,12 @@ class CfgAmmo { ACE_velocityBoundaries[]={}; ACE_standardAtmosphere="ICAO"; ACE_dragModel=1; - ACE_muzzleVelocities[]={700, 800, 820, 833}; - ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; + ACE_muzzleVelocities[]={760, 795, 835, 865}; + ACE_barrelLengths[]={406.4, 508.0, 604.5, 736.6}; }; class B_762x54_Tracer_Green; class ACE_762x54_Ball_7T2 : B_762x54_Tracer_Green { - airFriction=-0.00106104; + airFriction=-0.00103739; typicalSpeed=800; tracerStartTime=0.073; // Based on the 7T2 which burns three seconds tracerEndTime=3; @@ -324,8 +334,8 @@ class CfgAmmo { ACE_velocityBoundaries[]={}; ACE_standardAtmosphere="ICAO"; ACE_dragModel=1; - ACE_muzzleVelocities[]={680, 750, 798, 800}; - ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; + ACE_muzzleVelocities[]={735, 770, 809, 838}; + ACE_barrelLengths[]={406.4, 508.0, 604.5, 736.6}; }; class B_762x39_Ball_F : BulletBase { airFriction=-0.00154815; @@ -375,6 +385,7 @@ class CfgAmmo { ACE_caliber=9.296; ACE_bulletLength=34.29; ACE_bulletMass=14.904; + ACE_muzzleVelocityVariationSD=0.4; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; ACE_ballisticCoefficients[]={0.368}; ACE_velocityBoundaries[]={}; @@ -391,6 +402,7 @@ class CfgAmmo { ACE_bulletLength=55.1942; ACE_bulletMass=27.1507; // 419 gr ACE_transonicStabilityCoef=1; + ACE_muzzleVelocityVariationSD=0.2; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; ACE_ballisticCoefficients[]={0.434}; ACE_velocityBoundaries[]={}; @@ -408,6 +420,7 @@ class CfgAmmo { ACE_bulletLength=41.4528; ACE_bulletMass=19.7637; // 305 gr ACE_transonicStabilityCoef=1; + ACE_muzzleVelocityVariationSD=0.2; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; ACE_ballisticCoefficients[]={0.279}; ACE_velocityBoundaries[]={}; @@ -422,6 +435,7 @@ class CfgAmmo { ACE_caliber=8.585; ACE_bulletLength=39.573; ACE_bulletMass=16.2; + ACE_muzzleVelocityVariationSD=0.3; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; ACE_ballisticCoefficients[]={0.322}; ACE_velocityBoundaries[]={}; @@ -448,8 +462,9 @@ class CfgAmmo { airFriction=-0.00055706; typicalSpeed=826; ACE_caliber=8.585; - ACE_bulletLength=43.18; + ACE_bulletLength=44.0182; ACE_bulletMass=19.44; + ACE_muzzleVelocityVariationSD=0.3; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; ACE_ballisticCoefficients[]={0.368}; ACE_velocityBoundaries[]={}; @@ -466,6 +481,7 @@ class CfgAmmo { ACE_caliber=8.585; ACE_bulletLength=38.989; ACE_bulletMass=16.3941242; + ACE_muzzleVelocityVariationSD=0.4; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; ACE_ballisticCoefficients[]={0.290}; ACE_velocityBoundaries[]={}; @@ -498,6 +514,7 @@ class CfgAmmo { ACE_caliber=12.954; ACE_bulletLength=58.674; ACE_bulletMass=41.9256; + ACE_muzzleVelocityVariationSD=0.35; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; ACE_ballisticCoefficients[]={0.670}; ACE_velocityBoundaries[]={}; @@ -515,6 +532,7 @@ class CfgAmmo { ACE_caliber=12.954; ACE_bulletLength=58.674; ACE_bulletMass=41.9904; + ACE_muzzleVelocityVariationSD=0.4; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; ACE_ballisticCoefficients[]={0.670}; ACE_velocityBoundaries[]={}; @@ -530,6 +548,7 @@ class CfgAmmo { ACE_caliber=12.954; ACE_bulletLength=64.516; ACE_bulletMass=48.6; + ACE_muzzleVelocityVariationSD=0.2; ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; ACE_ballisticCoefficients[]={1.050}; ACE_velocityBoundaries[]={}; diff --git a/addons/ballistics/CfgMagazines.hpp b/addons/ballistics/CfgMagazines.hpp index 2b9088408b..a89cf7022d 100644 --- a/addons/ballistics/CfgMagazines.hpp +++ b/addons/ballistics/CfgMagazines.hpp @@ -2,24 +2,24 @@ class CfgMagazines { class CA_Magazine; + class VehicleMagazine; + class 30Rnd_580x42_Mag_F: CA_Magazine { - initSpeed = 930; - }; - class 100Rnd_580x42_Mag_F: 30Rnd_580x42_Mag_F { - initSpeed = 930; + initSpeed = 950; }; class 20Rnd_650x39_Cased_Mag_F: CA_Magazine { - initSpeed = 760; + initSpeed = 806; }; class 30Rnd_65x39_caseless_mag: CA_Magazine { - initSpeed = 760; + initSpeed = 774; + }; + class 30Rnd_65x39_caseless_green: 30Rnd_65x39_caseless_mag { + initSpeed = 788; }; class 100Rnd_65x39_caseless_mag: CA_Magazine { - initSpeed = 760; - }; - class 100Rnd_65x39_caseless_mag_Tracer: 100Rnd_65x39_caseless_mag { - initSpeed = 760; + initSpeed = 774; }; + class 100Rnd_65x39_caseless_mag_Tracer; class ACE_100Rnd_65x39_caseless_mag_Tracer_Dim: 100Rnd_65x39_caseless_mag_Tracer { author = ECSTRING(common,ACETeam); ammo = "ACE_65x39_Caseless_Tracer_Dim"; @@ -29,7 +29,7 @@ class CfgMagazines { picture = "\A3\weapons_f\data\ui\m_100rnd_65x39_yellow_ca.paa"; }; class 200Rnd_65x39_cased_Box: 100Rnd_65x39_caseless_mag { - initSpeed = 760; + initSpeed = 743; }; class ACE_200Rnd_65x39_cased_Box_Tracer_Dim: 200Rnd_65x39_cased_Box { author = ECSTRING(common,ACETeam); @@ -38,6 +38,7 @@ class CfgMagazines { displayNameShort = CSTRING(200Rnd_65x39_cased_Box_Tracer_DimNameShort); descriptionShort = CSTRING(200Rnd_65x39_cased_Box_Tracer_DimDescription); picture = "\A3\weapons_f\data\ui\m_200rnd_65x39_yellow_ca.paa"; + initSpeed = 774; }; class 30Rnd_65x39_caseless_mag_Tracer; class ACE_30Rnd_65x39_caseless_mag_Tracer_Dim: 30Rnd_65x39_caseless_mag_Tracer { @@ -61,6 +62,22 @@ class CfgMagazines { }; class 30Rnd_556x45_Stanag: CA_Magazine { + initSpeed = 909; + }; + class 30Rnd_556x45_Stanag_green: 30Rnd_556x45_Stanag { + initSpeed = 869; + }; + class 30Rnd_556x45_Stanag_red: 30Rnd_556x45_Stanag { + initSpeed = 869; + }; + class 30Rnd_556x45_Stanag_Tracer_Red: 30Rnd_556x45_Stanag { + initSpeed = 869; + }; + class 30Rnd_556x45_Stanag_Tracer_Green: 30Rnd_556x45_Stanag { + initSpeed = 869; + }; + class 30Rnd_556x45_Stanag_Tracer_Yellow: 30Rnd_556x45_Stanag { + initSpeed = 889; }; class ACE_30Rnd_556x45_Stanag_M995_AP_mag: 30Rnd_556x45_Stanag { author = ECSTRING(common,ACETeam); @@ -68,7 +85,7 @@ class CfgMagazines { displayName = CSTRING(30Rnd_556x45_Stanag_M995_AP_mag_Name); displayNameShort = CSTRING(30Rnd_556x45_Stanag_M995_AP_mag_NameShort); descriptionShort = CSTRING(30Rnd_556x45_Stanag_M995_AP_mag_Description); - initSpeed = 865; + initSpeed = 875; }; class ACE_30Rnd_556x45_Stanag_Mk262_mag: 30Rnd_556x45_Stanag { author = ECSTRING(common,ACETeam); @@ -84,9 +101,7 @@ class CfgMagazines { displayName = CSTRING(30Rnd_556x45_Stanag_Mk318_mag_Name); displayNameShort = CSTRING(30Rnd_556x45_Stanag_Mk318_mag_NameShort); descriptionShort = CSTRING(30Rnd_556x45_Stanag_Mk318_mag_Description); - initSpeed = 922; - }; - class 30Rnd_556x45_Stanag_Tracer_Red: 30Rnd_556x45_Stanag { + initSpeed = 923; }; class ACE_30Rnd_556x45_Stanag_Tracer_Dim: 30Rnd_556x45_Stanag_Tracer_Red { author = ECSTRING(common,ACETeam); @@ -98,15 +113,18 @@ class CfgMagazines { }; class 200Rnd_556x45_Box_F: CA_Magazine { - initSpeed = 872; + initSpeed = 889; + }; + class 200Rnd_556x45_Box_Red_F: 200Rnd_556x45_Box_F { + initSpeed = 869; }; class 30Rnd_762x39_Mag_F: CA_Magazine { - initSpeed = 715; + initSpeed = 716; }; class 20Rnd_762x51_Mag: CA_Magazine { - initSpeed = 833; + initSpeed = 827; }; class 10Rnd_762x51_Mag: 20Rnd_762x51_Mag { initSpeed = 833; @@ -140,7 +158,7 @@ class CfgMagazines { displayName = CSTRING(20Rnd_762x51_mag_SDName); displayNameShort = CSTRING(20Rnd_762x51_mag_SDNameShort); descriptionShort = CSTRING(20Rnd_762x51_mag_SDDescription); - initSpeed = 325; + initSpeed = 330; }; class ACE_10Rnd_762x51_M118LR_Mag: 10Rnd_762x51_Mag { @@ -185,7 +203,7 @@ class CfgMagazines { displayName = CSTRING(20Rnd_762x51_M118LR_Mag_Name); displayNameShort = CSTRING(20Rnd_762x51_M118LR_Mag_NameShort); descriptionShort = CSTRING(20Rnd_762x51_M118LR_Mag_Description); - initSpeed = 780; + initSpeed = 785; }; class ACE_20Rnd_762x51_Mk316_Mod_0_Mag: 20Rnd_762x51_Mag { author = ECSTRING(common,ACETeam); @@ -194,7 +212,7 @@ class CfgMagazines { displayName = CSTRING(20Rnd_762x51_Mk316_Mod_0_Mag_Name); displayNameShort = CSTRING(20Rnd_762x51_Mk316_Mod_0_Mag_NameShort); descriptionShort = CSTRING(20Rnd_762x51_Mk316_Mod_0_Mag_Description); - initSpeed = 790; + initSpeed = 798; }; class ACE_20Rnd_762x51_Mk319_Mod_0_Mag: 20Rnd_762x51_Mag { author = ECSTRING(common,ACETeam); @@ -202,7 +220,7 @@ class CfgMagazines { displayName = CSTRING(20Rnd_762x51_Mk319_Mod_0_Mag_Name); displayNameShort = CSTRING(20Rnd_762x51_Mk319_Mod_0_Mag_NameShort); descriptionShort = CSTRING(20Rnd_762x51_Mk319_Mod_0_Mag_Description); - initSpeed = 900; + initSpeed = 910; }; class ACE_20Rnd_762x51_M993_AP_Mag: 20Rnd_762x51_Mag { author = ECSTRING(common,ACETeam); @@ -211,7 +229,7 @@ class CfgMagazines { displayName = CSTRING(20Rnd_762x51_M993_AP_Mag_Name); displayNameShort = CSTRING(20Rnd_762x51_M993_AP_Mag_NameShort); descriptionShort = CSTRING(20Rnd_762x51_M993_AP_Mag_Description); - initSpeed = 920; + initSpeed = 930; }; class ACE_20Rnd_762x67_Mk248_Mod_0_Mag: 20Rnd_762x51_Mag { author = ECSTRING(common,ACETeam); @@ -219,7 +237,7 @@ class CfgMagazines { displayName = CSTRING(20Rnd_762x67_Mk248_Mod_0_Mag_Name); displayNameShort = CSTRING(20Rnd_762x67_Mk248_Mod_0_Mag_NameShort); descriptionShort = CSTRING(20Rnd_762x67_Mk248_Mod_0_Mag_Description); - initSpeed = 900; + initSpeed = 865; }; class ACE_20Rnd_762x67_Mk248_Mod_1_Mag: 20Rnd_762x51_Mag { author = ECSTRING(common,ACETeam); @@ -227,7 +245,7 @@ class CfgMagazines { displayName = CSTRING(20Rnd_762x67_Mk248_Mod_1_Mag_Name); displayNameShort = CSTRING(20Rnd_762x67_Mk248_Mod_1_Mag_NameShort); descriptionShort = CSTRING(20Rnd_762x67_Mk248_Mod_1_Mag_Description); - initSpeed = 880; + initSpeed = 847; }; class ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag: 20Rnd_762x51_Mag { author = ECSTRING(common,ACETeam); @@ -235,12 +253,12 @@ class CfgMagazines { displayName = CSTRING(20Rnd_762x67_Berger_Hybrid_OTM_Mag_Name); displayNameShort = CSTRING(20Rnd_762x67_Berger_Hybrid_OTM_Mag_NameShort); descriptionShort = CSTRING(20Rnd_762x67_Berger_Hybrid_OTM_Mag_Description); - initSpeed = 832; + initSpeed = 800; }; class ACE_30Rnd_65x47_Scenar_mag: 30Rnd_65x39_caseless_mag { author = ECSTRING(common,ACETeam); ammo = "ACE_65x47_Ball_Scenar"; - initSpeed = 761; + initSpeed = 826; displayName = CSTRING(30Rnd_65x47_Scenar_mag_Name); displayNameShort = CSTRING(30Rnd_65x47_Scenar_mag_NameShort); descriptionShort = CSTRING(30Rnd_65x47_Scenar_mag_Description); @@ -248,7 +266,7 @@ class CfgMagazines { class ACE_20Rnd_65x47_Scenar_mag: 20Rnd_650x39_Cased_Mag_F { author = ECSTRING(common,ACETeam); ammo = "ACE_65x47_Ball_Scenar"; - initSpeed = 779; + initSpeed = 826; displayName = CSTRING(20Rnd_65x47_Scenar_mag_Name); displayNameShort = CSTRING(20Rnd_65x47_Scenar_mag_NameShort); descriptionShort = CSTRING(20Rnd_65x47_Scenar_mag_Description); @@ -256,7 +274,7 @@ class CfgMagazines { class ACE_30Rnd_65_Creedmor_mag: 30Rnd_65x39_caseless_mag { author = ECSTRING(common,ACETeam); ammo = "ACE_65_Creedmor_Ball"; - initSpeed = 815; + initSpeed = 857; displayName = CSTRING(30Rnd_65_Creedmor_mag_Name); displayNameShort = CSTRING(30Rnd_65_Creedmor_mag_NameShort); descriptionShort = CSTRING(30Rnd_65_Creedmor_mag_Description); @@ -264,12 +282,14 @@ class CfgMagazines { class ACE_20Rnd_65_Creedmor_mag: 20Rnd_650x39_Cased_Mag_F { author = ECSTRING(common,ACETeam); ammo = "ACE_65_Creedmor_Ball"; - initSpeed = 808; + initSpeed = 857; displayName = CSTRING(20Rnd_65_Creedmor_mag_Name); displayNameShort = CSTRING(20Rnd_65_Creedmor_mag_NameShort); descriptionShort = CSTRING(20Rnd_65_Creedmor_mag_Description); }; - class 10Rnd_338_Mag; + class 10Rnd_338_Mag: CA_Magazine { + initSpeed = 880; + }; class ACE_10Rnd_338_300gr_HPBT_Mag: 10Rnd_338_Mag { author = ECSTRING(common,ACETeam); ammo = "ACE_338_Ball"; @@ -330,46 +350,47 @@ class CfgMagazines { class 30Rnd_9x21_Mag: CA_Magazine { - initSpeed = 390; + initSpeed = 430; }; - class ACE_30Rnd_9x19_mag: 30Rnd_9x21_Mag { - author = ECSTRING(common,ACETeam); - ammo = "ACE_9x19_Ball"; - displayName = CSTRING(30Rnd_9x19_mag_Name); - displayNameShort = CSTRING(30Rnd_9x19_mag_NameShort); - descriptionShort = CSTRING(30Rnd_9x19_mag_Description); - initSpeed = 370; + class 30Rnd_9x21_Green_Mag: 30Rnd_9x21_Mag { + initSpeed = 402; + }; + class 30Rnd_9x21_Mag_SMG_02: 30Rnd_9x21_Mag { + initSpeed = 430; + }; + class 30Rnd_9x21_Mag_SMG_02_Tracer_Green: 30Rnd_9x21_Mag_SMG_02 { + initSpeed = 402; }; class 10Rnd_50BW_Mag_F: CA_Magazine { initSpeed = 552; }; - + class 11Rnd_45ACP_Mag: CA_Magazine { - initSpeed = 250; + initSpeed = 254; }; class 6Rnd_45ACP_Cylinder : 11Rnd_45ACP_Mag { - initSpeed = 250; + initSpeed = 254; }; class 30Rnd_45ACP_Mag_SMG_01: 30Rnd_9x21_Mag { - initSpeed = 250; + initSpeed = 254; }; class 9Rnd_45ACP_Mag: 30Rnd_45ACP_Mag_SMG_01 { - initSpeed = 250; + initSpeed = 254; }; class 30Rnd_45ACP_Mag_SMG_01_Tracer_Green: 30Rnd_45ACP_Mag_SMG_01 { - initSpeed = 250; + initSpeed = 254; }; class 16Rnd_9x21_Mag: 30Rnd_9x21_Mag { - initSpeed = 390; + initSpeed = 430; }; class 10Rnd_9x21_Mag: 16Rnd_9x21_Mag { - initSpeed = 390; + initSpeed = 430; }; class ACE_16Rnd_9x19_mag: 16Rnd_9x21_Mag { author = ECSTRING(common,ACETeam); @@ -381,7 +402,7 @@ class CfgMagazines { }; class 10Rnd_762x54_Mag: 10Rnd_762x51_Mag { - initSpeed = 800; + initSpeed = 836; }; class ACE_10Rnd_762x54_Tracer_mag: 10Rnd_762x54_Mag { author = ECSTRING(common,ACETeam); @@ -389,19 +410,38 @@ class CfgMagazines { displayName = CSTRING(10Rnd_762x54_Tracer_mag_Name); displayNameShort = CSTRING(10Rnd_762x54_Tracer_mag_NameShort); descriptionShort = CSTRING(10Rnd_762x54_Tracer_mag_Description); - initSpeed = 800; + initSpeed = 810; tracersEvery = 1; }; class 150Rnd_762x54_Box: 150Rnd_762x51_Box { - initSpeed = 750; - }; - - class 150Rnd_93x64_Mag: CA_Magazine { - initSpeed = 860; + initSpeed = 778; }; class 10Rnd_127x54_Mag: CA_Magazine { initSpeed = 300; }; + + class 150Rnd_556x45_Drum_Mag_F: CA_Magazine { + initSpeed = 869; + }; + + class 130Rnd_338_Mag: CA_Magazine { + initSpeed = 807; + }; + + class 200Rnd_65x39_Belt: VehicleMagazine { + initSpeed = 806; + }; + + class 20Rnd_556x45_UW_mag: 30Rnd_556x45_Stanag { + initSpeed = 267; + }; + + class 150Rnd_93x64_Mag: CA_Magazine { + initSpeed = 870; + }; + class 10Rnd_93x64_DMR_05_Mag: 150Rnd_93x64_Mag { + initSpeed = 870; + }; }; diff --git a/addons/ballistics/CfgWeapons.hpp b/addons/ballistics/CfgWeapons.hpp index f95408d6a6..a2a0e0ff1d 100644 --- a/addons/ballistics/CfgWeapons.hpp +++ b/addons/ballistics/CfgWeapons.hpp @@ -11,97 +11,135 @@ class CfgWeapons { class Rifle_Base_F; class Rifle_Short_Base_F: Rifle_Base_F {}; class Rifle_Long_Base_F: Rifle_Base_F {}; - class MuzzleSlot; - - /* Long Rifles */ + // GM6 Lynx class GM6_base_F: Rifle_Long_Base_F { class Single: Mode_SemiAuto { - dispersion = 0.00029; // radians. Equal to 1.00 MOA. + dispersion = MOA_TO_RAD(0.45); }; }; + // M200 Intervention class LRR_base_F: Rifle_Long_Base_F { class Single: Mode_SemiAuto { - dispersion = 0.00020; // radians. Equal to 0.70 MOA. + dispersion = MOA_TO_RAD(0.50); }; }; - class DMR_07_base_F: Rifle_Long_Base_F { - initSpeed = -1.06051; - ACE_barrelTwist = 228.6; - ACE_barrelLength = 640.0; - magazines[] = { - "20Rnd_650x39_Cased_Mag_F", - "ACE_20Rnd_65x47_Scenar_mag", - "ACE_20Rnd_65_Creedmor_mag" + // MX + class arifle_MX_Base_F: Rifle_Base_F { + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(0.90); + }; + + class FullAuto: Mode_FullAuto { + dispersion = MOA_TO_RAD(0.90); + }; + }; + + // KH2002 Sama + class arifle_katiba_Base_F: Rifle_Base_F { + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(0.90); + }; + + class FullAuto: Mode_FullAuto { + dispersion = MOA_TO_RAD(0.90); + }; + }; + + // CTAR-21 + class Tavor_base_F: Rifle_Base_F { + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(1.12); + }; + + class FullAuto: Mode_FullAuto { + dispersion = MOA_TO_RAD(1.12); }; }; - class DMR_06_base_F: Rifle_Long_Base_F { + // F2000 + class mk20_base_F: Rifle_Base_F { class Single: Mode_SemiAuto { - dispersion = 0.00029; // radians. Equal to 1.00 MOA. + dispersion = MOA_TO_RAD(1.12); }; class FullAuto: Mode_FullAuto { - dispersion = 0.00029; // radians. Equal to 1.00 MOA. - }; - }; - - class DMR_05_base_F: Rifle_Long_Base_F { - class Single: Mode_SemiAuto { - dispersion = 0.00029; // radians. Equal to 1.00 MOA. - }; - - class FullAuto: Mode_FullAuto { - dispersion = 0.00029; // radians. Equal to 1.00 MOA. - }; - }; - - class DMR_04_base_F: Rifle_Long_Base_F { - class Single: Mode_SemiAuto { - dispersion = 0.00029; // radians. Equal to 1.00 MOA. - }; - }; - - class DMR_03_base_F: Rifle_Long_Base_F { - class Single: Mode_SemiAuto { - dispersion = 0.00032; // radians. Equal to 1.10 MOA. - }; - - class FullAuto: Mode_FullAuto { - dispersion = 0.00032; // radians. Equal to 1.10 MOA. + dispersion = MOA_TO_RAD(1.12); }; }; + // Noreen "Bad News" ULR class DMR_02_base_F: Rifle_Long_Base_F { class Single: Mode_SemiAuto { - dispersion = 0.000262; // radians. Equal to 0.90 MOA. + dispersion = MOA_TO_RAD(0.61); }; }; + // VS-121 class DMR_01_base_F: Rifle_Long_Base_F { class Single: Mode_SemiAuto { - dispersion = 0.0004; // radians. Equal to 1.375 MOA. - }; - }; - - class EBR_base_F: Rifle_Long_Base_F { - class Single: Mode_SemiAuto { - dispersion = 0.00029; // radians. Equal to 1.00 MOA. + dispersion = MOA_TO_RAD(0.81); }; class FullAuto: Mode_FullAuto { - dispersion = 0.00029; // radians. Equal to 1.00 MOA. + dispersion = MOA_TO_RAD(0.81); }; }; - /* MX */ + // Mk14 Mod 1 EBR + class EBR_base_F: Rifle_Long_Base_F { + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(0.81); + }; - class arifle_MX_Base_F: Rifle_Base_F { - class Single: Mode_SemiAuto {}; - class FullAuto: Mode_FullAuto {}; + class FullAuto: Mode_FullAuto { + dispersion = MOA_TO_RAD(0.81); + }; }; + + // SIG 556 + class DMR_03_base_F: Rifle_Long_Base_F { + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(0.81); + }; + + class FullAuto: Mode_FullAuto { + dispersion = MOA_TO_RAD(0.81); + }; + }; + + // ASP-1 Kir + class DMR_04_base_F: Rifle_Long_Base_F { + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(1.0); + }; + }; + + // Cyrus + class DMR_05_base_F: Rifle_Long_Base_F { + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(0.67); + }; + + class FullAuto: Mode_FullAuto { + dispersion = MOA_TO_RAD(0.67); + }; + }; + + // M14 + class DMR_06_base_F: Rifle_Long_Base_F { + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(0.81); + }; + + class FullAuto: Mode_FullAuto { + dispersion = MOA_TO_RAD(0.81); + }; + }; + + // MX LSW class arifle_MX_SW_F: arifle_MX_Base_F { magazines[] = { "100Rnd_65x39_caseless_mag_Tracer", @@ -111,10 +149,19 @@ class CfgWeapons { "ACE_100Rnd_65x39_caseless_mag_Tracer_Dim", "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim" }; - initSpeed = -1.0; + initSpeed = -0.981912; ACE_barrelTwist = 228.6; ACE_barrelLength = 406.4; + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(0.90); + }; + + class FullAuto: Mode_FullAuto { + dispersion = MOA_TO_RAD(0.90); + }; }; + + // MXM class arifle_MXM_F: arifle_MX_Base_F { magazines[] = { "30Rnd_65x39_caseless_mag", @@ -123,23 +170,19 @@ class CfgWeapons { "ACE_30Rnd_65x47_Scenar_mag", "ACE_30Rnd_65_Creedmor_mag" }; - initSpeed = -1.01842; + initSpeed = -1.0; ACE_barrelTwist = 228.6; ACE_barrelLength = 457.2; class Single: Single { - dispersion = 0.000436; // radians. Equal to 1.50 MOA. + dispersion = MOA_TO_RAD(0.90); }; class FullAuto: FullAuto { - dispersion = 0.000436; // radians. Equal to 1.50 MOA. + dispersion = MOA_TO_RAD(0.90); }; }; - - /* Katiba */ - class arifle_katiba_Base_F: Rifle_Base_F {}; - - /* SPAR */ + // HK416A5 11" class arifle_SPAR_01_base_F: Rifle_Base_F { magazines[] = { "30Rnd_556x45_Stanag", @@ -153,15 +196,33 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Mk318_mag", "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; - initSpeed = -0.859238; + initSpeed = -0.869636; ACE_barrelTwist = 177.8; ACE_barrelLength = 264.0; + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(1.12); + }; + + class FullAuto: Mode_FullAuto { + dispersion = MOA_TO_RAD(1.12); + }; }; + + // HK416A5 14.5" class arifle_SPAR_02_base_F: Rifle_Base_F { - initSpeed = -0.934282; + initSpeed = -0.999864; ACE_barrelTwist = 177.8; ACE_barrelLength = 368.0; + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(1.12); + }; + + class FullAuto: Mode_FullAuto { + dispersion = MOA_TO_RAD(1.12); + }; }; + + // HK417A2 20" class arifle_SPAR_03_base_F: Rifle_Base_F { magazines[] = { "20Rnd_762x51_Mag", @@ -173,201 +234,278 @@ class CfgWeapons { "ACE_20Rnd_762x51_M993_AP_Mag", "ACE_20Rnd_762x51_Mag_SD" }; - initSpeed = -0.984394; + initSpeed = -0.991536; ACE_barrelTwist = 279.4; ACE_barrelLength = 508.0; + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(0.81); + }; + + class FullAuto: Mode_FullAuto { + dispersion = MOA_TO_RAD(0.81); + }; }; - /* Other */ + // Stoner 99 LMG class LMG_Mk200_F: Rifle_Long_Base_F { magazines[] = { "200Rnd_65x39_cased_Box", "200Rnd_65x39_cased_Box_Tracer", "ACE_200Rnd_65x39_cased_Box_Tracer_Dim" }; - initSpeed = -0.976974; + initSpeed = -0.999327; ACE_barrelTwist = 177.8; ACE_barrelLength = 317.5; }; + + // Negev NG7 class LMG_Zafir_F: Rifle_Long_Base_F { - initSpeed = -1.00333; + initSpeed = -1.00048; ACE_barrelTwist = 304.8; ACE_barrelLength = 459.74; }; + + // M249 SPW class LMG_03_base_F: Rifle_Long_Base_F { - initSpeed = -1.02002; + initSpeed = -1.00051; ACE_barrelTwist = 177.8; ACE_barrelLength = 414.02; }; - class Tavor_base_F: Rifle_Base_F {}; - class mk20_base_F: Rifle_Base_F {}; - /* SMGs */ + // RFB SDAR class SDAR_base_F: Rifle_Base_F { - initSpeed = -1.211; class Single: Mode_SemiAuto { - dispersion = 0.0008727; // radians. Equal to 3 MOA. + dispersion = MOA_TO_RAD(3.0); }; class Burst: Mode_Burst { - dispersion = 0.0008727; // radians. Equal to 3 MOA. + dispersion = MOA_TO_RAD(3.0); }; class FullAuto: Mode_FullAuto { - dispersion = 0.0008727; // radians. Equal to 3 MOA. + dispersion = MOA_TO_RAD(3.0); }; }; - /* Pistols */ - class Pistol; class Pistol_Base_F: Pistol {}; + // P99 class hgun_P07_F: Pistol_Base_F { - initSpeed = -1.0; + initSpeed = -0.906977; ACE_barrelTwist = 254.0; ACE_barrelLength = 101.6; }; + // MP-443 Grach class hgun_Rook40_F: Pistol_Base_F { - initSpeed = -1.03077; + initSpeed = -0.934884; ACE_barrelTwist = 254.0; ACE_barrelLength = 111.76; }; + // Custom Covert II class hgun_ACPC2_F: Pistol_Base_F { - initSpeed = -1.0; + initSpeed = -0.984252; ACE_barrelTwist = 406.4; ACE_barrelLength = 127.0; }; + // FNX-45 Tactical class hgun_Pistol_heavy_01_F: Pistol_Base_F { - initSpeed = -0.96; + initSpeed = -0.944882; ACE_barrelTwist = 406.4; ACE_barrelLength = 114.3; }; + // Chiappa Rhino 60DS class hgun_Pistol_heavy_02_F: Pistol_Base_F { - initSpeed = -0.92; + initSpeed = -0.905512; ACE_barrelTwist = 406.4; ACE_barrelLength = 76.2; }; - + + // Makarov PM class hgun_Pistol_01_F: Pistol_Base_F { - initSpeed = -0.974359; + initSpeed = -0.883721; ACE_barrelTwist = 254.0; ACE_barrelLength = 93.5; }; - - class pdw2000_base_F: Rifle_Short_Base_F { - initSpeed = -1.09615; + + class pdw2000_base_F: Rifle_Short_Base_F {}; + + // CPW + class hgun_PDW2000_F: pdw2000_base_F { + initSpeed = -0.994186; ACE_barrelTwist = 228.6; ACE_barrelLength = 177.8; }; - /* Rifles */ + // AKS class arifle_AKS_base_F: Rifle_Base_F { initSpeed = -1.0; ACE_barrelTwist = 160.02; ACE_barrelLength = 206.5; }; + + // AKM class arifle_AKM_base_F: Rifle_Base_F { - initSpeed = -1.0014; + initSpeed = -1.0; ACE_barrelTwist = 199.898; ACE_barrelLength = 414.02; }; + + // AK12 class arifle_AK12_base_F: Rifle_Base_F { - initSpeed = -1.0014; + initSpeed = -1.0; ACE_barrelTwist = 199.898; ACE_barrelLength = 414.02; }; + + // QBZ-95-1 class arifle_CTAR_base_F: Rifle_Base_F { + initSpeed = -0.978947; + ACE_barrelTwist = 244.0; + ACE_barrelLength = 463.0; + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(1.12); + }; + + class FullAuto: Mode_FullAuto { + dispersion = MOA_TO_RAD(1.12); + }; + }; + + // QBU-88 + class DMR_07_base_F: Rifle_Long_Base_F { + initSpeed = -0.99998; + ACE_barrelTwist = 228.6; + ACE_barrelLength = 640.0; + magazines[] = { + "20Rnd_650x39_Cased_Mag_F", + "ACE_20Rnd_65x47_Scenar_mag", + "ACE_20Rnd_65_Creedmor_mag" + }; + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(1.01); + }; + }; + + // QBZ-95-1 LSW + class arifle_CTARS_base_F: Rifle_Base_F { initSpeed = -1.0; ACE_barrelTwist = 244.0; - ACE_barrelLength = 463.0; - }; - class arifle_CTARS_base_F: Rifle_Base_F { - initSpeed = -1.04301; - ACE_barrelTwist = 244.0; ACE_barrelLength = 600.0; + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(1.12); + }; + + class FullAuto: Mode_FullAuto { + dispersion = MOA_TO_RAD(1.12); + }; }; + + // Type 115 class arifle_ARX_base_F: Rifle_Base_F { - initSpeed = -1.02052; + initSpeed = -0.984262; ACE_barrelTwist = 228.6; ACE_barrelLength = 463.0; + class Single: Mode_SemiAuto { + dispersion = MOA_TO_RAD(0.90); + }; + + class FullAuto: Mode_FullAuto { + dispersion = MOA_TO_RAD(0.90); + }; }; + + // KH2002 Sama class arifle_Katiba_F: arifle_katiba_Base_F { magazines[] = { "30Rnd_65x39_caseless_green", "30Rnd_65x39_caseless_green_mag_Tracer", "ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim" }; - initSpeed = -1.08355; + initSpeed = -1.0; ACE_barrelTwist = 203.2; ACE_barrelLength = 508.0; }; + + // KH2002C Sama class arifle_Katiba_C_F: arifle_katiba_Base_F { magazines[] = { "30Rnd_65x39_caseless_green", "30Rnd_65x39_caseless_green_mag_Tracer", "ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim" }; - initSpeed = -1.07105; + initSpeed = -0.961294; ACE_barrelTwist = 203.2; ACE_barrelLength = 393.7; + class Single: Single { + dispersion = MOA_TO_RAD(0.90); + }; + + class FullAuto: FullAuto { + dispersion = MOA_TO_RAD(0.90); + }; }; + + // KH2002 Sama KGL class arifle_Katiba_GL_F: arifle_katiba_Base_F { magazines[] = { "30Rnd_65x39_caseless_green", "30Rnd_65x39_caseless_green_mag_Tracer", "ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim" }; - initSpeed = -1.08355; + initSpeed = -1.0; ACE_barrelTwist = 203.2; ACE_barrelLength = 508.0; }; + + // MX class arifle_MX_F: arifle_MX_Base_F { magazines[] = { "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag_Tracer", "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim" }; - initSpeed = -0.990132; + initSpeed = -0.972222; ACE_barrelTwist = 228.6; ACE_barrelLength = 368.3; }; + + // MX 3GL class arifle_MX_GL_F: arifle_MX_Base_F { magazines[] = { "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag_Tracer", "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim" }; - initSpeed = -0.99; + initSpeed = -0.972222; ACE_barrelTwist = 228.6; ACE_barrelLength = 368.3; }; - /* - class arifle_MX_SW_F: arifle_MX_Base_F { - ACE_barrelTwist=228.6; - ACE_barrelLength=406.4; - }; - */ + + // MXC class arifle_MXC_F: arifle_MX_Base_F { magazines[] = { "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag_Tracer", "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim" }; - initSpeed = -0.963816; + initSpeed = -0.946382; ACE_barrelTwist = 203.2; ACE_barrelLength = 266.7; + class Single: Single { + dispersion = MOA_TO_RAD(0.90); + }; + + class FullAuto: FullAuto { + dispersion = MOA_TO_RAD(0.90); + }; }; - /* - class arifle_MXM_F: arifle_MX_Base_F { - ACE_barrelTwist=228.6; - ACE_barrelLength=457.2; - }; - */ + + // RFB SDAR class arifle_SDAR_F: SDAR_base_F { magazines[] = { "20Rnd_556x45_UW_mag", @@ -382,20 +520,28 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Mk318_mag", "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; - initSpeed = -0.989; + initSpeed = -0.998321; ACE_barrelTwist = 285.75; ACE_barrelLength = 457.2; }; - class SMG_02_base_F: Rifle_Short_Base_F { - initSpeed = -1.10288; + + class SMG_02_base_F: Rifle_Short_Base_F {}; + + // Scorpion Evo 3 A1 + class SMG_02_F: SMG_02_base_F { + initSpeed = -1.00029; ACE_barrelTwist = 254.0; ACE_barrelLength = 195.58; }; + + // MP5K class SMG_05_base_F: Rifle_Short_Base_F { - initSpeed = -1.04058; + initSpeed = -0.943783; ACE_barrelTwist = 254.0; ACE_barrelLength = 115.0; }; + + // CTAR-21 class arifle_TRG20_F: Tavor_base_F { magazines[] = { "30Rnd_556x45_Stanag", @@ -409,10 +555,12 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Mk318_mag", "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; - initSpeed = -0.95; + initSpeed = -0.961496; ACE_barrelTwist = 177.8; ACE_barrelLength = 381.0; }; + + // TAR-21 class arifle_TRG21_F: Tavor_base_F { magazines[] = { "30Rnd_556x45_Stanag", @@ -426,10 +574,19 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Mk318_mag", "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; - initSpeed = -0.988043; + initSpeed = -1.0; ACE_barrelTwist = 177.8; ACE_barrelLength = 459.74; + class Single: Single { + dispersion = MOA_TO_RAD(1.12); + }; + + class FullAuto: FullAuto { + dispersion = MOA_TO_RAD(1.12); + }; }; + + // TAR-21 EGLM class arifle_TRG21_GL_F: arifle_TRG21_F { magazines[] = { "30Rnd_556x45_Stanag", @@ -443,16 +600,12 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Mk318_mag", "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; - initSpeed = -0.988043; + initSpeed = -1.0; ACE_barrelTwist = 177.8; ACE_barrelLength = 459.74; }; - /* - class LMG_Zafir_F: Rifle_Long_Base_F { - ACE_barrelTwist=304.8; - ACE_barrelLength=459.74; - }; - */ + + // F2000 class arifle_Mk20_F: mk20_base_F { magazines[] = { "30Rnd_556x45_Stanag", @@ -466,10 +619,12 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Mk318_mag", "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; - initSpeed = -0.980978; + initSpeed = -0.992849; ACE_barrelTwist = 177.8; ACE_barrelLength = 441.96; }; + + // F2000 Tactical class arifle_Mk20C_F: mk20_base_F { magazines[] = { "30Rnd_556x45_Stanag", @@ -483,10 +638,19 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Mk318_mag", "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; - initSpeed = -0.962648; + initSpeed = -0.974297; ACE_barrelTwist = 177.8; ACE_barrelLength = 406.4; + class Single: Single { + dispersion = MOA_TO_RAD(1.12); + }; + + class FullAuto: FullAuto { + dispersion = MOA_TO_RAD(1.12); + }; }; + + // F2000 EGLM class arifle_Mk20_GL_F: mk20_base_F { magazines[] = { "30Rnd_556x45_Stanag", @@ -500,24 +664,32 @@ class CfgWeapons { "ACE_30Rnd_556x45_Stanag_Mk318_mag", "ACE_30Rnd_556x45_Stanag_Tracer_Dim" }; - initSpeed = -0.962648; + initSpeed = -0.974297; ACE_barrelTwist = 177.8; ACE_barrelLength = 406.4; }; - class SMG_01_Base: Rifle_Short_Base_F { - initSpeed = -1.0175; + + class SMG_01_Base: Rifle_Short_Base_F {}; + + // Vector SMG + class SMG_01_F: SMG_01_Base { + initSpeed = -1.00148; ACE_barrelTwist = 406.4; ACE_barrelLength = 139.7; }; + + // VS-121 class srifle_DMR_01_F: DMR_01_base_F { magazines[] = { "10Rnd_762x54_Mag", "ACE_10Rnd_762x54_Tracer_mag" }; - initSpeed = -1.025; + initSpeed = -1.00019; ACE_barrelTwist = 241.3; ACE_barrelLength = 609.6; }; + + // Mk14 Mod 1 EBR class srifle_EBR_F: EBR_base_F { magazines[] = { "20Rnd_762x51_Mag", @@ -529,17 +701,12 @@ class CfgWeapons { "ACE_20Rnd_762x51_M993_AP_Mag", "ACE_20Rnd_762x51_Mag_SD" }; - initSpeed = -0.972389; + initSpeed = -0.979444; ACE_barrelTwist = 304.8; ACE_barrelLength = 457.2; }; - /* - class LMG_Mk200_F: Rifle_Long_Base_F { - initSpeed = -1.0; - ACE_barrelTwist=177.8; - ACE_barrelLength=317.5; - }; - */ + + // M200 Intervention class srifle_LRR_F: LRR_base_F { magazines[] = { "7Rnd_408_Mag", @@ -549,6 +716,8 @@ class CfgWeapons { ACE_barrelTwist = 330.2; ACE_barrelLength = 736.6; }; + + // GM6 Lynx class srifle_GM6_F: GM6_base_F { magazines[] = { "5Rnd_127x108_Mag", @@ -561,6 +730,8 @@ class CfgWeapons { ACE_barrelTwist = 381.0; ACE_barrelLength = 730; }; + + // Noreen "Bad News" ULR class srifle_DMR_02_F: DMR_02_base_F { magazines[] = { "10Rnd_338_Mag", @@ -570,10 +741,12 @@ class CfgWeapons { "ACE_20Rnd_762x67_Mk248_Mod_1_Mag", "ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag" }; - initSpeed = -0.961749; + initSpeed = -1.0; ACE_barrelTwist = 254.0; ACE_barrelLength = 508.0; }; + + // SIG 556 class srifle_DMR_03_F: DMR_03_base_F { magazines[] = { "20Rnd_762x51_Mag", @@ -585,20 +758,26 @@ class CfgWeapons { "ACE_20Rnd_762x51_M993_AP_Mag", "ACE_20Rnd_762x51_Mag_SD" }; - initSpeed = -0.984394; + initSpeed = -0.991536; ACE_barrelTwist = 254.0; ACE_barrelLength = 508.0; }; + + // ASP-1 Kir class srifle_DMR_04_F: DMR_04_base_F { initSpeed = -1.0; ACE_barrelTwist = 203.2; ACE_barrelLength = 450.088; }; + + // Cyrus class srifle_DMR_05_blk_F: DMR_05_base_F { initSpeed = -1.0; ACE_barrelTwist = 359.918; ACE_barrelLength = 620.014; }; + + // M14 class srifle_DMR_06_camo_F: DMR_06_base_F { magazines[] = { "20Rnd_762x51_Mag", @@ -610,15 +789,19 @@ class CfgWeapons { "ACE_20Rnd_762x51_M993_AP_Mag", "ACE_20Rnd_762x51_Mag_SD" }; - initSpeed = -0.992197; + initSpeed = -0.999395; ACE_barrelTwist = 304.8; ACE_barrelLength = 558.8; }; + + // HK121 class MMG_01_hex_F: MMG_01_base_F { - initSpeed = -0.997073; + initSpeed = -0.985613; ACE_barrelTwist = 359.918; ACE_barrelLength = 549.91; }; + + // LWMMG class MMG_02_camo_F: MMG_02_base_F { initSpeed = -1.0; ACE_barrelTwist = 234.95; diff --git a/addons/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml index ad33b30704..d8c09cbaeb 100644 --- a/addons/ballistics/stringtable.xml +++ b/addons/ballistics/stringtable.xml @@ -1978,52 +1978,50 @@ 口径: 6.5x47mm Creedmor 狙击专用弹<br />发数: 30<br />使用于: MXM - .338 10Rnd Mag (300gr Sierra MatchKing HPBT) - Ch. .338 10 Cps (300gr Sierra MatchKing HPBT) - Cargador de 10 balas de 8.6x70mm (300gr Sierra MatchKing HPBT) - Magazynek .338 10rd (300gr Sierra MatchKing HPBT) - Магазин из 10-ти .338 (300 гран Sierra MatchKing экспансивные) - .338 10-Patronen-Magazin (300gr Sierra MatchKing HPBT) - .338 10Munizioni Mag (300gr Sierra MatchKing HPBT) - .338 10náb. Zásobník (300gr Sierra MatchKing HPBT) - Carregador .338 (300gr Sierra MatchKing HPBT) com 10 cartuchos - .338 10-lövedékes tár (300gr Sierra MatchKing HPBT) - .338 10発入り 弾倉 (300gr Sierra MatchKing HPBT) - 10발들이 .338 탄창 (300gr Sierra MatchKing HPBT) - .338 10發 彈匣 (300公克 Sierra MatchKing 空尖艇尾比賽專用彈) - .338 10发 弹匣 (300公克 Sierra MatchKing 空尖艇尾比赛专用弹) + .338 10Rnd Mag (300gr Lapua Scenar) + Ch. .338 10 Cps (300gr Lapua Scenar) + Cargador de 10 balas de 8.6x70mm (300gr Lapua Scenar) + Magazynek .338 10rd (300gr Lapua Scenar) + Магазин из 10-ти .338 (300 гран Lapua Scenar) + .338 10-Patronen-Magazin (300gr Lapua Scenar) + .338 10Munizioni Mag (300gr Lapua Scenar) + .338 10náb. Zásobník (300gr Lapua Scenar) + Carregador .338 (300gr Lapua Scenar) com 10 cartuchos + .338 10-lövedékes tár (300gr Lapua Scenar) + .338 10発入り 弾倉 (300gr Lapua Scenar) + 10발들이 .338 탄창 (300gr Lapua Scenar) + .338 10發 彈匣 (300公克 Lapua Scenar) + .338 10发 弹匣 (300公克 Lapua Scenar) - .338 HPBT - .338 HPBT - .338 HPBT - .338 HPBT - .338 экспансивные - .338 HPBT - .338 HPBT - .338 HPBT - .338 HPBT - .338 HPBT - 338 HPBT - .338 HPBT - .338 空尖艇尾比賽專用彈 - .338 空尖艇尾比赛专用弹 + .338 Scenar + .338 Scenar + .338 Scenar + .338 Scenar + .338 Scenar + .338 Scenar + .338 Scenar + .338 Scenar + .338 Scenar + .338 Scenar + 338 Scenar + .338 Scenar - Caliber: 8.6x70mm (300gr Sierra MatchKing HPBT)<br />Rounds: 10 - Calibre: 8,6x70mm (300gr Sierra MatchKing HPBT)<br />Cartouches: 10 - Calibre: 8.6x70mm (300gr Sierra MatchKing HPBT)<br />Balas: 10 - Kaliber: 8,6x70mm (300gr Sierra MatchKing HPBT)<br />Pociski: 10 - Калибр: 8,6x70mm (300 гран Sierra MatchKing экспансивные)<br />Патронов: 10 - Kaliber: 8,6x70mm (300gr Sierra MatchKing HPBT)<br />Patronen: 10 - Calibro: 8.6x70mm (300gr Sierra MatchKing HPBT)<br />Munizioni: 10 - Ráže: 8.6x70mm (300gr Sierra MatchKing HPBT)<br />Nábojů: 10 - Calibre: 8.6x70mm (300gr Sierra MatchKing HPBT)<br/>Cartuchos: 10 - Kaliber: 8,6x70mm (300gr Sierra MatchKing HPBT)<br />Lövedékek: 10 - 口径: 8.6x70mm (300gr Sierra MatchKing HPBT)<br />装填数: 10 - 구경: 8.6x70mm (300gr Sierra MatchKing HPBT)<br />장탄수: 10 - 口徑: 8.6x70mm (300公克 Sierra MatchKing 空尖艇尾比賽專用彈)<br />發數: 10 - 口径: 8.6x70mm (300公克 Sierra MatchKing 空尖艇尾比赛专用弹)<br />发数: 10 + Caliber: 8.6x70mm (300gr Lapua Scenar)<br />Rounds: 10 + Calibre: 8,6x70mm (300gr Lapua Scenar)<br />Cartouches: 10 + Calibre: 8.6x70mm (300gr Lapua Scenar)<br />Balas: 10 + Kaliber: 8,6x70mm (300gr Lapua Scenar)<br />Pociski: 10 + Калибр: 8,6x70mm (300 гран Lapua Scenar)<br />Патронов: 10 + Kaliber: 8,6x70mm (300gr Lapua Scenar)<br />Patronen: 10 + Calibro: 8.6x70mm (300gr Lapua Scenar)<br />Munizioni: 10 + Ráže: 8.6x70mm (300gr Lapua Scenar)<br />Nábojů: 10 + Calibre: 8.6x70mm (300gr Lapua Scenar)<br/>Cartuchos: 10 + Kaliber: 8,6x70mm (300gr Lapua Scenar)<br />Lövedékek: 10 + 口径: 8.6x70mm (300gr Lapua Scenar)<br />装填数: 10 + 구경: 8.6x70mm (300gr Lapua Scenar)<br />장탄수: 10 + 口徑: 8.6x70mm (300公克 Lapua Scenar)<br />發數: 10 + 口径: 8.6x70mm (300公克 Lapua Scenar)<br />发数: 10 .338 10Rnd Mag (API526) diff --git a/addons/captives/ACE_Settings.hpp b/addons/captives/ACE_Settings.hpp index 40cda39b60..50d4c17aa7 100644 --- a/addons/captives/ACE_Settings.hpp +++ b/addons/captives/ACE_Settings.hpp @@ -1,11 +1,13 @@ class ACE_Settings { class GVAR(allowHandcuffOwnSide) { + category = CSTRING(DisplayName); displayName = CSTRING(ModuleSettings_handcuffSide_name); description = CSTRING(ModuleSettings_handcuffSide_description); typeName = "BOOL"; value = 1; }; class GVAR(requireSurrender) { + category = CSTRING(DisplayName); displayName = CSTRING(ModuleSettings_requireSurrender_name); description = CSTRING(ModuleSettings_requireSurrender_description); typeName = "SCALAR"; @@ -13,12 +15,14 @@ class ACE_Settings { value = 1; }; class GVAR(allowSurrender) { + category = CSTRING(DisplayName); displayName = CSTRING(ModuleSettings_allowSurrender_name); description = CSTRING(ModuleSettings_allowSurrender_description); typeName = "BOOL"; value = 1; }; class GVAR(requireSurrenderAi) { + category = CSTRING(DisplayName); displayName = CSTRING(ModuleSettings_requireSurrenderAi_name); description = CSTRING(ModuleSettings_requireSurrenderAi_description); typeName = "BOOL"; diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp index 45a3f323e6..8fdb45396e 100644 --- a/addons/captives/CfgVehicles.hpp +++ b/addons/captives/CfgVehicles.hpp @@ -152,7 +152,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(ModuleSurrender_DisplayName); function = QFUNC(moduleSurrender); - scope = 2; //show in editor + scope = 1; //show in editor isGlobal = 0; //run on server isTriggerActivated = 1; //Wait for triggers icon = QPATHTOF(UI\Icon_Module_Make_Unit_Surrender_ca.paa); @@ -168,7 +168,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(ModuleHandcuffed_DisplayName); function = QFUNC(moduleHandcuffed); - scope = 2; //show in editor + scope = 1; //show in editor isGlobal = 0; //run on server isTriggerActivated = 1; //Wait for triggers icon = QPATHTOF(UI\Icon_Module_Make_Unit_Handcuffed_ca.paa); @@ -186,7 +186,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(ModuleSettings_DisplayName); function = QFUNC(moduleSettings); - scope = 2; + scope = 1; icon = QPATHTOF(UI\Icon_Module_settings_ca.paa); isGlobal = 1; isSingular = 1; diff --git a/addons/captives/CfgWeapons.hpp b/addons/captives/CfgWeapons.hpp index 8f3ea1b4ed..34f7b59e10 100644 --- a/addons/captives/CfgWeapons.hpp +++ b/addons/captives/CfgWeapons.hpp @@ -3,6 +3,7 @@ class CfgWeapons { class CBA_MiscItem_ItemInfo; class ACE_CableTie: ACE_ItemCore { + author = ECSTRING(common,ACETeam); displayName = CSTRING(CableTie); descriptionShort = CSTRING(CableTieDescription); model = QPATHTOF(models\ace_cabletie.p3d); diff --git a/addons/captives/XEH_postInit.sqf b/addons/captives/XEH_postInit.sqf index 8917ba58f8..196cacbbe7 100644 --- a/addons/captives/XEH_postInit.sqf +++ b/addons/captives/XEH_postInit.sqf @@ -40,7 +40,8 @@ if (!hasInterface) exitWith {}; { private _target = cursorObject; if !([ACE_player, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; - if !(_target isKindOf "CAManBase" || {(_target distance ACE_player) > getNumber (configFile >> "CfgVehicles" >> "CAManBase" >> "ACE_Actions" >> "ACE_ApplyHandcuffs" >> "distance")}) exitWith {false}; + if !(_target isKindOf "CAManBase") exitWith {false}; + if ((_target distance ACE_player) > getNumber (configFile >> "CfgVehicles" >> "CAManBase" >> "ACE_Actions" >> "ACE_ApplyHandcuffs" >> "distance")) exitWith {false}; if ([ACE_player, _target] call FUNC(canApplyHandcuffs)) exitWith { [QGVAR(setHandcuffed), [_target, true], _target] call CBA_fnc_targetEvent; diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 92d500c27e..5e05def185 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -1,6 +1,14 @@  + + Captives + Gefangene + Prigionieri + 俘虜 + 俘虏 + 捕虜 + Take Prisoner Gefangen nehmen @@ -13,7 +21,7 @@ Foglyul ejtés Взять в плен 捕虜にする - 사로잡기 + 포박하기 逮捕俘虜 逮捕俘虏 @@ -252,7 +260,7 @@ Hacer que la unidad esté esposada Rendre une unité captive ユニットを拘束する - 수갑을 채우기 + 포박하기 使單位戴上手銬 使单位戴上手铐 @@ -283,7 +291,7 @@ Настройки пленения Impostazioni Prigionieri 拘束の設定 - 포로 설정 + 포박 설정 俘虜設定 俘虏设定 @@ -315,7 +323,7 @@ Связать союзника Puoi ammanettare unità alleate 拘束ユニットを自陣営へ - 자기편에게 수갑을 채울 수 있게 합니다 + 자기편을 포박 할 수 있습니다. 可以銬住同陣營隊友 可以铐住同阵营队友 @@ -393,7 +401,7 @@ I giocatori devono arrendersi prima che possano essere arrestati Requiert la capitulation des joueurs avant qu'ils ne puissent être arrêtés プレイヤーは拘束される前に、投降する必要があります。 - 체포하기 전에 플레이어가 투항을 먼저해야만 합니다 + 체포하기 전에 먼저 플레이어가 투항을 해야만 합니다 玩家須先要求目標投降,才可以進行逮捕 玩家须先要求目标投降,才可以进行逮捕 @@ -434,6 +442,7 @@ Imposta l'unità nello stato di prigioniero. 設置在游標下的單位成俘虜狀態。 设置在游标下的单位成俘虏状态。 + 커서의 병력을 포박합니다. Require AI surrendering @@ -442,6 +451,7 @@ AI の投降を必要とする 需要AI先行投降 需要AI先行投降 + AI 항복 필요 Require AI to surrender before they can be arrested @@ -450,6 +460,7 @@ AI の拘束は AI が投降している場合に限り可能にします。 在逮捕AI之前該AI必須先進入投降狀態。 在逮捕AI之前该AI必须先进入投降状态。 + 포박하기 전에 먼저 AI가 투항해야만 합니다. diff --git a/addons/cargo/ACE_Settings.hpp b/addons/cargo/ACE_Settings.hpp index 595de28459..e95465e647 100644 --- a/addons/cargo/ACE_Settings.hpp +++ b/addons/cargo/ACE_Settings.hpp @@ -12,5 +12,6 @@ class ACE_Settings { typeName = "SCALAR"; value = 2.5; category = ECSTRING(OptionsMenu,CategoryLogistics); + sliderSettings[] = {0, 10, 2.5, 1}; }; }; diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp index 4d76ac8581..8588296154 100644 --- a/addons/cargo/CfgVehicles.hpp +++ b/addons/cargo/CfgVehicles.hpp @@ -8,7 +8,7 @@ class CfgVehicles { }; class ACE_Module: Module_F {}; class ACE_moduleCargoSettings: ACE_Module { - scope = 2; + scope = 1; displayName = CSTRING(SettingsModule_DisplayName); icon = QPATHTOF(UI\Icon_Module_Cargo_ca.paa); category = "ACE_Logistics"; @@ -39,32 +39,9 @@ class CfgVehicles { sync[] = {}; }; }; - class GVAR(makeLoadable): ACE_Module { - scope = 2; - displayName = CSTRING(makeLoadable_displayName); - icon = QPATHTOF(UI\Icon_Module_makeLoadable_ca.paa); - category = "ACE_Logistics"; - function = QFUNC(moduleMakeLoadable); - isGlobal = 1; - isTriggerActivated = 0; - author = ECSTRING(common,ACETeam); - class Arguments { - class canLoad { - displayName = CSTRING(makeLoadable_displayName); - description = CSTRING(MakeLoadable_description); - typeName = "BOOL"; - defaultValue = 1; - }; - class setSize { - displayName = CSTRING(makeLoadable_setSize_displayName); - typeName = "NUMBER"; - defaultValue = 1; - }; - }; - class ModuleDescription: ModuleDescription { - description = CSTRING(makeLoadable_description); - sync[] = {"AnyStaticObject"}; - }; + class GVAR(makeLoadable): Logic { + scope = 1; + displayName = "Delete (Deprecated in ACE3 3.12.0)"; }; class LandVehicle; @@ -200,6 +177,11 @@ class CfgVehicles { GVAR(hasCargo) = 1; }; + class ParachuteBase: Helicopter { + GVAR(space) = 0; + GVAR(hasCargo) = 0; + }; + class Helicopter_Base_H; class Heli_Light_01_base_F: Helicopter_Base_H { GVAR(space) = 0; @@ -451,7 +433,7 @@ class CfgVehicles { GVAR(size) = 1; GVAR(canLoad) = 1; }; - + class Scrapyard_base_F; class Land_PaperBox_closed_F: Scrapyard_base_F { class EventHandlers { @@ -785,7 +767,7 @@ class CfgVehicles { class Land_PaperBox_01_small_closed_base_F: Items_base_F { GVAR(size) = 1; GVAR(canLoad) = 1; - + maximumLoad = 1000; transportMaxBackpacks = 12; transportMaxMagazines = 64; diff --git a/addons/cargo/UI/Icon_Module_makeLoadable_ca.paa b/addons/cargo/UI/Icon_Module_makeLoadable_ca.paa deleted file mode 100644 index 1577116a66..0000000000 Binary files a/addons/cargo/UI/Icon_Module_makeLoadable_ca.paa and /dev/null differ diff --git a/addons/cargo/XEH_PREP.hpp b/addons/cargo/XEH_PREP.hpp index 54db78ec79..154956c74a 100644 --- a/addons/cargo/XEH_PREP.hpp +++ b/addons/cargo/XEH_PREP.hpp @@ -1,4 +1,3 @@ - PREP(addCargoItem); PREP(addCargoVehiclesActions); PREP(canLoadItemIn); @@ -9,8 +8,6 @@ PREP(handleDestroyed); PREP(initObject); PREP(initVehicle); PREP(loadItem); -PREP(makeLoadable); -PREP(moduleMakeLoadable); PREP(moduleSettings); PREP(onMenuOpen); PREP(paradropItem); diff --git a/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf b/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf index 111407e3fe..e13cc65542 100644 --- a/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf +++ b/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf @@ -22,10 +22,11 @@ private _statement = { [_player, _target, _vehicle] call FUNC(startLoadIn); }; -private _vehicles = (nearestObjects [_target, GVAR(cargoHolderTypes), MAX_LOAD_DISTANCE]) select { +private _vehicles = (nearestObjects [_target, GVAR(cargoHolderTypes), (MAX_LOAD_DISTANCE + 10)]) select { private _hasCargoConfig = 1 == getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(hasCargo)); private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false]; - (_hasCargoConfig || {_hasCargoPublic}) && {_x != _target} + (_hasCargoConfig || {_hasCargoPublic}) && {_x != _target} && + {([_target, _x] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE} }; [_vehicles, _statement, _target] call EFUNC(interact_menu,createVehiclesActions) diff --git a/addons/cargo/functions/fnc_canLoadItemIn.sqf b/addons/cargo/functions/fnc_canLoadItemIn.sqf index 092272f94f..8780689241 100644 --- a/addons/cargo/functions/fnc_canLoadItemIn.sqf +++ b/addons/cargo/functions/fnc_canLoadItemIn.sqf @@ -34,7 +34,7 @@ if (_item isEqualType "") then { } else { _validItem = (alive _item) && - {(_item distance _vehicle) <= MAX_LOAD_DISTANCE}; + {([_item, _vehicle] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE}; }; _validItem && diff --git a/addons/cargo/functions/fnc_initObject.sqf b/addons/cargo/functions/fnc_initObject.sqf index e291cc54f3..d0e1e66a8f 100644 --- a/addons/cargo/functions/fnc_initObject.sqf +++ b/addons/cargo/functions/fnc_initObject.sqf @@ -58,8 +58,9 @@ private _condition = { private _type = typeOf _x; private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false]; private _hasCargoConfig = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) == 1; - (_hasCargoPublic || _hasCargoConfig) && {_x != _target} - } count (nearestObjects [_player, GVAR(cargoHolderTypes), MAX_LOAD_DISTANCE])} + (_hasCargoPublic || _hasCargoConfig) && {_x != _target} && + {([_target, _x] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE} + } count (nearestObjects [_player, GVAR(cargoHolderTypes), (MAX_LOAD_DISTANCE + 10)])} }; private _statement = { params ["_target", "_player"]; diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf index 6d3709a329..474b1b0d8f 100644 --- a/addons/cargo/functions/fnc_initVehicle.sqf +++ b/addons/cargo/functions/fnc_initVehicle.sqf @@ -71,6 +71,7 @@ private _condition = { GVAR(enable) && {(_target getVariable [QGVAR(hasCargo), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(hasCargo)) == 1])} && {locked _target < 2} && + {([_player, _target] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE} && {alive _target} && {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} }; diff --git a/addons/cargo/functions/fnc_makeLoadable.sqf b/addons/cargo/functions/fnc_makeLoadable.sqf deleted file mode 100644 index 4d2aac21f0..0000000000 --- a/addons/cargo/functions/fnc_makeLoadable.sqf +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Author: PabstMirror - * Makes any object loadable. Needs to be called on all machines. - * - * Arguments: - * 0: Object - * 1: Set as loadable (default: true) - * 2: Size. (default: 1) - * - * Return Value: - * None - * - * Example: - * [cursorTarget, true, 1] call ace_cargo_fnc_makeLoadable - * - * Public: Yes - */ -#include "script_component.hpp" - -// Only run this after the settings are initialized -if !(EGVAR(common,settingsInitFinished)) exitWith { - EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(makeLoadable), _this]; -}; - -ACE_DEPRECATED(QFUNC(makeLoadable),"3.12.0",QFUNC(setSize)); - -params [["_object", objNull, [objNull]], ["_canLoad", true, [false, 0]], ["_setSize", 1, [0]]]; -TRACE_3("params",_object,_canLoad,_setSize); - -if (isNull _object) exitWith {TRACE_1("null",_object);}; -private _type = typeOf _object; -private _cfgCanLoad = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad)); -private _curSize = [_object] call FUNC(getSizeItem); - -_canLoad = [0, 1] select _canLoad; // Convert true/false to scalar - -if ((_canLoad == 1) && {_setSize <= 0}) exitWith { - ERROR("ace_cargo_fnc_makeLoadable (size <= 0) when making loadable"); -}; - -TRACE_2("setVar if different from config",_canLoad,_cfgCanLoad); -if (_canLoad != _cfgCanLoad) then { - _object setVariable [QGVAR(canLoad), _canLoad == 1]; -}; - -TRACE_2("setVar if different from config",_setSize,_curSize); -if (_setSize != _curSize) then { - _object setVariable [QGVAR(size), _setSize]; -}; - -//Add the load actions to the object class if not already added -[_object] call FUNC(initObject); - -nil diff --git a/addons/cargo/functions/fnc_moduleMakeLoadable.sqf b/addons/cargo/functions/fnc_moduleMakeLoadable.sqf deleted file mode 100644 index 9a9e21a22d..0000000000 --- a/addons/cargo/functions/fnc_moduleMakeLoadable.sqf +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Author: PabstMirror - * Module to make an object loadable. - * - * Arguments: - * 0: The module logic - * 1: Synchronized units - * 2: Activated - * - * Return Value: - * None - * - * Example: - * [logic, [box], true] call ace_cargo_fnc_moduleMakeLoadable - * - * Public: No - */ -#include "script_component.hpp" - -params ["_logic", "_objects", "_activated"]; -TRACE_3("params",_logic,_objects,_activated); - -ACE_DEPRECATED(QFUNC(moduleMakeLoadable),"3.12.0","Eden editor object attributes"); - -if ((isNull _logic) || {!_activated}) exitWith {}; -if (_objects isEqualTo []) exitWith { - WARNING_1("ace_cargo_fnc_moduleMakeLoadable has no synced objects [%1]", _logic); -}; - -private _canLoad = _logic getVariable ["canLoad", true]; -private _setSize = _logic getVariable ["setSize", 1]; -TRACE_2("settings",_canLoad,_setSize); - -{ - [_x, _canLoad, _setSize] call FUNC(makeLoadable); -} forEach _objects; diff --git a/addons/cargo/functions/fnc_moduleSettings.sqf b/addons/cargo/functions/fnc_moduleSettings.sqf index b7af19c76a..6712d947fa 100644 --- a/addons/cargo/functions/fnc_moduleSettings.sqf +++ b/addons/cargo/functions/fnc_moduleSettings.sqf @@ -17,8 +17,6 @@ */ #include "script_component.hpp" -if (!isServer) exitWith {}; - params ["_logic", "", "_activated"]; if (!_activated) exitWith {}; diff --git a/addons/cargo/functions/fnc_onMenuOpen.sqf b/addons/cargo/functions/fnc_onMenuOpen.sqf index 8b3847993d..e08c7a478a 100644 --- a/addons/cargo/functions/fnc_onMenuOpen.sqf +++ b/addons/cargo/functions/fnc_onMenuOpen.sqf @@ -32,7 +32,7 @@ if (GVAR(interactionParadrop)) then { [_this select 1] call CBA_fnc_removePerFrameHandler; }; - if (isNull GVAR(interactionVehicle) || {(ACE_player distance GVAR(interactionVehicle) >= 10) && {(vehicle ACE_player) != GVAR(interactionVehicle)}}) exitWith { + if (isNull GVAR(interactionVehicle) || {(([ACE_player, GVAR(interactionVehicle)] call EFUNC(interaction,getInteractionDistance)) >= MAX_LOAD_DISTANCE) && {(vehicle ACE_player) != GVAR(interactionVehicle)}}) exitWith { closeDialog 0; [_this select 1] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/cargo/functions/fnc_paradropItem.sqf b/addons/cargo/functions/fnc_paradropItem.sqf index 0f74787723..4c1929a1dc 100644 --- a/addons/cargo/functions/fnc_paradropItem.sqf +++ b/addons/cargo/functions/fnc_paradropItem.sqf @@ -44,7 +44,7 @@ private _itemObject = if (_item isEqualType objNull) then { [QGVAR(serverUnload), [_item, _posBehindVehicleAGL]] call CBA_fnc_serverEvent; _item } else { - private _newItem = createVehicle [_item, _posBehindVehicleAGL, [], 0, ""]; + private _newItem = createVehicle [_item, _posBehindVehicleAGL, [], 0, "NONE"]; _newItem setPosASL (AGLtoASL _posBehindVehicleAGL); _newItem }; diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index 447c679df0..092440e5d4 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -24,7 +24,7 @@ private _vehicle = _cargoVehicle; if (isNull _vehicle) then { { if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_vehicle = _x}; - } forEach (nearestObjects [_player, GVAR(cargoHolderTypes), MAX_LOAD_DISTANCE]); + } forEach (nearestObjects [_player, GVAR(cargoHolderTypes), (MAX_LOAD_DISTANCE + 10)]); }; if (isNull _vehicle) exitWith { @@ -35,13 +35,17 @@ if (isNull _vehicle) exitWith { private _return = false; // Start progress bar if ([_object, _vehicle] call FUNC(canLoadItemIn)) then { + [_player, _object, true] call EFUNC(common,claim); private _size = [_object] call FUNC(getSizeItem); [ 5 * _size, - [_object,_vehicle], - {["ace_loadCargo", _this select 0] call CBA_fnc_localEvent}, - {}, + [_object, _vehicle], + { + [objNull, _this select 0 select 0, true] call EFUNC(common,claim); + ["ace_loadCargo", _this select 0] call CBA_fnc_localEvent; + }, + {[objNull, _this select 0 select 0, true] call EFUNC(common,claim)}, localize LSTRING(LoadingItem), {true}, ["isNotSwimming"] diff --git a/addons/cargo/functions/fnc_unloadItem.sqf b/addons/cargo/functions/fnc_unloadItem.sqf index 20fde5d631..702f145405 100644 --- a/addons/cargo/functions/fnc_unloadItem.sqf +++ b/addons/cargo/functions/fnc_unloadItem.sqf @@ -55,7 +55,7 @@ if (_item isEqualType objNull) then { // do both on server to ensure they are executed in the correct order [QGVAR(serverUnload), [_item, _emptyPosAGL]] call CBA_fnc_serverEvent; } else { - private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, ""]; + private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, "NONE"]; _newItem setPosASL (AGLtoASL _emptyPosAGL); }; diff --git a/addons/cargo/script_component.hpp b/addons/cargo/script_component.hpp index 3ae6331f91..d5cee60c39 100644 --- a/addons/cargo/script_component.hpp +++ b/addons/cargo/script_component.hpp @@ -16,7 +16,7 @@ #include "\z\ace\addons\main\script_macros.hpp" -#define MAX_LOAD_DISTANCE 10 +#define MAX_LOAD_DISTANCE 5 #define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index 1b6e780cc7..0d42954b7f 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -228,51 +228,6 @@ %1<br/>無法被卸載 %1<br/>无法被卸载 - - Make Object Loadable - Objekt ein/entladbar machen - Ustaw jako ładowalny - Rendi oggetto caricabile - Hacer objeto cargable - Rendre l'objet chargeable - Vytvořit objekt nakladatelným - Fazer objeto carregável - Сделать объект загружаемым - オブジェクトを積載可能に - 물체를 화물화시키기 - 使物件可裝載 - 使物件可装载 - - - Sets the synced object as loadable by the cargo system. - Das synchronisierte Objekt wird dem Frachtsystem hinzugefügt und ist ein- und entladbar. - Ustawia zsynchronizowany obiekt jako możliwy do załadowania poprzez system cargo - Imposta l'oggetto sincronizzato come caricabile dal sistema cargo - Sincronizar un objecto para hacerlo cargable. - Rend l'objet synchronisé comme chargeable par le système de cargaison. - Nastaví synchronizované objekty nakladatelnými za pomocí Nákladního systému. - Seta o objeto sincronizado como carregável - Делает синхронизированный объект загружаемым для модуля перевозки грузов. - オブジェクトを同期させると、カーゴ システムによる積載が可能になります。 - 물체를 화물 시스템과 동기화시켜 실을 수 있게 합니다 - 使用同步線來使該物件可被裝載. - 使用同步线来使该物件可被装载. - - - Object's Size - Objektgröße - Rozmiar obiektu - Dimensioni dell'oggetto - Tamaño del objeto - Taille de l'objet - Velikost objektu - Tamanho do objeto - Размер объекта - オブジェクトの大きさ - 물체 크기 - 物件的大小 - 物件的大小 - Cargo Space Frachtraum @@ -281,6 +236,7 @@ 貨物空間 货物空间 Przestrzeń ładunkowa + 화물 공간 The cargo space available in this vehicle/container @@ -290,6 +246,7 @@ 設定此載具/集裝箱可裝載多少貨物 设定此载具/集装箱可装载多少货物 Dostępna przestrzeń ładunkowa w tym pojeździe/kontenerze + 이 차량/컨테이너에서 사용가능한 화물 공간 Cargo Size @@ -299,6 +256,7 @@ 貨物的大小 货物的大小 Wielkość ładunku + 화물 크기 The cargo space required to hold this object (-1 for unloadable) @@ -308,6 +266,7 @@ 此貨物會佔掉多少空間(設定-1的話此貨物就不能被裝載) 此货物会占掉多少空间(设定-1的话此货物就不能被装载) Wymagana przestrzeń ładunkowa dla tego obiektu (-1 dla niemożliwych do załadowania) + 이 화물을 적재하는데 필요한 공간 (-1=무조건 적재가능) Airdrop @@ -340,6 +299,7 @@ 空投時間係數 空投时间系数 Współczynnik czasu zrzutu + 공중 투하 시간 계수 Modifier for how long it takes to paradrop a cargo item. @@ -350,6 +310,7 @@ 設定空投所需消耗的時間. 设定空投所需消耗的时间. Modyfikator wskazujący jak dużo czasu potrzeba by zrzucić przedmiot na spadochronie. + 화물을 공중 투하 하는데 얼마나 걸리는 시간 설정 diff --git a/addons/chemlights/CfgWeapons.hpp b/addons/chemlights/CfgWeapons.hpp index 5214c7e689..de6f3920f5 100644 --- a/addons/chemlights/CfgWeapons.hpp +++ b/addons/chemlights/CfgWeapons.hpp @@ -57,6 +57,7 @@ class CfgWeapons { descriptionShort = CSTRING(Shield_Green_DescriptionShort); model = "\A3\weapons_F\ammo\mag_univ.p3d"; picture = QPATHTOF(UI\ace_chemlight_shield_green_x_ca.paa); + ace_arsenal_uniqueBase = "ACE_Chemlight_Shield"; scope = 1; class ItemInfo: CBA_MiscItem_ItemInfo { mass = 1; diff --git a/addons/common/ACE_Settings.hpp b/addons/common/ACE_Settings.hpp index 2d8a5d7a27..eeee9c2f37 100644 --- a/addons/common/ACE_Settings.hpp +++ b/addons/common/ACE_Settings.hpp @@ -14,25 +14,27 @@ class ACE_Settings { * values[] = {"Disabled", "Enabled", "Only Cursor", "Only On Keypress", "Only Cursor and KeyPress"}; // Stringtable entries that describe the options * }; */ - class GVAR(forceAllSettings) { - value = 0; - typeName = "BOOL"; - }; class GVAR(checkPBOsAction) { + category = CSTRING(DisplayName); value = 0; typeName = "SCALAR"; isClientSettable = 0; + displayName = CSTRING(CheckPBOsAction); values[] = {CSTRING(CheckPBO_Action_WarnOnce), CSTRING(CheckPBO_Action_WarnPerm), CSTRING(CheckPBO_Action_Kick)}; }; class GVAR(checkPBOsCheckAll) { + category = CSTRING(DisplayName); value = 0; typeName = "BOOL"; isClientSettable = 0; + displayName = CSTRING(CheckPBOsCheckAll); }; class GVAR(checkPBOsWhitelist) { + category = CSTRING(DisplayName); value = "[]"; typeName = "STRING"; isClientSettable = 0; + displayName = CSTRING(CheckPBOsWhitelist); }; /*class GVAR(enableNumberHotkeys) { value = 1; @@ -41,6 +43,7 @@ class ACE_Settings { displayName = CSTRING(EnableNumberHotkeys); };*/ class GVAR(settingFeedbackIcons) { + category = CSTRING(DisplayName); value = 1; typeName = "SCALAR"; force = 0; @@ -50,6 +53,7 @@ class ACE_Settings { values[] = {ECSTRING(optionsmenu,Hide), ECSTRING(optionsmenu,TopRightDown), ECSTRING(optionsmenu,TopRightLeft), ECSTRING(optionsmenu,TopLeftDown), ECSTRING(optionsmenu,TopLeftRight)}; }; class GVAR(settingProgressBarLocation) { + category = CSTRING(DisplayName); value = 0; typeName = "SCALAR"; force = 0; @@ -59,6 +63,7 @@ class ACE_Settings { values[] = {ECSTRING(optionsmenu,Top), ECSTRING(optionsmenu,Bottom)}; }; class GVAR(displayTextColor) { + category = CSTRING(DisplayName); value[] = {0,0,0,0.1}; typeName = "COLOR"; isClientSettable = 1; @@ -66,6 +71,7 @@ class ACE_Settings { description = CSTRING(SettingDisplayTextColorDesc); }; class GVAR(displayTextFontColor) { + category = CSTRING(DisplayName); value[] = {1,1,1,1}; typeName = "COLOR"; isClientSettable = 1; diff --git a/addons/common/CfgVehicles.hpp b/addons/common/CfgVehicles.hpp index 1e958027be..a3ddef155e 100644 --- a/addons/common/CfgVehicles.hpp +++ b/addons/common/CfgVehicles.hpp @@ -33,7 +33,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(CheckPBO_DisplayName); function = QFUNC(moduleCheckPBOs); - scope = 2; + scope = 1; isGlobal = 1; isSingular = 1; icon = QPATHTOF(UI\Icon_Module_CheckPBO_ca.paa); diff --git a/addons/common/CompassControl.hpp b/addons/common/CompassControl.hpp new file mode 100644 index 0000000000..899c609161 --- /dev/null +++ b/addons/common/CompassControl.hpp @@ -0,0 +1,110 @@ +#include "\a3\ui_f\hpp\defineCommonGrids.inc" + +#define TEXTURE_0 "\a3\ui_f_curator\Data\CfgIngameUI\Compass\texture0_ca.paa" +#define TEXTURE_1 "\a3\ui_f_curator\Data\CfgIngameUI\Compass\texture90_ca.paa" +#define TEXTURE_2 "\a3\ui_f_curator\Data\CfgIngameUI\Compass\texture180_ca.paa" +#define TEXTURE_3 "\a3\ui_f_curator\Data\CfgIngameUI\Compass\texture270_ca.paa" + +#define BACKGROUND_COLOR {0.1,0.1,0.1,0.4} +#define POINTER_COLOR {0.1,0.1,0.1,1} +#define POINTER_WIDTH_FACTOR (1/128) + +#define LEFT (0.5 - 8 * GUI_GRID_W) +#define TOP (safezoneY + 1.6 * GUI_GRID_H) +#define WIDTH (16 * GUI_GRID_W) +#define HEIGHT (0.5 * GUI_GRID_H) + +class RscText; +class RscPicture; +class RscControlsGroupNoScrollbars; + +class GVAR(CompassControl): RscControlsGroupNoScrollbars { + onLoad = QUOTE(\ + params ['_control'];\ + private _display = ctrlParent _control;\ + private _fnc_update = {\ + params ['_display'];\ + private _compassControl = _display getVariable 'GVAR(compassControl)';\ + private _view = AGLToASL positionCameraToWorld [ARR_3(0,0,0)] vectorFromTo AGLToASL positionCameraToWorld [ARR_3(0,0,1)];\ + private _viewHorizontal = vectorNormalized (_view vectorCrossProduct [ARR_3(0,0,1)]);\ + private _dir = acos (_viewHorizontal select 0);\ + if (_viewHorizontal select 1 > 0) then {\ + _dir = 360 - _dir;\ + };\ + _compassControl ctrlSetPosition [ARR_2(-(16 * GUI_GRID_W) * (_dir / 360),0)];\ + _compassControl ctrlCommit 0;\ + };\ + _display displayAddEventHandler [ARR_2('MouseMoving',_fnc_update)];\ + _display displayAddEventHandler [ARR_2('MouseHolding',_fnc_update)];\ + ); + x = LEFT; + y = TOP; + w = WIDTH; + h = HEIGHT; + + class controls { + class Background: RscText { + colorBackground[] = BACKGROUND_COLOR; + x = 0; + y = 0; + w = WIDTH; + h = HEIGHT; + }; + class Pointer: RscText { + colorBackground[] = POINTER_COLOR; + x = WIDTH/2 - WIDTH*POINTER_WIDTH_FACTOR/2; + y = 0; + w = WIDTH*POINTER_WIDTH_FACTOR; + h = HEIGHT; + }; + class CompassGroup: RscControlsGroupNoScrollbars { + onLoad = QUOTE(\ + params ['_control'];\ + private _display = ctrlParent _control;\ + _display setVariable [ARR_2('GVAR(compassControl)',_control)];\ + ); + x = 0; + y = 0; + w = 2*WIDTH; + h = 2*HEIGHT; + + class controls { + class Compass0: RscPicture { + text = TEXTURE_0; + x = 0 * (WIDTH / 4); + y = 0; + w = WIDTH/4; + h = HEIGHT; + }; + class Compass1: Compass0 { + text = TEXTURE_1; + x = 1 * (WIDTH / 4); + }; + class Compass2: Compass0 { + text = TEXTURE_2; + x = 2 * (WIDTH / 4); + }; + class Compass3: Compass0 { + text = TEXTURE_3; + x = 3 * (WIDTH / 4); + }; + class Compass4: Compass0 { + text = TEXTURE_0; + x = 4 * (WIDTH / 4); + }; + class Compass5: Compass0 { + text = TEXTURE_1; + x = 5 * (WIDTH / 4); + }; + class Compass6: Compass0 { + text = TEXTURE_2; + x = 6 * (WIDTH / 4); + }; + class Compass7: Compass0 { + text = TEXTURE_3; + x = 7 * (WIDTH / 4); + }; + }; + }; + }; +}; diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index 823fa563f8..e0bd01ba51 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -1,8 +1,14 @@ +TRACE_1("",QUOTE(ADDON)); + +PREP(cbaSettings); +PREP(cbaSettings_loadFromConfig); +PREP(cbaSettings_settingChanged); +PREP(cbaSettings_transferUserSettings); +PREP(readSettingsFromParamsArray); PREP(actionKeysNamesConverted); PREP(addCanInteractWithCondition); PREP(addLineToDebugDraw); -PREP(addSetting); PREP(addToInventory); PREP(assignedItemFix); PREP(assignObjectsInList); @@ -84,6 +90,7 @@ PREP(getVersion); PREP(getWeaponAzimuthAndInclination); PREP(getWeaponIndex); PREP(getWeaponState); +PREP(getWeight); PREP(getWindDirection); PREP(getZoom); PREP(goKneeling); @@ -110,9 +117,6 @@ PREP(isUnderwater); PREP(lightIntensityFromObject); PREP(loadPerson); PREP(loadPersonLocal); -PREP(loadSettingsFromProfile); -PREP(loadSettingsOnServer); -PREP(loadSettingsLocalizedText); PREP(moduleCheckPBOs); PREP(moduleLSDVehicles); PREP(muteUnit); @@ -131,7 +135,6 @@ PREP(playerSide); PREP(positionToASL); PREP(progressBar); PREP(readSettingFromModule); -PREP(readSettingsFromParamsArray); PREP(receiveRequest); PREP(removeCanInteractWithCondition); PREP(removeSpecificMagazine); @@ -153,7 +156,6 @@ PREP(setPitchBankYaw); PREP(setPlayerOwner); PREP(setProne); PREP(setSetting); -PREP(setSettingFromConfig); PREP(setVariableJIP); PREP(setVariablePublic); PREP(setVolume); @@ -167,6 +169,7 @@ PREP(statusEffect_sendEffects); PREP(statusEffect_set); PREP(stringCompare); PREP(stringToColoredText); +PREP(switchPersistentLaser); PREP(switchToGroupSide); PREP(throttledPublicVariable); PREP(toBin); diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 3420d70bd4..369f7b87c2 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -19,41 +19,63 @@ //Status Effect EHs: [QGVAR(setStatusEffect), {_this call FUNC(statusEffect_set)}] call CBA_fnc_addEventHandler; -["forceWalk", false, ["ACE_SwitchUnits", "ACE_Attach", "ACE_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_dragging"]] call FUNC(statusEffect_addType); +["forceWalk", false, ["ACE_SwitchUnits", "ACE_Attach", "ACE_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_Trenches"]] call FUNC(statusEffect_addType); ["blockSprint", false, []] call FUNC(statusEffect_addType); -["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), "ace_unconscious"]] call FUNC(statusEffect_addType); +["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered)]] call FUNC(statusEffect_addType); ["blockDamage", false, ["fixCollision", "ACE_cargo"]] call FUNC(statusEffect_addType); ["blockEngine", false, ["ACE_Refuel"]] call FUNC(statusEffect_addType); +["blockThrow", false, ["ACE_Attach", "ACE_concertina_wire", "ACE_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_rearm", "ACE_refuel", "ACE_Sandbag", "ACE_Trenches", "ACE_tripod"]] call FUNC(statusEffect_addType); +["setHidden", true, ["ace_unconscious"]] call FUNC(statusEffect_addType); [QGVAR(forceWalk), { params ["_object", "_set"]; TRACE_2("forceWalk EH",_object,_set); _object forceWalk (_set > 0); }] call CBA_fnc_addEventHandler; + [QGVAR(blockSprint), { //Name reversed from `allowSprint` because we want NOR logic params ["_object", "_set"]; TRACE_2("blockSprint EH",_object,_set); _object allowSprint (_set == 0); }] call CBA_fnc_addEventHandler; + [QGVAR(setAnimSpeedCoef), { params ["_object", "_set"]; _object setAnimSpeedCoef _set; }] call CBA_fnc_addEventHandler; + [QGVAR(setCaptive), { params ["_object", "_set"]; TRACE_2("setCaptive EH",_object,_set); _object setCaptive (_set > 0); }] call CBA_fnc_addEventHandler; + +[QGVAR(setHidden), { + params ["_object", "_set"]; + TRACE_2("setHidden EH",_object,_set); + private _vis = _object getUnitTrait "camouflageCoef"; + if (_set > 0) then { + if (_vis != 0) then { + _object setVariable [QGVAR(oldVisibility), _vis]; + _object setUnitTrait ["camouflageCoef", 0]; + }; + } else { + _vis = _object getVariable [QGVAR(oldVisibility), _vis]; + _object setUnitTrait ["camouflageCoef", _vis]; + }; +}] call CBA_fnc_addEventHandler; + [QGVAR(blockDamage), { //Name reversed from `allowDamage` because we want NOR logic params ["_object", "_set"]; if ((_object isKindOf "CAManBase") && {(["ace_medical"] call FUNC(isModLoaded))}) then { TRACE_2("blockDamage EH (using medical)",_object,_set); - _object setvariable [QEGVAR(medical,allowDamage), (_set == 0), true]; + _object setVariable [QEGVAR(medical,allowDamage), (_set == 0), true]; } else { TRACE_2("blockDamage EH (using allowDamage)",_object,_set); _object allowDamage (_set == 0); }; }] call CBA_fnc_addEventHandler; + [QGVAR(blockEngine), { params ["_vehicle", "_set"]; _vehicle setVariable [QGVAR(blockEngine), _set > 0, true]; @@ -78,20 +100,6 @@ if (isServer) then { }]; }; -// Listens for global "SettingChanged" events, to update the force status locally -["ace_settingChanged", { - params ["_name", "_value", "_force"]; - - if (_force) then { - private _settingData = [_name] call FUNC(getSettingData); - - if (_settingData isEqualTo []) exitWith {}; - - _settingData set [6, _force]; - }; -}] call CBA_fnc_addEventHandler; - - // Event to log Fix Headbug output [QGVAR(headbugFixUsed), { params ["_profileName", "_animation"]; @@ -176,8 +184,8 @@ private _previousVersion = profileNamespace getVariable ["ACE_VersionNumberStrin // check previous version number from profile if (_currentVersion != _previousVersion) then { - // do something - + INFO_2("Updating ACE from [%1] to [%2]",_previousVersion,_currentVersion); + [_previousVersion] call FUNC(cbaSettings_transferUserSettings); profileNamespace setVariable ["ACE_VersionNumberString", _currentVersion]; }; @@ -196,60 +204,6 @@ call FUNC(checkFiles); ] call FUNC(checkPBOs) }] call CBA_fnc_addEventHandler; -// Create a pfh to wait until all postinits are ready and settings are initialized -[{ - params ["_args"]; - - _args params ["_waitingMsgSent"]; - - // If post inits are not ready then wait - if !(SLX_XEH_MACHINE select 8) exitWith {}; - - // If settings are not initialized then wait - if (isNil QGVAR(settings) || {!isServer && isNil QEGVAR(modules,serverModulesRead)}) exitWith { - if !(_waitingMsgSent) then { - _args set [0, true]; - INFO("Waiting on settings from server..."); - }; - }; - - [_this select 1] call CBA_fnc_removePerFrameHandler; - - INFO("Settings received from server."); - - if (isServer) then { //read settings from paramsArray - [] call FUNC(readSettingsFromParamsArray); - }; - // Event so that ACE_Modules have their settings loaded: - [QGVAR(initSettingsFromModules), []] call CBA_fnc_localEvent; - - if (isServer) then { - // Publish all settings data after all configs and modules are read - publicVariable QGVAR(settings); - }; - - // Load user settings from profile - if (hasInterface) then { - call FUNC(loadSettingsFromProfile); - call FUNC(loadSettingsLocalizedText); - }; - - INFO("Settings initialized."); - - //Event that settings are safe to use: - ["ace_settingsInitialized", []] call CBA_fnc_localEvent; - - //Set init finished and run all delayed functions: - GVAR(settingsInitFinished) = true; - INFO_1("%1 delayed functions running.",count GVAR(runAtSettingsInitialized)); - - { - (_x select 1) call (_x select 0); - false - } count GVAR(runAtSettingsInitialized); - - GVAR(runAtSettingsInitialized) = nil; //cleanup -}, 0, [false]] call CBA_fnc_addPerFrameHandler; /***************************************************************************/ diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 355ffb2a7d..d8fccd3884 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -9,6 +9,7 @@ PREP_RECOMPILE_END; GVAR(syncedEvents) = [] call CBA_fnc_hashCreate; GVAR(showHudHash) = [] call CBA_fnc_hashCreate; +GVAR(vehicleIconCache) = call CBA_fnc_createNamespace; // for getVehicleIcon GVAR(settingsInitFinished) = false; GVAR(runAtSettingsInitialized) = []; @@ -18,10 +19,8 @@ GVAR(runAtSettingsInitialized) = []; //Debug ACE_COUNTERS = []; -// Load settings on the server and broadcast them -if (isServer) then { - call FUNC(loadSettingsOnServer); -}; +// Load ace_settings into CBA Settings +[] call FUNC(cbaSettings); GVAR(statusEffect_Names) = []; GVAR(statusEffect_isGlobal) = []; @@ -42,4 +41,14 @@ isHC = !hasInterface && !isDedicated; // deprecated because no tag missionNamespace setVariable ["ACE_isHC", ACE_isHC]; uiNamespace setVariable ["ACE_isHC", ACE_isHC]; +[ + QGVAR(persistentLaserEnabled), + "CHECKBOX", + [localize LSTRING(SettingPersistentLaserName), localize LSTRING(SettingPersistentLaserDesc)], + localize LSTRING(ACEKeybindCategoryWeapons), + false, + false, + LINKFUNC(switchPersistentLaser) +] call CBA_settings_fnc_init; + ADDON = true; diff --git a/addons/common/config.cpp b/addons/common/config.cpp index 76258ca0cb..6280f186d8 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -64,6 +64,7 @@ class ACE_Rsc_Control_Base { #include #include #include +#include "CompassControl.hpp" class CfgUIGrids { class IGUI { diff --git a/addons/common/functions/fnc_addSetting.sqf b/addons/common/functions/fnc_addSetting.sqf deleted file mode 100644 index 0e5d391b1a..0000000000 --- a/addons/common/functions/fnc_addSetting.sqf +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Author: esteldunedain - * Adds a new setting at runtime, with all it's metadata. - * If has only local effects. - * - * Arguments: - * 0: name - * 1: typeName - * 2: isClientSetable - * 3: localizedName - * 4: localizedDescription - * 5: possibleValues - * 6: isForced - * 7: defaultValue - * - * Return Value: - * None - * - * Example: - * ["bob", "type", true, "bob", "person", [1,2,3], true, 5] call ace_common_fnc_addSettings - * - * Public: No - */ -#include "script_component.hpp" - -params ["_name", "", "", "", "", "", "", "_value"]; //["_name", "_typeName", "_isClientSetable", "_localizedName", "_localizedDescription", "_possibleValues", "_isForced", "_value"]; - -private _settingData = [_name] call FUNC(getSettingData); - -// Exit if the setting already exists -if (count _settingData > 0) exitWith {}; - -// Update the variable -TRACE_2("Setting added",_name,_value); - -// Init the variable -missionNamespace setVariable [_name, _value]; - -// Add the setting data -GVAR(settings) pushBack _this; - -// Raise event locally -["ace_settingChanged", [_name, _value]] call CBA_fnc_localEvent; diff --git a/addons/common/functions/fnc_canDig.sqf b/addons/common/functions/fnc_canDig.sqf index 8fe157becd..2b0412f730 100644 --- a/addons/common/functions/fnc_canDig.sqf +++ b/addons/common/functions/fnc_canDig.sqf @@ -24,8 +24,14 @@ if ((getPosATL _unit) select 2 > 0.05 || // Walking on objects, such as building ) exitWith {false}; private _surfaceClass = (surfaceType _posASL) select [1]; -private _surfaceType = getText (configFile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron"); -private _surfaceDust = getNumber (configFile >> "CfgSurfaces" >> _surfaceClass >> "dust"); +private _config = configFile >> "CfgSurfaces" >> _surfaceClass; +private _surfaceType = getText (_config >> "soundEnviron"); +private _surfaceDust = getNumber (_config >> "dust"); + TRACE_2("Surface",_surfaceType,_surfaceDust); -!(_surfaceType in DIG_SURFACE_BLACKLIST) && {(_surfaceDust >= 0.1) || {_surfaceType in DIG_SURFACE_WHITELIST}} +if (isNumber (_config >> "ACE_canDig")) then { + getNumber (_config >> "ACE_canDig") // return +} else { + !(_surfaceType in DIG_SURFACE_BLACKLIST) && {(_surfaceDust >= 0.1) || {_surfaceType in DIG_SURFACE_WHITELIST}} // return +}; diff --git a/addons/common/functions/fnc_cbaSettings.sqf b/addons/common/functions/fnc_cbaSettings.sqf new file mode 100644 index 0000000000..97978c590c --- /dev/null +++ b/addons/common/functions/fnc_cbaSettings.sqf @@ -0,0 +1,112 @@ +/* + * Author: PabstMirror + * Called at pre-init: Loads all ace_settings and converts them to CBA Settings. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_common_fnc_cbaSettings; + * + * Public: No + */ +//#define DEBUG_MODE_FULL +#include "script_component.hpp" + +LOG("Adding ACE_Settings to CBA_settings"); + +// Init Vars: +GVAR(cbaSettings_forcedSettings) = []; +GVAR(cbaSettings_missionSettings) = []; +GVAR(settings) = []; // will stay empty - for BWC? + +// Add Event Handlers: +[QGVAR(setSetting), { + params ["_settingName", "_value"]; + TRACE_2("setSettingMission from setSetting",_settingName,_value); + ["CBA_settings_setSettingMission", [_settingName, _value, true]] call CBA_fnc_localEvent; + ["CBA_settings_refreshSetting", [_settingName]] call CBA_fnc_localEvent; +}] call CBA_fnc_addEventHandler; + +["CBA_beforeSettingsInitialized", { + TRACE_1("CBA_beforeSettingsInitialized EH",_this); + + // First: Process missionConfig settings: + { + _x params ["_settingName", "_value"]; + TRACE_2("setSettingMission from missionConfig",_settingName,_value); + ["CBA_settings_setSettingMission", [_settingName, _value, true]] call CBA_fnc_localEvent; + } forEach GVAR(cbaSettings_missionSettings); + GVAR(cbaSettings_missionSettings) = nil; + + // Second: Read settings from mission params + [] call FUNC(readSettingsFromParamsArray); + + // Third: Event so that ACE_Modules have their settings loaded: + [QGVAR(initSettingsFromModules), []] call CBA_fnc_localEvent; + + TRACE_1("Finished mission settings",_this); +}] call CBA_fnc_addEventHandler; + +["CBA_settingsInitialized", { + TRACE_1("CBA_settingsInitialized EH",_this); + if !(SLX_XEH_MACHINE select 8) then {WARNING("PostInit not finished");}; + INFO("Settings initialized."); + + //Event that settings are safe to use: + ["ace_settingsInitialized", []] call CBA_fnc_localEvent; + + //Set init finished and run all delayed functions: + GVAR(settingsInitFinished) = true; + INFO_1("%1 delayed functions running.",count GVAR(runAtSettingsInitialized)); + { + (_x select 1) call (_x select 0); + false + } count GVAR(runAtSettingsInitialized); + GVAR(runAtSettingsInitialized) = nil; //cleanup +}] call CBA_fnc_addEventHandler; + +private _start = diag_tickTime; + +private _settingsConfig = configFile >> "ACE_Settings"; +private _countOptions = count _settingsConfig; +TRACE_1("Reading settings from configFile",_countOptions); +for "_index" from 0 to (_countOptions - 1) do { + private _optionEntry = _settingsConfig select _index; + if (isNil (configName _optionEntry)) then { + [_optionEntry] call FUNC(cbaSettings_loadFromConfig); + } else { + WARNING_1("Setting [%1] - Already defined from somewhere else??",_varName); + }; +}; + +_settingsConfig = missionConfigFile >> "ACE_Settings"; +_countOptions = count _settingsConfig; +TRACE_1("Reading settings from missionConfigFile",_countOptions); +for "_index" from 0 to (_countOptions - 1) do { + private _optionEntry = _settingsConfig select _index; + private _settingName = configName _optionEntry; + if ((toLower _settingName) in GVAR(cbaSettings_forcedSettings)) then { + WARNING_1("Setting [%1] - Already Forced - ignoring missionConfig",_varName); + } else { + if (isNil _settingName) then { + // New setting, that was first defined in missionConfigFile + [_optionEntry] call FUNC(cbaSettings_loadFromConfig); + } else { + private _value = (_optionEntry >> "value") call BIS_fnc_getCfgData; + if (isNil "_value") exitWith {ERROR_1("Setting [%1] - Has bad value",_settingName);}; + TRACE_2("queuing missionConfig setting",_settingName,_value); + GVAR(cbaSettings_missionSettings) pushBack [_settingName, _value]; + }; + }; +}; + +// Warning if using a custom ACE_ServerSettings config +if (isServer && {isClass (configFile >> "ACE_ServerSettings")}) then { + WARNING("ACE_ServerSettings is no longer supported and will be ignored"); +}; + +INFO_1("Parsed Settings Configs [%1 ms]",(1000 * (diag_tickTime - _start)) toFixed 1); diff --git a/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf b/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf new file mode 100644 index 0000000000..1382942732 --- /dev/null +++ b/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf @@ -0,0 +1,105 @@ +/* + * Author: PabstMirror + * Converts a ace_setting config into a cba setting + * + * Arguments: + * 0: Setting config + * + * Return Value: + * None + * + * Example: + * [] call ace_common_fnc_cbaSettings_loadFromConfig; + * + * Public: No + */ +// #define DEBUG_MODE_FULL +#include "script_component.hpp" + +params ["_config"]; + +private _varName = configName _config; +private _typeName = toUpper getText (_config >> "typeName"); +if (_typeName == "") then { + WARNING_1("Setting [%1] Has no typeName",_varName); + _typeName = "SCALAR"; +}; +TRACE_3("loadFromConfig",_var,_typeName,_config); + +private _isClientSettable = (getNumber (_config >> "isClientSettable")) > 0; +private _localizedName = getText (_config >> "displayName"); +private _localizedDescription = getText (_config >> "description"); +private _isForced = (getNumber (_config >> "force")) > 0; +private _category = getText (_config >> "category"); + +private _cbaIsGlobal = (!_isClientSettable) || _isForced; +if (_isForced) then {GVAR(cbaSettings_forcedSettings) pushBack (toLower _varName);}; + +// Basic handling of setting types CBA doesn't support: +if (_typeName == "ARRAY") exitWith { + WARNING_1("Setting [%1] is type ARRAY - limited support",_varName); + private _value = getArray (_config >> "value"); + if (isServer) then {missionNamespace setVariable [_varName, _value, true];}; +}; + +private _cbaSettingType = ""; +private _cbaValueInfo = []; +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);}; + if (isArray (_config >> "values")) then { + _cbaSettingType = "LIST"; // [_values, _valueTitles, _defaultIndex] + private _values = []; + private _valueTitles = []; + { + _values pushBack _forEachIndex; + _valueTitles pushBack (if ((_x select [0, 1]) == "$") then {localize (_x select [1]);} else {_x}); + } forEach (getArray (_config >> "values")); + _cbaValueInfo = [_values, _valueTitles, getNumber (_config >> "value")]; + } else { + _cbaSettingType = "SLIDER"; // [_min, _max, _default, _trailingDecimals] + _cbaValueInfo = if (isArray (_config >> "sliderSettings")) then { + getArray (_config >> "sliderSettings"); + } else { + INFO_1("Using auto min/max for [%1]",_varName); + [-1, 5000, 0, 1] + }; + _cbaValueInfo set [2, getNumber (_config >> "value")]; + }; + }; +case ("BOOL"): { + if (!isNumber (_config >> "value")) then {WARNING_2("Setting [%1] - value type [%2] is missing number",_varName,_typeName);}; + _cbaSettingType = "CHECKBOX"; + _cbaValueInfo = (getNumber (_config >> "value")) > 0; + }; +case ("COLOR"): { + if (!isArray (_config >> "value")) then {WARNING_2("Setting [%1] - value type [%2] is missing array",_varName,_typeName);}; + _cbaSettingType = "COLOR"; + _cbaValueInfo = getArray (_config >> "value"); + }; +case ("STRING"): { + if (!isText (_config >> "value")) then {WARNING_2("Setting [%1] - value type [%2] is missing text",_varName,_typeName);}; + _cbaSettingType = "EDITBOX"; + _cbaValueInfo = getText (_config >> "value"); + }; +}; + +if (_cbaSettingType == "") exitWith {ERROR_3("Setting [%1] - value type [%2] is unknown - %3",_varName,_typeName,_cbaValueInfo);}; + +if (_localizedDescription == "") then {_localizedDescription = _varName}; +if (_category == "") then { + // WARNING_1("Setting [%1] - no category",_varName); + _category = "Uncategorized"; +}; +if (((_varName select [0, 4]) == "ACE_") && {(_category select [0, 3]) != "ACE"}) then {_category = format ["ACE %1", _category];}; +if (((_varName select [0, 5]) == "ACEX_") && {(_category select [0, 4]) != "ACEX"}) then {_category = format ["ACEX %1", _category];}; + +private _code = compile format ['["%1", _this] call FUNC(cbaSettings_settingChanged)', _varName]; + +TRACE_2("setting",_cbaSettingType,_cbaValueInfo); +TRACE_4("",_isForced,_cbaIsGlobal,_category,_cbaValueInfo); +private _return = [_varName, _cbaSettingType, [_localizedName, _localizedDescription], _category, _cbaValueInfo, _cbaIsGlobal, _code] call CBA_settings_fnc_init; +TRACE_1("returned",_return); +if ((isNil "_return") || {_return != 0}) then {ERROR_1("Setting [%1] - CBA Error",_varName);}; +_return + diff --git a/addons/common/functions/fnc_cbaSettings_settingChanged.sqf b/addons/common/functions/fnc_cbaSettings_settingChanged.sqf new file mode 100644 index 0000000000..6fa99e313d --- /dev/null +++ b/addons/common/functions/fnc_cbaSettings_settingChanged.sqf @@ -0,0 +1,33 @@ +/* + * Author: PabstMirror + * Function for handeling a cba setting being changed. + * Adds warning if global setting is changed after ace_settingsInitialized + * + * Arguments: + * 0: Setting Name + * 1: New Value + * 2: Can be changed mid-mission (default: false) + * + * Return Value: + * None + * + * Example: + * ["ace_medical_level", 1, false] call ace_common_fnc_cbaSettings_settingChanged; + * + * Public: No + */ +// #define DEBUG_MODE_FULL +#include "script_component.hpp" + +params ["_settingName", "_newValue", ["_canBeChanged", false]]; +TRACE_2("",_settingName,_newValue); + +["ace_settingChanged", [_settingName, _newValue]] call CBA_fnc_localEvent; + +if (_canBeChanged) exitWith {}; +if (!GVAR(settingsInitFinished)) exitWith {}; // Ignore changed event before CBA_settingsInitialized +if (CBA_settings_default getVariable [_settingName, []] param [7, 0] == 0) exitWith {}; // Ignore if not a global setting +if ((getNumber (configFile >> "ACE_settings" >> _settingName >> "canBeChanged")) == 1) exitWith {}; // Ignore if flagged as ok to change + +WARNING_1("Global setting [%1] changed mid-mission",_settingName); +[QGVAR(displayTextStructured), [format ["Global setting %1 changed mid-mission. Mission restart may be required to prevent issues", _settingName], 4]] call CBA_fnc_localEvent; diff --git a/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf b/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf new file mode 100644 index 0000000000..8d55f671b7 --- /dev/null +++ b/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf @@ -0,0 +1,42 @@ +/* + * Author: PabstMirror + * Transfers a client's old ace settings to cba + * + * Arguments: + * 0: Old Version + * + * Return Value: + * None + * + * Example: + * ["3.11.0"] call ace_common_fnc_cbaSettings_transferUserSettings + * + * Public: No + */ +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +params [["_lastVersion", "", [""]]]; + +if ((parseNumber _lastVersion) >= 3.12) exitWith {}; + +INFO("-Transfering old ACE_Settings to CBA-"); + +private _aceSettings = configProperties [configFile >> "ACE_Settings", "isClass _x"]; +{ + private _settingName = configName _x; + private _isClientSettable = (getNumber (_x >> "isClientSettable")) > 0; + private _profileVar = profileNamespace getVariable _settingName; + + if (!isNil "_profileVar") then { + private _currentValue = [_settingName, "client"] call CBA_settings_fnc_get; + if (_isClientSettable && {!(_currentValue isEqualTo _profileVar)}) then { + // CBA_settings_fnc_set will do type checking for the old profile var + private _ret = [_settingName, _profileVar, 0, "client", true] call CBA_settings_fnc_set; + INFO_3("Transfering setting [%1: %2] returned %3", _settingName, _profileVar, _ret); + }; + }; +} forEach _aceSettings; + +INFO("-Finished Transfering-"); diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf index 480cdab9a9..1a3d34bc86 100644 --- a/addons/common/functions/fnc_checkFiles.sqf +++ b/addons/common/functions/fnc_checkFiles.sqf @@ -78,7 +78,17 @@ if (toLower (productVersion select 6) in ["linux", "osx"]) then { private _versionEx = _x callExtension "version"; if (_versionEx == "") then { - private _errorMsg = format ["Extension %1.dll not installed.", _x]; + private _extension = ".dll"; + + if (productVersion select 7 == "x64") then { + _extension = "_x64.dll"; + }; + + if (productVersion select 6 == "Linux") then { + _extension = ".so"; + }; + + private _errorMsg = format ["Extension %1%2 not found.", _x, _extension]; ERROR(_errorMsg); diff --git a/addons/common/functions/fnc_claim.sqf b/addons/common/functions/fnc_claim.sqf index 79237d725b..8df41cb241 100644 --- a/addons/common/functions/fnc_claim.sqf +++ b/addons/common/functions/fnc_claim.sqf @@ -30,10 +30,17 @@ _target setVariable [QGVAR(owner), _unit, true]; // lock target object if (_lockTarget) then { + private _canBeDisassembled = !([] isEqualTo getArray (_target call CBA_fnc_getObjectConfig >> "assembleInfo" >> "dissasembleTo")); if (!isNull _unit) then { [QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent; + if (_canBeDisassembled) then { + _target enableWeaponDisassembly false; + }; } else { [QGVAR(unlockVehicle), _target, _target] call CBA_fnc_targetEvent; + if (_canBeDisassembled) then { + _target enableWeaponDisassembly true; + }; }; }; diff --git a/addons/common/functions/fnc_endRadioTransmission.sqf b/addons/common/functions/fnc_endRadioTransmission.sqf index ead1ec29c6..57099afe90 100644 --- a/addons/common/functions/fnc_endRadioTransmission.sqf +++ b/addons/common/functions/fnc_endRadioTransmission.sqf @@ -1,7 +1,7 @@ /* * Author: commy2 * - * End radio transmissions of addons TFAR and ACRE2. TFAR v0.9.7, ACRE Public Beta 2.0.3.571 + * End radio transmissions of addons TFAR and ACRE2. TFAR v0.9.x, ACRE Public Beta 2.0.3.571 * * Arguments: * None @@ -16,6 +16,8 @@ */ #include "script_component.hpp" +["ace_endRadioTransmissions"] call CBA_fnc_localEvent; + // ACRE if (isClass (configFile >> "CfgPatches" >> "acre_main")) then { [-1] call acre_sys_core_fnc_handleMultiPttKeyPressUp; diff --git a/addons/common/functions/fnc_fixPosition.sqf b/addons/common/functions/fnc_fixPosition.sqf index b00c08f25a..3eaf7665cd 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 (configFile >> "CfgVehicles" >> typeOf _this >> "simulation") != "house"}; if (!_hasGravity) then { private _posAbove = (getPosATL _this) select 2; diff --git a/addons/common/functions/fnc_getVehicleIcon.sqf b/addons/common/functions/fnc_getVehicleIcon.sqf index 1974c57b71..fd556ed580 100644 --- a/addons/common/functions/fnc_getVehicleIcon.sqf +++ b/addons/common/functions/fnc_getVehicleIcon.sqf @@ -21,8 +21,6 @@ params [["_object", objNull, [objNull, ""]]]; if ((_object isEqualType objNull && {isNull _object}) || {_object isEqualType "" && {_object == ""}}) exitWith { DEFAULT_TEXTURE }; -ISNILS(GVAR(vehicleIconCache),call CBA_fnc_createNamespace); - private _objectType = if (_object isEqualType objNull) then { typeOf _object } else { diff --git a/addons/movement/functions/fnc_getWeight.sqf b/addons/common/functions/fnc_getWeight.sqf similarity index 56% rename from addons/movement/functions/fnc_getWeight.sqf rename to addons/common/functions/fnc_getWeight.sqf index b64abc3623..6c3a224582 100644 --- a/addons/movement/functions/fnc_getWeight.sqf +++ b/addons/common/functions/fnc_getWeight.sqf @@ -4,23 +4,24 @@ * * Arguments: * 0: The Unit (usually the player) + * 1: Force a return type * * Return Value: * The return value * * Example: - * [player] call ace_movement_fnc_getWeight + * [player] call ace_common_fnc_getWeight * * Public: No */ #include "script_component.hpp" -params ["_unit"]; +params ["_unit", ["_useImperial", false, [false, 0]]]; private _virtualLoad = 0; { - _virtualLoad = _virtualLoad + (_x getVariable [QGVAR(vLoad), 0]); + _virtualLoad = _virtualLoad + (_x getVariable [QEGVAR(movement,vLoad), 0]); } forEach [ _unit, uniformContainer _unit, @@ -30,10 +31,9 @@ private _virtualLoad = 0; private _weight = (loadAbs _unit + _virtualLoad) * 0.1; -if (GVAR(useImperial)) then { - _weight = format ["%1lb", (round (_weight * 100)) / 100]; +//Return +if (_useImperial in [true, 1]) then { + format ["%1lb", (round (_weight * 100)) / 100] } else { - _weight = format ["%1kg", (round (_weight * FACTOR_POUND_TO_KILOGRAMM * 100)) / 100]; + format ["%1kg", (round (_weight * (1/2.2046) * 100)) / 100] }; - -_weight diff --git a/addons/common/functions/fnc_isFeatureCameraActive.sqf b/addons/common/functions/fnc_isFeatureCameraActive.sqf index b0870408af..2f3cafe35d 100644 --- a/addons/common/functions/fnc_isFeatureCameraActive.sqf +++ b/addons/common/functions/fnc_isFeatureCameraActive.sqf @@ -5,6 +5,7 @@ * - Curator * - ACE Spectator * - Arsenal camera (BIS_fnc_arsenal) + * - Nexus Spectator (BIS_fnc_EGSpectator) * - Establishing shot (BIS_fnc_establishingShot) * - Splendid camera (BIS_fnc_camera) * - Animation viewer (BIS_fnc_animViewer) @@ -26,6 +27,7 @@ !( isNull curatorCamera && // Curator {!(GETMVAR(EGVAR(spectator,isSet),false))} && // ACE Spectator + {isNull (GETMVAR(BIS_EGSpectatorCamera_camera, objNull))} && // BIS Nexus Spectator {isNull (GETUVAR(BIS_fnc_arsenal_cam, objNull))} && // Arsenal camera {isNull (GETMVAR(BIS_fnc_establishingShot_fakeUAV, objNull))} && // Establishing shot camera {isNull (GETMVAR(BIS_fnc_camera_cam, objNull))} && // Splendid camera diff --git a/addons/common/functions/fnc_loadPersonLocal.sqf b/addons/common/functions/fnc_loadPersonLocal.sqf index 90cbd7da03..f6a759add8 100644 --- a/addons/common/functions/fnc_loadPersonLocal.sqf +++ b/addons/common/functions/fnc_loadPersonLocal.sqf @@ -19,9 +19,9 @@ params ["_unit", "_vehicle", "_caller"]; -if (!alive _unit) then { - // _unit = [_unit, _caller] call FUNC(makeCopyOfBody); //func does not exist -}; +// if (!alive _unit) then { +// _unit = [_unit, _caller] call makeCopyOfBody; //func does not exist +// }; private _slotsOpen = false; diff --git a/addons/common/functions/fnc_loadSettingsFromProfile.sqf b/addons/common/functions/fnc_loadSettingsFromProfile.sqf deleted file mode 100644 index 9151d79cce..0000000000 --- a/addons/common/functions/fnc_loadSettingsFromProfile.sqf +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Author: esteldunedain - * Load the user setable settings from the user profile. - * Config < Server UserConfig < Mission Config < Client settings - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_common_fnc_loadSettingsFromProfile - * - * Public: No - */ -#include "script_component.hpp" - -// Iterate through settings -{ - _x params ["_name", "", "_isClientSetable", "", "", "", "_isForced"]; - - // If setting is user setable - if (_isClientSetable) then { - // If setting is not forced - if !(_isForced) then { - private _profileValue = profileNamespace getVariable _name; - - // If the setting is stored on the profile - if !(isNil "_profileValue") then { - // If the profile variable has the correct type - if (_profileValue isEqualType (missionNamespace getVariable _name)) then { - // Load the setting from the profile - missionNamespace setVariable [_name, _profileValue]; - }; - }; - }; - }; - false -} count GVAR(settings); diff --git a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf b/addons/common/functions/fnc_loadSettingsLocalizedText.sqf deleted file mode 100644 index 7ceffa04e7..0000000000 --- a/addons/common/functions/fnc_loadSettingsLocalizedText.sqf +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Author: Glowbal - * Parse all settings and load the localized displayName and description for all text - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_common_fnc_loadSettingsLocalizedText - * - * Public: No - */ -#include "script_component.hpp" - -private _fnc_parseConfigForDisplayNames = { - params ["_optionEntry"]; - - if !(isClass _optionEntry) exitWith {false}; - - private _values = getArray (_optionEntry >> "values"); - - _x set [3, getText (_optionEntry >> "displayName")]; - _x set [4, getText (_optionEntry >> "description")]; - _x set [5, _values]; - _x set [8, getText (_optionEntry >> "category")]; - - { - private _text = _x; - - if (_text isEqualType "" && {count _text > 1} && {_text select [0, 1] == "$"}) then { - _text = localize (_text select [1]); //chop off the leading $ - _values set [_forEachIndex, _text]; - }; - } forEach _values; - - if (!(_values isEqualTo [])) then { - if (_typeOf != "SCALAR") then { - WARNING_2("Setting [%1] has values[] but is not SCALAR (%2)", _name, _typeOf); - } else { - private _value = missionNamespace getVariable [_name, -1]; - if ((_value < 0) || {_value >= (count _values)}) then { - WARNING_3("Setting [%1] out of bounds %2 (values[] count is %3)", _name, _value, count _values); - }; - }; - }; - true -}; - -// Iterate through settings -{ - _x params ["_name", "_typeOf"]; - - if !([configFile >> "ACE_Settings" >> _name] call _fnc_parseConfigForDisplayNames) then { - if !([configFile >> "ACE_ServerSettings" >> _name] call _fnc_parseConfigForDisplayNames) then { - if !([missionConfigFile >> "ACE_Settings" >> _name] call _fnc_parseConfigForDisplayNames) then { - WARNING_1("Setting found, but couldn't localize [%1] (server has but we don't?)",_name); - }; - }; - }; - false -} count GVAR(settings); diff --git a/addons/common/functions/fnc_loadSettingsOnServer.sqf b/addons/common/functions/fnc_loadSettingsOnServer.sqf deleted file mode 100644 index eaeac7d51d..0000000000 --- a/addons/common/functions/fnc_loadSettingsOnServer.sqf +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Author: esteldunedain - * Load the parameters on the server. - * Config < Server UserConfig < Mission Config - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_common_fnc_loadSettingsOnServer - * - * Public: No - */ -#include "script_component.hpp" - -GVAR(settings) = []; - -private _fnc_parseConfigForSettings = { - params ["_config"]; - - private _countOptions = count _config; - - for "_index" from 0 to (_countOptions - 1) do { - private _optionEntry = _config select _index; - [_optionEntry] call FUNC(setSettingFromConfig); - }; - - // Check if all settings should be forced - if (GVAR(forceAllSettings)) then { - { - _x set [6, true]; - false - } count GVAR(settings); - }; -}; - -// Order is this way because: -// ACE_Settings should never force any setting by default. Loading it first ensures that all settings from ACE_Settings exist. -// This way, ACE_ServerSettings will override ACE_Settings, even if no force is used. -// Mission settings will override the server config settings, if no force is used. -// This ensures that all settings are of their correct type, in case an outdated or corrupt server config is used , as well as have their correct localized display name and description - -// Regular config -[configFile >> "ACE_Settings"] call _fnc_parseConfigForSettings; - -// Server config -[configFile >> "ACE_ServerSettings"] call _fnc_parseConfigForSettings; - -// mission side settings -[missionConfigFile >> "ACE_Settings"] call _fnc_parseConfigForSettings; - -// Publish all setting values -{ - publicVariable (_x select 0); - false -} count GVAR(settings); diff --git a/addons/common/functions/fnc_moduleCheckPBOs.sqf b/addons/common/functions/fnc_moduleCheckPBOs.sqf index f3a8c0902c..6cdfd0d811 100644 --- a/addons/common/functions/fnc_moduleCheckPBOs.sqf +++ b/addons/common/functions/fnc_moduleCheckPBOs.sqf @@ -17,8 +17,6 @@ */ #include "script_component.hpp" -if !(isServer) exitWith {}; - params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/common/functions/fnc_playConfigSound3D.sqf b/addons/common/functions/fnc_playConfigSound3D.sqf index b347cffca8..fde3848cf8 100644 --- a/addons/common/functions/fnc_playConfigSound3D.sqf +++ b/addons/common/functions/fnc_playConfigSound3D.sqf @@ -1,38 +1,43 @@ /* * Author: esteldunedain - * Plays a sound defined in CfgSounds using playSound3D, with global effect + * Plays a sound defined in CfgSounds using playSound3D, with global effect. * * Arguments: * 0: Sound class * 1: Position ASL - * 2: Volume - * 3: Distance + * 2: Volume (default: from sound config) + * 3: Distance (default: from sound config) * * Return Value: * None * * Example: - * ["sound", [0,0,0], 5, 5] call ace_common_fnc_playConfigSound3D + * ["hint", getPosASL player, 5, 5] call ace_common_fnc_playConfigSound3D * * Public: Yes */ -// #define DEBUG_MODE_FULL #include "script_component.hpp" params ["_soundClass", "_posASL", "_volume", "_distance"]; -private _cfgSound = configFile >> "CfgSounds" >> _soundClass; - -if (!isClass _cfgSound) exitWith { - ERROR_1("CfgSounds class [%1] does not exist", _soundClass); +private _sound = getArray (configFile >> "CfgSounds" >> _soundClass >> "sound"); +if (_sound isEqualTo []) exitWith { + ERROR_1("CfgSounds class [%1] does not exist or contains empty sound array", _soundClass); }; +TRACE_2("sound",_soundClass,_sound); + +_sound params ["_fileName", "_cfgVolume", "_pitch", ["_cfgDistance", 0]]; + +ISNILS(_volume,_cfgVolume); +ISNILS(_distance,_cfgDistance); -private _args = getArray (_cfgSound >> "sound"); -TRACE_1("playConfigSound3D args", _args); -private _pitch = (_args select 2); // Strip the first \ from the filename -private _fileName = _args select 0; -_fileName = _fileName select [1, count _fileName - 1]; -TRACE_1("playConfigSound3D filename", _fileName); +_fileName = _fileName select [1]; + +// add file extension .wss as default +if !(toLower (_fileName select [count _fileName - 4]) in [".wav", ".ogg", ".wss"]) then { + ADD(_fileName,".wss"); +}; +TRACE_5("vars",_fileName,_posASL,_volume,_pitch,_distance); playSound3D [_fileName, objNull, false, _posASL, _volume, _pitch, _distance]; diff --git a/addons/common/functions/fnc_readSettingFromModule.sqf b/addons/common/functions/fnc_readSettingFromModule.sqf index 21e7dc7e4b..0e40f55412 100644 --- a/addons/common/functions/fnc_readSettingFromModule.sqf +++ b/addons/common/functions/fnc_readSettingFromModule.sqf @@ -1,7 +1,7 @@ /* * Author: esteldunedain * Reads a setting value from a module, set it and force it. Logs if the setting is missing from the module. - * Must be called on the server, effect is global. + * Must be called on all machines!!!!!!! * * Arguments: * 0: Module @@ -16,12 +16,16 @@ * * Public: No */ +#define DEBUG_MODE_FULL #include "script_component.hpp" -if !(isServer) exitWith {}; - params ["_logic", "_settingName", "_moduleVariable"]; +// Check if the variable is already defined +if (isNil _settingName) exitWith { + ERROR_1("readSettingFromModule - param [%1] is not an ace_setting", _settingName); +}; + // Check if the parameter is defined in the module if (isNil {_logic getVariable _moduleVariable}) exitWith { WARNING_2("Warning in %1 module: %2 setting is missing. Probably an obsolete version of the module is used in the mission.",typeOf _logic,_moduleVariable); @@ -37,5 +41,10 @@ if (_value isEqualTo -1) then { }; }; -// Set the setting globally and force it -[_settingName, _value, true, true] call FUNC(setSetting); +if ([_settingName, "mission"] call CBA_settings_fnc_isForced) then { + WARNING_1("Setting [%1] - Already Forced",_settingName); +}; + +// Set the setting as a mission setting and force it +TRACE_2("setSettingMission from module",_settingName,_value); +["CBA_settings_setSettingMission", [_settingName, _value, true]] call CBA_fnc_localEvent; diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf index 5faf1f52cf..8b8a0ee9c6 100644 --- a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -14,6 +14,7 @@ * * Public: No */ +#define DEBUG_MODE_FULL #include "script_component.hpp" //paramsArray is a normal variable not a command @@ -35,12 +36,6 @@ TRACE_1("Reading missionConfigFile params",_paramsArray); ERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName); }; - private _settingData = [_settingName] call FUNC(getSettingData); - _settingData params ["", "_typeName", "", "", "", "", "_isForced"]; - - // Check if it's already forced and quit - if (_isForced) exitWith {WARNING_1("readSettingsFromParamsArray - param [%1] is already set and forced", _settingName);}; - // The setting is not forced, so update the value // Read entry and cast it to the correct type from the existing variable private _validValue = false; @@ -57,7 +52,12 @@ TRACE_1("Reading missionConfigFile params",_paramsArray); WARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]", _settingName,_settingValue,_typeName); }; - // Update the variable globaly and Force - [_settingName, _settingValue, true, true] call FUNC(setSetting); + if ([_settingName, "mission"] call CBA_settings_fnc_isForced) then { + WARNING_1("Setting [%1] - Already Forced",_settingName); + }; + + // Set the setting as a mission setting and force it + TRACE_2("setSettingMission from module",_settingName,_value); + ["CBA_settings_setSettingMission", [_settingName, _value, true]] call CBA_fnc_localEvent; }; } forEach _paramsArray; diff --git a/addons/common/functions/fnc_setSetting.sqf b/addons/common/functions/fnc_setSetting.sqf index fc2dc92339..1d98f613fd 100644 --- a/addons/common/functions/fnc_setSetting.sqf +++ b/addons/common/functions/fnc_setSetting.sqf @@ -18,68 +18,19 @@ * * Public: No */ +#define DEBUG_MODE_FULL #include "script_component.hpp" params ["_name", "_value", ["_force", false], ["_broadcastChanges", false]]; +TRACE_4("setSetting",_name,_value,_force,_broadcastChanges); -private _settingData = [_name] call FUNC(getSettingData); - -// Exit if the setting does not exist -if (_settingData isEqualTo []) exitWith { - ERROR_1("SetSetting [%1] setting does not exist", _name); +if (!isServer) exitWith {}; +if (!_broadcastChanges) exitWith { + ERROR_1("Setting [%1] - SetSetting no longer supports non-global settings",_name); }; -_settingData params ["", "_typeName", "_isClientSetable", "", "", "", "_isForced"]; - -// Exit if the setting is already forced -if (_isForced) exitWith { - INFO_1("SetSetting [%1] Trying to set forced setting", _name); +if ([_settingName, "mission"] call CBA_settings_fnc_isForced) then { + WARNING_1("Setting [%1] - Already mission forced - Ignoring",_settingName); }; -//This does NOT broadcast changes to GVAR(settings), so clients would not get updated force status -if ((missionNamespace getVariable [QEGVAR(modules,serverModulesRead), false]) && {!(_isForced isEqualTo _force)}) then { - WARNING_3("SetSetting [%1] attempting to broadcast a change to force (%2 to %3)", _name, _isForced, _force); -}; - -// If the type is not equal, try to cast it -private _failed = false; -if (typeName _value != _settingData select 1) then { - _failed = true; - if ((_typeName == "BOOL") && {_value isEqualType 0}) then { - // If value is not 0 or 1 consider it invalid and don't set anything - if (_value isEqualTo 0) then { - _value = false; - _failed = false; - }; - if (_value isEqualTo 1) then { - _value = true; - _failed = false; - }; - }; - if ((_typeName == "COLOR") && {_value isEqualType []}) then { - _failed = false; - }; -}; - -if (_failed) exitWith {ERROR_3("SetSetting [%1] bad data type expected %2 got %3", _name, _typeName, typeName _value);}; - -// Force it if it was required -_settingData set [6, _force]; - -// Exit if the value didn't change -if (_value isEqualTo (missionNamespace getVariable _name)) exitWith {}; - -// Update the variable -TRACE_2("Variable Updated",_name,_value); -missionNamespace setVariable [_name, _value]; - -if (isServer && {_broadcastChanges}) then { - // Publicize the new value - publicVariable _name; - - // Raise event globally, this publicizes eventual changes in _force status so clients can update it locally - ["ace_settingChanged", [_name, _value, _force]] call CBA_fnc_globalEvent; -} else { - // Raise event locally - ["ace_settingChanged", [_name, _value, _force]] call CBA_fnc_localEvent; -}; +[QGVAR(setSetting), [_name, _value], (format [QGVAR(setSetting_%1), _name])] call CBA_fnc_globalEventJIP; diff --git a/addons/common/functions/fnc_setSettingFromConfig.sqf b/addons/common/functions/fnc_setSettingFromConfig.sqf deleted file mode 100644 index 6308438ac8..0000000000 --- a/addons/common/functions/fnc_setSettingFromConfig.sqf +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Author: esteldunedain - * Load a setting from config if it was not previosuly forced. Force if neccesary. - * - * Arguments: - * 0: Config entry - * - * Return Value: - * None - * - * Example: - * [CONFIG] call ace_common_fnc_setSettingFromConfig - * - * Public: No - */ -#include "script_component.hpp" - -params ["_optionEntry"]; - -private _fnc_getValueWithType = { - params ["_optionEntry", "_typeName"]; - - private _valueConfig = (_optionEntry >> "value"); - private _value = if (isNumber (_optionEntry >> "value")) then {getNumber (_optionEntry >> "value")} else {0}; - TRACE_3("_fnc_getValueWithType:", configName _optionEntry, _typeName, _value); - if (_typeName == "BOOL") exitWith { - _value > 0 - }; - if (_typeName == "STRING") exitWith { - getText (_optionEntry >> "value") - }; - if (_typeName == "ARRAY") exitWith { - getArray (_optionEntry >> "value") - }; - if (_typeName == "COLOR") exitWith { - getArray (_optionEntry >> "value") - }; - _value -}; - -private _name = configName _optionEntry; - -// Check if the variable is already defined -if (isNil _name) then { - // That setting was not loaded yet - - // Get type from config - private _typeName = getText (_optionEntry >> "typeName"); - if (_typeName == "") then { - _typeName = "SCALAR"; - }; - - // Read entry and cast it to the correct type - private _value = [_optionEntry, _typeName] call _fnc_getValueWithType; - - // Init the variable - missionNamespace setVariable [_name, _value]; - - // Add the setting to a list on the server - // Set the variable to not forced - /*private _settingData = [ - name, - typeName, - isClientSettable, - localizedName, - localizedDescription, - possibleValues, - isForced, - defaultValue, - category - ];*/ - private _settingData = [ - _name, - _typeName, - (getNumber (_optionEntry >> "isClientSettable")) > 0, - "", //getText (_optionEntry >> "displayName"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText - "", //getText (_optionEntry >> "description"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText - [], //getArray (_optionEntry >> "values"), //No need to broadcast, handeled by fnc_loadSettingsLocalizedText - getNumber (_optionEntry >> "force") > 0, - _value, - "" //getText (_optionEntry >> "category") //No need to broadcast, handeled by fnc_loadSettingsLocalizedText - ]; - - //Strings in the values array won't be localized from the config, so just do that now: - /*private _values = _settingData select 5; - - { - private _text = _x; - if (((typeName _text) == "STRING") && {(count _text) > 1} && {(_text select [0,1]) == "$"}) then { - _text = localize (_text select [1, ((count _text) - 1)]); //chop off the leading $ - _values set [_forEachIndex, _text]; - }; - } forEach _values;*/ - - - GVAR(settings) pushBack _settingData; - -} else { - // The setting already exists. - - // Check if it's already forced and quit - private _settingData = [_name] call FUNC(getSettingData); - if (_settingData select 6) exitWith {}; - - // The setting is not forced, so update the value - - // Read entry and cast it to the correct type from the existing variable - private _value = [_optionEntry, _settingData select 1] call _fnc_getValueWithType; - - // Update the variable - missionNamespace setVariable [_name, _value]; - - // Force the setting if requested - if (getNumber (_optionEntry >> "force") > 0) then { - _settingData set [6, true]; - }; -}; diff --git a/addons/common/functions/fnc_statusEffect_set.sqf b/addons/common/functions/fnc_statusEffect_set.sqf index 4908da5395..27824cfe2e 100644 --- a/addons/common/functions/fnc_statusEffect_set.sqf +++ b/addons/common/functions/fnc_statusEffect_set.sqf @@ -16,7 +16,6 @@ * * Public: Yes */ -// #define DEBUG_MODE_FULL #include "script_component.hpp" params [["_object", objNull, [objNull]], ["_effectName", "", [""]], ["_ID", "", [""]], ["_set", true, [false]]]; @@ -32,7 +31,7 @@ if (isNull _object) exitWith {TRACE_1("null",_object);}; [_object, true] call FUNC(statusEffect_resetVariables); //Check for mismatch, and set object ref -//check ID case and set globaly if not already set: +//check ID case and set globally if not already set: _ID = toLower _ID; private _statusReasons = missionNamespace getVariable [(format [QGVAR(statusEffects_%1), _effectName]), []]; private _statusIndex = _statusReasons find _ID; @@ -62,9 +61,13 @@ if (_set isEqualTo (_effectBoolArray select _statusIndex)) exitWith { TRACE_2("Setting to new value",_set,_effectBoolArray select _statusIndex); _effectBoolArray set [_statusIndex, _set]; -_effectNumber = _effectBoolArray call FUNC(toBitmask); //Convert array back to number +private _newEffectNumber = _effectBoolArray call FUNC(toBitmask); //Convert array back to number -TRACE_2("Saving globaly",_effectVarName,_effectNumber); -_object setVariable [_effectVarName, _effectNumber, true]; +TRACE_2("Saving globally",_effectVarName,_newEffectNumber); +_object setVariable [_effectVarName, _newEffectNumber, true]; -[_object, _effectName] call FUNC(statusEffect_sendEffects); +if (_effectNumber == 0 || {_newEffectNumber == 0}) then { + [_object, _effectName] call FUNC(statusEffect_sendEffects); +} else { + LOG("not sending more than once"); +}; diff --git a/addons/common/functions/fnc_switchPersistentLaser.sqf b/addons/common/functions/fnc_switchPersistentLaser.sqf new file mode 100644 index 0000000000..5ba9d5ce05 --- /dev/null +++ b/addons/common/functions/fnc_switchPersistentLaser.sqf @@ -0,0 +1,65 @@ +/* + * Author: Dystopian + * Controls persistent laser state. + * + * Arguments: + * 0: Enabled + * + * Return Value: + * None + * + * Example: + * true call ace_common_fnc_switchPersistentLaser + * + * Public: No + */ +#include "script_component.hpp" + +params ["_enabled"]; + +if (!_enabled) exitWith { + if (isNil QGVAR(laserKeyDownEH)) exitWith {}; + ["KeyDown", GVAR(laserKeyDownEH)] call CBA_fnc_removeDisplayHandler; + ["weapon", GVAR(laserWeaponEH)] call CBA_fnc_removePlayerEventHandler; + ["turret", GVAR(laserTurretEH)] call CBA_fnc_removePlayerEventHandler; + ["vehicle", GVAR(laserVehicleEH)] call CBA_fnc_removePlayerEventHandler; +}; + +GVAR(laserKeyDownEH) = ["KeyDown", { + if !((_this select 1) in actionKeys "headlights") exitWith {false}; + private _weapon = currentWeapon ACE_player; + [ + { + params ["_weapon", "_laserWasEnabled"]; + private _laserEnabled = ACE_player isIRLaserOn _weapon || {ACE_player isFlashlightOn _weapon}; + if (_laserEnabled && {_laserWasEnabled} || {!_laserEnabled && {!_laserWasEnabled}}) exitWith {}; + private _weaponIndex = [ACE_player, _weapon] call FUNC(getWeaponIndex); + ACE_player setVariable [QGVAR(laserEnabled_) + str _weaponIndex, [nil, true] select _laserEnabled]; + }, + [_weapon, ACE_player isIRLaserOn _weapon || {ACE_player isFlashlightOn _weapon}] + ] call CBA_fnc_execNextFrame; + false +}] call CBA_fnc_addDisplayHandler; + +private _laserEH = { + if (sunOrMoon > 0.5) exitWith {}; + params ["_player"]; + private _weaponIndex = [_player, currentWeapon _player] call FUNC(getWeaponIndex); + if ( + !(_player getVariable [QGVAR(laserEnabled_) + str _weaponIndex, false]) + || {_weaponIndex > 0 && {"" != primaryWeapon _player}} // Arma switches to primary weapon if exists + || {!(_player call CBA_fnc_canUseWeapon)} // ignore in vehicle except FFV + ) exitWith {}; + [ + // wait for weapon in "ready to fire" direction + {0.01 > getCameraViewDirection _this vectorDistance (_this weaponDirection currentWeapon _this)}, + {{_this action [_x, _this]} forEach ["GunLightOn", "IRLaserOn"]}, + _player, + 3, + {{_this action [_x, _this]} forEach ["GunLightOn", "IRLaserOn"]} + ] call CBA_fnc_waitUntilAndExecute; +}; + +GVAR(laserWeaponEH) = ["weapon", _laserEH] call CBA_fnc_addPlayerEventHandler; +GVAR(laserTurretEH) = ["turret", _laserEH] call CBA_fnc_addPlayerEventHandler; +GVAR(laserVehicleEH) = ["vehicle", _laserEH] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/common/script_component.hpp b/addons/common/script_component.hpp index aaa0045a41..9eb8af601f 100644 --- a/addons/common/script_component.hpp +++ b/addons/common/script_component.hpp @@ -33,4 +33,4 @@ "wood", "wood_int", "int_wood", "softwood_exp", "int_softwood_exp", "int_solidwood_exp" \ ] -#define DIG_SURFACE_WHITELIST ["grass"] +#define DIG_SURFACE_WHITELIST ["grass", "grasstall_exp", "forest_exp"] diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index ad1aad793d..51c9d3c6ff 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -1,6 +1,14 @@  + + Common + Allgemein + Comuni + 全般 + 通用 + 通用 + ACE-Team ACE-Team @@ -363,7 +371,7 @@ [ACE] Itens diversos [ACE] Egyéb tárgyak [ACE] Oggetti vari - [ACE] その他のアイテム + [ACE] その他アイテム [ACE] 기타 물품. [ACE] 雜項 [ACE] 杂项 @@ -494,6 +502,27 @@ 拒絕由其他玩家送出的請求。包含使用/共享裝備與執行特定動作。 拒绝由其他玩家送出的请求。包含使用/共享装备与执行特定动作。 + + Check PBO Action + Controlla Azioni PBO + 檢查PBO動作 + 检查PBO动作 + PBO 検査の挙動 + + + Check PBO All + Controlla Tutti i PBO + 檢查所有PBO + 检查所有PBO + PBO 全てを検査 + + + Check PBO Whitelist + Controlla Whitelist PBO + 檢查PBO白名單 + 检查PBO白名单 + 許可リスト内の PBO を検査 + Feedback icons Rückmeldungssymbole @@ -622,6 +651,18 @@ 設定ACE提示文字的顏色。若提示字體並無指定其他顏色,將會自動選用ACE系統的預設顏色。 设定ACE提示文字的颜色。若提示字体并无指定其他颜色,将会自动选用ACE系统的预设颜色。 + + Persistent weapon laserpointer/flashlight + Автоматический ЛЦУ/тактический фонарь + 武器のレーザー ポインタ/フラッシュライトの永続 + Laser/torcia dell'arma costantemente accesi + + + Enable gunlight after weapon switch or vehicle enter/exit if it was previously enabled. + Включать ЛЦУ/тактический фонарь после смены оружия или входа/выхода из машины, если он был до этого включен. + 銃のライト等を点けていると武器を切り替えた後や車両を乗り降りしても、ライト等を点けたままにします。 + Abilita la torcia/laser dopo il cambio dell'arma o l'entrata/uscita del veicolo se precedentemente attiva. + Banana Banane @@ -712,7 +753,7 @@ Mi legyen azokkal a személyekkel, akiknek nincsenek meg a helyes PBO-k? Что делать с игроками с неправильными аддонами? Cosa fare con giocatori che non hanno i PBO corretti? - プレイヤーが正しい PBO を持っていない場合は? + プレイヤーが正しい PBO を持っていない場合は? 올바르지 않는 PBO를 가진 사람을 어떻게 할까요? 若玩家沒有正確的PBO檔時,將採取何種動作? 若玩家没有正确的PBO档时,将采取何种动作? @@ -744,7 +785,7 @@ Figyelmeztetés (tartós) Предупреждать (постоянно) Avverti (permanente) - 警告(永久的) + 警告 (永久的) 경고 (영구적) 警告 (持續) 警告 (持续) @@ -792,7 +833,7 @@ Az összes bővítmény ellenőrzése, csak az ACE helyett? Проверять все аддоны, а не только ACE? Controlla tutti gli addon invece dei soli addon ACE? - ACE MOD の代わりに全アドオンを検査しますか? + ACE MOD の代わりに全アドオンを検査しますか? ACE를 제외한 모든 모드를 검사할까요? 檢查包含ACE之外的其他模組? 检查包含ACE之外的其他模组? @@ -824,7 +865,7 @@ Milyen bővítmények vannak feltétlenül engedélyezve? Какие аддоны дополнительно разрешены? Quali addon sono permessi in ogni caso? - どのようなアドオンを許可しますか? + どのようなアドオンを許可しますか? 허가되는 에드온은 어느것입니까? 哪些模組是可被允許/忽略的? 哪些模组是可被允许/忽略的? @@ -1050,94 +1091,94 @@ 不要强行 - ACE3 Equipment - ACE-Ausrüstung - ACE3 Wyposażenie - Equipamentos ACE3 - ACE3 Снаряжение - ACE3 Vybavení - ACE3 Equipo - Equipaggiamento ACE3 - ACE3 Equipement - ACE3 装備 - ACE3 장비 - ACE3 裝備按鍵 - ACE3 装备按键 + ACE Equipment + ACE Ausrüstung + ACE Wyposażenie + ACE Equipamentos + ACE Снаряжение + ACE Vybavení + ACE Equipo + ACE Equipaggiamento + ACE Equipement + ACE 装備 + ACE 장비 + ACE 裝備按鍵 + ACE 装备按键 - ACE3 Common - ACE3 Allgemein - ACE3 Ogólne - Comum ACE3 - ACE3 Общие - ACE3 Común - ACE3 Obecné - Comune ACE3 - ACE3 Commun - ACE3 全般 - ACE3 일반 - ACE3 通用按鍵 - ACE3 通用按键 + ACE Common + ACE Allgemein + ACE Ogólne + ACE Comum + ACE Общие + ACE Común + ACE Obecné + ACE Comune + ACE Commun + ACE 全般 + ACE 일반 + ACE 通用按鍵 + ACE 通用按键 - ACE3 Weapons - ACE3 Waffen - ACE3 Broń - Armamento ACE3 - ACE3 Оружие - ACE3 Zbraně - ACE3 Armas - Armi ACE3 - ACE3 Armes - ACE3 武器 - ACE3 무기 - ACE3 武器按鍵 - ACE3 武器按键 + ACE Weapons + ACE Waffen + ACE Broń + ACE Armamento + ACE Оружие + ACE Zbraně + ACE Armas + ACE Armi + ACE Armes + ACE 武器 + ACE 무기 + ACE 武器按鍵 + ACE 武器按键 - ACE3 Movement - ACE3 Bewegung - ACE3 Ruch - Movimento ACE3 - ACE3 Перемещение - ACE3 Movimiento - ACE3 Pohyb - Movimento ACE3 - ACE3 Mouvement - ACE3 移動 - ACE3 움직임 - ACE3 動作按鍵 - ACE3 动作按键 + ACE Movement + ACE Bewegung + ACE Ruch + ACE Movimento + ACE Перемещение + ACE Movimiento + ACE Pohyb + ACE Movimento + ACE Mouvement + ACE 移動 + ACE 움직임 + ACE 動作按鍵 + ACE 动作按键 - ACE3 Scope Adjustment - ACE3 Visiereinstellung - ACE3 Regulacja optyki - Ajuste de luneta ACE3 - ACE3 Прицелы - ACE3 Nastavení optiky - ACE3 Ajuste de miras - Regolazione Ottiche ACE3 - ACE3 Ajustement de la lunette - ACE3 スコープ調節 - ACE3 조준경 조정 - ACE3 瞄準鏡調節按鍵 - ACE3 瞄准镜调节按键 + ACE Scope Adjustment + ACE Visiereinstellung + ACE Regulacja optyki + ACE Ajuste de luneta + ACE Прицелы + ACE Nastavení optiky + ACE Ajuste de miras + ACE Regolazione Ottiche + ACE Ajustement de la lunette + ACE スコープ調節 + ACE 조준경 조정 + ACE 瞄準鏡調節按鍵 + ACE 瞄准镜调节按键 - ACE3 Vehicles - ACE3 Fahrzeuge - ACE3 Pojazdy - Veículos ACE3 - ACE3 Транспорт - ACE3 Vozidla - ACE3 Vehículos - Veicoli ACE3 - ACE3 Vehicules - ACE3 車両 - ACE3 차량 - ACE3 載具按鍵 - ACE3 载具按键 + ACE Vehicles + ACE Fahrzeuge + ACE Pojazdy + ACE Veículos + ACE Транспорт + ACE Vozidla + ACE Vehículos + ACE Veicoli + ACE Vehicules + ACE 車両 + ACE 차량 + ACE 載具按鍵 + ACE 载具按键 No Room to unload @@ -1170,5 +1211,21 @@ 切換 切换 + + Weight: + Gewicht: + Peso: + Poids : + Waga: + Váha: + Peso: + Peso: + Súly: + Вес: + 重量: + 무게: + 重量: + 重量: + diff --git a/addons/concertina_wire/CfgEventHandlers.hpp b/addons/concertina_wire/CfgEventHandlers.hpp index 80711b5390..b0ff603096 100644 --- a/addons/concertina_wire/CfgEventHandlers.hpp +++ b/addons/concertina_wire/CfgEventHandlers.hpp @@ -40,12 +40,12 @@ class Extended_Init_EventHandlers { }; class ACE_ConcertinaWire { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_init)); + init = QUOTE(call FUNC(handleInit)); }; }; class Land_Razorwire_F { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_init)); + init = QUOTE(call FUNC(handleInit)); }; }; }; diff --git a/addons/concertina_wire/XEH_PREP.hpp b/addons/concertina_wire/XEH_PREP.hpp index 34a666a6b9..5fffc24969 100644 --- a/addons/concertina_wire/XEH_PREP.hpp +++ b/addons/concertina_wire/XEH_PREP.hpp @@ -3,5 +3,6 @@ PREP(deploy); PREP(dismount); PREP(dismountSuccess); PREP(handleDamage); +PREP(handleInit); PREP(handleKilled); PREP(vehicleDamage); diff --git a/addons/concertina_wire/XEH_init.sqf b/addons/concertina_wire/XEH_init.sqf deleted file mode 100644 index b24353b4df..0000000000 --- a/addons/concertina_wire/XEH_init.sqf +++ /dev/null @@ -1,3 +0,0 @@ -#include "script_component.hpp" -params ["_wire"]; -_wire addEventHandler ["HandleDamage", {call FUNC(handleDamage)}]; diff --git a/addons/concertina_wire/functions/fnc_deploy.sqf b/addons/concertina_wire/functions/fnc_deploy.sqf index 6dc05b365d..6782f64342 100644 --- a/addons/concertina_wire/functions/fnc_deploy.sqf +++ b/addons/concertina_wire/functions/fnc_deploy.sqf @@ -65,6 +65,7 @@ GVAR(deployPFH) = [{ }, 0, [_wireNoGeo, _wire, _anim, _dir, _wireNoGeoPos]] call CBA_fnc_addPerFrameHandler; [_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler); + [_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); call EFUNC(interaction,hideMouseHint); [_idPFH] call CBA_fnc_removePerFrameHandler; @@ -78,6 +79,8 @@ GVAR(deployPFH) = [{ [localize "STR_ACE_ROLLWIRE", "", ""] call EFUNC(interaction,showMouseHint); +[_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); + GVAR(placer) setVariable [QGVAR(Deploy), [GVAR(placer), "DefaultAction", {GVAR(deployPFH) != -1}, diff --git a/addons/concertina_wire/functions/fnc_handleInit.sqf b/addons/concertina_wire/functions/fnc_handleInit.sqf new file mode 100644 index 0000000000..d547a09463 --- /dev/null +++ b/addons/concertina_wire/functions/fnc_handleInit.sqf @@ -0,0 +1,18 @@ +/* + * Author: Rocko + * Handles wire Init + * + * Arguments: + * 0: wire + * + * Return Value: + * None + * + * Example: + * [wire] call ace_concertina_wire_fnc_handleInit + * + * Public: No + */ +#include "script_component.hpp" +params ["_wire"]; +_wire addEventHandler ["HandleDamage", {call FUNC(handleDamage)}]; diff --git a/addons/cookoff/ACE_Settings.hpp b/addons/cookoff/ACE_Settings.hpp index 13ef915ffb..b06aaf7b9a 100644 --- a/addons/cookoff/ACE_Settings.hpp +++ b/addons/cookoff/ACE_Settings.hpp @@ -1,27 +1,40 @@ class ACE_Settings { class GVAR(enable) { + category = CSTRING(displayName); displayName = CSTRING(enable_name); description = CSTRING(enable_tooltip); value = 1; typeName = "BOOL"; }; class GVAR(enableAmmobox) { + category = CSTRING(displayName); displayName = CSTRING(enableBoxCookoff_name); description = CSTRING(enableBoxCookoff_tooltip); value = 1; typeName = "BOOL"; }; class GVAR(enableAmmoCookoff) { // For CBA Setting Switch: we can eliminate and just use (ammoCookoffDuration == 0) + category = CSTRING(displayName); displayName = CSTRING(enableAmmoCookoff_name); description = CSTRING(enableAmmoCookoff_tooltip); value = 1; typeName = "BOOL"; }; class GVAR(ammoCookoffDuration) { + category = CSTRING(displayName); displayName = CSTRING(ammoCookoffDuration_name); description = CSTRING(ammoCookoffDuration_tooltip); value = 1; typeName = "SCALAR"; + sliderSettings[] = {0, 5, 1, 1}; + }; + class GVAR(probabilityCoef) { + category = CSTRING(displayName); + displayName = CSTRING(probabilityCoef_name); + description = CSTRING(probabilityCoef_tooltip); + value = 1; + typeName = "SCALAR"; + sliderSettings[] = {0, 5, 1, 1}; }; }; diff --git a/addons/cookoff/CfgEden.hpp b/addons/cookoff/CfgEden.hpp index aa550a9228..04e7762a41 100644 --- a/addons/cookoff/CfgEden.hpp +++ b/addons/cookoff/CfgEden.hpp @@ -11,8 +11,18 @@ class Cfg3DEN { tooltip = CSTRING(enable_tooltip); expression = QUOTE(if !(_value) then {_this setVariable [ARR_3('%s',_value,true)];};); typeName = "BOOL"; + condition = "objectVehicle"; + defaultValue = QUOTE(GETMVAR(QGVAR(enable),true)); + }; + class GVAR(enableAmmoCookoff) { + property = QGVAR(enableAmmoCookoff); + control = "Checkbox"; + displayName = CSTRING(enableAmmoCookoff_name); + tooltip = CSTRING(enableAmmoCookoff_tooltip); + expression = QUOTE(if !(_value) then {_this setVariable [ARR_3('%s',_value,true)];};); + typeName = "BOOL"; condition = "objectHasInventoryCargo"; - defaultValue = "(true)"; // fix pbo project preprocessing bug + defaultValue = QUOTE(if (_this isKindOf 'ReammoBox_F') then { GETMVAR(QGVAR(enableAmmobox),true) } else { GETMVAR(QGVAR(enableAmmoCookoff),true) };); }; }; }; diff --git a/addons/cookoff/CfgVehicles.hpp b/addons/cookoff/CfgVehicles.hpp index 7d82d97c12..7a682ca9d0 100644 --- a/addons/cookoff/CfgVehicles.hpp +++ b/addons/cookoff/CfgVehicles.hpp @@ -37,6 +37,7 @@ class CfgVehicles { class Tank_F: Tank { GVAR(ammoLocation) = "HitHull"; GVAR(cookoffSelections)[] = {"poklop_gunner","poklop_commander"}; + GVAR(probability) = 0.5; }; class MBT_02_base_F: Tank_F { GVAR(ammoLocation) = "HitTurret"; @@ -46,11 +47,19 @@ class CfgVehicles { class Wheeled_APC_F: Car_F { GVAR(ammoLocation) = "HitHull"; GVAR(cookoffSelections)[] = {"poklop_gunner","poklop_commander"}; + GVAR(probability) = 0.8; // big explosions for wheeled APCs (same as for tanks) explosionEffect = "FuelExplosionBig"; }; + class APC_Wheeled_02_base_F: Wheeled_APC_F { // Otokar ARMA - RCWS Turret + GVAR(ignoreTurret) = 1; + }; + class APC_Tracked_01_base_F: Tank_F { // Namera, Nemmera - RCWS Turret + GVAR(ignoreTurret) = 1; + }; + class B_MBT_01_base_F; class B_MBT_01_cannon_F: B_MBT_01_base_F { GVAR(turret)[] = {QGVAR(Turret_MBT_01),{0,-1,0.5}}; diff --git a/addons/cookoff/XEH_postInit.sqf b/addons/cookoff/XEH_postInit.sqf index b7bed03475..fad901982d 100644 --- a/addons/cookoff/XEH_postInit.sqf +++ b/addons/cookoff/XEH_postInit.sqf @@ -71,7 +71,7 @@ GVAR(cacheTankDuplicates) = call CBA_fnc_createNamespace; ["ReammoBox_F", "init", { (_this select 0) addEventHandler ["HandleDamage", { - if ((_this select 0) getVariable [QGVAR(enable), GVAR(enableAmmobox)]) then { + if ((_this select 0) getVariable [QGVAR(enableAmmoCookoff), GVAR(enableAmmobox)]) then { ["box", _this] call FUNC(handleDamage); }; }]; diff --git a/addons/cookoff/functions/fnc_cookOffBox.sqf b/addons/cookoff/functions/fnc_cookOffBox.sqf index 4e509e3194..1f2c0b3b90 100644 --- a/addons/cookoff/functions/fnc_cookOffBox.sqf +++ b/addons/cookoff/functions/fnc_cookOffBox.sqf @@ -44,11 +44,9 @@ if (local _box) then { // These functions are smart and do all the cooking off work if (local _box) then { - if (_box getVariable [QGVAR(enableAmmoCookoff), GVAR(enableAmmoCookoff)]) then { - if (GVAR(ammoCookoffDuration) == 0) exitWith {}; - ([_box] call FUNC(getVehicleAmmo)) params ["_mags", "_total"]; - [_box, _mags, _total] call FUNC(detonateAmmunition); - }; + if (GVAR(ammoCookoffDuration) == 0) exitWith {}; + ([_box] call FUNC(getVehicleAmmo)) params ["_mags", "_total"]; + [_box, _mags, _total] call FUNC(detonateAmmunition); // This shit is busy being on fire, magazines aren't accessible/usable clearMagazineCargoGlobal _box; diff --git a/addons/cookoff/functions/fnc_handleDamage.sqf b/addons/cookoff/functions/fnc_handleDamage.sqf index a1724db961..d9fbaf4cef 100644 --- a/addons/cookoff/functions/fnc_handleDamage.sqf +++ b/addons/cookoff/functions/fnc_handleDamage.sqf @@ -66,12 +66,23 @@ if (_simulationType == "tank") exitWith { // ammo was hit, high chance for cook-off if (_hitpoint == _ammoLocationHitpoint) then { - if (_damage > 0.5 && {random 1 < 0.7}) then { - _vehicle call FUNC(cookOff); + if (_damage > 0.5) then { + // get cookoff probability for vehicle + private _probability = [_vehicle call CBA_fnc_getObjectConfig >> QGVAR(probability), "number", 0.7] call CBA_fnc_getConfigEntry; + // probability multiplied by coef for global probability control (higher coef = more probable cookoff) + if (GVAR(probabilityCoef) > 1) then { + _probability = 1 - (1 - _probability) / GVAR(probabilityCoef); + } else { + _probability = _probability * GVAR(probabilityCoef); + }; + if (random 1 < _probability) then { + _vehicle call FUNC(cookOff); + }; }; } else { - if (_hitpoint in ["hithull", "hitturret", "#structural"] && {_newDamage > 0.6 + random 0.3}) then { - _vehicle call FUNC(cookOff); + if (_hitpoint in ["hithull", "hitturret", "#structural"] && {_newDamage > 0.8 + random 0.2}) then { + if ((_hitpoint == "hitturret") && {(getNumber (_vehicle call CBA_fnc_getObjectConfig >> QGVAR(ignoreTurret))) == 1}) exitWith {}; // ignore turrets like RCWS + _vehicle setDamage 1; }; }; diff --git a/addons/cookoff/stringtable.xml b/addons/cookoff/stringtable.xml index c75961708e..79db993245 100644 --- a/addons/cookoff/stringtable.xml +++ b/addons/cookoff/stringtable.xml @@ -1,6 +1,13 @@  + + Cook off + Esplosione + 殉爆效果 + 殉爆效果 + 誘爆 + Enable cook off Selbstzündung ermöglichen @@ -39,7 +46,7 @@ Wreck (Turret) Ruínas (torre) 잔해(포탑) - 残骸(タレット) + 残骸 (砲塔) 殘骸 (砲塔) 残骸 (炮塔) @@ -78,7 +85,7 @@ Enables Ammunition cook off. Fires ammunition projectiles while vehicle is on fire and has ammunition. - 弾薬が誘爆します。車両が燃えると、搭載している弾薬が激しく燃え上がりす。 + 弾薬が誘爆します。車両が燃えると、搭載している弾薬が激しく燃え上がります。 Ermöglicht Selbstzündung von Munition. Feuert Projektile der Munition ab, solange das Fahrzeug brennt und Munition besitzt. Aktywuje samozapłon amunicji. Wystrzeliwuje pociski podczas gdy pojazd płonie i posiada amunicję. Mets à feu les munitions lorsqu'un véhicule est en feu et contient des munitions. @@ -109,5 +116,15 @@ 设定弹药殉爆效果会持续多久时间 [输入0来关闭殉爆效果] 쿡오프 지속 시간의 배수 [0 이면 비활성] + + Cook-off probability coefficient + 誘爆の可能性係数 + Coefficiente probabilità esplosione + + + Multiplier for cook-off probability. Higher value results in higher cook-off probability + 誘爆する可能性の乗数。高い値では誘爆する可能性が高まります。 + Moltiplicatore per la probabilità dell'esplosione. Un valore più alto aumenta la probabilità dell'esplosione + diff --git a/addons/dagr/CfgWeapons.hpp b/addons/dagr/CfgWeapons.hpp index 0d6ec3951f..55692e7f9a 100644 --- a/addons/dagr/CfgWeapons.hpp +++ b/addons/dagr/CfgWeapons.hpp @@ -4,7 +4,7 @@ class CfgWeapons { class CBA_MiscItem_ItemInfo; class ACE_DAGR: ACE_ItemCore { - author[] = {$STR_ACE_Common_ACETeam, "Ruthberg"}; + author = ECSTRING(common,ACETeam); scope = 2; displayName = CSTRING(Name); model = QPATHTOF(data\DAGR.p3d); diff --git a/addons/dogtags/XEH_postInit.sqf b/addons/dogtags/XEH_postInit.sqf index 6a50ce61cf..02d2db862b 100644 --- a/addons/dogtags/XEH_postInit.sqf +++ b/addons/dogtags/XEH_postInit.sqf @@ -46,5 +46,35 @@ if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then { }; }; +if (["ACE_Arsenal"] call EFUNC(common,isModLoaded)) then { + [QEGVAR(arsenal,rightPanelFilled), { + + params ["_display", "_leftPanelIDC", "_rightPanelIDC"]; + + if (_leftPanelIDC in [2010, 2012, 2014] && {_rightPanelIDC == 38}) then { + LOG("passed"); + private _rightPanel = _display displayCtrl 15; + (lnbSize _rightPanel) params ["_rows", "_columns"]; + + private _allDogtags = missionNameSpace getVariable [QGVAR(allDogtags), []]; + private _allDogtagDatas = missionNameSpace getVariable [QGVAR(allDogtagDatas), []]; + + for "_r" from 0 to (_rows - 1) do { + private _data = _rightPanel lnbData [_r, 0]; + + if (_data isKindOf ["ACE_dogtag", (configFile >> "CfgWeapons")]) then { + + private _dogtagData = []; + private _index = _allDogtags find _data; + _dogtagData = _allDogtagDatas select _index; + private _dogtagString = [localize LSTRING(itemName), ": ", (_dogtagData select 0)] joinString ""; + + _rightPanel lnbSetText [[_r, 1], _dogtagString]; + }; + }; + }; + }] call CBA_fnc_addEventHandler; +}; + // disable dogtags for civilians "CIV_F" call FUNC(disableFactionDogtags); diff --git a/addons/dogtags/stringtable.xml b/addons/dogtags/stringtable.xml index e47a0ae1b7..a60f325652 100644 --- a/addons/dogtags/stringtable.xml +++ b/addons/dogtags/stringtable.xml @@ -58,7 +58,7 @@ Zabrałeś nieśmiertelnik %1... Жетон снят с %1... Sebral jsem známku od %1... - %1からドッグ タグを取っている・・・ + %1からドッグ タグを取っています・・・ Hundemarke von %1 genommen ... %1로부터 군번줄을 회수했습니다... Plaque d'identification pris sur %1... @@ -71,7 +71,7 @@ Ktoś już zabrał ten nieśmiertelnik... Кто-то уже забрал жетон... Někdo jiný už vzal identifikační známku... - すでに誰かがドッグ タグを取っているようだ・・・ + すでに誰かがドッグ タグを取っていったようだ・・・ Jemand anderes hat bereits die Hundemarke genommen ... 누군가 이미 군번줄을 회수해갔습니다... Quelqu'un d'autre a déjâ pris les plaques d'identification... diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index 007f54adef..6553c84929 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -46,6 +46,8 @@ if (_target isKindOf "CAManBase") then { _unit removeWeapon "ACE_FakePrimaryWeapon"; +[_unit, "blockThrow", "ACE_dragging", false] call EFUNC(common,statusEffect_set); + // prevent object from flipping inside buildings if (_inBuilding) then { _target setPosASL (getPosASL _target vectorAdd [0, 0, 0.05]); diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf index c3521bbed0..857e64bb7a 100644 --- a/addons/dragging/functions/fnc_dropObject_carry.sqf +++ b/addons/dragging/functions/fnc_dropObject_carry.sqf @@ -51,6 +51,7 @@ _unit removeWeapon "ACE_FakePrimaryWeapon"; _unit selectWeapon primaryWeapon _unit; [_unit, "forceWalk", "ACE_dragging", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_dragging", false] call EFUNC(common,statusEffect_set); // prevent object from flipping inside buildings if (_inBuilding) then { diff --git a/addons/dragging/functions/fnc_startCarry.sqf b/addons/dragging/functions/fnc_startCarry.sqf index 7a5341b8a8..1a53a06994 100644 --- a/addons/dragging/functions/fnc_startCarry.sqf +++ b/addons/dragging/functions/fnc_startCarry.sqf @@ -58,6 +58,8 @@ if (_target isKindOf "CAManBase") then { }; +[_unit, "blockThrow", "ACE_dragging", true] call EFUNC(common,statusEffect_set); + // prevent multiple players from accessing the same object [_unit, _target, true] call EFUNC(common,claim); diff --git a/addons/dragging/functions/fnc_startDrag.sqf b/addons/dragging/functions/fnc_startDrag.sqf index 378128862a..8cf552e3d1 100644 --- a/addons/dragging/functions/fnc_startDrag.sqf +++ b/addons/dragging/functions/fnc_startDrag.sqf @@ -35,6 +35,8 @@ if (primaryWeapon _unit == "") then { // select primary, otherwise the drag animation actions don't work. _unit selectWeapon primaryWeapon _unit; +[_unit, "blockThrow", "ACE_dragging", true] call EFUNC(common,statusEffect_set); + // prevent multiple players from accessing the same object [_unit, _target, true] call EFUNC(common,claim); diff --git a/addons/explosives/ACE_Settings.hpp b/addons/explosives/ACE_Settings.hpp index e103b6e018..dbde3ea19b 100644 --- a/addons/explosives/ACE_Settings.hpp +++ b/addons/explosives/ACE_Settings.hpp @@ -1,17 +1,20 @@ class ACE_Settings { class GVAR(requireSpecialist) { + category = CSTRING(Menu); displayName = CSTRING(RequireSpecialist_DisplayName); description = CSTRING(RequireSpecialist_Description); value = 0; typeName = "BOOL"; }; class GVAR(punishNonSpecialists) { + category = CSTRING(Menu); displayName = CSTRING(PunishNonSpecialists_DisplayName); description = CSTRING(PunishNonSpecialists_Description); value = 1; typeName = "BOOL"; }; class GVAR(explodeOnDefuse) { + category = CSTRING(Menu); displayName = CSTRING(ExplodeOnDefuse_DisplayName); description = CSTRING(ExplodeOnDefuse_Description); value = 1; diff --git a/addons/explosives/CfgModule.hpp b/addons/explosives/CfgModule.hpp index a4e0d8dbd2..081df5d72d 100644 --- a/addons/explosives/CfgModule.hpp +++ b/addons/explosives/CfgModule.hpp @@ -4,7 +4,7 @@ class ACE_ModuleExplosive: ACE_Module { category = "ACE"; displayName = CSTRING(Module_DisplayName); function = QFUNC(module); - scope = 2; + scope = 1; isGlobal = 1; isSingular = 1; icon = QPATHTOF(UI\Icon_Module_Explosives_ca.paa); diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp index 4eca355909..9296813ee5 100644 --- a/addons/explosives/CfgWeapons.hpp +++ b/addons/explosives/CfgWeapons.hpp @@ -18,6 +18,7 @@ class CfgWeapons { class ACE_Clacker: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(clacker_displayName); descriptionShort = CSTRING(clacker_description); picture = QPATHTOF(Data\UI\Clacker.paa); @@ -32,6 +33,7 @@ class CfgWeapons { }; }; class ACE_M26_Clacker: ACE_Clacker { + author = ECSTRING(common,ACETeam); displayName = CSTRING(M152_Clacker_displayName); picture = QPATHTOF(Data\UI\MK26_Transmitter_ca.paa); GVAR(Range) = 5000; @@ -39,6 +41,7 @@ class CfgWeapons { }; class ACE_DefusalKit: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(DefusalKit_displayName); descriptionShort = CSTRING(DefusalKit_description); picture = QPATHTOF(Data\UI\Pliers.paa); @@ -51,6 +54,7 @@ class CfgWeapons { }; class ACE_DeadManSwitch: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(DeadManSwitch_displayName); descriptionShort = CSTRING(DeadManSwitch_description); picture = QPATHTOF(Data\UI\DeadmanSwitch.paa); @@ -66,6 +70,7 @@ class CfgWeapons { }; class ACE_Cellphone: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(cellphone_displayName); descriptionShort = CSTRING(cellphone_description); picture = QPATHTOF(Data\UI\Cellphone_UI.paa); diff --git a/addons/explosives/functions/fnc_module.sqf b/addons/explosives/functions/fnc_module.sqf index cbe7c3e2ad..f6a486591a 100644 --- a/addons/explosives/functions/fnc_module.sqf +++ b/addons/explosives/functions/fnc_module.sqf @@ -15,8 +15,6 @@ */ #include "script_component.hpp" -if !(isServer) exitWith {}; - params ["_logic"]; [_logic, QGVAR(RequireSpecialist), "RequireSpecialist"] call EFUNC(Common,readSettingFromModule); diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index 33d304609e..6e356a6f8d 100644 --- a/addons/explosives/functions/fnc_setupExplosive.sqf +++ b/addons/explosives/functions/fnc_setupExplosive.sqf @@ -31,6 +31,7 @@ private _p3dModel = getText (configFile >> "CfgVehicles" >> _setupObjectClass >> if (_p3dModel == "") exitWith {ERROR("No Model");}; //"" - will crash game! [_unit, "forceWalk", "ACE_Explosives", true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Explosives", true] call EFUNC(common,statusEffect_set); //Show mouse buttons: [localize LSTRING(PlaceAction), localize LSTRING(CancelAction), localize LSTRING(ScrollAction)] call EFUNC(interaction,showMouseHint); @@ -149,6 +150,7 @@ GVAR(TweakedAngle) = 0; GVAR(pfeh_running) = false; [_unit, "forceWalk", "ACE_Explosives", false] call EFUNC(common,statusEffect_set); + [_unit, "blockThrow", "ACE_Explosives", false] call EFUNC(common,statusEffect_set); [] call EFUNC(interaction,hideMouseHint); [_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler); [_unit, "zoomtemp", (_unit getVariable [QGVAR(cancelActionEH), -1])] call EFUNC(common,removeActionEventHandler); diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 56b73d0d4e..2ca36bcdc1 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -154,7 +154,7 @@ Obrót Rotaciona Bращать - 向きを変える + 回転 회전 旋转 旋轉 @@ -474,7 +474,7 @@ Robbanóanyag hatástalanítása... Desarmando Explosivo... Обезвреживание... - 爆発物を無力化中・・・ + 爆発物を無力化しています・・・ 폭발물 해체중... 炸弹拆除中... 炸彈拆除中... @@ -634,7 +634,7 @@ Infravörös szenzor (Side Attack) Sensor infravermelho (ataque lateral) ИК сенсор (детонация вбок) - 赤外線感知式 (横からの攻撃) + 赤外線感知式 (側面攻撃) 적외선 센서 (측면 공격) 红外线感应器 (侧边攻击) 紅外線感應器 (側邊攻擊) @@ -650,7 +650,7 @@ Mágneses mező érzékelő (Bottom Attack) Influência magnética (ataque inferior) Магнитный сенсор (детонация вверх) - 磁気感知式 (下からの攻撃) + 磁気感知式 (底面攻撃) 자기장 감지센서 (바닥 공격) 磁性感应器 (底部攻击) 磁性感應器 (底部攻擊) @@ -746,7 +746,7 @@ Specialisták igénylése? Требуется специалист? Richiedi specialisti? - 特技兵を必要としますか? + 特技兵を必要としますか? 전문가가 필요합니까? 需要专家? 需要專家? @@ -762,7 +762,7 @@ Szükséges-e egy specialista a robbanóanyagok hatástalanításához? Alapértelmezett: Nem Требуется ли специалист по минному делу для обезвреживания взрывчатки? По-умолчанию: Нет Richiedi specialisti esplosivi per disabilitare esplosivi? Default: No - 爆発物を無効化するには、爆発物の特技兵を必要としますか?標準: いいえ + 爆発物を無効化するには、爆発物の特技兵を必要としますか? 標準: 無効化 폭발물을 해제하기 위해서는 전문가가 필요합니까? 기본설정: 아니요 需要炸弹专家才能拆除炸弹? 预设: 否 需要炸彈專家才能拆除炸彈? 預設: 否 @@ -778,7 +778,7 @@ Nem-specialisták büntetése? Штраф не-специалистам? Punisci non-specialisti? - 非特技兵へ足かせを与えますか? + 非特技兵へ足かせを与えますか? 비-전문가에 불이익을 줍니까? 折磨非专业人员? 折磨非專業人員? @@ -794,7 +794,7 @@ Nem-specialisták esetén több ideig tartson a cselekvés befejezése? Alapértelmezett: Igen Увеличивать время завершения действий для не-специалистов? По-умолчанию: Нет Aumenta il tempo richiesto per completare azioni per non-specialisti? Default: Si - 非特技兵へ動作完了までの時間を増加させますか?標準: はい + 非特技兵へ動作完了までの時間を増加させますか? 標準: 有効化 비-전문가가 폭발물을 해제시 더욱 많은 시간을 소요합니까? 기본설정: 예 增加非专业人员相关操作的时间? 预设: 是 增加非專業人員相關操作的時間? 預設: 是 @@ -810,7 +810,7 @@ Robbanás hatástalanításkor? Взрыв при разминир.? Fai esplodere quando disarmato? - 解除中に爆発させますか? + 解除中に爆発させますか? 해제시 폭발합니까? 拆除时引爆? 拆除時引爆? @@ -826,7 +826,7 @@ Meghatározott robbanóanyagok felrobbanjanak-e hatástalanításkor? Alapértelmezett: Igen Разрешить определенным взрывным устройствам взрываться при разминировании? По-умолчанию: Да Abilita alcuni esplosivi per esplosione al disarmo? Default: Si - 特定の爆発物を解除中に爆発させますか?標準: はい + 特定の爆発物を解除中に爆発させますか? 標準: 有効化 특정 폭발물이 해제시 폭발하게 합니까? 기본설정: 예 启用后, 某些炸弹会在拆除时引爆? 预设: 是 啟用後, 某些炸彈會在拆除時引爆? 預設: 是 @@ -864,7 +864,7 @@ M6 SLAM (Útok zespoda) Mina M6 SLAM (Ataque Inferior) Мина M6 SLAM (направлена вверх) - M6 SLAM 地雷 (下からの攻撃) + M6 SLAM 地雷 (底面攻撃) M6 SLAM 지뢰 (바닥 공격) M6指向性反装甲地雷 (底部攻击) M6指向性反裝甲地雷 (底部攻擊) @@ -886,7 +886,7 @@ M6 SLAM (Útok do strany) Mina M6 SLAM (Ataque Lateral) Мина M6 SLAM (направлена вбок) - M6 SLAM 地雷 (横からの攻撃) + M6 SLAM 地雷 (側面攻撃) M6 SLAM 지뢰 (측면 공격) M6指向性反装甲地雷 (侧边攻击) M6指向性反裝甲地雷 (側邊攻擊) diff --git a/addons/fastroping/CfgVehicles.hpp b/addons/fastroping/CfgVehicles.hpp index 6338ce813d..94992669d9 100644 --- a/addons/fastroping/CfgVehicles.hpp +++ b/addons/fastroping/CfgVehicles.hpp @@ -4,7 +4,7 @@ control = "Checkbox"; \ displayName = CSTRING(Eden_equipFRIES); \ tooltip = CSTRING(Eden_equipFRIES_Tooltip); \ - expression = QUOTE([_this] call FUNC(equipFRIES)); \ + expression = QUOTE(if (_value) then {[_this] call FUNC(equipFRIES)}); \ typeName = "BOOL"; \ condition = "objectVehicle"; \ defaultValue = false; \ @@ -18,7 +18,7 @@ class CfgVehicles { }; class ACE_Module: Module_F {}; class ACE_moduleEquipFRIES: ACE_Module { - scope = 2; + scope = 1; displayName = CSTRING(Module_FRIES_DisplayName); icon = QPATHTOF(UI\Icon_Module_FRIES_ca.paa); category = "ACE"; diff --git a/addons/fastroping/stringtable.xml b/addons/fastroping/stringtable.xml index e0d4d8667d..8c8e4ee600 100644 --- a/addons/fastroping/stringtable.xml +++ b/addons/fastroping/stringtable.xml @@ -53,6 +53,7 @@ ファスト ロープのシステムを収容 收起快速繩降系統 收起快速绳降系统 + 패스트 로프 시스템 보관 Deploy ropes diff --git a/addons/finger/ACE_Settings.hpp b/addons/finger/ACE_Settings.hpp index 73e1db1904..c28b33dd74 100644 --- a/addons/finger/ACE_Settings.hpp +++ b/addons/finger/ACE_Settings.hpp @@ -1,16 +1,20 @@ class ACE_Settings { class GVAR(enabled) { + category = CSTRING(DisplayName); value = 0; typeName = "BOOL"; displayName = CSTRING(enabled_displayName); }; class GVAR(maxRange) { + category = CSTRING(DisplayName); value = 4; typeName = "SCALAR"; displayName = CSTRING(maxRange_displayName); description = CSTRING(maxRange_description); + sliderSettings[] = {0, 50, 4, 1}; }; class GVAR(indicatorForSelf) { + category = CSTRING(DisplayName); value = 1; typeName = "BOOL"; isClientSettable = 1; @@ -18,6 +22,7 @@ class ACE_Settings { description = CSTRING(indicatorForSelf_description); }; class GVAR(indicatorColor) { + category = CSTRING(DisplayName); value[] = {0.83, 0.68, 0.21, 0.75}; typeName = "COLOR"; isClientSettable = 1; diff --git a/addons/finger/CfgVehicles.hpp b/addons/finger/CfgVehicles.hpp index 8125e7f2f5..8d6d1a4146 100644 --- a/addons/finger/CfgVehicles.hpp +++ b/addons/finger/CfgVehicles.hpp @@ -1,12 +1,12 @@ class CfgVehicles { class ACE_Module; class GVAR(moduleSettings): ACE_Module { - scope = 2; + scope = 1; category = "ACE"; displayName = CSTRING(moduleSettings_displayName); icon = QPATHTOF(UI\Icon_Module_finger_ca.paa); function = QFUNC(moduleSettings); - isGlobal = 0; + isGlobal = 1; isSingular = 1; author = ECSTRING(common,ACETeam); class Arguments { diff --git a/addons/finger/functions/fnc_moduleSettings.sqf b/addons/finger/functions/fnc_moduleSettings.sqf index 4667e76c51..678b51ac5f 100644 --- a/addons/finger/functions/fnc_moduleSettings.sqf +++ b/addons/finger/functions/fnc_moduleSettings.sqf @@ -17,7 +17,6 @@ #include "script_component.hpp" params ["_logic"]; -if !(isServer) exitWith {}; [_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(maxRange), "maxRange"] call EFUNC(common,readSettingFromModule); diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml index 1a2265694e..72f0b67d55 100644 --- a/addons/finger/stringtable.xml +++ b/addons/finger/stringtable.xml @@ -1,6 +1,14 @@  + + Pointing + Fingerzeig + Puntamento + 指向指示器 + 指向指示器 + 指差し + Show pointing indicator to self Zeigersymbol einem selbst anzeigen diff --git a/addons/flashlights/CfgWeapons.hpp b/addons/flashlights/CfgWeapons.hpp index e1a325595b..9623b4d069 100644 --- a/addons/flashlights/CfgWeapons.hpp +++ b/addons/flashlights/CfgWeapons.hpp @@ -4,6 +4,7 @@ class CfgWeapons { class CBA_MiscItem_ItemInfo; class ACE_Flashlight_MX991: ACE_ItemCore { + author = ECSTRING(common,ACETeam); displayName = CSTRING(MX991_DisplayName); descriptionShort = CSTRING(MX991_Description); model = QPATHTOF(data\MX_991.p3d); @@ -21,6 +22,7 @@ class CfgWeapons { }; class ACE_Flashlight_KSF1: ACE_ItemCore { + author = ECSTRING(common,ACETeam); displayName = CSTRING(KSF1_DisplayName); descriptionShort = CSTRING(KSF1_Description); model = QPATHTOF(data\KSF_1.p3d); @@ -38,6 +40,7 @@ class CfgWeapons { }; class ACE_Flashlight_XL50: ACE_ItemCore { + author = ECSTRING(common,ACETeam); displayName = CSTRING(XL50_DisplayName); descriptionShort = CSTRING(XL50_Description); model = QPATHTOF(data\Maglight.p3d); diff --git a/addons/frag/ACE_Settings.hpp b/addons/frag/ACE_Settings.hpp index 63a3d564d2..6d511d3c3d 100644 --- a/addons/frag/ACE_Settings.hpp +++ b/addons/frag/ACE_Settings.hpp @@ -26,6 +26,7 @@ class ACE_Settings { description = CSTRING(MaxTrack_Desc); typeName = "SCALAR"; value = 10; + sliderSettings[] = {0, 50, 10, -1}; }; class GVAR(maxTrackPerFrame) { category = CSTRING(Module_DisplayName); @@ -33,5 +34,6 @@ class ACE_Settings { description = CSTRING(MaxTrackPerFrame_Desc); typeName = "SCALAR"; value = 10; + sliderSettings[] = {0, 50, 10, -1}; }; }; diff --git a/addons/gestures/stringtable.xml b/addons/gestures/stringtable.xml index 05c5d98e90..fce2270cbb 100644 --- a/addons/gestures/stringtable.xml +++ b/addons/gestures/stringtable.xml @@ -2,20 +2,20 @@ - ACE3 Gestures - ACE3 Gesten - ACE3 Gesty - ACE3 Posunky - ACE3 Gestes - ACE3 Kézjelek - Gesti ACE3 - ACE3 Gestos - ACE3 Жесты - ACE3 Gestos - ACE3 ジェスチャー - ACE3 수신호 - ACE3 手势 - ACE3 手勢 + ACE Gestures + ACE Gesten + ACE Gesty + ACE Posunky + ACE Gestes + ACE Kézjelek + ACE Gesti + ACE Gestos + ACE Жесты + ACE Gestos + ACE ジェスチャー + ACE 수신호 + ACE 手势 + ACE 手勢 ACE Gestures @@ -24,7 +24,7 @@ ACE Posunky ACE Gestes ACE Kézjelek - Gesti ACE + ACE Gesti ACE Gestos ACE Жесты ACE Gestos diff --git a/addons/goggles/ACE_Settings.hpp b/addons/goggles/ACE_Settings.hpp index 659a10b4e3..2b20b46514 100644 --- a/addons/goggles/ACE_Settings.hpp +++ b/addons/goggles/ACE_Settings.hpp @@ -1,12 +1,14 @@ class ACE_Settings { class GVAR(effects) { + category = CSTRING(DisplayName); displayName = CSTRING(effects_displayName); typeName = "SCALAR"; value = 2; values[] = {ECSTRING(common,Disabled), CSTRING(effects_tintOnly), CSTRING(enabled_tintAndEffects)}; }; class GVAR(showInThirdPerson) { + category = CSTRING(DisplayName); value = 0; typeName = "BOOL"; isClientSettable = 1; diff --git a/addons/goggles/stringtable.xml b/addons/goggles/stringtable.xml index 309a420a46..44d0328726 100644 --- a/addons/goggles/stringtable.xml +++ b/addons/goggles/stringtable.xml @@ -1,6 +1,14 @@ - + + + Goggles + Schutzbrille + Occhiali + 護目鏡 + 护目镜 + ゴーグル + Show Goggle Effects in Third Person Brilleneffekt in dritter Person anzeigen @@ -41,7 +49,7 @@ Brilleneffekt 고글 효과 Effets des lunettes - Effetto Occhiali + Effetti Occhiali 护目镜效果 護目鏡效果 diff --git a/addons/grenades/functions/fnc_incendiary.sqf b/addons/grenades/functions/fnc_incendiary.sqf index 6081daa8af..216ab349a3 100644 --- a/addons/grenades/functions/fnc_incendiary.sqf +++ b/addons/grenades/functions/fnc_incendiary.sqf @@ -169,7 +169,10 @@ if (isServer) then { _x setDamage 1; }; if (_x isKindOf "ReammoBox_F") then { - if ("ace_cookoff" call EFUNC(common,isModLoaded) && {EGVAR(cookoff,enable)}) then { + if ( + "ace_cookoff" call EFUNC(common,isModLoaded) && + {GETVAR(_x,EGVAR(cookoff,enableAmmoCookoff),EGVAR(cookoff,enableAmmobox))} + ) then { _x call EFUNC(cookoff,cookOffBox); } else { _x setDamage 1; diff --git a/addons/hearing/ACE_Settings.hpp b/addons/hearing/ACE_Settings.hpp index 2fb2a46211..8814f2466d 100644 --- a/addons/hearing/ACE_Settings.hpp +++ b/addons/hearing/ACE_Settings.hpp @@ -10,11 +10,13 @@ class ACE_Settings { category = CSTRING(Module_DisplayName); value = 0.5; typeName = "SCALAR"; + sliderSettings[] = {0, 1, 0.5, 1}; }; class GVAR(unconsciousnessVolume) { category = CSTRING(Module_DisplayName); value = 0.4; typeName = "SCALAR"; + sliderSettings[] = {0, 1, 0.4, 1}; }; class GVAR(disableEarRinging) { category = CSTRING(Module_DisplayName); diff --git a/addons/hearing/CfgVehicles.hpp b/addons/hearing/CfgVehicles.hpp index c306e46b77..51e064d16b 100644 --- a/addons/hearing/CfgVehicles.hpp +++ b/addons/hearing/CfgVehicles.hpp @@ -97,7 +97,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(Module_DisplayName); function = QFUNC(moduleHearing); - scope = 2; + scope = 1; isGlobal = 1; isSingular = 1; icon = QPATHTOF(UI\Icon_Module_Hearing_ca.paa); diff --git a/addons/hearing/CfgWeapons.hpp b/addons/hearing/CfgWeapons.hpp index 48ebba61b9..85d941909a 100644 --- a/addons/hearing/CfgWeapons.hpp +++ b/addons/hearing/CfgWeapons.hpp @@ -3,6 +3,7 @@ class CfgWeapons { class CBA_MiscItem_ItemInfo; class ACE_EarPlugs: ACE_ItemCore { + author = ECSTRING(common,ACETeam); displayName = CSTRING(EarPlugs_Name); descriptionShort = CSTRING(EarPlugs_Description); model = QPATHTOF(data\ace_earplugs.p3d); diff --git a/addons/hellfire/stringtable.xml b/addons/hellfire/stringtable.xml index e3d21c14a2..34ed9555ed 100644 --- a/addons/hellfire/stringtable.xml +++ b/addons/hellfire/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -9,6 +9,7 @@ 设定地狱火模式 設定地獄火模式 Ustaw tryb pocisku Hellfire + 헬파이어 모드 세팅 diff --git a/addons/hitreactions/ACE_Settings.hpp b/addons/hitreactions/ACE_Settings.hpp index 4fa45e8ebc..0220e09629 100644 --- a/addons/hitreactions/ACE_Settings.hpp +++ b/addons/hitreactions/ACE_Settings.hpp @@ -4,5 +4,7 @@ class ACE_Settings { //Minimum mamage needed to trigger falling down while moving. Set to -1 to disable completely. typeName = "SCALAR"; value = 0.1; + displayName = CSTRING(minDamageToTrigger_displayName); + sliderSettings[] = {-1, 1, 0.1, 1}; }; }; diff --git a/addons/hitreactions/stringtable.xml b/addons/hitreactions/stringtable.xml new file mode 100644 index 0000000000..01f344741b --- /dev/null +++ b/addons/hitreactions/stringtable.xml @@ -0,0 +1,12 @@ + + + + + Min Damage to trigger falling + Danno Minimo da caduta se colpiti + 觸發倒下前最低需受到多少傷害 + 触发倒下前最低需受到多少伤害 + 崩れ落ちるまでの最低損傷値 + + + diff --git a/addons/huntir/CfgWeapons.hpp b/addons/huntir/CfgWeapons.hpp index bc00035a1d..7cda0e7066 100644 --- a/addons/huntir/CfgWeapons.hpp +++ b/addons/huntir/CfgWeapons.hpp @@ -5,6 +5,7 @@ class CfgWeapons { class ACE_HuntIR_monitor: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(monitor_displayName); picture = QPATHTOF(UI\w_huntir_monitor_ca.paa); descriptionShort = CSTRING(monitor_displayName); diff --git a/addons/interact_menu/functions/fnc_createVehiclesActions.sqf b/addons/interact_menu/functions/fnc_createVehiclesActions.sqf index 6bdc941118..4f29b9e65b 100644 --- a/addons/interact_menu/functions/fnc_createVehiclesActions.sqf +++ b/addons/interact_menu/functions/fnc_createVehiclesActions.sqf @@ -21,13 +21,13 @@ params ["_vehicles", "_statement", "_target"]; _vehicles apply { - private _config = configFile >> "CfgVehicles" >> typeOf _x; - private _name = getText (_config >> "displayName"); + private _type = typeOf _x; + private _name = getText (configFile >> "CfgVehicles" >> _type >> "displayName"); private _ownerName = [_x, true] call EFUNC(common,getName); if ("" != _ownerName) then { _name = format ["%1 (%2)", _name, _ownerName]; }; - private _icon = (getText (_config >> "icon")) call BIS_fnc_textureVehicleIcon; + private _icon = [_type] call EFUNC(common,getVehicleIcon); private _action = [format ["%1", _x], _name, _icon, _statement, {true}, {}, _x] call EFUNC(interact_menu,createAction); [_action, [], _target] } diff --git a/addons/interaction/ACE_Settings.hpp b/addons/interaction/ACE_Settings.hpp index 6c6010bbe4..3efb745a6b 100644 --- a/addons/interaction/ACE_Settings.hpp +++ b/addons/interaction/ACE_Settings.hpp @@ -1,19 +1,21 @@ class ACE_Settings { class GVAR(enableTeamManagement) { + category = CSTRING(DisplayName); displayName = CSTRING(EnableTeamManagement_DisplayName); description = CSTRING(EnableTeamManagement_Description); value = 1; typeName = "BOOL"; }; class GVAR(enableMagazinePassing) { + category = CSTRING(DisplayName); value = 1; typeName = "BOOL"; isClientSettable = 1; displayName = CSTRING(PassMagazineSetting); - category = ECSTRING(interact_menu,Category_InteractionMenu); }; class GVAR(disableNegativeRating) { + category = CSTRING(DisplayName); displayName = CSTRING(DisableNegativeRating_DisplayName); description = CSTRING(DisableNegativeRating_Description); value = 0; diff --git a/addons/interaction/ACE_ZeusActions.hpp b/addons/interaction/ACE_ZeusActions.hpp index 44b7078f4b..af6b4504e1 100644 --- a/addons/interaction/ACE_ZeusActions.hpp +++ b/addons/interaction/ACE_ZeusActions.hpp @@ -33,7 +33,7 @@ class ACE_ZeusActions { class remoteControl { displayName = "$STR_A3_CfgVehicles_ModuleRemoteControl_F"; icon = "\A3\Modules_F_Curator\Data\portraitRemoteControl_ca.paa"; - statement = "_unit = objNull; { if ((side _x in [east,west,resistance,civilian]) && !(isPlayer _x)) exitWith { _unit = _x; }; } forEach (curatorSelected select 0); bis_fnc_curatorObjectPlaced_mouseOver = ['OBJECT',_unit]; (group _target) createUnit ['ModuleRemoteControl_F',[0,0,0],[],0,''];"; + statement = "_unit = objNull; { if ((side _x in [east,west,resistance,civilian]) && !(isPlayer _x)) exitWith { _unit = _x; }; } forEach (curatorSelected select 0); bis_fnc_curatorObjectPlaced_mouseOver = ['OBJECT',_unit]; (group _target) createUnit ['ModuleRemoteControl_F',[0,0,0],[],0,'NONE'];"; }; }; @@ -52,7 +52,7 @@ class ACE_ZeusActions { class safe { displayName = "$STR_Combat_Safe"; icon = "\A3\UI_F_Curator\Data\RscCommon\RscAttributeBehaviour\safe_ca.paa"; - statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('CARELESS',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); + statement = QUOTE([ARR_3(QQGVAR(zeusBehaviour),[ARR_2('SAFE',curatorSelected select 1)],curatorSelected select 1)] call CBA_fnc_targetEvent;); }; class aware { displayName = "$STR_Combat_Aware"; diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 59be0b34b0..9bd70a00da 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -8,7 +8,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(Module_DisplayName); function = QFUNC(moduleInteraction); - scope = 2; + scope = 1; isGlobal = 1; isSingular = 1; icon = QPATHTOF(UI\Icon_Module_Interaction_ca.paa); @@ -168,6 +168,14 @@ class CfgVehicles { showDisabled = 0; priority = 2.6; }; + + class GVAR(PullOutBody) { + displayName = CSTRING(PullOutBody); + condition = QUOTE(call DFUNC(canPullOutBody)); + statement = QUOTE(call DFUNC(pullOutBody)); + exceptions[] = {"isNotSwimming"}; + icon = "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\getout_ca.paa"; + }; }; class ACE_Torso { @@ -342,7 +350,7 @@ class CfgVehicles { condition = "true"; class ACE_Passengers { displayName = CSTRING(Passengers); - condition = "true"; + condition = QUOTE(alive _target); statement = ""; exceptions[] = {"isNotSwimming"}; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); @@ -353,7 +361,7 @@ class CfgVehicles { class ACE_SelfActions { class ACE_Passengers { displayName = CSTRING(Passengers); - condition = "true"; + condition = QUOTE(alive _target); statement = ""; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); }; @@ -370,7 +378,7 @@ class CfgVehicles { condition = "true"; class ACE_Passengers { displayName = CSTRING(Passengers); - condition = "true"; + condition = QUOTE(alive _target); statement = ""; exceptions[] = {"isNotSwimming"}; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); @@ -381,7 +389,7 @@ class CfgVehicles { class ACE_SelfActions { class ACE_Passengers { displayName = CSTRING(Passengers); - condition = "true"; + condition = QUOTE(alive _target); statement = ""; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); }; @@ -397,7 +405,7 @@ class CfgVehicles { condition = "true"; class ACE_Passengers { displayName = CSTRING(Passengers); - condition = "true"; + condition = QUOTE(alive _target); statement = ""; exceptions[] = {"isNotSwimming"}; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); @@ -408,7 +416,7 @@ class CfgVehicles { class ACE_SelfActions { class ACE_Passengers { displayName = CSTRING(Passengers); - condition = "true"; + condition = QUOTE(alive _target); statement = ""; exceptions[] = {"isNotSwimming"}; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); @@ -428,7 +436,7 @@ class CfgVehicles { condition = "true"; class ACE_Passengers { displayName = CSTRING(Passengers); - condition = "true"; + condition = QUOTE(alive _target); statement = ""; exceptions[] = {"isNotSwimming"}; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); @@ -439,7 +447,7 @@ class CfgVehicles { class ACE_SelfActions { class ACE_Passengers { displayName = CSTRING(Passengers); - condition = "true"; + condition = QUOTE(alive _target); statement = ""; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); }; @@ -456,7 +464,7 @@ class CfgVehicles { condition = "true"; class ACE_Passengers { displayName = CSTRING(Passengers); - condition = "true"; + condition = QUOTE(alive _target); statement = ""; exceptions[] = {"isNotSwimming"}; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); @@ -467,7 +475,7 @@ class CfgVehicles { class ACE_SelfActions { class ACE_Passengers { displayName = CSTRING(Passengers); - condition = "true"; + condition = QUOTE(alive _target); statement = ""; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); }; @@ -505,7 +513,7 @@ class CfgVehicles { }; class ACE_Passengers { displayName = CSTRING(Passengers); - condition = "true"; + condition = QUOTE(alive _target); statement = ""; exceptions[] = {"isNotSwimming"}; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); @@ -516,7 +524,7 @@ class CfgVehicles { class ACE_SelfActions { class ACE_Passengers { displayName = CSTRING(Passengers); - condition = "true"; + condition = QUOTE(alive _target); statement = ""; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); }; @@ -532,7 +540,7 @@ class CfgVehicles { condition = "true"; class ACE_Passengers { displayName = CSTRING(Passengers); - condition = "true"; + condition = QUOTE(alive _target); statement = ""; exceptions[] = {"isNotSwimming"}; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); @@ -543,7 +551,7 @@ class CfgVehicles { class ACE_SelfActions { class ACE_Passengers { displayName = CSTRING(Passengers); - condition = "true"; + condition = QUOTE(alive _target); statement = ""; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); }; diff --git a/addons/interaction/XEH_PREP.hpp b/addons/interaction/XEH_PREP.hpp index 4f0ef58357..1a70de8831 100644 --- a/addons/interaction/XEH_PREP.hpp +++ b/addons/interaction/XEH_PREP.hpp @@ -28,6 +28,8 @@ PREP(canTapShoulder); PREP(tapShoulder); PREP(canPardon); PREP(pardon); +PREP(canPullOutBody); +PREP(pullOutBody); // interaction with doors PREP(getDoor); diff --git a/addons/interaction/functions/fnc_canPullOutBody.sqf b/addons/interaction/functions/fnc_canPullOutBody.sqf new file mode 100644 index 0000000000..f0f8f32db9 --- /dev/null +++ b/addons/interaction/functions/fnc_canPullOutBody.sqf @@ -0,0 +1,47 @@ +/* + * Author: Dystopian + * Checks if unit can pull target body out of vehicle. + * + * Arguments: + * 1: Body + * 2: Unit + * + * Return Value: + * Able to pull out target body + * + * Example: + * [crew cursorObject select 0, player] call ace_interaction_fnc_canPullOutBody + * + * Public: No + */ +#include "script_component.hpp" + +params ["_body", "_unit"]; + +private _vehicle = objectParent _body; + +if ( + !isNull objectParent _unit + || {alive _body} + || {isNull _vehicle} + || {1 < locked _vehicle} + || { + 0 < {alive _x} count crew _vehicle // alive is in vehicle + // group is used here for situations when side player == ENEMY + && {0.6 > side group _unit getFriend side group _vehicle} // player is enemy + } +) exitWith {false}; + +((fullCrew [_vehicle, ""] select {_body == _x select 0}) select 0) params ["", "", "_cargoIndex", "_turretPath"]; + +private _locked = if (!(_turretPath isEqualTo [])) then { + _vehicle lockedTurret _turretPath; +} else { + if (_cargoIndex > -1) then { + _vehicle lockedCargo _cargoIndex; + } else { + lockedDriver _vehicle; + }; +}; + +!_locked diff --git a/addons/interaction/functions/fnc_pullOutBody.sqf b/addons/interaction/functions/fnc_pullOutBody.sqf new file mode 100644 index 0000000000..bab54a0805 --- /dev/null +++ b/addons/interaction/functions/fnc_pullOutBody.sqf @@ -0,0 +1,63 @@ +/* + * Author: Dystopian + * Makes unit pull target body out of vehicle. + * + * Arguments: + * 0: Body + * 1: Unit + * + * Return Value: + * None + * + * Example: + * [crew cursorObject select 0, player] call ace_interaction_fnc_pullOutBody + * + * Public: No + */ +#include "script_component.hpp" + +params ["_body", "_unit"]; + +private _vehicle = objectParent _body; // vehicle command doesn't work for dead + +// get target crew properties +private ["_cargoIndex", "_turretPath"]; +private _cargoNumber = -1; +{ + if ("cargo" == _x select 1) then { + INC(_cargoNumber); + }; + if (_body == _x select 0) exitWith { + _cargoIndex = _x select 2; + _turretPath = _x select 3; + }; +} forEach fullCrew [_vehicle, "", true]; +TRACE_3("",_cargoIndex,_cargoNumber,_turretPath); + +private _preserveEngineOn = false; + +// first get in to target seat +if (!(_turretPath isEqualTo [])) then { + _unit action ["GetInTurret", _vehicle, _turretPath]; +} else { + if (_cargoIndex > -1) then { + _unit action ["GetInCargo", _vehicle, _cargoNumber]; + } else { + _unit action ["GetInDriver", _vehicle]; + _preserveEngineOn = isEngineOn _vehicle; + }; +}; + +// then get out +[ + {(_this select 0) in (_this select 1)}, + { + params ["_unit", "_vehicle", "_preserveEngineOn"]; + TRACE_3("",_unit,_vehicle,_preserveEngineOn); + _unit action ["GetOut", _vehicle]; + if (_preserveEngineOn) then { + [{isNull driver _this}, {_this engineOn true}, _vehicle] call CBA_fnc_waitUntilAndExecute; + }; + }, + [_unit, _vehicle, _preserveEngineOn] +] call CBA_fnc_waitUntilAndExecute; diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 1f7e62f909..f1aa5944d0 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -1,6 +1,14 @@  + + Interaction + Interaktion + Interazione + 互動 + 互动 + インタラクション + Interactions Interaktionen @@ -300,7 +308,7 @@ TÁNC! DANCE! DANZA! - おどれ! + おどれ! 춤추기! 跳舞 跳舞 @@ -365,7 +373,7 @@ Tocar ombro Dai un colpetto 肩を叩く - 어깨 두드리기 + 어깨 치기 轻拍肩膀 輕拍肩膀 @@ -444,7 +452,7 @@ Tűnés! Vá Embora! Via di qui! - うせろ! + 失せろ! 저리 가! 走开! 走開! @@ -460,7 +468,7 @@ Ложись! Abaixe-se! A terra! - ふせろ! + 伏せろ! 엎드려! 趴下! 趴下! @@ -474,7 +482,7 @@ Sortez ! Выходи Vystupte - 降りる + 降りろ 나가 出去 出去 @@ -922,7 +930,7 @@ A játékosoknak engedélyezve legyen a csapatkezelő menü? Alapértelmezett: Igen Devem os jogadores ter permissão de usar o menu de gestão de equipes? Padrão: Sim Possono i giocatori usare il Menù Managment Squadra? Default: Si - プレイヤーがチーム管理メニューを使えるようにしますか?標準:はい + プレイヤーがチーム管理メニューを使えるようにしますか? 標準: 有効化 플레이어들이 팀 설정하는 것을 허락합니까? 기본설정: 예 允许玩家使用小队管理选单? 预设: 是 允許玩家使用小隊管理選單? 預設: 是 @@ -934,6 +942,7 @@ Disabilita valutazione negativa 關閉負面評價 关闭负面评价 + 부정행위 가중치 사용안함 Should players receive negative rating? When enabled players are only receiving positive ratings which prevents friendly AI fire when destroying friendly equipment or killing team members. @@ -942,6 +951,7 @@ I giocatori dovrebbero ricevere delle valutazioni negative ? Quando è abilitato i giocatori ricevono esclusivamente valutazioni positive che prevengono il fuoco delle AI alleate quando distruggono equipaggiamenti o uccidono membri della squadra. 玩家是否會收到負面評價? 當本功能開啟時玩家只會接收到正面評價,所以當玩家做出擊殺友軍AI、毀壞友軍裝備或殺害小隊夥伴都不會收到負面評價。 玩家是否会收到负面评价? 当本功能开启时玩家只会接收到正面评价,所以当玩家做出击杀友军AI、毁坏友军装备或杀害小队伙伴都不会收到负面评价。 + 플레이어의 부정행위 가중치를 계산합니까? 활성화된 플레이어는 높은 레이팅을 가질때, 아군의 장비나 병력을 사격해도 아군 AI의 사격을 받지 않습니다. Team management allows color allocation for team members, taking team command and joining/leaving teams. @@ -1064,5 +1074,11 @@ 显示"给予弹匣"互动动作 顯示"給予彈匣"互動動作 + + Pull out body + Вытащить тело + 身体を引き出す + Estrai il corpo + diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index fae8575e21..240862b4f2 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -59,7 +59,7 @@ private _textCenterLine5 = ""; private _textCenterLine6 = ""; private _windSpeed = call FUNC(measureWindSpeed); -private _windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); +private _windDir = (wind select 0) atan2 (wind select 1); private _playerDir = getDir ACE_player; private _playerAltitude = (getPosASL ACE_player) select 2; diff --git a/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf b/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf index 17e97c4579..c023d8ec8d 100644 --- a/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf +++ b/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf @@ -16,8 +16,8 @@ #include "script_component.hpp" private _playerDir = getDir ACE_player; -private _windSpeed = vectorMagnitude ACE_wind; -private _windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); +private _windSpeed = vectorMagnitude wind; +private _windDir = (wind select 0) atan2 (wind select 1); if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { // With wind gradient _windSpeed = [eyePos ACE_player, true, true, true] call EFUNC(weather,calculateWindSpeed); diff --git a/addons/laser/ACE_Settings.hpp b/addons/laser/ACE_Settings.hpp index 72c513f928..3584a2086f 100644 --- a/addons/laser/ACE_Settings.hpp +++ b/addons/laser/ACE_Settings.hpp @@ -3,5 +3,6 @@ class ACE_Settings { value = 2; typeName = "SCALAR"; displayName = CSTRING(dispersionCount_displayName); + sliderSettings[] = {0, 5, 2, -1}; }; }; diff --git a/addons/laser/XEH_postInit.sqf b/addons/laser/XEH_postInit.sqf index 5f0385cee8..709682853b 100644 --- a/addons/laser/XEH_postInit.sqf +++ b/addons/laser/XEH_postInit.sqf @@ -15,6 +15,8 @@ if (hasInterface) then { TRACE_4("ACE_controlledUAV EH",_UAV,_seatAI,_turret,_position); if (!isNull _seatAI) then { [_seatAI] call FUNC(showVehicleHud); + } else { + [ace_player] call FUNC(showVehicleHud); }; }] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler; diff --git a/addons/laserpointer/ACE_Settings.hpp b/addons/laserpointer/ACE_Settings.hpp index 0536db730d..833167ba28 100644 --- a/addons/laserpointer/ACE_Settings.hpp +++ b/addons/laserpointer/ACE_Settings.hpp @@ -1,5 +1,7 @@ class ACE_Settings { class GVAR(enabled) { + category = ECSTRING(common,ACEKeybindCategoryWeapons); + displayName = CSTRING(DisplayName); typeName = "BOOL"; value = 1; }; diff --git a/addons/laserpointer/functions/fnc_onDraw.sqf b/addons/laserpointer/functions/fnc_onDraw.sqf index 06c601869c..4c614064e7 100644 --- a/addons/laserpointer/functions/fnc_onDraw.sqf +++ b/addons/laserpointer/functions/fnc_onDraw.sqf @@ -15,8 +15,7 @@ */ #include "script_component.hpp" -// no lasers in thermal mode -if !(GVAR(isTI)) then { +if (count GVAR(redLaserUnits) + count GVAR(greenLaserUnits) > 0 && {!GVAR(isTI)}) then { private _brightness = 2 - call EFUNC(common,ambientBrightness); { diff --git a/addons/laserpointer/stringtable.xml b/addons/laserpointer/stringtable.xml index 88228dc289..17b7dbe933 100644 --- a/addons/laserpointer/stringtable.xml +++ b/addons/laserpointer/stringtable.xml @@ -1,6 +1,22 @@ + + Laser Pointer + Pointeur laser + Laserpointer + Лазерный прицел + Laserové ukazovátko + Wskaźnik laserowy + Lézer-pointer + Puntero láser + Puntatore laser + Laser + レーザ ポインタ + 레이저 지시기 + 雷射指示器 + 雷射指示器 + Laser Pointer (red) Pointeur laser (rouge) diff --git a/addons/logistics_uavbattery/CfgWeapons.hpp b/addons/logistics_uavbattery/CfgWeapons.hpp index 2e55bccd37..c4092dc017 100644 --- a/addons/logistics_uavbattery/CfgWeapons.hpp +++ b/addons/logistics_uavbattery/CfgWeapons.hpp @@ -4,6 +4,7 @@ class CfgWeapons { class ACE_UAVBattery: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(Battery_Name); descriptionShort = CSTRING(Battery_Description); model = QPATHTOF(data\ace_battery.p3d); diff --git a/addons/logistics_uavbattery/stringtable.xml b/addons/logistics_uavbattery/stringtable.xml index 409a692029..bd3ea82684 100644 --- a/addons/logistics_uavbattery/stringtable.xml +++ b/addons/logistics_uavbattery/stringtable.xml @@ -13,7 +13,7 @@ Il drone è pieno БПЛА полностью заряжен ドローンは充電完了 - 드론 충전완료 + 무인기 충전완료 无人载具电池已充满 無人載具電池已充滿 @@ -29,7 +29,7 @@ Hai bisogno di una Batteria UAV Требуется аккумулятор для БПЛА UAV バッテリが必要です - UAV 배터리가 필요합니다 + 무인기 배터리가 필요합니다 你需要一个无人载具电池 你需要一個無人載具電池 @@ -61,7 +61,7 @@ Batteria UAV Аккумулятор БПЛА UAV バッテリ - UAV 배터리 + 무인기 배터리 无人载具电池 無人載具電池 @@ -77,7 +77,7 @@ Usata per ricaricare la Batteria dell'UAV Используется для зарядки переносных БПЛА 運んでいる UAV を充電に使う - UAV를 재충전 할때 씁니다. + 무인기를 재충전 할때 씁니다. 对可携式无人载具进行充电 對可攜式無人載具進行充電 @@ -92,7 +92,7 @@ Recarregando... In ricarica... Заряжается... - 充電中 + 充電しています・・・ 充电中... 充電中... 충전중... diff --git a/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf b/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf index e371be405f..911ddcf01d 100644 --- a/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf +++ b/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf @@ -57,3 +57,5 @@ private _progressCheck = { }; [_timeToCut, [_fenceObject,0,_unit], _onCompletion, _onFail, localize LSTRING(CuttingFence), _progressCheck, ["isNotSwimming"]] call EFUNC(common,progressBar); + +["ace_wireCuttingStarted", [_unit, _fenceObject]] call CBA_fnc_globalEvent; diff --git a/addons/logistics_wirecutter/script_component.hpp b/addons/logistics_wirecutter/script_component.hpp index 7ec3a5dc0d..69711d289b 100644 --- a/addons/logistics_wirecutter/script_component.hpp +++ b/addons/logistics_wirecutter/script_component.hpp @@ -18,6 +18,6 @@ //find is case sensitive, so keep everything lowercase -#define FENCE_P3DS ["mil_wiredfence_f.p3d","wall_indfnc_3.p3d", "wall_indfnc_9.p3d", "wall_indfnc_corner.p3d", "pletivo_wired.p3d", "wall_fen1_5.p3d"] +#define FENCE_P3DS ["mil_wiredfence_f.p3d","wall_indfnc_3.p3d", "wall_indfnc_9.p3d", "wall_indfnc_corner.p3d", "pletivo_wired.p3d", "wall_fen1_5.p3d", "net_fence_8m_f.p3d"] #define SOUND_CLIP_TIME_SPACEING 1.5 diff --git a/addons/logistics_wirecutter/stringtable.xml b/addons/logistics_wirecutter/stringtable.xml index 53c5e21b14..62b7ef77d2 100644 --- a/addons/logistics_wirecutter/stringtable.xml +++ b/addons/logistics_wirecutter/stringtable.xml @@ -60,7 +60,7 @@ Sto tagliando... Drótok elvágása... Разрезаем забор / провода... - フェンス/ワイヤを切断中・・・ + フェンス/ワイヤを切断しています・・・ 철망/철조망 자르는중... 剪断护栏/刺网中... 剪斷護欄/刺網中... diff --git a/addons/magazinerepack/ACE_Settings.hpp b/addons/magazinerepack/ACE_Settings.hpp index 940af87d15..b66fe5f254 100644 --- a/addons/magazinerepack/ACE_Settings.hpp +++ b/addons/magazinerepack/ACE_Settings.hpp @@ -1,17 +1,26 @@ class ACE_Settings { //Time to move a round from one magazine to another class GVAR(timePerAmmo) { + category = CSTRING(DisplayName); + displayName = CSTRING(timePerAmmo); value = 1.5; typeName = "SCALAR"; + sliderSettings[] = {1, 10, 1.5, 1}; }; //Time to swap between magazines when repacking class GVAR(timePerMagazine) { + category = CSTRING(DisplayName); + displayName = CSTRING(timePerMagazine); value = 2.0; typeName = "SCALAR"; + sliderSettings[] = {1, 10, 2, 1}; }; //Time to relink 2 belts together class GVAR(timePerBeltLink) { + category = CSTRING(DisplayName); + displayName = CSTRING(timePerBeltLink); value = 8.0; typeName = "SCALAR"; + sliderSettings[] = {1, 10, 8, 1}; }; }; diff --git a/addons/magazinerepack/stringtable.xml b/addons/magazinerepack/stringtable.xml index 10e806b316..23dc18c3fd 100644 --- a/addons/magazinerepack/stringtable.xml +++ b/addons/magazinerepack/stringtable.xml @@ -1,6 +1,37 @@ - + + + Magazine Repack + Riempimento Caricatori + 重新整理彈匣 + 重新整理弹匣 + 弾倉詰め替え + + + Time per round + Zeit pro Patrone + Durata per proiettile + 每發所需時間 + 每发所需时间 + 弾頭毎の所有時間 + + + Time per magazine + Zeit pro Magazin + Durata per caricatore + 每匣所需時間 + 每匣所需时间 + 弾倉毎の所有時間 + + + Time per belt link + Zeit pro Gurtglied + Durata per caricatore a nastro + 每彈鍊所需時間 + 每弹炼所需时间 + ベルトリンク毎の所有時間 + Repack Magazines Magazine umpacken @@ -8,7 +39,7 @@ Réorganiser les chargeurs Przepakuj magazynki Přepáskovat zásobníky - Riempi i caricatori + Riempi Caricatori Reorganizar Carregadores Újratárazás Перепаковать магазины @@ -24,7 +55,7 @@ Réorganisation des chargeurs... Przepakowywanie magazynków... Přepáskovávám zásobník... - Sto riempendo i caricatori... + Riempendo i caricatori... Reorganizando Carregadores... Újratárazás... Перепаковка магазинов... @@ -44,7 +75,7 @@ %1 carregador(es) cheio(s) e %2 disparo(s) a mais %1 teljes tár és %2 extra lőszer %1 полных магазина(ов) и %2 патрона(ов) - %1 個の満杯な弾倉と入りきらなかった %2 発の弾薬 + %1 個の満杯な弾倉とあふれた %2 発の弾薬 %1개의 꽉찬 탄창과 %2발의 총알이 남았다 %1个满的弹匣与%2发额外子弹 %1個滿的彈匣與%2發額外子彈 @@ -58,7 +89,7 @@ Páskování dokončeno Przepakowywanie zakończone Újratárazás befejezve - Caricatori riempiti + Caricatori Riempiti Reorganização Terminada 詰め替えが完了 탄창 채우기 끝남 @@ -74,7 +105,7 @@ Páskování přerušeno Przepakowywanie przerwane Újratárazás megszakítva - Riempimento interrotto + Riempimento Interrotto Reorganização Interrompida 詰め替えを中断した 탄창 채우기 방해받음 @@ -90,7 +121,7 @@ %1 plný a %2 částečně Pełnych: %1.<br/>Częściowo pełnych: %2. %1 teljes és %2 részleges - %1 pieno(i) e %2 parziale(i) + %1 Pieno(i) e %2 Parziale(i) %1 Total e %2 Parcial %1 個の満杯と %2 個の弾薬入り弾倉 %1 꽉찼고 %2 부분참 diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 167884616f..5480797513 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -109,4 +109,17 @@ #define TRACE_10(MESSAGE,A,B,C,D,E,F,G,H,I,J) /* disabled */ #endif +#define GRAVITY 9.8066 + +#define SD_TO_MIN_MAX(d) ((d) * 3.371) // Standard deviation -> min / max of random [min, mid, max] + +// Angular unit conversion +#define MRAD_TO_MOA(d) ((d) * 3.43774677) // Conversion factor: 54 / (5 * PI) +#define MOA_TO_MRAD(d) ((d) * 0.29088821) // Conversion factor: (5 * PI) / 54 +#define DEG_TO_MOA(d) ((d) * 60) // Conversion factor: 60 +#define MOA_TO_DEG(d) ((d) / 60) // Conversion factor: 1 / 60 +#define DEG_TO_MRAD(d) ((d) * 17.45329252) // Conversion factor: (50 * PI) / 9 +#define MRAD_TO_DEG(d) ((d) / 17.45329252) // Conversion factor: 9 / (50 * PI) +#define MOA_TO_RAD(d) ((d) * 0.00029088) // Conversion factor: PI / 10800 + #include "script_debug.hpp" diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index cd6d49c4e1..04785a35a6 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -9,8 +9,8 @@ #define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD // MINIMAL required version for the Mod. Components can specify others.. -#define REQUIRED_VERSION 1.76 -#define REQUIRED_CBA_VERSION {3,4,1} +#define REQUIRED_VERSION 1.78 +#define REQUIRED_CBA_VERSION {3,5,0} #ifdef COMPONENT_BEAUTIFIED #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED) diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp index 709e29f4ab..ed6780a32f 100644 --- a/addons/main/script_version.hpp +++ b/addons/main/script_version.hpp @@ -1,4 +1,4 @@ #define MAJOR 3 -#define MINOR 11 +#define MINOR 12 #define PATCHLVL 0 -#define BUILD 26 +#define BUILD 29 diff --git a/addons/map/ACE_Settings.hpp b/addons/map/ACE_Settings.hpp index b04c7b39b3..591ec24116 100644 --- a/addons/map/ACE_Settings.hpp +++ b/addons/map/ACE_Settings.hpp @@ -5,6 +5,7 @@ class ACE_Settings { typeName = "SCALAR"; displayName = CSTRING(BFT_Interval_DisplayName); description = CSTRING(BFT_Interval_Description); + sliderSettings[] = {0, 30, 1, 1}; }; class GVAR(BFT_Enabled) { category = CSTRING(Module_DisplayName); @@ -68,5 +69,6 @@ class ACE_Settings { typeName = "SCALAR"; displayName = CSTRING(DefaultChannel_DisplayName); description = CSTRING(DefaultChannel_Description); + sliderSettings[] = {-1, 5, -1, -1}; }; }; diff --git a/addons/map/CfgVehicles.hpp b/addons/map/CfgVehicles.hpp index 16eba79cb2..3a28fe4c3e 100644 --- a/addons/map/CfgVehicles.hpp +++ b/addons/map/CfgVehicles.hpp @@ -21,7 +21,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(Module_DisplayName); function = QFUNC(moduleMap); - scope = 2; + scope = 1; isGlobal = 1; isSingular = 1; icon = QPATHTOF(UI\Icon_Module_Map_ca.paa); @@ -81,8 +81,8 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(BFT_Module_DisplayName); function = QFUNC(blueForceTrackingModule); - scope = 2; - isGlobal = 0; + scope = 1; + isGlobal = 1; isSingular = 1; icon = QPATHTOF(UI\Icon_Module_BFTracking_ca.paa); class Arguments { diff --git a/addons/map/CfgWeapons.hpp b/addons/map/CfgWeapons.hpp index c7f350a454..5831428c6c 100644 --- a/addons/map/CfgWeapons.hpp +++ b/addons/map/CfgWeapons.hpp @@ -13,4 +13,14 @@ class CfgWeapons { }; }; }; -}; \ No newline at end of file + class acc_flashlight_pistol: ItemCore { + class ItemInfo: InventoryFlashlightItem_Base_F { + class FlashLight { + ACE_Flashlight_Colour = "white"; + ACE_Flashlight_Beam = QPATHTOF(UI\Flashlight_beam_white_ca.paa); + ACE_Flashlight_Size = 2.75; + ACE_Flashlight_Sound = 1; + }; + }; + }; +}; diff --git a/addons/map/functions/fnc_blueForceTrackingModule.sqf b/addons/map/functions/fnc_blueForceTrackingModule.sqf index a892bf72cd..f19fc84e57 100644 --- a/addons/map/functions/fnc_blueForceTrackingModule.sqf +++ b/addons/map/functions/fnc_blueForceTrackingModule.sqf @@ -16,8 +16,6 @@ #include "script_component.hpp" -if (!isServer) exitWith {}; - params ["_logic"]; [_logic, QGVAR(BFT_Enabled), "Enabled"] call EFUNC(common,readSettingFromModule); diff --git a/addons/map/functions/fnc_moduleMap.sqf b/addons/map/functions/fnc_moduleMap.sqf index 3dead784ca..077106eabe 100644 --- a/addons/map/functions/fnc_moduleMap.sqf +++ b/addons/map/functions/fnc_moduleMap.sqf @@ -16,8 +16,6 @@ #include "script_component.hpp" -if !(isServer) exitWith {}; - params ["_logic", "", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/map/functions/fnc_updateMapEffects.sqf b/addons/map/functions/fnc_updateMapEffects.sqf index e8ebcbd884..2c0f3c128c 100644 --- a/addons/map/functions/fnc_updateMapEffects.sqf +++ b/addons/map/functions/fnc_updateMapEffects.sqf @@ -35,7 +35,7 @@ if (GVAR(mapShake)) then { // Only shake map while moving on foot private _speed = 0; - if (vehicle ACE_player == ACE_player) then { + if ((alive ACE_player) && {vehicle ACE_player == ACE_player}) then { _speed = vectorMagnitude (velocity ACE_player); }; diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index a28266ed60..eab4549f75 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -28,7 +28,7 @@ Térkép megvilágítása? Освещение карты? Illuminazione Mappa? - 地図に照明? + 地図に照明? 지도에 조명? 地图照明? 地圖照明? @@ -43,7 +43,7 @@ Simular iluminación de mapa basada en la iluminación ambiente y los elementos de los jugadores? Simulovat nasvícení mapy v závisloti na okolí a předmětů hráče? Simula illuminazione della mappa in base alla luce ambientale e agli oggetti del giocatore? - 地図へ環境光やプレイヤーのアイテムにもとづいた光のシミュレーションをおこないますか? + 地図へ環境光やプレイヤーのアイテムに基づいた光のシミュレーションをおこないますか? 주변 환경및 플레이어 조명에 의한 빛 변화를 지도에 반영할까요? 透过环境光与玩家的物品来决定地图亮度? 透過環境光與玩家的物品來決定地圖亮度? @@ -58,7 +58,7 @@ Nasvícení mapy pomocí baterky? Luce della torcia in mappa? Lumière de la lampe de carte ? - 地図をフラッシュライトで照らしますか? + 地図をライトで照らしますか? 지도 조명이 빛이 납니까? 增加地图亮度? 增加地圖亮度? @@ -73,7 +73,7 @@ Añadir resplandor externo a los jugadores que utilizan la linterna en el mapa? Přidat externí záři hráči který používá baterku v mapě? Aggiungi luce esterna a giocatori che usano la torcia in mappa? - プレイヤが地図上でフラッシュライトを使うと、照らすようにしますか? + プレイヤが地図上でフラッシュライトを使うと、照らすようにしますか? 지도에 불빛을 비치는 플레이어를 조금 더 밝게 합니까? 当玩家拥有手电筒时,增加地图亮度? 當玩家擁有手電筒時,增加地圖亮度? @@ -89,7 +89,7 @@ Térkép-rázkódás? Тряска карты? Scuoti la mappa? - 地図を揺らしますか? + 地図を揺らしますか? 지도 흔들림? 地图震动? 地圖震動? @@ -105,7 +105,7 @@ Rázkódjon-e a térkép mozgáskor? Заставлять карту трястись при ходьбе? Far scuotere la mappa mentre cammini? - 歩いているときは地図を揺らしますか? + 歩いているときは地図を揺らしますか? 걸을때 지도보면 흔들리게 합니까? 走路时让地图有震动的感觉? 走路時讓地圖有震動的感覺? @@ -121,7 +121,7 @@ Térkép-nagyítás korlátozása? Ограничить приближение карты? Limita lo zoom in mappa? - 地図の拡大を制限しますか? + 地図の拡大を制限しますか? 지도 확대 제한? 限制地图缩放倍率? 限制地圖縮放倍率? @@ -137,7 +137,7 @@ Korlátozva legyen-e a nagyítás mennyisége a térképnél? Ограничить максимальное приближение, доступное на карте? Limita l'ammontare di zoom disponibile per la mappa? - 地図上で利用できる拡大倍率を制限しますか? + 地図上で利用できる拡大倍率を制限しますか? 지도 확대에 제한을 둡니까? 限制地图上可允许缩放的倍率? 限制地圖上可允許縮放的倍率? @@ -153,7 +153,7 @@ Kurzor-koordináták mutatása? Показывать координаты курсора? Mostra coordinate sul cursore? - カーソル先で座標を表示しますか? + カーソル先で座標を表示しますか? 커서에 좌표를 보이게 합니까? 显示游标的座标? 顯示游標的座標? @@ -169,7 +169,7 @@ Mutatva legyen-e a kurzornál található rész rácskoordinátája? Показывать координаты около курсора мыши? Mostra la griglia coordinate sul cursore mouse? - カーソルに合わせた先を地図座標で表示しますか? + カーソルに合わせた先を地図座標で表示しますか? 지도에서 커서 옆에 좌표가 뜨게 합니까? 显示滑鼠游标所在的网格座标? 顯示滑鼠游標所在的網格座標? @@ -185,7 +185,7 @@ Этот модуль позволяет настроить отображение карты. Este módulo permite personalizar la pantalla del mapa. Questo modulo ti permette di customizzare lo schermo della mappa. - モジュールは地図画面をカスタマイズできます。 + このモジュールは地図画面を変更できます。 이 모듈은 지도 화면을 임의로 설정할 수 있게 해줍니다. 此模块允许自定地图的相关效果. 此模塊允許自定地圖的相關效果. @@ -281,7 +281,7 @@ AI csoportok elrejtése? Скрыть группы ботов? Nascondere gruppi IA? - AI グループを非表示にしますか? + AI グループを非表示にしますか? 인공지능 그룹을 숨깁니까? 隐藏AI小队? 隱藏AI小隊? @@ -297,7 +297,7 @@ Jelölők elrejtése "csak AI" csoportoknál? Скрыть маркеры групп, которые состоят полностью из ботов? Nascondi markers per gruppi di sole IA? - 'AI のみ'グループのマーカを隠しますか? + 'AI のみ'グループのマーカを隠しますか? 인공지능만 있는 그룹의 마커를 숨깁니까? 隐藏'AI小队'的踪迹? 隱藏'AI小隊'的蹤跡? @@ -313,7 +313,7 @@ Itt található az a játékos nevét? Показать имена игроков? Mostra i nomi dei giocatori? - プレイヤ名を表示しますか? + プレイヤ名を表示しますか? 플레이어 이름을 표시합니까? 显示玩家名称? 顯示玩家名稱? @@ -329,7 +329,7 @@ Itt található az adott játékos neveket? Показать отдельные имена игроков? Mostra i nomi dei giocatori singoli? - プレイヤの名前を表示しますか? + プレイヤの名前を表示しますか? 각 플레이어의 이름을 표시합니까? 显示玩家的个别名称? 顯示玩家的個別名稱? diff --git a/addons/map_gestures/ACE_Settings.hpp b/addons/map_gestures/ACE_Settings.hpp index bb01592230..d74d58a1a5 100644 --- a/addons/map_gestures/ACE_Settings.hpp +++ b/addons/map_gestures/ACE_Settings.hpp @@ -12,6 +12,7 @@ class ACE_Settings { category = CSTRING(mapGestures_category); typeName = "SCALAR"; value = 7; + sliderSettings[] = {0, 50, 7, 1}; }; class GVAR(interval) { displayName = CSTRING(interval_displayName); @@ -19,6 +20,7 @@ class ACE_Settings { category = CSTRING(mapGestures_category); typeName = "SCALAR"; value = 0.03; + sliderSettings[] = {0, 1, 0.03, 2}; }; class GVAR(nameTextColor) { displayName = CSTRING(nameTextColor_displayName); diff --git a/addons/map_gestures/CfgVehicles.hpp b/addons/map_gestures/CfgVehicles.hpp index 0745c70a16..4823460971 100644 --- a/addons/map_gestures/CfgVehicles.hpp +++ b/addons/map_gestures/CfgVehicles.hpp @@ -1,11 +1,11 @@ class CfgVehicles { class ACE_Module; class GVAR(moduleSettings): ACE_Module { - scope = 2; + scope = 1; category = "ACE"; displayName = CSTRING(moduleSettings_displayName); function = QFUNC(moduleSettings); - isGlobal = 0; + isGlobal = 1; isSingular = 1; author = ECSTRING(common,ACETeam); icon = QPATHTOF(ui\icon_module_map_gestures_ca.paa); diff --git a/addons/map_gestures/functions/fnc_moduleSettings.sqf b/addons/map_gestures/functions/fnc_moduleSettings.sqf index 6e292ce75e..f49e1d4525 100644 --- a/addons/map_gestures/functions/fnc_moduleSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleSettings.sqf @@ -19,7 +19,7 @@ params ["_logic", "", "_activated"]; -if (!_activated || !isServer) exitWith {}; +if (!_activated) exitWith {}; [_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(maxRange), "maxRange"] call EFUNC(common,readSettingFromModule); @@ -30,14 +30,14 @@ private _defaultLeadColor = _logic getVariable ["defaultLeadColor", ""]; if (_defaultLeadColor != "") then { _defaultLeadColor = call compile ("[" + _defaultLeadColor + "]"); if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultLeadColor is not a valid color array.")}; - [QGVAR(defaultLeadColor), _defaultLeadColor, true, true] call EFUNC(common,setSetting); + ["CBA_settings_setSettingMission", [QGVAR(defaultLeadColor), _defaultLeadColor, true]] call CBA_fnc_localEvent; }; private _defaultColor = _logic getVariable ["defaultColor", ""]; if (_defaultColor != "") then { _defaultColor = call compile ("[" + _defaultColor + "]"); if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")}; - [QGVAR(defaultColor), _defaultColor, true, true] call EFUNC(common,setSetting); + ["CBA_settings_setSettingMission", [QGVAR(defaultColor), _defaultColor, true]] call CBA_fnc_localEvent; }; INFO("Map Gestures Module Initialized."); diff --git a/addons/maptools/ACE_Settings.hpp b/addons/maptools/ACE_Settings.hpp index cb2d98e1ce..c0642ed4e7 100644 --- a/addons/maptools/ACE_Settings.hpp +++ b/addons/maptools/ACE_Settings.hpp @@ -1,5 +1,6 @@ class ACE_Settings { class GVAR(rotateModifierKey) { + category = CSTRING(Name); value = 1; typeName = "SCALAR"; isClientSettable = 1; @@ -7,11 +8,12 @@ class ACE_Settings { description = CSTRING(rotateModifierKey_description); values[] = {"$STR_A3_OPTIONS_DISABLED", "ALT", "CTRL", "SHIFT"}; }; - class GVAR(drawStaightLines) { + class GVAR(drawStraightLines) { + category = CSTRING(Name); value = 1; typeName = "BOOL"; isClientSettable = 1; - displayName = CSTRING(drawStaightLines_displayName); - description = CSTRING(drawStaightLines_description); + displayName = CSTRING(drawStraightLines_displayName); + description = CSTRING(drawStraightLines_description); }; }; diff --git a/addons/maptools/CfgWeapons.hpp b/addons/maptools/CfgWeapons.hpp index df884c6b67..31d8bc491e 100644 --- a/addons/maptools/CfgWeapons.hpp +++ b/addons/maptools/CfgWeapons.hpp @@ -4,6 +4,7 @@ class CfgWeapons { class ACE_MapTools: ACE_ItemCore { displayName = CSTRING(Name); + author = ECSTRING(common,ACETeam); descriptionShort = CSTRING(Description); model = QPATHTOF(data\ace_MapTools.p3d); picture = QPATHTOF(UI\maptool_item.paa); diff --git a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf index ba9363c68f..ef354f0798 100644 --- a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf +++ b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf @@ -16,7 +16,7 @@ */ #include "script_component.hpp" -if (!GVAR(drawStaightLines)) exitWith {}; +if (!GVAR(drawStraightLines)) exitWith {}; params ["_theMap", "_roamerWidth"]; GVAR(mapTool_pos) params ["_roamerPosX", "_roamerPosY"]; diff --git a/addons/maptools/stringtable.xml b/addons/maptools/stringtable.xml index 639ece59e5..c467da5f2a 100644 --- a/addons/maptools/stringtable.xml +++ b/addons/maptools/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -201,7 +201,7 @@ 修改旋转地图工具的按键 修改旋轉地圖工具的按鍵 - + Draw straight lines with maptools マップ ツールを使って直線を書く Zeichne gerade Linien mit dem Kartenwerkzeug @@ -212,7 +212,7 @@ 使用地图工具来绘制直线 使用地圖工具來繪製直線 - + Draw on the edge of maptools to draw straight lines. Note: Must hover at midpoint to delete. マップ ツールの端から直線を書きます。メモ:線の中央ホバーすると削除します。 Zeichne gerade Linien am Rand des Kartenwerkzeugs. Hinweis: zum Löschen über den Mittelpunkt der Linie fahren diff --git a/addons/markers/CfgVehicles.hpp b/addons/markers/CfgVehicles.hpp index 2fd3778738..dd20546fb0 100644 --- a/addons/markers/CfgVehicles.hpp +++ b/addons/markers/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(Module_DisplayName); function = QFUNC(initModule); - scope = 2; + scope = 1; isGlobal = 1; isSingular = 1; icon = QPATHTOF(UI\Icon_Module_Markers_ca.paa); diff --git a/addons/markers/stringtable.xml b/addons/markers/stringtable.xml index b815f80d6b..8ce677cbbc 100644 --- a/addons/markers/stringtable.xml +++ b/addons/markers/stringtable.xml @@ -24,6 +24,7 @@ Marcatori 標誌 标志 + 맵마커 This module allows you to customize markers placement. @@ -32,6 +33,7 @@ Questo modulo permette di personalizzare i marcatori a piacimento. 此模塊可讓你自定標誌的擺放方式。 此模块可让你自定标志的摆放方式。 + 이 모듈을 설정해서 맵마커 배치에 대하여 설정 할 수 있습니다. Movable markers @@ -40,6 +42,7 @@ Marcatori mobili 可移動的標誌 可移动的标志 + 마커 이동 Should map markers placed by players be movable? @@ -48,6 +51,7 @@ I marcatori in mappa piazzati dai giocatori dovrebbero poter essere mossi ? 玩家放置的地圖標誌可以被移動嗎? 玩家放置的地图标志可以被移动吗? + 배치한 마커를 플레이어가 움직일 수 있게 합니까? Move restriction @@ -56,6 +60,7 @@ Restrizione di movimento 移動限制 移动限制 + 이동 제한 Apply move restrictions so that not every player is able to move markers. @@ -64,6 +69,7 @@ Applica le restrizioni di movimento cosicchè ogni giocatore possa spostare i marcatori. 設定那些玩家可以移動標誌的位置。 设定那些玩家可以移动标志的位置。 + 일부의 플레이어가 마커를 움직일 수 있도록 제한권한을 설정하세요. All players @@ -72,6 +78,7 @@ Tutti i giocatori 所有玩家 所有玩家 + 모든 플레이어 Admins @@ -80,6 +87,7 @@ Amministratori 管理員 管理员 + 관리자 Group leaders @@ -88,6 +96,7 @@ Capigruppo 小隊長 小队长 + 분대장 Group leaders and Admins @@ -96,6 +105,7 @@ Capigruppo e Amministratori 小隊長與管理員 小队长与管理员 + 분대장과 관리자 diff --git a/addons/maverick/stringtable.xml b/addons/maverick/stringtable.xml index 3c349f4d9e..65cf3eb5f6 100644 --- a/addons/maverick/stringtable.xml +++ b/addons/maverick/stringtable.xml @@ -9,6 +9,7 @@ AGM-65 マーベリック L、レーザー誘導対地ミサイル AGM-65"小牛"飛彈L型,雷射導引對地導彈 AGM-65"小牛"飞弹L型,雷射导引对地导弹 + AGM-65 Maverick L, 레이저 유도 대지 미사일 AGM-65 Maverick L x1 @@ -17,6 +18,7 @@ AGM-65 マーベリック L x1 AGM-65"小牛"飛彈L型 x1 AGM-65"小牛"飞弹L型 x1 + AGM-65 Maverick L x1 AGM-65 Maverick L x2 @@ -25,6 +27,7 @@ AGM-65 マーベリック L x2 AGM-65"小牛"飛彈L型 x2 AGM-65"小牛"飞弹L型 x2 + AGM-65 Maverick L x2 AGM-65 Maverick L x3 @@ -33,6 +36,7 @@ AGM-65 マーベリック L x3 AGM-65"小牛"飛彈L型 x3 AGM-65"小牛"飞弹L型 x3 + AGM-65 Maverick L x3 Laser Guided @@ -41,6 +45,7 @@ レーザー誘導 雷射導引 雷射导引 + 레이저 유도 @@ -51,6 +56,7 @@ AGM-65 マーベリック L AGM-65"小牛"飛彈L型 AGM-65"小牛"飞弹L型 + AGM-65 Maverick L diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index d9ff8fe073..1b7c51b077 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -30,6 +30,7 @@ class ACE_Settings { description = CSTRING(MedicalSettings_bleedingCoefficient_Description); typeName = "SCALAR"; value = 1; + sliderSettings[] = {0, 25, 1, 1}; }; class GVAR(painCoefficient) { category = CSTRING(Category_Medical); @@ -37,6 +38,7 @@ class ACE_Settings { description = CSTRING(MedicalSettings_painCoefficient_Description); typeName = "SCALAR"; value = 1; + sliderSettings[] = {0, 25, 1, 1}; }; class GVAR(advancedBandages) { category = CSTRING(Category_Medical); @@ -58,6 +60,7 @@ class ACE_Settings { description = CSTRING(MedicalSettings_advancedDiagnose_Description); typeName = "BOOL"; value = 1; + sliderSettings[] = {0, 25, 1, 1}; }; class GVAR(woundReopening) { category = CSTRING(Category_Medical); @@ -65,6 +68,7 @@ class ACE_Settings { description = CSTRING(MedicalSettings_enableAdvancedWounds_Description); typeName = "BOOL"; value = 1; + sliderSettings[] = {0, 25, 1, 1}; }; /* @todo class GVAR(enableVehicleCrashes) { @@ -94,14 +98,16 @@ class ACE_Settings { displayName = CSTRING(MedicalSettings_playerDamageThreshold_DisplayName); description = CSTRING(MedicalSettings_playerDamageThreshold_Description); typeName = "SCALAR"; - value = 1.05; + value = 120; + sliderSettings[] = {0, 1200, 120, 0}; }; class GVAR(AIDamageThreshold) { category = CSTRING(Category_Medical); displayName = CSTRING(MedicalSettings_AIDamageThreshold_DisplayName); description = CSTRING(MedicalSettings_AIDamageThreshold_Description); typeName = "SCALAR"; - value = 1.05; + value = -1; + sliderSettings[] = {-1, 25, -1, -1}; }; class GVAR(fatalInjuryCondition) { category = CSTRING(Category_Medical); @@ -133,6 +139,7 @@ class ACE_Settings { typeName = "SCALAR"; value = 0; values[] = {"Anyone", "Medics only", "Doctors only"}; + sliderSettings[] = {-1, 3600, 0, 0}; }; class GVAR(medicSetting_Medkit) { category = CSTRING(Category_Medical); @@ -256,6 +263,7 @@ class ACE_Settings { displayName = CSTRING(MedicalSettings_spontaneousWakeUpChance_DisplayName); description = CSTRING(MedicalSettings_spontaneousWakeUpChance_Description); typeName = "SCALAR"; - value = 0; + value = 3; + sliderSettings[] = {0, 30, 3, 0}; }; }; diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index 3d03dafe7c..63a1db497e 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -9,7 +9,7 @@ class CfgVehicles { }; class ACE_Module; class ACE_moduleMedicalSettings: ACE_Module { - scope = 2; + scope = 1; displayName = CSTRING(MedicalSettings_Module_DisplayName); icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); category = "ACE_medical"; diff --git a/addons/medical/CfgWeapons.hpp b/addons/medical/CfgWeapons.hpp index b74725aadd..072e2ef640 100644 --- a/addons/medical/CfgWeapons.hpp +++ b/addons/medical/CfgWeapons.hpp @@ -8,12 +8,14 @@ class CfgWeapons { // ITEMS class FirstAidKit: ItemCore { type = 0; + ace_arsenal_hide = 1; class ItemInfo: InventoryFirstAidKitItem_Base_F { mass = 4; }; }; class Medikit: ItemCore { type = 0; + ace_arsenal_hide = 1; class ItemInfo: MedikitItem { mass = 60; }; @@ -22,6 +24,7 @@ class CfgWeapons { class ACE_ItemCore; class ACE_fieldDressing: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); model = QPATHTOF(data\bandage.p3d); picture = QPATHTOF(ui\items\fieldDressing_x_ca.paa); displayName = CSTRING(Bandage_Basic_Display); @@ -33,6 +36,7 @@ class CfgWeapons { }; class ACE_packingBandage: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(Packing_Bandage_Display); picture = QPATHTOF(ui\items\packingBandage_x_ca.paa); model = QPATHTOF(data\packingbandage.p3d); @@ -44,6 +48,7 @@ class CfgWeapons { }; class ACE_elasticBandage: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(Bandage_Elastic_Display); picture = QPATHTOF(ui\items\elasticBandage_x_ca.paa); model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; @@ -55,6 +60,7 @@ class CfgWeapons { }; class ACE_tourniquet: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(Tourniquet_Display); picture = QPATHTOF(ui\items\tourniquet_x_ca.paa); model = QPATHTOF(data\tourniquet.p3d); @@ -66,6 +72,7 @@ class CfgWeapons { }; class ACE_morphine: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(Morphine_Display); picture = QPATHTOF(ui\items\morphine_x_ca.paa); model = QPATHTOF(data\morphine.p3d); @@ -77,6 +84,7 @@ class CfgWeapons { }; class ACE_adenosine: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(Adenosine_Display); picture = QPATHTOF(ui\items\adenosine_x_ca.paa); model = QPATHTOF(data\adenosine.p3d); @@ -88,6 +96,7 @@ class CfgWeapons { }; class ACE_atropine: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(Atropine_Display); picture = QPATHTOF(ui\items\atropine_x_ca.paa); model = QPATHTOF(data\atropine.p3d); @@ -99,6 +108,7 @@ class CfgWeapons { }; class ACE_epinephrine: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(Epinephrine_Display); picture = QPATHTOF(ui\items\epinephrine_x_ca.paa); model = QPATHTOF(data\epinephrine.p3d); @@ -111,6 +121,7 @@ class CfgWeapons { class ACE_plasmaIV: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(Plasma_IV); model = QPATHTOF(data\IVBag_1000ml.p3d); hiddenSelections[] = {"camo"}; @@ -140,6 +151,7 @@ class CfgWeapons { }; class ACE_bloodIV: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); model = QPATHTOF(data\IVBag_1000ml.p3d); displayName = CSTRING(Blood_IV); picture = QPATHTOF(ui\items\bloodIV_x_ca.paa); @@ -169,6 +181,7 @@ class CfgWeapons { }; class ACE_salineIV: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(Saline_IV); model = QPATHTOF(data\IVBag_1000ml.p3d); hiddenSelections[] = {"camo"}; @@ -198,6 +211,7 @@ class CfgWeapons { }; class ACE_quikclot: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(QuikClot_Display); model = QPATHTOF(data\QuikClot.p3d); picture = QPATHTOF(ui\items\quickclot_x_ca.paa); @@ -219,6 +233,7 @@ class CfgWeapons { }; class ACE_personalAidKit: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(Aid_Kit_Display); picture = QPATHTOF(ui\items\personal_aid_kit_x_ca.paa); descriptionShort = CSTRING(Aid_Kit_Desc_Short); @@ -229,6 +244,7 @@ class CfgWeapons { }; class ACE_surgicalKit: ACE_ItemCore { scope=2; + author = ECSTRING(common,ACETeam); displayName= CSTRING(SurgicalKit_Display); model = QPATHTOF(data\surgical_kit.p3d); picture = QPATHTOF(ui\items\surgicalKit_x_ca.paa); @@ -240,6 +256,7 @@ class CfgWeapons { }; class ACE_bodyBag: ACE_ItemCore { scope=2; + author = ECSTRING(common,ACETeam); displayName= CSTRING(Bodybag_Display); model = QPATHTOF(data\bodybagItem.p3d); picture = QPATHTOF(ui\items\bodybag_x_ca.paa); diff --git a/addons/medical/XEH_PREP.hpp b/addons/medical/XEH_PREP.hpp index daf0727054..980d46a467 100644 --- a/addons/medical/XEH_PREP.hpp +++ b/addons/medical/XEH_PREP.hpp @@ -1,22 +1,36 @@ - PREP(addDamageToUnit); PREP(addStateHandler); PREP(adjustPainLevel); PREP(bodyCleanupLoop); PREP(conditionCardiacArrestTimer); PREP(conditionExecutionDeath); +PREP(dev_watchMedicalStats); PREP(displayPatientInformation); PREP(displayTriageCard); -PREP(dev_watchMedicalStats); PREP(enteredStateCardiacArrest); PREP(enteredStateFatalInjury); PREP(getBloodLoss); PREP(getBloodPressure); PREP(getBloodVolumeChange); PREP(getCardiacOutput); +PREP(getHeartRateChange); PREP(getPainLevel); +PREP(getTriageStatus); +PREP(getTypeOfDamage); +PREP(getUnconsciousCondition); PREP(getUnitState); +PREP(handleBandageOpening); +PREP(handleDamage); +PREP(handleDamage_advanced); +PREP(handleDamage_advancedSetDamage); +PREP(handleDamage_airway); +PREP(handleDamage_caching); +PREP(handleDamage_fractures); +PREP(handleDamage_internalInjuries); +PREP(handleDamage_wounds); +PREP(handleDamage_woundsOld); PREP(handleIncapacitation); +PREP(handleInit); PREP(handleKilled); PREP(handleLocal); PREP(handleRespawn); @@ -24,6 +38,10 @@ PREP(handleStateDefault); PREP(handleStateInjured); PREP(handleStateUnconscious); PREP(handleUnitVitals); +PREP(handleUnitVitals); +PREP(hasItem); +PREP(hasItems); +PREP(hasMedicalEnabled); PREP(hasStableVitals); PREP(hasTourniquetAppliedTo); PREP(init); @@ -36,9 +54,9 @@ PREP(isInStableCondition); PREP(isMedic); PREP(isMedicalVehicle); PREP(leftStateCardiacArrest); -PREP(moduleMedicalSettings); PREP(moduleAssignMedicRoles); PREP(moduleAssignMedicalVehicle); +PREP(moduleMedicalSettings); PREP(serverRemoveBody); PREP(setCardiacArrest); PREP(setDead); diff --git a/addons/medical/config.cpp b/addons/medical/config.cpp index 6345e1fbd0..a6de5e4d6b 100644 --- a/addons/medical/config.cpp +++ b/addons/medical/config.cpp @@ -29,3 +29,7 @@ class CfgPatches { class ACE_Extensions { extensions[] += {"ace_medical"}; }; + +class ACE_Extensions { + extensions[] += {"ace_medical"}; +}; diff --git a/addons/medical/functions/fnc_handleInit.sqf b/addons/medical/functions/fnc_handleInit.sqf new file mode 100644 index 0000000000..7094219aae --- /dev/null +++ b/addons/medical/functions/fnc_handleInit.sqf @@ -0,0 +1,27 @@ +/* + * Author: KoffeinFlummi + * Called when a unit is initialized via XEH_init + * + * Arguments: + * 0: The Unit + * + * Return Value: + * None + * + * Example: + * [bob] call ACE_medical_fnc_handleInit + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit"]; + +_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]; + +if (local _unit) then { + if (!EGVAR(common,settingsInitFinished)) exitWith { + EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(init), [_unit]]; + }; + [_unit] call FUNC(init); +}; diff --git a/addons/medical/functions/fnc_handleRespawn.sqf b/addons/medical/functions/fnc_handleRespawn.sqf index 13fd03dc7b..45fddb7572 100644 --- a/addons/medical/functions/fnc_handleRespawn.sqf +++ b/addons/medical/functions/fnc_handleRespawn.sqf @@ -1,6 +1,6 @@ /* - * Author: Zakant - * Handles respawn of a unit. + * Author: KoffeinFlummi + * Called when a unit is Respawned * * Arguments: * 0: The Unit @@ -9,22 +9,24 @@ * None * * Example: - * [player] call ace_medical_fnc_handleRespawn + * [bob] call ACE_medical_fnc_handleRespawn * * Public: No */ -#define DEBUG_MODE_FULL #include "script_component.hpp" params ["_unit"]; -TRACE_2("handleRespawn",_unit,local _unit); -if (!local _unit) exitWith {}; +// reset all variables. @todo GROUP respawn? +[_unit] call FUNC(init); -_unit call FUNC(init); // Call init to reset the medical states for the unit. -[_unit, GVAR(STATE_MACHINE), _unit call FUNC(getUnitState), "Default"] call CBA_statemachine_fnc_manualTransition; // Move the unit to the default medical state -#ifdef DEBUG_MODE_FULL -private _state = [_unit, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState; -TRACE_1("current state",_state); -#endif +// Reset captive status for respawning unit +if (!(_unit getVariable ["ACE_isUnconscious", false])) then { + [_unit, "setCaptive", "ace_unconscious", false] call EFUNC(common,statusEffect_set); +}; +// Remove maximum unconsciousness time handler +_maxUnconHandle = _unit getVariable [QGVAR(maxUnconTimeHandle), -1]; +if (_maxUnconHandle > 0) then { + [_maxUnconHandle] call CBA_fnc_removePerFrameHandler; +}; diff --git a/addons/medical/functions/fnc_unconsciousPFH.sqf b/addons/medical/functions/fnc_unconsciousPFH.sqf new file mode 100644 index 0000000000..2f9d1a5522 --- /dev/null +++ b/addons/medical/functions/fnc_unconsciousPFH.sqf @@ -0,0 +1,146 @@ +/* + * Author: Glowbal + * PFH logic for unconscious state + * + * Arguments: + * 0: PFEH - + * 0: The unit that will be put in an unconscious state + * 1: unitPos (stance) + * 2: Starting Time + * 3: Minimum Waiting Time + * 4: Has Moved Out + * 5: Parachute Check + * 1: PFEH ID + * + * Return Value: + * None + * + * Example: + * [[unit,"pos", 5, 5, true, false], 5], "classname"] call ace_medical_fnc_unconsciousPFH + * + * Public: yes + */ + +#include "script_component.hpp" + +params ["_args", "_idPFH"]; +_args params ["_unit", "_originalPos", "_startingTime", "_minWaitingTime", "_hasMovedOut", "_parachuteCheck"]; + +TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _originalPos, _startingTime, _minWaitingTime, _hasMovedOut, _parachuteCheck); + +if (!alive _unit) exitWith { + if ("ACE_FakePrimaryWeapon" in (weapons _unit)) then { + TRACE_1("Removing fake weapon [on death]",_unit); + _unit removeWeapon "ACE_FakePrimaryWeapon"; + }; + if (GVAR(moveUnitsFromGroupOnUnconscious)) then { + [_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide); + }; + [_unit, "setHidden", "ace_unconscious", false] call EFUNC(common,statusEffect_set); + [_unit, false] call EFUNC(common,disableAI); + //_unit setUnitPos _originalPos; + + [_unit, "isUnconscious"] call EFUNC(common,unmuteUnit); + ["ace_unconscious", [_unit, false]] call CBA_fnc_globalEvent; + + TRACE_3("ACE_DEBUG_Unconscious_Exit",_unit, (!alive _unit) , "ace_unconscious"); + + [_idPFH] call CBA_fnc_removePerFrameHandler; +}; + +// In case the unit is no longer in an unconscious state, we are going to check if we can already reset the animation +if !(_unit getVariable ["ACE_isUnconscious",false]) exitWith { + TRACE_7("ACE_DEBUG_Unconscious_PFH",_unit, _args, [_unit] call FUNC(isBeingCarried), [_unit] call FUNC(isBeingDragged), _idPFH, _unit getVariable QGVAR(unconsciousArguments),animationState _unit); + // TODO, handle this with carry instead, so we can remove the PFH here. + // Wait until the unit isn't being carried anymore, so we won't end up with wierd animations + if !(([_unit] call FUNC(isBeingCarried)) || ([_unit] call FUNC(isBeingDragged))) then { + if ("ACE_FakePrimaryWeapon" in (weapons _unit)) then { + TRACE_1("Removing fake weapon [on wakeup]",_unit); + _unit removeWeapon "ACE_FakePrimaryWeapon"; + }; + + if (vehicle _unit == _unit) then { + if (animationState _unit == "AinjPpneMstpSnonWrflDnon") then { + [_unit,"AinjPpneMstpSnonWrflDnon_rolltofront", 2] call EFUNC(common,doAnimation); + [_unit,"amovppnemstpsnonwnondnon", 1] call EFUNC(common,doAnimation); + } else { + [_unit,"amovppnemstpsnonwnondnon", 2] call EFUNC(common,doAnimation); + }; + } else { + private _vehicle = vehicle _unit; + private _oldVehicleAnimation = _unit getVariable [QGVAR(vehicleAwakeAnim), []]; + private _awakeInVehicleAnimation = ""; + if (((count _oldVehicleAnimation) > 0) && {(_oldVehicleAnimation select 0) == _vehicle}) then { + _awakeInVehicleAnimation = _oldVehicleAnimation select 1; + }; + //Make sure we have a valid, non-terminal animation: + if ((_awakeInVehicleAnimation != "") && {(getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> _awakeInVehicleAnimation >> "terminal")) == 0}) then { + [_unit, _awakeInVehicleAnimation, 2] call EFUNC(common,doAnimation); + } else { + //Don't have a valid animation saved, reset the unit animation with a moveInXXX + TRACE_1("No Valid Animation, doing seat reset", _awakeInVehicleAnimation); + private _slotInfo = []; + {if ((_x select 0) == _unit) exitWith {_slotInfo = _x;};} forEach (fullCrew _vehicle); + if (_slotInfo isEqualTo []) exitWith {ERROR("No _slotInfo?");}; + //Move the unit out: + _unit setPosASL ((getPosASL _unit) vectorAdd [0,0,100]); + //Move the unit back into old seat: + if ((_slotInfo select 1) == "driver") then { + _unit moveInDriver _vehicle; + } else { + if ((_slotInfo select 1) == "cargo") then { + _unit moveInCargo [_vehicle, (_slotInfo select 2)]; + } else { + _unit moveInTurret [_vehicle, (_slotInfo select 3)]; + }; + }; + }; + }; + _unit setVariable [QGVAR(vehicleAwakeAnim), nil]; + + ["ace_unconscious", [_unit, false]] call CBA_fnc_globalEvent; + // EXIT PFH + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + if (!_hasMovedOut) then { + // Reset the unit back to the previous captive state. + [_unit, "setHidden", "ace_unconscious", false] call EFUNC(common,statusEffect_set); + + // Swhich the unit back to its original group + //Unconscious units shouldn't be put in another group #527: + if (GVAR(moveUnitsFromGroupOnUnconscious)) then { + [_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide); + }; + [_unit, false] call EFUNC(common,disableAI); + _unit setUnitPos _originalPos; // This is not position but stance (DOWN, MIDDLE, UP) + + _unit setUnconscious false; + + [_unit, "isUnconscious"] call EFUNC(common,unmuteUnit); + + // ensure this statement runs only once + _args set [4, true]; + }; +}; + +if (_parachuteCheck) then { + if !(vehicle _unit isKindOf "ParachuteBase") then { + [_unit, [_unit] call EFUNC(common,getDeathAnim), 1, true] call EFUNC(common,doAnimation); + _args set [5, false]; + }; +}; + +if (!local _unit) exitWith { + TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getVariable QGVAR(unconsciousArguments)); + _args set [3, _minWaitingTime - (CBA_missionTime - _startingTime)]; + _unit setVariable [QGVAR(unconsciousArguments), _args, true]; + [_idPFH] call CBA_fnc_removePerFrameHandler; +}; + +// Ensure we are waiting at least a minimum period before checking if we can wake up the unit again, allows for temp knock outs +if ((CBA_missionTime - _startingTime) >= _minWaitingTime) exitWith { + TRACE_2("ACE_DEBUG_Unconscious_Temp knock outs",_unit, [_unit] call FUNC(getUnconsciousCondition)); + if (!([_unit] call FUNC(getUnconsciousCondition))) then { + _unit setVariable ["ACE_isUnconscious", false, true]; + }; +}; diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 6b4b121557..2cc910e09f 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -4,7 +4,7 @@ INJURIES VERLETZUNGEN - LESIONI + FERITE ТРАВМЫ BLESSURES OBRAŻENIA @@ -20,7 +20,7 @@ No injuries on this bodypart... Körperteil nicht verletzt... - Non ci sono lesioni in questa parte del corpo... + Non ci sono ferite in questa parte del corpo... Данная часть тела не повреждена... Aucune blessures sur cette partie du corps... Brak obrażeń na tej części ciała... @@ -28,11 +28,43 @@ Ezen a testrészen nincs sérülés... Žádné zranění na této části těla... Nenhum ferimento nesta parte do corpo... - 怪我をしていない + この身体は怪我をしていません・・・ 이 부위에는 부상이 없습니다... 此身体部位没有受伤 此身體部位沒有受傷 + + Litter Simulation Detail + Detale zużytych medykamentów + Detalle de simulación de basura + Количество мусора от медицины + Dettagli Simulazione Rifiuti + Niveau de simulation des détritus + Abfall-Detaillevel + Hulladékszimuláció részletessége + Detalhe da simulação de sujeira + Počet zobrazených předmětů po použití zdravotnického materiálu + 医療廃棄物シミュレーション詳細度 + 의료폐기물 재현 상세도 + 医疗废弃物模拟细节 + 醫療廢棄物模擬細節 + + + Litter simulation detail level sets the number of litter items which will be locally spawned in the client. Excessive amounts in local areas could cause FPS lag, so this is a client only setting. + Opcja ta ustawia liczbę zużytych medykamentów, jakie pojawiają się lokalnie wokół gracza. Ich zbyt duża ilość może spowodować spadki FPS, dlatego jest to ustawienie tylko po stronie klienta. + Detalle simulación de basura establece el número de artículos de basura que se generan a nivel local en el cliente. Las cantidades excesivas en áreas locales podrían causar caída de rendimiento, así que esto es un ajuste de cliente únicamente. + Устанавливает количество мусора, который появляется после использования мед. препаратов. Большое количество мусора может уменьшить производительность, поэтому данная настройка локальна для клиента. + Il numero di rifiuti che verranno creati localmente. La creazione di troppi rifiuti in aree locali potrebbe causare lag e calo di FPS. Questo è un settaggio lato client. + Le niveau de simulation des détritus règle la quantité de déchets qui vont être créés localement chez le client. Des quantitées excessive chez certains clients peuvent causer des chutes de FPS, c'est donc une option client uniquement. + Die Einstellung für das Abfall-Detaillevel stellt die Menge des lokal angezeigten medizinischen Abfalls ein. Zuviel Abfall kann FPS-Einbrüche erzeugen, weswegen diese Einstellung nur clientseitig ist. + A hulladékszimuláció részletessége megszabja a kliens által megjelenített hulladékobjektumok mennyiségét. Súlyos mennyiségek izolált területeken alacsony FPS-t okozhatnak, így ez egy kliensoldali beállítás. + O nível de detalhe de sujeira determina o número de itens que irão aparecer no cliente. Quantidades excessivas em áreas locais podem aumentar o lag do FPS, então esta é uma opção somente para o cliente. + Počet zobrazených předmětů po použití zdravotnického materiálu ovlivňuje počet objektů, které budou zobrazeny klientovi v místě použití zdravotnického materiálu. Vyšší množství objektů může způsobovat poklesy FPS a proto je toto nastavení čistě na klientovi. + 医療廃棄物シミュレーションは各クライアントでローカルに作成される、医療廃棄物の詳細度を決定できます。ローカルで多くのアイテムがあると FPS の低下を引き起こすため、クライアント側のみの設定です。 + 의료폐기물 재현 상세도의 경우 얼마나 많은 수의 폐기물이 클라이언트 주변에 생성되는지를 정합니다. 매우 많은 수의 지역은 프레임드랍을 유발할 수 있습니다, 고로 이는 클라이언트 전용 설정입니다. + 设定医疗废弃物的最大产生数量,过多的数量会导致画面更新率延迟,因此这由用户端来设定。 + 設定醫療廢棄物的最大產生數量,過多的數量會導致畫面更新率延遲,因此這由用戶端來設定。 + Inject Adenosine Adenosin injizieren @@ -283,7 +315,7 @@ Morfium beadása... Injetando Morfina... Inietto la morfina... - モルヒネを投与中・・・ + モルヒネを投与しています・・・ 모르핀 주사중... 吗啡注射中... 嗎啡注射中... @@ -299,7 +331,7 @@ Epinefrin beadása... Injetando Epinefrina... Inietto l'adrenalina... - アドレナリンを投与中・・・ + アドレナリンを投与しています・・・ 에피네프린 주사중... 肾上腺素注射中... 腎上腺素注射中... @@ -314,7 +346,7 @@ Aplikuji adenosine... Injetando Adenosina... Введение аденозина... - アドネシンを投与中・・・ + アドネシンを投与しています・・・ 아데노신 주사중... 腺苷注射中... 腺苷注射中... @@ -330,7 +362,7 @@ Atropin beadása... Inietto l'atropina... Injetando Atropina - アトロピンを投与中・・・ + アトロピンを投与しています・・・ 아트리핀 주사중... 阿托品注射中 ... 阿托品注射中 ... @@ -346,7 +378,7 @@ Infúzió vérrel... Transfundindo Sangue... Effettuo la trasfusione di sangue... - 輸血中・・・ + 輸血しています・・・ 혈액 수혈중... 输血液中 ... 輸血液中 ... @@ -362,7 +394,7 @@ Infúzió sós vizzel... Effettuo la rasfusione di soluzione salina Transfundindo Soro... - 生理食塩水を投与中・・・ + 生理食塩水を投与しています・・・ 생리식염수 수혈중... 施打生理食盐水中 ... 施打生理食鹽水中 ... @@ -378,7 +410,7 @@ Infúzió vérplazmával... Effettu la trasfusione di plasma... Transfundindo Plasma... - 血しょうを投与中・・・ + 血しょうを投与しています・・・ 혈장 수혈중... 输血浆中 ... 輸血漿中 ... @@ -554,7 +586,7 @@ Ez az orvosi lap nem tartalmaz bejegyzést. Žádné záznamy na tomto štítku Nenhuma entrada neste cartão de triagem - トリアージ カードには何も無い + トリアージ カードには何も無い。 부상자 분류 카드에 쓰여있는것이 없습니다. 此检伤分类卡上没有任何资料 此檢傷分類卡上沒有任何資料 @@ -618,7 +650,7 @@ Diagnózis folyamatban... Diagnostika... Diagnosticando... - 診断中・・・ + 診断しています・・・ 진단중... 诊断中... 診斷中... @@ -650,7 +682,7 @@ Újraélesztés folyamatban... Provádím CPR... Realizando o SBV... - 心肺蘇生を実行中・・・ + 心肺蘇生をしています・・・ 심폐소생중... 进行心肺复苏术中... 進行心肺復甦術中... @@ -1915,7 +1947,7 @@ Controllando la pressione sanguigna.. Aferindo Pressão Arterial... Měřím krevní tlak... - 血圧を測定中・・・ + 血圧を測定しています・・・ 혈압 측정증... 检查血压中... 檢查血壓中... @@ -2139,7 +2171,7 @@ Controllando il battito cardiaco... Aferindo Pulso... Kontroluji srdeční tep... - 心拍数を測定中・・・ + 心拍数を測定しています・・・ 맥박 확인중... 检查心跳中... 檢查心跳中... @@ -2571,7 +2603,7 @@ %1 verbindet dich %1 está aplicando uma bandagem em você %1 tě obvazuje - %1 は自分に包帯を巻いている + %1 はあなたに包帯を巻いている %1 (이)가 나에게 붕대를 감고있다 %1 正在对你包扎绷带中 %1 正在對你包紮繃帶中 @@ -2795,7 +2827,7 @@ Stai mettendo il corpo nella sacca... Colocando corpo dentro do saco para cadáver... Umístňuji tělo do pytle na mrtvoly... - 死体袋へ梱包中・・・ + 死体袋へ入れています・・・ 시체 가방에 담는중... 将尸体放入尸袋中... 將屍體放入屍袋中... @@ -3131,7 +3163,7 @@ Tratando... Ošetřuji... Curando... - 治療中・・・ + 治療しています・・・ 치료중... 治疗中... 治療中... @@ -3147,7 +3179,7 @@ Sundavám škrtidlo... Снятие жгута... Togliendo il laccio emostatico... - 止血帯を外している・・・ + 止血帯を外しています・・・ 지혈대 제거중... 移除军用止血带中... 移除軍用止血帶中... @@ -3211,7 +3243,7 @@ Quel niveau de simulation médicale choisissez-vous? Milyen komplex legyen az orvosi szimuláció? Qual'è il livello di simulazione medica? - 治療の再現度は? + 治療の再現度は? 의료 시뮬레이션의 수준 选择需要的医疗模拟等级 選擇需要的醫療模擬等級 @@ -3243,7 +3275,7 @@ Quel niveau de détail voulez-vous pour les infirmiers? Mi a javasolt részletesség orvosok számára? Qual'è il livello di dettagli preferito per i medici? - >衛生兵への再現度をどのくらいに設定しますか? + 衛生兵への再現度をどのくらいに設定しますか? 의무병의 시뮬레이션 정도? 设定医护兵的预设医疗水平(医疗兵, 军医) 設定醫護兵的預設醫療水平(醫療兵, 軍醫) @@ -3273,7 +3305,7 @@ Aumenta a classificação do médico dentro de veículos médicos ou perto de instalações médicas [sem treinamento vira médico, médico vira doutor] Améliore l'efficacité des soins dans les véhicules ou structures de soins [non formés deviennent médecins, médecins deviennent docteurs] Улучшает медицинскую подготовку в мед. транспорте и около мед. строений [нетренированные становятся медиками, медики становятся врачами] - 医療車両や医療施設の近くは衛生兵としての能力を与える場所となり、衛生兵の訓練を受けていないのに衛生兵としてなる(未訓練は衛生兵に、衛生兵は医師に) + 医療車両や医療施設の近くは衛生兵としての能力を与える場所となり、衛生兵の訓練を受けていないのに衛生兵としてなる (未訓練は衛生兵に、衛生兵は医師に) 의무병의 수준이 주변의 차량이나 의료시설에 따라 증가합니다. [비교육자가 의무병이되고, 의무병이 의사가 됩니다] 当人员在医疗载具或是医护设施旁进行医疗时, 该员医疗能力将会有所提升 (未受训人员提升为医疗兵, 医疗兵提升为军医) 當人員在醫療載具或是醫護設施旁進行醫療時, 該員醫療能力將會有所提升 (未受訓人員提升為醫療兵, 醫療兵提升為軍醫) @@ -3294,6 +3326,70 @@ 关闭医护兵 關閉醫護兵 + + Enable Litter + Включить мусор + Aktywuj odpadki + Activar restos médicos + Abfälle aktivieren + Povolit odpadky + Ativar lixo médico + Activer les détritus + Szemét engedélyezése + Abilita Barella + 医療廃棄物の表示を有効化 + 의료폐기물 활성화 + 启用医疗废弃物 + 啟用醫療廢棄物 + + + Enable litter being created upon treatment + Включить появление мусора после лечения + Twórz odpadki medyczne podczas leczenia + Activar los restos médicos que se crean en el tratamiento + Aktiviere Abfälle, wenn eine Behandlung durchgeführt wurde + Vytváří odpad zdravotnického materiálu pří léčení + Ativar lixo ser criado após tratamento + Activer la création de détrimus au début des traitements + Engedélyezi a szemét keletkezését ellátáskor + Abilita la creazione della barella dopo trattamento + 治療を始めると、医療廃棄物の作成を有効化する + 의료폐기물이 치료중 주변에 생성되는것을 활성화 합니다 + 本功能启用后,当每次医疗动作结束时,地上会产生相应的医疗废弃物 + 本功能啟用後,當每次醫療動作結束時,地上會產生相應的醫療廢棄物 + + + Life time of litter objects + Время удаления мусора + Długość życia odpadków + Tiempo de vida de los restos médicos + Dauer des angezeigten Abfalls + Životnost pro odpadky + Tempo de vida dos objetos do lixo + Durée d'affichage des détritus + Szemétobjektumok élettartama + Tempo di vita delle barelle + 医療廃棄物の作成限界数を設定 + 의료폐기물 시간제한 + 医疗废弃物存在时间 + 醫療廢棄物存在時間 + + + How long should litter objects stay? In seconds. -1 is forever. + Как долго мусор будет оставаться на земле? В секундах. -1 означает бесконечное время. + Ile czasu musi upłynąć, aby odpadki zaczęły znikać? W sekundach. -1 dla nieskończoności. + ¿Por cuánto tiempo deben permanecer los restos médicos? En segundos. -1 es para siempre. + Wie lange sollen Abfälle am Boden liegen (in Sekunden)? -1 ist für immer. + Za jak dlouho začnou odpadky mizet? V sekundách. -1 navždy. + Quanto tempo os objetos do lixo devem ficar? Em segundos. -1 é para sempre. + Combien de temps doivent rester affiché les détritus? En secondes. -1 pour tout le temps + Milyen sokáig legyenek jelen a szemétobjektumok (másodpercben)? A -1 végtelen időt jelent. + Per quanto devono restare le barelle? In secondi. -1 è permanente + 医療廃棄物オブジェクトが表示されつづける時間を設定しますか? -1 は永遠です。 + 얼마동안 폐기물이 존재합니까? 초 단위. -1 은 영구적. + 定义医疗废弃物存在时间,以秒为单位,-1为永远存在。 + 定義醫療廢棄物存在時間,以秒為單位,-1為永遠存在。 + Enable Screams Включить крики @@ -3359,7 +3455,7 @@ Quels dégâts peut subir un joueur avant d'être tué Mennyi sérülést szenvedhet el egy játékos, mielőtt meghal? Quanto è il danno che un giocatore può sostenere prima di essere ucciso? - プレイヤーが死に始める前に損傷を受けるようにしますか? + プレイヤーが死に始める前に損傷を受けるようにしますか? 얼마정도의 부상을 플레이어가 죽기 전까지 버틸 수 있습니까? 玩家死亡前所能承受的伤害程度 玩家死亡前所能承受的傷害程度 @@ -3391,7 +3487,7 @@ Quels dégâts peut subir une IA avant d'être tuée Mennyi sérülést szenvedhet el egy AI, mielőtt meghal? Quanto è il danno che un'IA può sostenere prima di essere uccisa? - AI が死に始める前に損傷を受けるようにしますか? + AI が死に始める前に損傷を受けるようにしますか? 얼마정도의 부상을 인공지능이 죽기 전까지 버틸 수 있습니까? AI 死亡前所能承受的伤害程度 AI 死亡前所能承受的傷害程度 @@ -3411,6 +3507,102 @@ Defines how long it takes to die from cardiac arrest? + + AI Unconsciousness + Потеря сознания ботами + Nieprzytomność AI + Inconsciencia IA + KI-Bewusstlosigkeit + Bezvědomí AI + Inconsciência da IA + Inconscience des IA + AI eszméletlenség + Incoscienza IA + AI の気絶 + 인공지능 기절 + AI无意识 + AI無意識 + + + Allow AI to go unconscious + Позволить ботам терять сознание + Czy AI może być nieprzytomne od odniesionych obrażeń? + Permita a la IA caer inconsciente + KI kann bewusstlos werden + Umožňuje AI upadnout do bezvědomí + Permite IA ficar inconsciente + Autoriser les IA à tomber inconscients + Engedélyezi az AI eszméletének elvesztését + Permetti alle IA di diventare incoscienti + AI が気絶をするように + 인공지능도 기절에 빠지게 합니다 + 允许AI进入无意识状态 + 允許AI進入無意識狀態 + + + Remote Controlled AI + Ferngesteuerte KI-Einheiten + IA controlada remotamente + IA controlada remotamente + Zdalnie sterowane AI + Vzdáleně ovládané AI + Contrôle à distance des IA + Távvezérelt AI + Зевса считать ботом + IA Controllate in Remoto + 遠隔操作された AI + 인공지능 원격조종 + 遥控AI + 遙控AI + + + Treat remote controlled units as AI not players? + Legt fest, ob ferngesteuerte Einheiten als KI anstatt als Spieler behandelt werden sollen. + ¿Tratar unidades remotamente controladas como IA? + Tratar unidades remotamente controladas como IA? + Traktuj jednostki zdalnie sterowane (przez Zeusa) jako AI, nie jako graczy? + Ošetřit vzdáleně ovládané jednotky jako AI, ne jako hráče? + Soigner les unitées controlées à distance comme des IA et non comme des joueurs? + Távvezérelt egységek AI-ként, nem játékosként való kezelése? + Обрабатывать дистанционно управляемых юнитов как ботов, а не как игроков? + Considera le unità controllate in remoto come IA e non come giocatori? + 遠隔操作された AI は、非プレイヤーとして扱いますか? + 원격 조작하는 AI는 비 플레이어로 취급합니까? + 以医疗AI的方式医疗被遥控的单位 + 以醫療AI的方式醫療被遙控的單位 + + + Prevent instant death + Откл. мгновенную смерть + Wyłącz natychmiastową śmierć + Prevenir muerte instantánea + Verhindere direkten Tod + Zabránit okamžité smrti + Previnir morte instantânea + Empêcher la mort instantanée + Azonnali halál kiiktatása + Previeni morte istantanea + 即死の防止 + 즉사 방지 + 防止当场死亡 + 防止當場死亡 + + + Have a unit move to unconscious instead of death + Бойцы теряют сознание вместо того, чтобы умирать + Spraw, aby jednostka została przeniesiona do stanu nieprzytomności zamiast ginąć na miejscu od śmiertelnych obrażeń + Mover una unidad a inconsciente en vez de a muerta + Lässt eine Einheit bewusstlos werden anstatt zu sterben + Jednotka upadne do bezvědomí namísto smrti + Fazer a unidade ficar inconsciente invés de morrer + Forcer l'inconscience au lieu de la mort instantanée + Egy egység kerüljön eszméletlen állapotba a halott helyett + Imposta un'unità come incosciente invece di morta + ユニットの即死を防止するために、気絶へ移行させます + 인원의 즉사를 방지코자 즉사 대신 기절시킵니다 + 伤者最严重只会立即进入昏迷,而非立即死亡 + 傷者最嚴重只會立即進入昏迷,而非立即死亡 + Bleeding coefficient Коэффициент кровопотери @@ -3643,7 +3835,7 @@ Les plaies peuvent se rouvrir Visszanyílhatnak a bekötözött sebek? Permetti la riapertura di ferite bendate? - 包帯で巻かれた傷を再び開くようにしますか? + 包帯で巻かれた傷を再び開くようにしますか? 붕대가 풀리는것을 활성화합니까? 启用进阶伤口系统会使已被包扎的伤口有机率裂开 啟用進階傷口系統會使已被包紮的傷口有機率裂開 @@ -3675,7 +3867,7 @@ Les unités subissent des dégats lors d'accident Sérülnek-e az egységek autós ütközés során? Le unità sostengono danni da incidenti con veicoli? - ユニットは車両の衝突による損傷を受けるようにしますか? + ユニットは車両の衝突による損傷を受けるようにしますか? 차량 사고시 인원들이 부상을 입습니까? 设定人员是否会因为载具冲撞别的物件而产生伤害? 設定人員是否會因為載具衝撞別的物件而產生傷害? @@ -3711,6 +3903,24 @@ Who can use the Medkit for partial heal? + Who can use the Medkit for partial heal? + + + Who can use Epinephrine for full heal? (Basic medical only) + Wer darf Epiniphrin zur vollständigen Heilung benutzen? (Standard Sanitätseinstellungen) + Configura quienes pueden usar Epinefrina (Solo sistema médico básico) + Kto może skorzystać z adrenaliny w celu pełnego uleczenia? (Tylko podstawowy system medyczny) + Qui peut utiliser l'adrénaline pour les soins complets ? (Médical basique seulement) + Chi può usare l'epinefrina per la cura completa? (solo per sistema medico di base) + Kdo může použít adrenalin k úplnému vyléčení? (Pouze základní zdravotní systém) + Quem pode usar Epinefrina para cura completa? (Somente sistema médico básico) + Кому разрешено использовать адреналин для полного излечения? (Только для базовой медицины) + 完全に回復できるよう誰しもがアドレナリンを使えるようにしますか? (ベーシック医療のみ) + 완전한 체력회복을 위해 어느 인원이 에피네프린을 쓸 수 있습니까? (기본 의료 전용) + 谁可以使用肾上腺素完整医治? (仅适用于基本医疗) + 誰可以使用腎上腺素完整醫治? (僅適用於基本醫療) + + Allow PAK Использование аптечки Ustawienie apteczek osobistych @@ -3737,7 +3947,7 @@ Qui peut utilier la trousse sanitaire pour des soins complets? Ki használhatja az elsősegélycsomagot teljes gyógyításra? Chi può usare il KPS per cura completa? - 完全に回復できるよう誰しもが応急処置キットを使えるようにしますか? + 完全に回復できるよう誰しもが応急処置キットを使えるようにしますか? 완전한 체력회복을 위해 어느 인원이 개인응급키트을 쓸 수 있습니까? (기본 의료 전용) 谁能够使用个人急救包来达到完整医疗? 誰能夠使用個人急救包來達到完整醫療? @@ -3823,7 +4033,7 @@ La trousse sanitaire doit être consommée à l'utilisation? Eltávolítódjon az elsősegélycsomag használatkor? Il Kit Pronto Soccorso dev'essere rimosso dopo l'utilizzo? - 応急処置キットを使うと削除しますか? + 応急処置キットを使うと削除しますか? 개인응급키트를 사용하고 나서 제거합니까? 要在使用后删除个人急救包吗? 要在使用後刪除個人急救包嗎? @@ -3853,6 +4063,25 @@ Where can the Medkit be used? + Where can the Medkit be used? + + + + Where can the Epinephrine be used? (Basic Medical) + Wo kann Epiniphrin verwendet werden? (Standard Sanitätseinstellungen) + Configura donde puede usarse Epinefrina (Solo sistema médico básico) + Gdzie można korzystać z adrenaliny? (Podstawowy system medyczny) + Où peut être utilisé l'épinéphrine ? (Médical basique) + Dove si può usare l'epinefrina? (Sistema medico di base) + Kde může být použit adrenalin? (Pouze základní zdravotní systém) + Onde pode-se usar a Epinefrina? (Somente sistema médico básico) + Где может использоваться адреналин? (Базовая медицина) + どこでもアドレナリンをつかえるようにしますか? (ベーシック医療のみ) + 어디에서 에피네프린을 사용할 수 있습니까? (기본 의료) + 在哪里可以使用肾上腺素? (基本医疗) + 在哪裡可以使用腎上腺素? (基本醫療) + + Locations PAK Место использования аптечки Ograniczenie apteczek osobistych @@ -3879,7 +4108,7 @@ Où la trousse sanitaire peut être utilisée ? Hol lehet az elsősegélycsomagot használni? Dove può essere usato il Kit Pronto Soccorso? - どこでも応急処置キットをつかえるようにしますか? + どこでも応急処置キットをつかえるようにしますか? 어디에서 개인응급키트를 사용할 수 있습니까? 在哪里可以使用个人急救包? 在哪裡可以使用個人急救包? @@ -3911,7 +4140,7 @@ Onde o kit de primeiros socorros pode ser utilizado? Когда может использоваться аптечка? Quando può essere usato il Kit Pronto Soccorso? - どこでも応急処置キットをつかえるようにしますか? + どこでも応急処置キットをつかえるようにしますか? 언제 개인응급키트를 사용할 수 있습니까? 何时可以使用个人急救包? 何時可以使用個人急救包? @@ -3975,7 +4204,7 @@ Qui peut utiliser les trousses chirurgicales? Ki használhatja a sebészkészletet? Chi può usare il Kit Chirurgico? - だれでも縫合キットをつかえるようにしますか? + だれでも縫合キットをつかえるようにしますか? 어느 인원이 봉합키트를 사용할 수 있습니까? 谁能够使用手术包? 誰能夠使用手術包? @@ -4007,7 +4236,7 @@ La trousse chirurgicale doit être consommée à l'utilisation? Eltávolítódjon a sebészkészlet használatkor? Il Kit Chirurgico dev'essere rimosso dopo l'uso? - 縫合キットをつかった後に削除しますか? + 縫合キットをつかった後に削除しますか? 봉합키트를 사용하고 나서 제거합니까? 手术包会在使用后被删除吗? 手術包會在使用後被刪除嗎? @@ -4039,7 +4268,7 @@ Où peut être utilisé les trousses chirurgicales? Hol lehet a sebészkészletet használni? Dove può essere usato il Kit Chirurgico? - どこでも縫合キットをつかえるようにしますか? + どこでも縫合キットをつかえるようにしますか? 어디에서 봉합키트를 사용할 수 있게 합니까? 定义手术包可被使用的地方? 定義手術包可被使用的地方? @@ -4077,7 +4306,7 @@ Onde o kit cirúrgico pode ser utilizado? Когда может использоваться хирургический набор? Quando può essere usato il Kit Chirurgico? - いつでも縫合キットをつかえるようにしますか? + いつでも縫合キットをつかえるようにしますか? 언제 봉합키트를 사용할 수 있습니까? 何时可以使用手术工具包? 何時可以使用手術工具包? @@ -4518,7 +4747,7 @@ Estável После стабилизации Stabile - 安定 + 安静下 안정된 稳定状态下 穩定狀態下 @@ -4579,7 +4808,7 @@ Žádné škrtidlo na této části těla! Non c'è nessun laccio emostatico su questa parte del corpo! Il n'y a pas de garrot sur ce membre ! - 身体には止血帯が無い! + 身体には止血帯が無い! 이 부위에는 지혈대가 없습니다! 这部位没有止血带! 這部位沒有止血帶! @@ -4630,12 +4859,18 @@ Deckel aufklappen フタをあける Apri lid + 打開蓋子 + 打开盖子 + 뚜껑 열기 Close lid Deckel zuklappen フタをしめる Chiudi lid + 關閉蓋子 + 关闭盖子 + 뚜껑 닫기 diff --git a/addons/medical_menu/ACE_Settings.hpp b/addons/medical_menu/ACE_Settings.hpp index f6ec9d3932..4c34d11865 100644 --- a/addons/medical_menu/ACE_Settings.hpp +++ b/addons/medical_menu/ACE_Settings.hpp @@ -29,5 +29,6 @@ class ACE_Settings { value = 3; typeName = "SCALAR"; category = ECSTRING(medical,Category_Medical); + sliderSettings[] = {0, 10, 3, 1}; }; }; diff --git a/addons/medical_menu/CfgVehicles.hpp b/addons/medical_menu/CfgVehicles.hpp index 5326779cb1..71dae5d720 100644 --- a/addons/medical_menu/CfgVehicles.hpp +++ b/addons/medical_menu/CfgVehicles.hpp @@ -3,13 +3,13 @@ class CfgVehicles { class ACE_Module; class ACE_moduleMedicalMenuSettings: ACE_Module { - scope = 2; + scope = 1; displayName = CSTRING(module_DisplayName); icon = QPATHTOEF(medical,UI\Icon_Module_Medical_ca.paa); category = "ACE_medical"; function = QUOTE(DFUNC(module)); functionPriority = 1; - isGlobal = 0; + isGlobal = 1; isSingular = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); diff --git a/addons/medical_treatment/functions/fnc_actionPlaceInBodyBag.sqf b/addons/medical_treatment/functions/fnc_actionPlaceInBodyBag.sqf index be01ca7919..e2329bd5fc 100644 --- a/addons/medical_treatment/functions/fnc_actionPlaceInBodyBag.sqf +++ b/addons/medical_treatment/functions/fnc_actionPlaceInBodyBag.sqf @@ -40,7 +40,7 @@ private _direction = _dirVect call CBA_fnc_vectDir; // move the body away now, so it won't physX the bodyBag object (this setPos seems to need to be called where object is local) _target setPosASL [-5000, -5000, 0]; -private _bodyBag = createVehicle ["ACE_bodyBagObject", _position, [], 0, ""]; +private _bodyBag = createVehicle ["ACE_bodyBagObject", _position, [], 0, "NONE"]; // prevent body bag from flipping _bodyBag setPosASL _position; diff --git a/addons/microdagr/CfgVehicles.hpp b/addons/microdagr/CfgVehicles.hpp index cf596c9762..cc06db69f9 100644 --- a/addons/microdagr/CfgVehicles.hpp +++ b/addons/microdagr/CfgVehicles.hpp @@ -36,8 +36,8 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(Module_DisplayName); function = QFUNC(moduleMapFill); - scope = 2; - isGlobal = 0; + scope = 1; + isGlobal = 1; isSingular = 1; icon = QPATHTOF(UI\Icon_Module_microDAGR_ca.paa); functionPriority = 0; diff --git a/addons/microdagr/functions/fnc_moduleMapFill.sqf b/addons/microdagr/functions/fnc_moduleMapFill.sqf index 03089a4ff4..46b071122a 100644 --- a/addons/microdagr/functions/fnc_moduleMapFill.sqf +++ b/addons/microdagr/functions/fnc_moduleMapFill.sqf @@ -15,7 +15,6 @@ */ #include "script_component.hpp" -if !(isServer) exitWith {}; params ["_logic"]; [_logic, QGVAR(MapDataAvailable), "MapDataAvailable"] call EFUNC(common,readSettingFromModule); diff --git a/addons/microdagr/functions/fnc_updateDisplay.sqf b/addons/microdagr/functions/fnc_updateDisplay.sqf index 87c5ee9751..f60db3bb0f 100644 --- a/addons/microdagr/functions/fnc_updateDisplay.sqf +++ b/addons/microdagr/functions/fnc_updateDisplay.sqf @@ -89,7 +89,7 @@ case (APP_MODE_INFODISPLAY): { ([_bearing, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8 }; private _2dDistanceKm = ((getPosASL ACE_player) distance2D _targetPosLocationASL) / 1000; - _rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)]; + _rangeText = format ["%1km", _2dDistanceKm toFixed 3]; private _numASL = (_targetPosLocationASL select 2) + EGVAR(common,mapAltitude); _aboveSeaLevelText = [_numASL, 5, 0] call CBA_fnc_formatNumber; _aboveSeaLevelText = if (_numASL > 0) then {"+" + _aboveSeaLevelText + " MSL"} else {_aboveSeaLevelText + " MSL"}; @@ -145,7 +145,7 @@ case (APP_MODE_COMPASS): { ([_bearing, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8 }; private _2dDistanceKm = ((getPosASL ACE_player) distance2D _targetPosLocationASL) / 1000; - _rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)]; + _rangeText = format ["%1km", _2dDistanceKm toFixed 3]; }; (_display displayCtrl IDC_MODECOMPASS_BEARING) ctrlSetText _bearingText; @@ -163,7 +163,7 @@ case (APP_MODE_WAYPOINTS): { _x params ["_wpName", "_wpPos"]; _wpListBox lbAdd _wpName; private _2dDistanceKm = ((getPosASL ACE_player) distance2D _wpPos) / 1000; - _wpListBox lbSetTextRight [_forEachIndex, (format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)])]; + _wpListBox lbSetTextRight [_forEachIndex, (format ["%1km", _2dDistanceKm toFixed 3])]; } forEach _waypoints; _currentIndex = (_currentIndex max 0) min (count _waypoints); diff --git a/addons/missileguidance/ACE_Settings.hpp b/addons/missileguidance/ACE_Settings.hpp deleted file mode 100644 index 6394e75390..0000000000 --- a/addons/missileguidance/ACE_Settings.hpp +++ /dev/null @@ -1,9 +0,0 @@ -class ACE_Settings { - class GVAR(enabled) { - value = 2; - typeName = "SCALAR"; - displayName = CSTRING(Title); - description = CSTRING(Desc); - values[] = {CSTRING(Off), CSTRING(PlayerOnly), CSTRING(PlayerAndAi)}; - }; -}; diff --git a/addons/missileguidance/XEH_pre_init.sqf b/addons/missileguidance/XEH_pre_init.sqf index b47cf6628d..f377efddb6 100644 --- a/addons/missileguidance/XEH_pre_init.sqf +++ b/addons/missileguidance/XEH_pre_init.sqf @@ -6,4 +6,9 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +// Formally a ace_setting, users can still disable by `setting ace_missileguidance_enabled = x;` +// [0 - Off , 1 - PlayerOnly, 2 - PlayerAndAi] +// As weapons take config changes, there is little point in being able to disable guidance +if (isNil QGVAR(enabled)) then { GVAR(enabled) = 2; }; + ADDON = true; diff --git a/addons/missileguidance/config.cpp b/addons/missileguidance/config.cpp index ce75e277b4..0ce70a6026 100644 --- a/addons/missileguidance/config.cpp +++ b/addons/missileguidance/config.cpp @@ -14,7 +14,6 @@ class CfgPatches { }; #include "ACE_GuidanceConfig.hpp" -#include "ACE_Settings.hpp" #include "CfgEventhandlers.hpp" #include "CfgAmmo.hpp" diff --git a/addons/mk6mortar/ACE_Settings.hpp b/addons/mk6mortar/ACE_Settings.hpp index cd7d4e64cb..5fb88aa23b 100644 --- a/addons/mk6mortar/ACE_Settings.hpp +++ b/addons/mk6mortar/ACE_Settings.hpp @@ -1,6 +1,7 @@ class ACE_Settings { //These settings effect gameplay difficutly: defaults will leave the mortar the same as vanilla class GVAR(airResistanceEnabled) { + category = CSTRING(DisplayName); displayName = CSTRING(airResistanceEnabled_DisplayName); description = CSTRING(airResistanceEnabled_Description); value = 0; @@ -8,6 +9,7 @@ class ACE_Settings { isClientSetable = 0; }; class GVAR(allowComputerRangefinder) { + category = CSTRING(DisplayName); displayName = CSTRING(allowComputerRangefinder_DisplayName); description = CSTRING(allowComputerRangefinder_Description); value = 1; @@ -15,6 +17,7 @@ class ACE_Settings { isClientSetable = 0; }; class GVAR(allowCompass) { + category = CSTRING(DisplayName); displayName = CSTRING(allowCompass_DisplayName); description = CSTRING(allowCompass_Description); value = 1; @@ -22,6 +25,7 @@ class ACE_Settings { isClientSetable = 0; }; class GVAR(useAmmoHandling) { + category = CSTRING(DisplayName); displayName = CSTRING(useAmmoHandling_DisplayName); description = CSTRING(useAmmoHandling_Description); value = 0; diff --git a/addons/mk6mortar/CfgVehicles.hpp b/addons/mk6mortar/CfgVehicles.hpp index 75b0277192..36315772d4 100644 --- a/addons/mk6mortar/CfgVehicles.hpp +++ b/addons/mk6mortar/CfgVehicles.hpp @@ -99,8 +99,8 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(Module_DisplayName); function = QFUNC(moduleInit); - scope = 2; - isGlobal = 0; + scope = 1; + isGlobal = 1; isSingular = 1; icon = QPATHTOF(UI\Icon_Module_mk6_ca.paa); functionPriority = 0; diff --git a/addons/mk6mortar/functions/fnc_handleFired.sqf b/addons/mk6mortar/functions/fnc_handleFired.sqf index 629e66442e..b6cdac2b03 100644 --- a/addons/mk6mortar/functions/fnc_handleFired.sqf +++ b/addons/mk6mortar/functions/fnc_handleFired.sqf @@ -73,7 +73,7 @@ if (_newMuzzleVelocityCoefficent != 1) then { private _bulletVelocity = velocity _shell; private _bulletSpeed = vectorMagnitude _bulletVelocity; - private _trueVelocity = _bulletVelocity vectorDiff ACE_wind; + private _trueVelocity = _bulletVelocity vectorDiff wind; private _trueSpeed = vectorMagnitude _trueVelocity; private _drag = _deltaT * _airFriction * _trueSpeed * _relativeDensity; diff --git a/addons/mk6mortar/functions/fnc_moduleInit.sqf b/addons/mk6mortar/functions/fnc_moduleInit.sqf index 808fd576b1..4fef320117 100644 --- a/addons/mk6mortar/functions/fnc_moduleInit.sqf +++ b/addons/mk6mortar/functions/fnc_moduleInit.sqf @@ -20,7 +20,6 @@ params ["_logic", "_syncedUnits", "_activated"]; if (!_activated) exitWith {WARNING("Module - placed but not active");}; -if (!isServer) exitWith {}; [_logic, QGVAR(airResistanceEnabled), "airResistanceEnabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(allowComputerRangefinder), "allowComputerRangefinder"] call EFUNC(common,readSettingFromModule); diff --git a/addons/mk6mortar/stringtable.xml b/addons/mk6mortar/stringtable.xml index 986eadb3d3..b6dbbc2db5 100644 --- a/addons/mk6mortar/stringtable.xml +++ b/addons/mk6mortar/stringtable.xml @@ -65,6 +65,14 @@ 装药 裝藥 + + Mk6 Mortar + Mk6 Mörser + Mortaio Mk6 + MK6迫擊炮 + MK6迫击炮 + Mk6 迫撃砲 + Mk6 Settings Moździerz Mk6 - Ustawienia diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index dcd6277aed..c6892046fe 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -39,6 +39,7 @@ }; if (_isDisposable) then { + if (_isGlobal) then {WARNING_1("Deleting Global Module??? [%1]",_logicType);}; deleteVehicle _logic; }; }; diff --git a/addons/movement/ACE_Settings.hpp b/addons/movement/ACE_Settings.hpp deleted file mode 100644 index fdc0bd36b0..0000000000 --- a/addons/movement/ACE_Settings.hpp +++ /dev/null @@ -1,8 +0,0 @@ -class ACE_Settings { - class GVAR(useImperial) { - value = 0; - typeName = "BOOL"; - isClientSettable = 1; - displayName = CSTRING(UseImperial); - }; -}; diff --git a/addons/movement/CfgEventHandlers.hpp b/addons/movement/CfgEventHandlers.hpp index 083c5bb089..6aee79933c 100644 --- a/addons/movement/CfgEventHandlers.hpp +++ b/addons/movement/CfgEventHandlers.hpp @@ -1,4 +1,3 @@ - class Extended_PreStart_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preStart)); @@ -19,6 +18,6 @@ class Extended_PostInit_EventHandlers { class Extended_DisplayLoad_EventHandlers { class RscDisplayInventory { - ADDON = QUOTE(_this call COMPILE_FILE(XEH_inventoryDisplayLoad)); + ADDON = QUOTE(_this call FUNC(inventoryDisplayLoad)); }; }; diff --git a/addons/movement/XEH_PREP.hpp b/addons/movement/XEH_PREP.hpp index 04913f7670..ceafa7f5dc 100644 --- a/addons/movement/XEH_PREP.hpp +++ b/addons/movement/XEH_PREP.hpp @@ -1,7 +1,6 @@ - PREP(addLoadToUnitContainer); -PREP(getWeight); PREP(canClimb); PREP(climb); PREP(handleClimb); PREP(handleVirtualMass); +PREP(inventoryDisplayLoad); diff --git a/addons/movement/XEH_inventoryDisplayLoad.sqf b/addons/movement/XEH_inventoryDisplayLoad.sqf deleted file mode 100644 index ae717e7b39..0000000000 --- a/addons/movement/XEH_inventoryDisplayLoad.sqf +++ /dev/null @@ -1,14 +0,0 @@ -#include "script_component.hpp" - -disableSerialization; - -[{ - disableSerialization; - params ["_dialog"]; - - if (isNull _dialog) exitWith { - [_this select 1] call CBA_fnc_removePerFrameHandler; - }; - - (_dialog displayCtrl 111) ctrlSetText format ["%1 - %2 %3", [ACE_player, false, true] call EFUNC(common,getName), localize LSTRING(Weight), [ACE_player] call FUNC(getWeight)]; -}, 0, _this select 0] call CBA_fnc_addPerFrameHandler; diff --git a/addons/movement/config.cpp b/addons/movement/config.cpp index 14a3b8f68d..4979faf819 100644 --- a/addons/movement/config.cpp +++ b/addons/movement/config.cpp @@ -18,4 +18,3 @@ class CfgPatches { #include "CfgFatigue.hpp" #include "CfgMoves.hpp" #include "CfgVehicles.hpp" -#include "ACE_Settings.hpp" diff --git a/addons/movement/functions/fnc_handleClimb.sqf b/addons/movement/functions/fnc_handleClimb.sqf index ed3ff93d7e..84f78cfcc0 100644 --- a/addons/movement/functions/fnc_handleClimb.sqf +++ b/addons/movement/functions/fnc_handleClimb.sqf @@ -24,4 +24,5 @@ private _pos = _unit modelToWorldVisual (_unit selectionPosition "camera"); _pos = _pos vectorDiff (_unit selectionPosition "camera"); -_unit setPos _pos; +_unit setPosASL (AGLtoASL _pos); +TRACE_2("",AGLtoASL _pos,getPosASL _unit); diff --git a/addons/movement/functions/fnc_inventoryDisplayLoad.sqf b/addons/movement/functions/fnc_inventoryDisplayLoad.sqf new file mode 100644 index 0000000000..f7c240f332 --- /dev/null +++ b/addons/movement/functions/fnc_inventoryDisplayLoad.sqf @@ -0,0 +1,35 @@ +/* + * Author: commy2 + * Executed every time an inventory display is opened. + * + * Arguments: + * 0: Inventory display + * + * Return Value: + * None + * + * Example: + * [DISPLAY] call ACE_movement_fnc_inventoryDisplayLoad + * + * Public: No + */ +#include "script_component.hpp" + +params ["_display"]; + +private _fnc_update = { + params ["_display"]; + private _control = _display displayCtrl 111; + + _control ctrlSetText format ["%1 - %2 %3 (%4)", + [ACE_player, false, true] call EFUNC(common,getName), + localize ELSTRING(common,Weight), + [ACE_player] call EFUNC(common,getWeight), + [ACE_player, true] call EFUNC(common,getWeight) + ]; +}; + +_display displayAddEventHandler ["MouseMoving", _fnc_update]; +_display displayAddEventHandler ["MouseHolding", _fnc_update]; + +_display call _fnc_update; diff --git a/addons/movement/stringtable.xml b/addons/movement/stringtable.xml index 0eb4434b42..2d587ce3d2 100644 --- a/addons/movement/stringtable.xml +++ b/addons/movement/stringtable.xml @@ -17,22 +17,6 @@ 使用磅来显示重量 使用磅來顯示重量 - - Weight: - Gewicht: - Peso: - Poids : - Waga: - Váha: - Peso: - Peso: - Súly: - Вес: - 重量: - 무게: - 重量: - 重量: - Climb Grimper diff --git a/addons/nametags/ACE_Settings.hpp b/addons/nametags/ACE_Settings.hpp index ab6220f131..5f2956d03c 100644 --- a/addons/nametags/ACE_Settings.hpp +++ b/addons/nametags/ACE_Settings.hpp @@ -56,12 +56,14 @@ class ACE_Settings { typeName = "SCALAR"; isClientSettable = 0; category = CSTRING(Module_DisplayName); + sliderSettings[] = {0, 50, 5, 1}; }; class GVAR(playerNamesMaxAlpha) { value = 0.8; typeName = "SCALAR"; isClientSettable = 0; category = CSTRING(Module_DisplayName); + sliderSettings[] = {0, 1, 0.8, 2}; }; class GVAR(tagSize) { value = 2; diff --git a/addons/nametags/CfgVehicles.hpp b/addons/nametags/CfgVehicles.hpp index 47f530df68..e712459f68 100644 --- a/addons/nametags/CfgVehicles.hpp +++ b/addons/nametags/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(Module_DisplayName); function = QFUNC(moduleNameTags); - scope = 2; + scope = 1; isGlobal = 1; isSingular = 1; icon = QPATHTOF(UI\Icon_Module_NameTags_ca.paa); diff --git a/addons/nametags/functions/fnc_moduleNameTags.sqf b/addons/nametags/functions/fnc_moduleNameTags.sqf index e1fa1a5dc7..c2d0cf8c79 100644 --- a/addons/nametags/functions/fnc_moduleNameTags.sqf +++ b/addons/nametags/functions/fnc_moduleNameTags.sqf @@ -16,8 +16,6 @@ #include "script_component.hpp" -if !(isServer) exitWith {}; - params ["_logic", "", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index a130a002f7..ef6f27fb16 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -204,7 +204,7 @@ Névcímkék megjelenítése AI-nál? Показывать имена ботов? Mostra etichette nomi per IA? - AI の名札も表示しますか? + AI の名札も表示しますか? 인공지능의 이름도 표시합니까? 显示AI名称? 顯示AI名稱? @@ -220,7 +220,7 @@ Mutassa-e a szövetséges AI egységek nevét és rangját? Alapértelmezett: Nincs felülbírálás Показывать имена и звания дружественных ботов? По-умолчанию: Не обязывать Mostra etichette nomi ed etichette gradi per unità IA alleate? Default: Non forzare - 友軍の AI にも名前と階級を表示しますか?標準: 強制しない + 友軍の AI にも名前と階級を表示しますか? 標準: 強制しない 아군 인공지능의 계급을 표시합니까? 기본설정: 강제하지 않음 显示友军AI的名称和军阶? 预设: 不显示 顯示友軍AI的名稱和軍階? 預設: 不顯示 diff --git a/addons/nightvision/ACE_Settings.hpp b/addons/nightvision/ACE_Settings.hpp index 32dbab7fff..2cf90a2c05 100644 --- a/addons/nightvision/ACE_Settings.hpp +++ b/addons/nightvision/ACE_Settings.hpp @@ -1,8 +1,32 @@ class ACE_Settings { class GVAR(disableNVGsWithSights) { + category = CSTRING(Category); displayName = CSTRING(DisableNVGsWithSights_DisplayName); description = CSTRING(DisableNVGsWithSights_description); typeName = "BOOL"; value = 0; }; + class GVAR(fogScaling) { + category = CSTRING(Category); + displayName = CSTRING(fogScaling_DisplayName); + description = CSTRING(fogScaling_Description); + typeName = "SCALAR"; + value = 1; + sliderSettings[] = {0, 2, 1, 1}; + }; + class GVAR(effectScaling) { + category = CSTRING(Category); + displayName = CSTRING(effectScaling_DisplayName); + description = CSTRING(effectScaling_Description); + typeName = "SCALAR"; + value = 1; + sliderSettings[] = {0, 2, 1, 1}; + }; + class GVAR(aimDownSightsBlur) { + category = CSTRING(Category); + displayName = CSTRING(aimDownSightsBlur_DisplayName); + typeName = "SCALAR"; + value = 1; + sliderSettings[] = {0, 2, 1, 1}; + }; }; diff --git a/addons/nightvision/CfgEventHandlers.hpp b/addons/nightvision/CfgEventHandlers.hpp index 152887a24a..e90bed419e 100644 --- a/addons/nightvision/CfgEventHandlers.hpp +++ b/addons/nightvision/CfgEventHandlers.hpp @@ -1,30 +1,15 @@ - class Extended_PreStart_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preStart)); }; }; - class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit) ); + init = QUOTE(call COMPILE_FILE(XEH_preInit)); }; }; - class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient)); - }; -}; - -class Extended_DisplayLoad_EventHandlers { - class RscDisplayCurator { - ADDON = QUOTE(_this call FUNC(updatePPEffects)); - }; -}; - -class Extended_DisplayUnload_EventHandlers { - class RscDisplayCurator { - ADDON = QUOTE(displayNull call FUNC(updatePPEffects)); // emulate zeus display being deleted + init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; diff --git a/addons/nightvision/CfgVehicles.hpp b/addons/nightvision/CfgVehicles.hpp index c540251dbb..6b7b04f25d 100644 --- a/addons/nightvision/CfgVehicles.hpp +++ b/addons/nightvision/CfgVehicles.hpp @@ -1,9 +1,4 @@ class CfgVehicles { - class All { - ACE_NightVision_grain = 0.75; - ACE_NightVision_blur = 0.055; - }; - class Box_NATO_Support_F; class ACE_Box_Misc: Box_NATO_Support_F { class TransportItems { @@ -17,7 +12,7 @@ class CfgVehicles { class ACE_Module; class GVAR(ModuleSettings): ACE_Module { - scope = 2; + scope = 1; displayName = CSTRING(Module_DisplayName); icon = QPATHTOF(UI\Icon_Module_ca.paa); category = "ACE"; diff --git a/addons/nightvision/CfgWeapons.hpp b/addons/nightvision/CfgWeapons.hpp index 72be31d8cf..5d87b0170c 100644 --- a/addons/nightvision/CfgWeapons.hpp +++ b/addons/nightvision/CfgWeapons.hpp @@ -2,55 +2,85 @@ class CfgWeapons { class Binocular; class NVGoggles: Binocular { displayName = CSTRING(NVG_Gen3_brown); - ACE_NightVision_grain = 0.75; - ACE_NightVision_blur = 0.055; - ACE_NightVision_radBlur = 0.001; + modelOptics = ""; + GVAR(border) = QPATHTOF(data\nvg_mask_binos_4096.paa); + GVAR(bluRadius) = 0.15; + }; + class O_NVGoggles_hex_F: NVGoggles { // APEX NVG with multiple lenses (spider eyes) + modelOptics = ""; + GVAR(border) = QPATHTOF(data\nvg_mask_quad_4096.paa); // Use quad tube mask + GVAR(bluRadius) = 0.26; + }; + class NVGogglesB_grn_F: NVGoggles { // APEX NVG/Thermal + modelOptics = "\A3\weapons_f\reticle\optics_night"; // use vanilla modelOptics so it will show in IR mode }; class NVGoggles_OPFOR: NVGoggles { + modelOptics = ""; displayName = CSTRING(NVG_Gen3_black); }; class NVGoggles_INDEP: NVGoggles { + modelOptics = ""; displayName = CSTRING(NVG_Gen3_green); }; - class ACE_NVG_Gen1: NVGoggles_OPFOR { author = ECSTRING(common,ACETeam); - modelOptics = "\A3\weapons_f\reticle\optics_night"; displayName = CSTRING(NVG_Gen1); - ACE_NightVision_grain = 2.25; - ACE_NightVision_blur = 0.22; - ACE_NightVision_radBlur = 0.004; + GVAR(generation) = 1; }; class ACE_NVG_Gen2: NVGoggles_INDEP { author = ECSTRING(common,ACETeam); - modelOptics = "\A3\weapons_f\reticle\optics_night"; displayName = CSTRING(NVG_Gen2); - ACE_NightVision_grain = 1.5; - ACE_NightVision_blur = 0.11; - ACE_NightVision_radBlur = 0.002; + GVAR(generation) = 2; }; - /*class ACE_NVG_Gen3: NVGoggles { - author = ECSTRING(common,ACETeam); - modelOptics = "\A3\weapons_f\reticle\optics_night"; - displayName = CSTRING(NVG_Gen3); - ACE_NightVision_grain = 0.75; - ACE_NightVision_blur = 0.055; - ACE_NightVision_radBlur = 0.001; -};*/ class ACE_NVG_Gen4: NVGoggles { author = ECSTRING(common,ACETeam); - modelOptics = "\A3\weapons_f\reticle\optics_night"; displayName = CSTRING(NVG_Gen4); - ACE_NightVision_grain = 0.0; - ACE_NightVision_blur = 0.0; - ACE_NightVision_radBlur = 0.0; + GVAR(generation) = 4; }; class ACE_NVG_Wide: NVGoggles { author = ECSTRING(common,ACETeam); modelOptics = QPATHTOF(models\ACE_nvg_wide_optics); displayName = CSTRING(NVG_FullScreen); - ACE_NightVision_grain = 0.75; - ACE_NightVision_blur = 0.055; - ACE_NightVision_radBlur = 0.001; + }; + + + // Examples of different goggle effect types (scope=1) + // These all function differently, but we have no models to go with them + class ACE_NVG_Biocular: NVGoggles { + scope = 1; + modelOptics = ""; + author = ECSTRING(common,ACETeam); + descriptionShort = "Biocular nightvision goggles"; + displayName = "NV Goggles (Bio)"; + GVAR(border) = QPATHTOF(data\nvg_mask_4096.paa); + GVAR(bluRadius) = 0.13; + GVAR(eyeCups) = 1; + }; + class ACE_NVG_Monocular: NVGoggles { + scope = 1; + modelOptics = ""; + author = ECSTRING(common,ACETeam); + descriptionShort = "Monocular nightvision goggles"; + displayName = "NV Goggles (Mono)"; + GVAR(border) = QPATHTOF(data\nvg_mask_4096.paa); + GVAR(bluRadius) = 0.13; + }; + class ACE_NVG_Binocular: NVGoggles { + scope = 1; + modelOptics = ""; + author = ECSTRING(common,ACETeam); + descriptionShort = "Binocular nightvision goggles"; + displayName = "NV Goggles (Bino)"; + GVAR(border) = QPATHTOF(data\nvg_mask_binos_4096.paa); + GVAR(bluRadius) = 0.15; + }; + class ACE_NVG_Quadocular: NVGoggles { + scope = 1; + modelOptics = ""; + author = ECSTRING(common,ACETeam); + descriptionShort = "Quadocular nightvision goggles"; + displayName = "NV Goggles (Quad)"; + GVAR(border) = QPATHTOF(data\nvg_mask_quad_4096.paa); + GVAR(bluRadius) = 0.26; }; }; diff --git a/addons/nightvision/RscTitles.hpp b/addons/nightvision/RscTitles.hpp new file mode 100644 index 0000000000..98c2b11cb3 --- /dev/null +++ b/addons/nightvision/RscTitles.hpp @@ -0,0 +1,41 @@ +class RscPicture; +class RscText; + +class RscTitles { + class GVAR(title) { + idd = 10777; + movingEnable = 1; + enableSimulation = 1; + enableDisplay = 1; + + onLoad = QUOTE(with uiNamespace do {GVAR(titleDisplay) = _this select 0};); + onunLoad = ""; + + duration = 999999; + fadein = 0; + fadeout = 0; + + class controls { + class Hexes: RscPicture { + idc = 1000; + }; + class Mask: RscPicture { + idc = 1001; + }; + + // Add blinders for side monitors for tripple monitors (mask won't cover them) + class trippleHeadLeft: RscPicture { + idc = 1002; + text = "#(argb,8,8,3)color(0,0,0,1)"; + x = "safeZoneXAbs"; + Y = "safezoneY"; + W = "(safezoneX - safeZoneXAbs) * ((getResolution select 4)/(16/3))"; + H = "safeZoneH"; + }; + class trippleHeadRight: trippleHeadLeft { + idc = 1003; + x = "safeZoneXAbs + safeZoneWAbs - (safezoneX - safeZoneXABS) * ((getResolution select 4)/(16/3))"; + }; + }; + }; +}; diff --git a/addons/nightvision/XEH_PREP.hpp b/addons/nightvision/XEH_PREP.hpp index 251c8cc5dd..c212d22b18 100644 --- a/addons/nightvision/XEH_PREP.hpp +++ b/addons/nightvision/XEH_PREP.hpp @@ -1,7 +1,12 @@ -PREP(blending); PREP(changeNVGBrightness); PREP(initModule); +PREP(nonDedicatedFix); PREP(onCameraViewChanged); +PREP(onFiredPlayer); +PREP(onLoadoutChanged); PREP(onVisionModeChanged); -PREP(updatePPEffects); +PREP(pfeh); +PREP(refreshGoggleType); +PREP(scaleCtrl); +PREP(setupDisplayEffects); diff --git a/addons/nightvision/XEH_postInit.sqf b/addons/nightvision/XEH_postInit.sqf new file mode 100644 index 0000000000..762fd70496 --- /dev/null +++ b/addons/nightvision/XEH_postInit.sqf @@ -0,0 +1,102 @@ +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +GVAR(PFID) = -1; +GVAR(running) = false; +GVAR(nextEffectsUpdate) = -1; + +GVAR(playerHMD) = "#"; + +GVAR(priorFog) = nil; +GVAR(nvgFog) = [0,0,0]; + +GVAR(nvgBlurRadius) = -1; +GVAR(nvgGeneration) = -1; +GVAR(defaultPositionBorder) = []; +GVAR(defaultPositionHex) = []; + +GVAR(ppeffectGrain) = -1; +GVAR(ppeffectRadialBlur) = -1; +GVAR(ppeffectColorCorrect) = -1; +GVAR(ppeffectBlur) = -1; +GVAR(ppEffectCCMuzzleFlash) = -1; + + +["ace_settingsInitialized", { + TRACE_3("settingsInitialized",GVAR(disableNVGsWithSights),GVAR(fogScaling),GVAR(effectScaling)); + + ["visionMode", LINKFUNC(onVisionModeChanged), false] call CBA_fnc_addPlayerEventHandler; + + // handle only brightness if effects are disabled + if (GVAR(effectScaling) == 0) exitWith { + GVAR(ppEffectNVGBrightness) = ppEffectCreate ["ColorCorrections", 1236]; + GVAR(ppEffectNVGBrightness) ppEffectForceInNVG true; + GVAR(ppEffectNVGBrightness) ppEffectAdjust [1, (-3+3)/5 + 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]]; + GVAR(ppEffectNVGBrightness) ppEffectCommit 0; + }; + + ["loadout", LINKFUNC(onLoadoutChanged), true] call CBA_fnc_addPlayerEventHandler; + ["cameraView", LINKFUNC(onCameraViewChanged), true] call CBA_fnc_addPlayerEventHandler; + ["vehicle", LINKFUNC(refreshGoggleType), false] call CBA_fnc_addPlayerEventHandler; + ["turret", LINKFUNC(refreshGoggleType), true] call CBA_fnc_addPlayerEventHandler; + + ["ace_firedPlayer", LINKFUNC(onFiredPlayer)] call CBA_fnc_addEventHandler; + ["ace_firedPlayerVehicle", LINKFUNC(onFiredPlayer)] call CBA_fnc_addEventHandler; + + + addMissionEventHandler ["Loaded", { // Restart UI vars on mission load + if (GVAR(running)) then { + TRACE_1("restarting effects",CBA_missionTime); + [false] call FUNC(setupDisplayEffects); + [true] call FUNC(setupDisplayEffects); + }; + }]; +}] call CBA_fnc_addEventHandler; + + +// Handle an edge case for non-dedicated servers were the server running the fog effect would sync fog to other clients +[QGVAR(nonDedicatedFix), LINKFUNC(nonDedicatedFix)] call CBA_fnc_addEventHandler; +if (!isNil QGVAR(serverPriorFog)) then {[] call FUNC(nonDedicatedFix);}; // If var is defined, run it now (we must be a jip) + + +// Add keybinds +["ACE3 Equipment", QGVAR(IncreaseNVGBrightness), localize LSTRING(IncreaseNVGBrightness), { + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting", "isNotRefueling"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if ((currentVisionMode ACE_player != 1)) exitWith {false}; + if (!(missionNamespace getVariable [QGVAR(allowBrightnessControl), true])) exitWith {false}; // just a mission setVar (not ace_setting) + + // Statement + [ACE_player, 1] call FUNC(changeNVGBrightness); + true +}, {false}, [201, [false, false, true]], false] call CBA_fnc_addKeybind; //PageUp + ALT + +["ACE3 Equipment", QGVAR(DecreaseNVGBrightness), localize LSTRING(DecreaseNVGBrightness), { + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting", "isNotRefueling"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + if ((currentVisionMode ACE_player != 1)) exitWith {false}; + if (!(missionNamespace getVariable [QGVAR(allowBrightnessControl), true])) exitWith {false}; // just a mission setVar (not ace_setting) + + // Statement + [ACE_player, -1] call FUNC(changeNVGBrightness); + true +}, {false}, [209, [false, false, true]], false] call CBA_fnc_addKeybind; //PageDown + ALT + +#ifdef DEBUG_MODE_FULL +WARNING("Debug mouse wheel action enabled, this should NOT be in a final release"); +["MouseZChanged", { + GVAR(nextEffectsUpdate) = 0; + if (cba_events_shift) then { + GVAR(effectScaling) = ((GVAR(effectScaling) + ((_this select 1) / 20)) max 0) min 1; + systemChat format ["%1: %2", QGVAR(effectScaling), GVAR(effectScaling)]; + }; + if (cba_events_control) then { + GVAR(fogScaling) = ((GVAR(fogScaling) + ((_this select 1) / 20)) max 0) min 1; + systemChat format ["%1: %2", QGVAR(fogScaling), GVAR(fogScaling)]; + }; +}] call CBA_fnc_addDisplayHandler; +#endif + diff --git a/addons/nightvision/XEH_postInitClient.sqf b/addons/nightvision/XEH_postInitClient.sqf deleted file mode 100644 index bbc31d2b74..0000000000 --- a/addons/nightvision/XEH_postInitClient.sqf +++ /dev/null @@ -1,65 +0,0 @@ -// by commy2 -#include "script_component.hpp" - -if (!hasInterface) exitWith {}; - -GVAR(ppEffectBlur) = ppEffectCreate ["dynamicBlur", 1234]; -GVAR(ppEffectBlur) ppEffectForceInNVG true; -GVAR(ppEffectBlur) ppEffectAdjust [0]; -GVAR(ppEffectBlur) ppEffectCommit 0; - -GVAR(ppEffectRadialBlur) = ppEffectCreate ["radialBlur", 1238]; -GVAR(ppEffectRadialBlur) ppEffectForceInNVG true; -GVAR(ppEffectRadialBlur) ppEffectAdjust [0, 0, 0, 0]; -GVAR(ppEffectRadialBlur) ppEffectCommit 0; - -GVAR(ppEffectFilmGrain) = ppEffectCreate ["FilmGrain", 1235]; -GVAR(ppEffectFilmGrain) ppEffectAdjust [0.25, 2.5, 2.5, 2.5*0.3, 2.5*0.3, false]; -GVAR(ppEffectFilmGrain) ppEffectCommit 0; - -GVAR(ppEffectNVGBrightness) = ppEffectCreate ["ColorCorrections", 1236]; -GVAR(ppEffectNVGBrightness) ppEffectForceInNVG true; -GVAR(ppEffectNVGBrightness) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]]; -GVAR(ppEffectNVGBrightness) ppEffectCommit 0; - -GVAR(ppEffectMuzzleFlash) = ppEffectCreate ["ColorCorrections", 1237]; -GVAR(ppEffectMuzzleFlash) ppEffectEnable true; -GVAR(ppEffectMuzzleFlash) ppEffectForceInNVG true; -GVAR(ppEffectMuzzleFlash) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]]; -GVAR(ppEffectMuzzleFlash) ppEffectCommit 0; - -// Setup the event handlers -["loadout", FUNC(updatePPEffects)] call CBA_fnc_addPlayerEventHandler; -["visionMode", FUNC(updatePPEffects)] call CBA_fnc_addPlayerEventHandler; -["visionMode", FUNC(onVisionModeChanged)] call CBA_fnc_addPlayerEventHandler; -["cameraView", FUNC(updatePPEffects)] call CBA_fnc_addPlayerEventHandler; -["cameraView", FUNC(onCameraViewChanged)] call CBA_fnc_addPlayerEventHandler; -["vehicle", FUNC(updatePPEffects)] call CBA_fnc_addPlayerEventHandler; -["turret", FUNC(updatePPEffects)] call CBA_fnc_addPlayerEventHandler; - -// Add keybinds -["ACE3 Equipment", QGVAR(IncreaseNVGBrightness), localize LSTRING(IncreaseNVGBrightness), { - // Conditions: canInteract - if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting", "isNotRefueling"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Conditions: specific - if ((currentVisionMode ACE_player != 1)) exitWith {false}; - - // Statement - [ACE_player, 1] call FUNC(changeNVGBrightness); - true -}, {false}, [201, [false, false, true]], false] call CBA_fnc_addKeybind; //PageUp + ALT - -["ACE3 Equipment", QGVAR(DecreaseNVGBrightness), localize LSTRING(DecreaseNVGBrightness), { - // Conditions: canInteract - if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSitting", "isNotRefueling"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Conditions: specific - if ((currentVisionMode ACE_player != 1)) exitWith {false}; - - // Statement - [ACE_player, -1] call FUNC(changeNVGBrightness); - true -}, {false}, [209, [false, false, true]], false] call CBA_fnc_addKeybind; //PageDown + ALT - -// Register fire event handler -["ace_firedPlayer", DFUNC(blending)] call CBA_fnc_addEventHandler; -["ace_firedPlayerVehicle", DFUNC(blending)] call CBA_fnc_addEventHandler; diff --git a/addons/nightvision/config.cpp b/addons/nightvision/config.cpp index 673a7d31c0..8e33002c31 100644 --- a/addons/nightvision/config.cpp +++ b/addons/nightvision/config.cpp @@ -18,3 +18,4 @@ class CfgPatches { #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" #include "ACE_Settings.hpp" +#include "RscTitles.hpp" diff --git a/addons/nightvision/data/nvg_mask_2048.paa b/addons/nightvision/data/nvg_mask_2048.paa new file mode 100644 index 0000000000..93913fc08c Binary files /dev/null and b/addons/nightvision/data/nvg_mask_2048.paa differ diff --git a/addons/nightvision/data/nvg_mask_4096.paa b/addons/nightvision/data/nvg_mask_4096.paa new file mode 100644 index 0000000000..24d83ef648 Binary files /dev/null and b/addons/nightvision/data/nvg_mask_4096.paa differ diff --git a/addons/nightvision/data/nvg_mask_binos_2048.paa b/addons/nightvision/data/nvg_mask_binos_2048.paa new file mode 100644 index 0000000000..b3f6e2525f Binary files /dev/null and b/addons/nightvision/data/nvg_mask_binos_2048.paa differ diff --git a/addons/nightvision/data/nvg_mask_binos_4096.paa b/addons/nightvision/data/nvg_mask_binos_4096.paa new file mode 100644 index 0000000000..4a208090f4 Binary files /dev/null and b/addons/nightvision/data/nvg_mask_binos_4096.paa differ diff --git a/addons/nightvision/data/nvg_mask_hexes.paa b/addons/nightvision/data/nvg_mask_hexes.paa new file mode 100644 index 0000000000..f81514b074 Binary files /dev/null and b/addons/nightvision/data/nvg_mask_hexes.paa differ diff --git a/addons/nightvision/data/nvg_mask_hexes_thin.paa b/addons/nightvision/data/nvg_mask_hexes_thin.paa new file mode 100644 index 0000000000..57fed1ccb0 Binary files /dev/null and b/addons/nightvision/data/nvg_mask_hexes_thin.paa differ diff --git a/addons/nightvision/data/nvg_mask_quad_2048.paa b/addons/nightvision/data/nvg_mask_quad_2048.paa new file mode 100644 index 0000000000..43df98c333 Binary files /dev/null and b/addons/nightvision/data/nvg_mask_quad_2048.paa differ diff --git a/addons/nightvision/data/nvg_mask_quad_4096.paa b/addons/nightvision/data/nvg_mask_quad_4096.paa new file mode 100644 index 0000000000..3449bc8e7a Binary files /dev/null and b/addons/nightvision/data/nvg_mask_quad_4096.paa differ diff --git a/addons/nightvision/functions/fnc_blending.sqf b/addons/nightvision/functions/fnc_blending.sqf deleted file mode 100644 index 4a858838d3..0000000000 --- a/addons/nightvision/functions/fnc_blending.sqf +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Author: commy2 - * Change the blending when the player fires??. Called from the unified fired EH only for the local player and his vehicle. - * - * Arguments: - * None. Parameters inherited from EFUNC(common,firedEH) - * - * Return Value: - * Noneg - * - * Example: - * [clientFiredBIS-XEH] call ace_nightvision_fnc_blending - * - * Public: No - */ -#include "script_component.hpp" - -//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; -TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); - -private _player = ACE_player; - -//If we're not in NVG mode, or it's a grenade, exit -if (currentVisionMode _player != 1 || {toLower _weapon in ["throw", "put"]}) exitWith {}; - -private _silencer = _player weaponAccessories _weapon select 0; - -private _visibleFireCoef = 1; -private _visibleFireTimeCoef = 1; - -if (_silencer != "") then { - _visibleFireCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "visibleFire"); - _visibleFireTimeCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "visibleFireTime"); -}; - -private _visibleFire = getNumber (configFile >> "CfgAmmo" >> _ammo >> "visibleFire"); -private _visibleFireTime = getNumber (configFile >> "CfgAmmo" >> _ammo >> "visibleFireTime"); - -private _fnc_isTracer = { - if (getNumber (configFile >> "CfgAmmo" >> _ammo >> "nvgOnly") > 0) exitWith {false}; - - private _indexShot = (_player ammo _weapon) + 1; - - private _lastRoundsTracer = getNumber (configFile >> "CfgMagazines" >> _magazine >> "lastRoundsTracer"); - if (_indexShot <= _lastRoundsTracer) exitWith {true}; - - private _tracersEvery = getNumber (configFile >> "CfgMagazines" >> _magazine >> "tracersEvery"); - if (_tracersEvery == 0) exitWith {false}; - - (_indexShot - _lastRoundsTracer) % _tracersEvery == 0 -}; - -if (call _fnc_isTracer) then { - _visibleFire = _visibleFire + 2; - _visibleFireTime = _visibleFireTime + 2; -}; - -private _darkness = 1 - (call EFUNC(common,ambientBrightness)); -private _nvgBrightnessCoef = 1 + (_player getVariable [QGVAR(NVGBrightness), 0]) / 4; - -_visibleFire = _darkness * _visibleFireCoef * _visibleFire * _nvgBrightnessCoef / 10 min 1; -_visibleFireTime = _darkness * _visibleFireTimeCoef * _visibleFireTime * _nvgBrightnessCoef / 10 min 0.5; - -TRACE_2("Player Shot, Adjusting NVG Effect", _visibleFire, _visibleFireTime); - -GVAR(ppEffectMuzzleFlash) ppEffectAdjust [1, 1, _visibleFire, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]]; -GVAR(ppEffectMuzzleFlash) ppEffectCommit 0; - -GVAR(ppEffectMuzzleFlash) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]]; -GVAR(ppEffectMuzzleFlash) ppEffectCommit _visibleFireTime; diff --git a/addons/nightvision/functions/fnc_changeNVGBrightness.sqf b/addons/nightvision/functions/fnc_changeNVGBrightness.sqf index 5bb5d52721..b6ea640564 100644 --- a/addons/nightvision/functions/fnc_changeNVGBrightness.sqf +++ b/addons/nightvision/functions/fnc_changeNVGBrightness.sqf @@ -1,6 +1,6 @@ /* * Author: commy2 - * Change the brightness of the unit's NVG + * Change the brightness of the unit's NVG. * * Arguments: * 0: The Unit @@ -17,18 +17,24 @@ #include "script_component.hpp" params ["_player", "_changeInBrightness"]; -TRACE_2("params",_player,_changeInBrightness); +TRACE_2("changeNVGBrightness",_player,_changeInBrightness); -if (!hasInterface) exitWith {}; +private _areEffectsDisabled = GVAR(effectScaling) == 0; +private _brightness = _player getVariable [QGVAR(NVGBrightness), [0, -3] select _areEffectsDisabled]; -private _brightness = _player getVariable [QGVAR(NVGBrightness), 0]; - -_brightness = ((round (10 * _brightness + _changeInBrightness) / 10) min 0.5) max -0.5; +_brightness = ((_brightness + _changeInBrightness) min 0) max -6; _player setVariable [QGVAR(NVGBrightness), _brightness, false]; -GVAR(ppEffectNVGBrightness) ppEffectAdjust [1, (_brightness + 1), 0, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]]; -GVAR(ppEffectNVGBrightness) ppEffectCommit 0; - -[format [(localize LSTRING(NVGBrightness)), (_brightness * 10)]] call EFUNC(common,displayTextStructured); +[format [(localize LSTRING(NVGBrightness)), _brightness]] call EFUNC(common,displayTextStructured); playSound "ACE_Sound_Click"; + +// handle only brightness if effects are disabled +if (_areEffectsDisabled) exitWith { + // here we take (-6; 0) _brightness range and alter it to (0.4; 1.6) + GVAR(ppEffectNVGBrightness) ppEffectAdjust [1, (_brightness+3)/5 + 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]]; + GVAR(ppEffectNVGBrightness) ppEffectCommit 0; +}; + +// Trigger full ppEffects update next time run in the PFEH: +GVAR(nextEffectsUpdate) = -1; diff --git a/addons/nightvision/functions/fnc_initModule.sqf b/addons/nightvision/functions/fnc_initModule.sqf index 6831a29edf..50f8785e91 100644 --- a/addons/nightvision/functions/fnc_initModule.sqf +++ b/addons/nightvision/functions/fnc_initModule.sqf @@ -17,5 +17,6 @@ #include "script_component.hpp" params ["_module"]; +TRACE_1("initModule",_module); [_module, QGVAR(disableNVGsWithSights), "disableNVGsWithSights"] call EFUNC(common,readSettingFromModule); diff --git a/addons/nightvision/functions/fnc_nonDedicatedFix.sqf b/addons/nightvision/functions/fnc_nonDedicatedFix.sqf new file mode 100644 index 0000000000..2a5178a595 --- /dev/null +++ b/addons/nightvision/functions/fnc_nonDedicatedFix.sqf @@ -0,0 +1,30 @@ +/* + * Author: PabstMirror + * Handles the client who is the non-dedicated server turning on the fog effects. + * + * Arguments: + * 0: Module + * + * Return Value: + * None + * + * Example: + * [] call ace_nightvision_fnc_nonDedicatedFix + * + * Public: No + */ +#include "script_component.hpp" + +TRACE_1("Starting PFEH to handling non-dedicated server running effect",GVAR(serverPriorFog)); + +if (isServer) exitWith {}; + +[{ + if (isNil QGVAR(serverPriorFog)) exitWith { + TRACE_1("Ending PFEH to handling non-dedicated server running effect",_this); + [_this select 1] call CBA_fnc_removePerFrameHandler; + }; + if (!GVAR(running)) then { // If we aren't running the effect ourselves, then use the server's old fog value + 0 setFog GVAR(serverPriorFog); + }; +}, 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/nightvision/functions/fnc_onCameraViewChanged.sqf b/addons/nightvision/functions/fnc_onCameraViewChanged.sqf index 5384d6924c..08ec3afcec 100644 --- a/addons/nightvision/functions/fnc_onCameraViewChanged.sqf +++ b/addons/nightvision/functions/fnc_onCameraViewChanged.sqf @@ -14,10 +14,13 @@ * * Public: No */ - #include "script_component.hpp" params ["_unit", "_cameraView"]; +TRACE_2("onCameraViewChanged",_unit,_cameraView); + +// Refresh goggle effect (e.g. switching to vehicle's NVG) +[] call FUNC(refreshGoggleType); if (GVAR(disableNVGsWithSights) && {(hmd _unit) != ""}) then { if ((vehicle _unit == _unit) diff --git a/addons/nightvision/functions/fnc_onFiredPlayer.sqf b/addons/nightvision/functions/fnc_onFiredPlayer.sqf new file mode 100644 index 0000000000..98dc8ab56d --- /dev/null +++ b/addons/nightvision/functions/fnc_onFiredPlayer.sqf @@ -0,0 +1,66 @@ +/* + * Author: commy2, Dslyecxi, PabstMirror + * Change the blending when the player fires. Called from the unified fired EH only for the local player and his vehicle. + * + * Arguments: + * None. Parameters inherited from EFUNC(common,firedEH) + * + * Return Value: + * None + * + * Example: + * [clientFiredBIS-XEH] call ace_nightvision_fnc_onFiredPlayer + * + * Public: No + */ +#include "script_component.hpp" + +//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"]; +TRACE_7("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile); + +if ((!GVAR(running)) || {_weapon == "throw"} || {_weapon == "put"}) exitWith {}; + +private _visibleFireCoef = 1; +if (_unit == ace_player) then { + private _silencer = (_unit weaponAccessories _weapon) select 0; + if (_silencer != "") then { + _visibleFireCoef = getNumber (configFile >> "CfgWeapons" >> _silencer >> "ItemInfo" >> "AmmoCoef" >> "visibleFire"); + TRACE_1("muzzle attachement",_visibleFireCoef); + }; +}; + +private _visibleFire = getNumber (configFile >> "CfgAmmo" >> _ammo >> "visibleFire"); + +private _isTracer = call { + if (getNumber (configFile >> "CfgAmmo" >> _ammo >> "nvgOnly") > 0) exitWith {false}; + private _indexShot = (_unit ammo _weapon) + 1; + private _lastRoundsTracer = getNumber (configFile >> "CfgMagazines" >> _magazine >> "lastRoundsTracer"); + if (_indexShot <= _lastRoundsTracer) exitWith {true}; + private _tracersEvery = getNumber (configFile >> "CfgMagazines" >> _magazine >> "tracersEvery"); + if (_tracersEvery == 0) exitWith {false}; + (_indexShot - _lastRoundsTracer) % _tracersEvery == 0 +}; + +TRACE_3("",_ammo,_visibleFire,_isTracer); +if ( _isTracer) then { + _visibleFire = _visibleFire + 2; +}; + +_visibleFire = _visibleFireCoef * _visibleFire; +if (_ammo isKindOf "BulletBase") then { + _visibleFire = _visibleFire min 5; // Prevent every shot from triggering with HMG +}; +TRACE_1("final", _visibleFire); + +if (_visibleFire <= 1.5) exitWith {}; +if ((random (linearConversion [1, 4, GVAR(nvgGeneration), 10, 20])) > _visibleFire) exitWith {}; + +GVAR(ppEffectCCMuzzleFlash) = ppEffectCreate ["ColorCorrections", 1237]; +GVAR(ppEffectCCMuzzleFlash) ppEffectEnable true; +GVAR(ppEffectCCMuzzleFlash) ppEffectForceInNVG true; + +GVAR(ppEffectCCMuzzleFlash) ppEffectAdjust [1, 1, -1, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]]; +GVAR(ppEffectCCMuzzleFlash) ppEffectCommit 0; + +GVAR(ppEffectCCMuzzleFlash) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 1]]; +GVAR(ppEffectCCMuzzleFlash) ppEffectCommit 0.07; diff --git a/addons/nightvision/functions/fnc_onLoadoutChanged.sqf b/addons/nightvision/functions/fnc_onLoadoutChanged.sqf new file mode 100644 index 0000000000..32f1914bfa --- /dev/null +++ b/addons/nightvision/functions/fnc_onLoadoutChanged.sqf @@ -0,0 +1,25 @@ +/* + * Author: Dslyecxi, PabstMirror + * Refreshes nvg effect if switching NVG goggles. + * + * Arguments: + * 0: Player + * + * Return Value: + * None + * + * Example: + * [player] call ace_nightvision_fnc_onLoadoutChange + * + * Public: No + */ +#include "script_component.hpp" + +params ["_player"]; +TRACE_1("onLoadoutChange",_player); + +private _newHMD = hmd _player; +if (_newHMD != GVAR(playerHMD)) then { + GVAR(playerHMD) = _newHMD; + [] call FUNC(refreshGoggleType); +}; diff --git a/addons/nightvision/functions/fnc_onVisionModeChanged.sqf b/addons/nightvision/functions/fnc_onVisionModeChanged.sqf index 64f77a69bc..f28e39b964 100644 --- a/addons/nightvision/functions/fnc_onVisionModeChanged.sqf +++ b/addons/nightvision/functions/fnc_onVisionModeChanged.sqf @@ -1,5 +1,5 @@ /* - * Author: BaerMitUmlaut + * Author: BaerMitUmlaut, Dslyecxi, PabstMirror * Disables turning on NVGs while the player aims down his sight. * * Arguments: @@ -14,17 +14,36 @@ * * Public: No */ - #include "script_component.hpp" params ["_unit", "_visionMode"]; +TRACE_2("onVisionModeChanged",_unit,_visionMode); +// handle only brightness if effects are disabled +if (GVAR(effectScaling) == 0) exitWith { + GVAR(ppEffectNVGBrightness) ppEffectEnable (_visionMode == 1); +}; + +// Start PFEH when entering night vision mode: +if (_visionMode == 1) then { + if (GVAR(PFID) == -1) then { + GVAR(running) = true; + [true] call FUNC(setupDisplayEffects); + [] call FUNC(refreshGoggleType); + GVAR(PFID) = [LINKFUNC(pfeh), 0, []] call CBA_fnc_addPerFrameHandler; + + // Fade in from black when turning nvg on + QGVAR(turnOnEffect) cutText ["", "BLACK IN", 2.5]; + }; +}; + +// Handle disableNVGsWithSights setting: if (GVAR(disableNVGsWithSights) && {(hmd _unit) != ""}) then { if ((vehicle _unit == _unit) - || {isTurnedOut _unit} - || {!([_unit] call EFUNC(common,hasHatch)) - && {[_unit] call EFUNC(common,getTurretIndex) in ([vehicle _unit] call EFUNC(common,getTurretsFFV))} - }) then { + || {isTurnedOut _unit} + || {!([_unit] call EFUNC(common,hasHatch)) + && {[_unit] call EFUNC(common,getTurretIndex) in ([vehicle _unit] call EFUNC(common,getTurretsFFV))} + }) then { if ((cameraView == "GUNNER") && {_visionMode > 0}) then { _unit action ["NVGogglesOff", _unit]; }; diff --git a/addons/nightvision/functions/fnc_pfeh.sqf b/addons/nightvision/functions/fnc_pfeh.sqf new file mode 100644 index 0000000000..5da34d2aac --- /dev/null +++ b/addons/nightvision/functions/fnc_pfeh.sqf @@ -0,0 +1,159 @@ +/* + * Author: Dslyecxi, PabstMirror + * PFEH to handle refreshing effects. + * Updates UI scale on every frame, effects are updated less often. + * + * Arguments: + * 1: PFEH ID + * + * Return Value: + * None + * + * Example: + * [[], 1] call ace_nightvision_fnc_pfeh + * + * Public: No + */ +#include "script_component.hpp" + +if ((currentVisionMode ACE_player) != 1) exitWith { + GVAR(running) = false; + [false] call FUNC(setupDisplayEffects); + [GVAR(PFID)] call CBA_fnc_removePerFrameHandler; + GVAR(PFID) = -1; +}; +if (EGVAR(common,OldIsCamera)) exitWith { + if (GVAR(running)) then { + TRACE_2("pausing NVG for scripted camera",alive ACE_player,EGVAR(common,OldIsCamera)); + GVAR(running) = false; + [false] call FUNC(setupDisplayEffects); + }; +}; +if (!GVAR(running)) then { + TRACE_1("Un-Pausing", GVAR(paused)); + GVAR(running) = true; + [true] call FUNC(setupDisplayEffects); + [] call FUNC(refreshGoggleType); +}; + +// Scale Border / Hex +BEGIN_COUNTER(borderScaling); +private _scale = (call EFUNC(common,getZoom)) * 1.12513; +if (!(GVAR(defaultPositionBorder) isEqualTo [])) then { + // Prevents issues when "zooming out" on ultra wide monitors - The square mask would be narrower than the screen + if (((GVAR(defaultPositionBorder) select 2) * _scale) < safeZoneW) then { + _scale = safeZoneW / (GVAR(defaultPositionBorder) select 2); + }; + [(uiNamespace getVariable QGVAR(titleDisplay)) displayCtrl 1000, GVAR(defaultPositionHex), _scale] call FUNC(scaleCtrl); + [(uiNamespace getVariable QGVAR(titleDisplay)) displayCtrl 1001, GVAR(defaultPositionBorder), _scale] call FUNC(scaleCtrl); + // Fade out hexes with high zoom (optics are doing the magnifying, not the player "focusing in") + ((uiNamespace getVariable QGVAR(titleDisplay)) displayCtrl 1000) ctrlSetFade (linearConversion [4, 6, _scale, 0.2, 1, true]); +}; +END_COUNTER(borderScaling); + +if (CBA_missionTime < GVAR(nextEffectsUpdate)) then { + // Update radial blur as it depends on zoom level, so should be changed each frame like the border/hex + if (GVAR(ppeffectRadialBlur) != -1) then { + GVAR(ppeffectRadialBlur) ppEffectAdjust [.005, .005, _scale * GVAR(nvgBlurRadius), _scale * .16]; + GVAR(ppeffectRadialBlur) ppEffectCommit 0; + }; + // Need to rapidly update fog or it will try to resync from the server + if (GVAR(fogScaling) > 0) then { + 0 setFog GVAR(nvgFog); + }; +} else { + // Redo full effects less often + BEGIN_COUNTER(updateAllEffects); + GVAR(nextEffectsUpdate) = CBA_missionTime + 5; + + // Detecting the efficiency of the nightvision. + private _lightFinal = 0 max (moonIntensity - ((overcast * .8) min .275) - (rain * .5)); + private _effectiveLight = _lightFinal * linearConversion [1, 3, GVAR(nvgGeneration), 0.25, 1]; + private _effectMod = linearConversion [1, 3, GVAR(nvgGeneration), 1.5, 1]; + // This has become a little weird. Basically means that lightfinal is unlikely to reach zero with any moon in the sky + // buuut it just so happens that setting it like this means that the lighting progression from clear -> cloudy -> rainy works particularly well. + + private _grainFinal = linearConversion [1, 0, _effectiveLight, ST_NVG_GRAIN_MIN, ST_NVG_GRAIN_MAX, true]; + private _blurFinal = _effectMod *_effectMod * linearConversion [1, 0, _effectiveLight, ST_NVG_BLUR_MIN, ST_NVG_BLUR_MAX, true]; + private _brightFinal = linearConversion [0, 1, _effectiveLight, ST_NVG_BRIGHT_MIN, ST_NVG_BRIGHT_MAX, true]; + private _contrastFinal = linearConversion [0, 1, _effectiveLight, ST_NVG_CONTRAST_MIN, ST_NVG_CONTRAST_MAX, true]; + private _grainIntensityFinal = _effectMod * linearConversion [1, 0, _effectiveLight, ST_NVG_NOISEINTENSITY_MIN, ST_NVG_NOISEINTENSITY_MAX, true]; + private _noiseSharpnessFinal = linearConversion [1, 0, _effectiveLight, ST_NVG_NOISESHARPNESS_MIN, ST_NVG_NOISESHARPNESS_MAX, true]; + + private _playerBrightSetting = ACE_player getVariable [QGVAR(NVGBrightness), 0]; + _brightFinal = _brightFinal + (_playerBrightSetting / 20); + + private _fogApply = linearConversion [0, 1, _effectiveLight, ST_NVG_MAXFOG, ST_NVG_MINFOG, true]; + + // Modify blur if looking down scope + if ((cameraView == "GUNNER") && {[ACE_player] call CBA_fnc_canUseWeapon}) then { + if (currentWeapon ACE_player == "") exitWith {}; + if (currentWeapon ACE_player == primaryWeapon ACE_player) exitWith {_blurFinal = _blurFinal * linearConversion [0, 1, GVAR(aimDownSightsBlur), 1, ST_NVG_CAMERA_BLUR_SIGHTS_RIFLE]}; // Rifles are bad + if (currentWeapon ACE_player == handgunWeapon ACE_player) exitWith {_blurFinal = _blurFinal * linearConversion [0, 1, GVAR(aimDownSightsBlur), 1, ST_NVG_CAMERA_BLUR_SIGHTS_PISTOL]}; // Pistols aren't so bad + }; + + // Scale effects based on ace_nightvision_effectScaling setting + _grainIntensityFinal = _grainIntensityFinal * GVAR(effectScaling); + _noiseSharpnessFinal = linearConversion [0, 1, GVAR(effectScaling), 2.5, _noiseSharpnessFinal]; + private _radialBlurPower = 0.0025 * GVAR(effectScaling); + _brightFinal = linearConversion [0, 1, GVAR(effectScaling), 1, _brightFinal]; + _contrastFinal = linearConversion [0, 1, GVAR(effectScaling), 1, _contrastFinal]; + + + // Setup all effects + // This is hacky but... works. This prevents the effects from being cancelled by various things - alt-tabbing, resizing, going into AT sights, etc. A nicer method would be welcome but I don't have time to spend on it. TODO. + + // FilmGrain - Electronic Noise + // Params: [intensity(0..1), sharpness(0..20), grainsize(1..8), intensityX0, intensityX1, monochromatic(bool)] + GVAR(ppeffectGrain) = ppEffectCreate ["FilmGrain", 200]; + GVAR(ppeffectGrain) ppEffectAdjust [_grainIntensityFinal, _noiseSharpnessFinal, _grainFinal, 0.3, 0.3]; + // OldNVG: [0.25, 2.5, 2.5, _grainSetting, _grainSetting, false] + GVAR(ppeffectGrain) ppEffectCommit 0; + GVAR(ppeffectGrain) ppEffectForceInNVG true; + GVAR(ppeffectGrain) ppEffectEnable true; + + // RadialBlur - Blurs closer to the edge nvg border (radius based on GVAR(bluRadius) config; e.g. larger for quadtube) + // Note: "Will not do anything if RADIAL BLUR is disabled in Video Options." - So should try to keep this effect to a minimum to prevent balance issues + // Params: [powerX, powerY, offsetX, offsetY] + if (GVAR(nvgBlurRadius) != -1) then { + GVAR(ppeffectRadialBlur) = ppEffectCreate ["RadialBlur", 451]; + GVAR(ppeffectRadialBlur) ppEffectAdjust [_radialBlurPower, _radialBlurPower, _scale * GVAR(nvgBlurRadius), _scale * .16]; + GVAR(ppeffectRadialBlur) ppEffectCommit 0; + GVAR(ppeffectRadialBlur) ppEffectForceInNVG true; + GVAR(ppeffectRadialBlur) ppEffectEnable true; + }; + + // ColorCorrections - Changes brightness, contrast and "green" color of nvg + // Params: [brightness(0..2), contrast(0..inf), offset(-x..+x), blendArray, colorizeArray, weightArray] + GVAR(ppeffectColorCorrect) = ppEffectCreate ["ColorCorrections", 2003]; + GVAR(ppeffectColorCorrect) ppEffectAdjust [_brightFinal, _contrastFinal, 0, [0.0, 0.0, 0.0, 0.0], [1.3, 1.2, 0.0, 0.9], [6, 1, 1, 0.0]]; + GVAR(ppeffectColorCorrect) ppEffectCommit 0; + GVAR(ppeffectColorCorrect) ppEffectForceInNVG true; + GVAR(ppeffectColorCorrect) ppEffectEnable true; + + // DynamicBlur - Increases overall screen blur when aiming down sights (which would be hard/impossible with NVG) + // Params: [value(0..inf)] + GVAR(ppeffectBlur) = ppEffectCreate ["DynamicBlur", 190]; + GVAR(ppeffectBlur) ppEffectAdjust [_blurFinal]; + GVAR(ppeffectBlur) ppEffectCommit 0; + GVAR(ppeffectBlur) ppEffectForceInNVG true; + GVAR(ppeffectBlur) ppEffectEnable true; + + + // Modify local fog: + if (GVAR(fogScaling) > 0) then { + if (((vehicle ACE_player) != ACE_player) && {(vehicle ACE_player) isKindOf "Air"}) then { // For flying in particular, can refine nicer later. + _fogApply = _fogApply * ST_NVG_AIR_FOG_MULTIPLIER; + }; + _fogApply = linearConversion [0, 1, GVAR(priorFog) select 0, (GVAR(fogScaling) * _fogApply), 1]; // mix in old fog if present + GVAR(nvgFog) = [_fogApply, 0, 0]; + 0 setFog GVAR(nvgFog) + }; + + #ifdef DEBUG_MODE_FULL + private _aceAmbient = [] call EFUNC(common,ambientBrightness); + hintSilent format ["EffectiveLight %1\nLight: %2\nACE Ambient: %3\nBrightness: %4\nContrast: %5\nGrain: %6\nBlur: %7\nFog: %8\nScaling %9", _effectiveLight, _lightFinal, _aceAmbient, _brightFinal, _contrastFinal, [_grainIntensityFinal, _noiseSharpnessFinal, _grainFinal], _blurFinal, _fogApply, [GVAR(effectScaling),GVAR(fogScaling)]]; + #endif + + END_COUNTER(updateAllEffects); +}; diff --git a/addons/nightvision/functions/fnc_refreshGoggleType.sqf b/addons/nightvision/functions/fnc_refreshGoggleType.sqf new file mode 100644 index 0000000000..1ebadf56ae --- /dev/null +++ b/addons/nightvision/functions/fnc_refreshGoggleType.sqf @@ -0,0 +1,129 @@ +/* + * Author: Dslyecxi, PabstMirror + * Determines night vision source (player/vehicle) - Updates UI based on type. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_nightvision_fnc_refreshGoggleType + * + * Public: No + */ +#include "script_component.hpp" + +TRACE_1("refreshGoggleType",_this); + +if (!GVAR(running)) exitWith {}; + +// Defaults (good for most vehicles/binoculars) +private _borderImage = ""; +private _eyeCups = false; +private _hideHex = true; +private _nvgGen = 3; +private _blurRadius = -1; + +if (alive ACE_player) then { + if (((vehicle ACE_player) == ACE_player) || { + // Test if we are using player's nvg or if sourced from vehicle: + + private _currentVehicle = vehicle ACE_player; + private _vehConfig = configFile >> "CfgVehicles" >> (typeOf _currentVehicle); + + if (cameraView != "GUNNER") exitWith {true}; // asume hmd usage outside of gunner view + + if (ACE_player == (driver _currentVehicle)) exitWith { + !("NVG" in getArray (_vehConfig >> "ViewOptics" >> "visionMode")); + }; + private _result = true; + private _turret = ACE_player call CBA_fnc_turretPath; + private _turretConfig = [_currentVehicle, _turret] call CBA_fnc_getTurret; + + // Seems to cover things like the offroad technical + if ((isNumber (_turretConfig >> "optics")) && {(getNumber (_turretConfig >> "optics")) == 0}) exitWith {true}; + + private _turretConfigOpticsIn = _turretConfig >> "OpticsIn"; + if (isClass _turretConfigOpticsIn) then { + for "_index" from 0 to (count _turretConfigOpticsIn - 1) do { + if ("NVG" in getArray (_turretConfigOpticsIn select _index >> "visionMode")) exitWith {_result = false}; + }; + } else { + // No OpticsIn usualy means RCWS, still need to test on more vehicles + _result = false; + }; + _result + }) then { + if ((cameraView == "GUNNER") && {currentWeapon ACE_player != ""} && {binocular ACE_player == currentWeapon ACE_player}) exitWith { + TRACE_1("souce: binocular",binocular ACE_player); // Source is from player's binocular (Rangefinder/Vector21bNite) + private _config = configFile >> "CfgWeapons" >> (binocular ACE_player); + if (isNumber (_config >> QGVAR(generation))) then {_nvgGen = getNumber (_config >> QGVAR(generation));}; + }; + + TRACE_1("source: hmd",GVAR(playerHMD)); // Source is player's HMD (or possibly a NVG scope, but no good way to detect that) + private _config = configFile >> "CfgWeapons" >> GVAR(playerHMD); + if (!isClass _config) exitWith {}; + + // Only use border if there is no modelOptics + if ((getText (_config >> "modelOptics")) == "") then { + _borderImage = getText (_config >> QGVAR(border)); + _eyeCups = ((getNumber (_config >> QGVAR(eyeCups))) == 1); + _hideHex = (getNumber (_config >> QGVAR(hideHex))) == 1; + if (isNumber (_config >> QGVAR(bluRadius))) then {_blurRadius = getNumber (_config >> QGVAR(bluRadius));}; + }; + if (isNumber (_config >> QGVAR(generation))) then {_nvgGen = getNumber (_config >> QGVAR(generation));}; + + } else { + TRACE_1("source: vehicle - defaults",typeOf vehicle ACE_player); + }; +}; + +#ifdef DEBUG_MODE_FULL +systemChat format ["NVG Refresh - Border: %1", _borderImage]; +systemChat format ["EyeCups: %1, HideHex %2, NVGen: %3, BluRadius: %4", _eyeCups, _hideHex, _nvgGen, _blurRadius]; +#endif + +GVAR(nvgBlurRadius) = _blurRadius; +GVAR(nvgGeneration) = _nvgGen; + +// Setup border and hex image based on NVG config: +private _scale = (call EFUNC(common,getZoom)) * 1.12513; + +private _borderImageCtrl = (uiNamespace getVariable QGVAR(titleDisplay)) displayCtrl 1001; +private _trippleHeadLeft = (uiNamespace getVariable QGVAR(titleDisplay)) displayCtrl 1002; +private _trippleHeadRight = (uiNamespace getVariable QGVAR(titleDisplay)) displayCtrl 1003; +if (_borderImage == "") then { + _borderImageCtrl ctrlShow false; + _trippleHeadLeft ctrlShow false; + _trippleHeadRight ctrlShow false; + GVAR(defaultPositionBorder) = []; +} else { + _borderImageCtrl ctrlShow true; + _trippleHeadLeft ctrlShow true; + _trippleHeadRight ctrlShow true; + + _borderImageCtrl ctrlSetText _borderImage; + _borderImageCtrl ctrlSetFade ([.15, 0] select _eyeCups); + + #define BORDER_SIZE 3 + GVAR(defaultPositionBorder) = [safezoneX - (((BORDER_SIZE * 0.75) * safezoneH) - safezoneW) / 2, safezoneY - ((BORDER_SIZE - 1) / 2) * safezoneH, (BORDER_SIZE * 0.75) * safezoneH, BORDER_SIZE * safezoneH]; + [_borderImageCtrl, GVAR(defaultPositionBorder), _scale] call FUNC(scaleCtrl); +}; + +private _hexCtrl = (uiNamespace getVariable QGVAR(titleDisplay)) displayCtrl 1000; +if (_hideHex) then { + _hexCtrl ctrlShow false; +} else { + _hexCtrl ctrlShow true; + // _hexCtrl ctrlSetText QPATHTOF(data\nvg_mask_hexes.paa); + _hexCtrl ctrlSetText QPATHTOF(data\nvg_mask_hexes_thin.paa); + + #define HEX_SIZE 1.5 + GVAR(defaultPositionHex) = [safezoneX - (((HEX_SIZE * 0.75) * safezoneH) - safezoneW) / 2, safezoneY - ((HEX_SIZE - 1) / 2) * safezoneH, (HEX_SIZE * 0.75) * safezoneH, HEX_SIZE * safezoneH]; + [_hexCtrl, GVAR(defaultPositionHex), _scale] call FUNC(scaleCtrl); +}; + +// Trigger full ppEffects update next time run in the PFEH: +GVAR(nextEffectsUpdate) = -1; diff --git a/addons/nightvision/functions/fnc_scaleCtrl.sqf b/addons/nightvision/functions/fnc_scaleCtrl.sqf new file mode 100644 index 0000000000..b5bb80715d --- /dev/null +++ b/addons/nightvision/functions/fnc_scaleCtrl.sqf @@ -0,0 +1,31 @@ +/* + * Author: Dslyecxi, PabstMirror + * Determines night vision source (player/vehicle) - Updates UI based on type. + * + * Arguments: + * 0: Control + * 1: Default position [x,y,w,h] + * 2: Zoom Level + * + * Return Value: + * None + * + * Example: + * [] call ace_nightvision_fnc_scaleCtrl + * + * Public: No + */ +#include "script_component.hpp" + +params ["_ctrl", "_default_pos", "_scale"]; + +if (!ctrlShown _ctrl) exitWith {}; + +_ctrl ctrlSetPosition +[(((_default_pos select 0) - 0.5) * _scale) + 0.5, +(((_default_pos select 1) - 0.5) * _scale) + 0.5, +(_default_pos select 2) * _scale, +(_default_pos select 3) * _scale]; + + +_ctrl ctrlCommit 0; diff --git a/addons/nightvision/functions/fnc_setupDisplayEffects.sqf b/addons/nightvision/functions/fnc_setupDisplayEffects.sqf new file mode 100644 index 0000000000..004d186998 --- /dev/null +++ b/addons/nightvision/functions/fnc_setupDisplayEffects.sqf @@ -0,0 +1,77 @@ +/* + * Author: Dslyecxi, PabstMirror + * Handles setting up the effects: fog, ppEffects and the RscTittle. + * + * Arguments: + * 0: Activated + * + * Return Value: + * None + * + * Example: + * [true] call ace_nightvision_fnc_setupDisplayEffects + * + * Public: No + */ +#include "script_component.hpp" + +params ["_activated"]; +TRACE_1("setupDisplayEffects",_activated); + +// Backup and restore changes to fog: +if (GVAR(fogScaling) > 0) then { + if (_activated) then { + if (isNil QGVAR(priorFog)) then { + TRACE_1("Backing up fog",fogParams); + GVAR(priorFog) = fogParams; + } else { + ERROR("fog already backed up"); + }; + + // Handle non-dedicated: + if (isServer && hasInterface) then { + missionNamespace setVariable [QGVAR(serverPriorFog), fogParams, true]; + [QGVAR(nonDedicatedFix), []] call CBA_fnc_remoteEvent; + }; + } else { + if (!isNil QGVAR(priorFog)) then { + 0 setFog GVAR(priorFog); + GVAR(priorFog) = nil; + } else { + ERROR("no fog backed up"); + }; + + // Handle non-dedicated: + if (isServer && hasInterface) then { + missionNamespace setVariable [QGVAR(serverPriorFog), nil, true]; + }; + }; +}; + +// Note: Using BIS_fnc_rscLayer because of bug with string syntax - https://feedback.bistudio.com/T120768 +(QGVAR(display) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; // Cleanup Old Display +if (_activated) then { // Create New Display + (QGVAR(display) call BIS_fnc_rscLayer) cutRsc [QGVAR(title), "PLAIN", 0, false]; +}; + +// Cleanup Old PP Effects +if (GVAR(ppeffectGrain) != -1) then { + ppEffectDestroy GVAR(ppeffectGrain); + GVAR(ppeffectGrain) = -1; +}; +if (GVAR(ppeffectBlur) != -1) then { + ppEffectDestroy GVAR(ppeffectBlur); + GVAR(ppeffectBlur) = -1; +}; +if (GVAR(ppeffectRadialBlur) != -1) then { + ppEffectDestroy GVAR(ppeffectRadialBlur); + GVAR(ppeffectRadialBlur) = -1; +}; +if (GVAR(ppeffectColorCorrect) != -1) then { + ppEffectDestroy GVAR(ppeffectColorCorrect); + GVAR(ppeffectColorCorrect) = -1; +}; +if (GVAR(ppEffectCCMuzzleFlash) != -1) then { + ppEffectDestroy GVAR(ppEffectCCMuzzleFlash); + GVAR(ppEffectCCMuzzleFlash) = -1; +}; diff --git a/addons/nightvision/functions/fnc_updatePPEffects.sqf b/addons/nightvision/functions/fnc_updatePPEffects.sqf deleted file mode 100644 index f80b0fa57e..0000000000 --- a/addons/nightvision/functions/fnc_updatePPEffects.sqf +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Author: commy2, PabstMirror and esteldunedain - * Update the ppEffects everytime something changes - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [someEvent] call ace_nightvision_fnc_updatePPEffects - * - * Public: No - */ -#include "script_component.hpp" - -if (!hasInterface) exitWith {}; - -disableSerialization; - -params [["_display", displayNull]]; - -if !(_display isEqualType displayNull) then { - _display = displayNull; -}; - -private _currentVehicle = vehicle ACE_player; - -// If the Zeus display is on or the player has no nightvision -if (ctrlIDD _display == 312 || currentVisionMode ACE_player != 1) exitWith { - GVAR(ppEffectFilmGrain) ppEffectEnable false; - GVAR(ppEffectBlur) ppEffectEnable false; - GVAR(ppEffectRadialBlur) ppEffectEnable false; - GVAR(ppEffectNVGBrightness) ppEffectEnable false; -}; - -// The unit has nightvision -private _config = configFile >> "CfgVehicles" >> typeOf _currentVehicle; -private _hmd = hmd ACE_player; -private _cameraView = cameraView; -private _turret = [ACE_player] call EFUNC(common,getTurretIndex); - - -private _fnc_isUsingHMD = { - if (_cameraView != "GUNNER") exitWith {true}; // asume hmd usage outside of gunner view - - if (ACE_player == (driver _currentVehicle)) exitWith { - !("NVG" in getArray (_config >> "ViewOptics" >> "visionMode")); - }; - - private _result = true; - private _turretConfig = [_config, _turret] call EFUNC(common,getTurretConfigPath); - private _turretConfigOpticsIn = _turretConfig >> "OpticsIn"; - - if (isClass _turretConfigOpticsIn) then { - for "_index" from 0 to (count _turretConfigOpticsIn - 1) do { - if ("NVG" in getArray (_turretConfigOpticsIn select _index >> "visionMode")) exitWith {_result = false}; - }; - } else { - //No OpticsIn usualy means RCWS, still need to test on more vehicles - _result = false; - }; - _result -}; - -private _grainSetting = 0; -private _blurSetting = 0; -private _radBlurSetting = 0; - -if ((_currentVehicle == ACE_player) || _fnc_isUsingHMD) then { - _grainSetting = getNumber (configFile >> "CfgWeapons" >> _hmd >> "ACE_NightVision_grain"); - _blurSetting = getNumber (configFile >> "CfgWeapons" >> _hmd >> "ACE_NightVision_blur"); - _radBlurSetting = getNumber (configFile >> "CfgWeapons" >> _hmd >> "ACE_NightVision_radBlur"); - TRACE_3("New NVG Settings From Player NVG",_grainSetting,_blurSetting,_radBlurSetting) -} else { - _grainSetting = _currentVehicle getVariable ["ACE_NightVision_grain", getNumber (_config >> "ACE_NightVision_grain")]; - _blurSetting = _currentVehicle getVariable ["ACE_NightVision_blur", getNumber (_config >> "ACE_NightVision_blur")]; - _radBlurSetting = _currentVehicle getVariable ["ACE_NightVision_radBlur", getNumber (_config >> "ACE_NightVision_radBlur")]; - TRACE_3("New NVG Settings From Vehicle",_grainSetting,_blurSetting,_radBlurSetting) -}; - - -// Enable the effects -GVAR(ppEffectFilmGrain) ppEffectEnable true; -GVAR(ppEffectBlur) ppEffectEnable true; -GVAR(ppEffectRadialBlur) ppEffectEnable true; -GVAR(ppEffectNVGBrightness) ppEffectEnable true; - -// Configure effects parameters -GVAR(ppEffectFilmGrain) ppEffectAdjust [0.25, 2.5, 2.5, _grainSetting, _grainSetting, false]; -GVAR(ppEffectFilmGrain) ppEffectCommit 0; -GVAR(ppEffectBlur) ppEffectAdjust [_blurSetting]; -GVAR(ppEffectBlur) ppEffectCommit 0; -GVAR(ppEffectRadialBlur) ppEffectAdjust [_radBlurSetting, _radBlurSetting, 0.2, 0.2]; -GVAR(ppEffectRadialBlur) ppEffectCommit 0; diff --git a/addons/nightvision/script_component.hpp b/addons/nightvision/script_component.hpp index 142983ebdc..0fd46d1fa3 100644 --- a/addons/nightvision/script_component.hpp +++ b/addons/nightvision/script_component.hpp @@ -15,3 +15,34 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" + + +// Effect Settings / Magic values to tweak: + +// Decreases fog when in air vehicles +#define ST_NVG_AIR_FOG_MULTIPLIER 0.5 + +// Increase blur when looking down sights +#define ST_NVG_CAMERA_BLUR_SIGHTS_RIFLE 6 +#define ST_NVG_CAMERA_BLUR_SIGHTS_PISTOL 2 + +#define ST_NVG_MINFOG 0.2 +#define ST_NVG_MAXFOG 0.3 + +#define ST_NVG_GRAIN_MIN 2.25 +#define ST_NVG_GRAIN_MAX 2.7 + +#define ST_NVG_BLUR_MIN 0.05 +#define ST_NVG_BLUR_MAX 0.11 + +#define ST_NVG_BRIGHT_MIN 0.65 +#define ST_NVG_BRIGHT_MAX 0.75 + +#define ST_NVG_CONTRAST_MIN 0.4 +#define ST_NVG_CONTRAST_MAX 0.8 + +#define ST_NVG_NOISEINTENSITY_MIN 0.4 +#define ST_NVG_NOISEINTENSITY_MAX 0.55 + +#define ST_NVG_NOISESHARPNESS_MIN 1.2 +#define ST_NVG_NOISESHARPNESS_MAX 1 diff --git a/addons/nightvision/stringtable.xml b/addons/nightvision/stringtable.xml index 3efe2e5ea7..18d3b7684c 100644 --- a/addons/nightvision/stringtable.xml +++ b/addons/nightvision/stringtable.xml @@ -1,6 +1,11 @@  + + ACE Nightvision + ACE 暗視装置 + Visione notturna ACE + NV Goggles (Gen1) Noktovizor (Gen1) @@ -54,7 +59,7 @@ Noktovizor (Gen3, hnědý) JVN (Gen3, marron) NS-Brille (3. Gen., braun) - Occhiali notturni (Gen3, marroni) + Occhiali notturni (Gen3, Marroni) Gogle noktowizyjne (Gen3, brązowe) Óculos de visão noturna (Gen3, marrons) ПНВ (Gen3, Коричневый) @@ -70,7 +75,7 @@ Noktovizor (Gen3, zelený) JVN (Gen3, vertes) NS-Brille (3. Gen., grün) - Occhiali notturni (Gen3, verdi) + Occhiali notturni (Gen3, Verdi) Gogle noktowizyjne (Gen3, zielone) Óculos de visão noturna (Gen3, verdes) ПНВ (Gen3, Зелёный) @@ -86,7 +91,7 @@ Noktovizor (Gen3, černý) JVN (Gen3, noires) NS-Brille (3. Gen., schwarz) - Occhiali notturni (Gen3, neri) + Occhiali notturni (Gen3, Neri) Gogle noktowizyjne (Gen3, czarne) Óculos de visão noturna (Gen3, pretos) ПНВ (Gen3, Чёрный) @@ -217,7 +222,7 @@ Disabilita NVG nei mirini Desactivar NVG en miras Desactiver les JVN dans les viseurs. - スコープを覗くと暗視装置を無効化 + スコープでは暗視装置を無効化 조준경 사용시 야투경 비활성화 使用瞄准镜时关闭夜视镜 使用瞄準鏡時關閉夜視鏡 @@ -237,5 +242,29 @@ 此功能开启后,当要使用瞄准镜时,为避免夜视镜镜头碰撞到瞄准镜,会先拿开夜视镜后再进行瞄准镜瞄准。 此功能開啟後,當要使用瞄準鏡時,為避免夜視鏡鏡頭碰撞到瞄準鏡,會先拿開夜視鏡後再進行瞄準鏡瞄準。 + + NVG Fog Scale + 暗視装置の霧の規模 + Livello Nebbia NVG + + + Fog is used to limit visibility. + 霧は視界制限のために使われます。 + La nebbia viene utilizzata per limitare la visibilità. + + + NVG Effect Scale + 暗視装置の効果規模 + Effetto livello NVG + + + Blur, grain and brightness effects [Setting to 0 will disable ALL nightvision effects] + ぼかしと粒子、明度効果 [0 に設定で全効果を無効化します] + Effetti di sfocatura, sgranatura e luminosità [Importare a 0 disabiliterà TUTTI gli effetti della visione notturna] + + + Aim Down Sights Blur + 照準器を使用時にぼかし + diff --git a/addons/nlaw/stringtable.xml b/addons/nlaw/stringtable.xml index 7027490066..8292cba0b9 100644 --- a/addons/nlaw/stringtable.xml +++ b/addons/nlaw/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -9,6 +9,7 @@ 次世代轻型反坦克导弹发射器追踪目标 (按住) 次世代輕型反坦克導彈發射器追蹤目標 (按住) Śledzenie Celu NLAW (Przytrzymaj) + NLAW 목표 추적 (누름유지) Direct Attack @@ -18,6 +19,7 @@ 直射模式 直射模式 Bezpośredni atak + 직접 사격 Overfly Top Attack @@ -27,6 +29,7 @@ 攻顶模式 攻頂模式 Atak z góry + 탑어택 diff --git a/addons/noradio/CfgEventhandlers.hpp b/addons/noradio/CfgEventhandlers.hpp index b0cc92b513..b928bc2de6 100644 --- a/addons/noradio/CfgEventhandlers.hpp +++ b/addons/noradio/CfgEventhandlers.hpp @@ -1,5 +1,5 @@ -class Extended_PostInit_EventHandlers { +class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_FILE(XEH_preInit)); }; }; diff --git a/addons/noradio/XEH_postInit.sqf b/addons/noradio/XEH_postInit.sqf deleted file mode 100644 index 6ca39e0c23..0000000000 --- a/addons/noradio/XEH_postInit.sqf +++ /dev/null @@ -1,29 +0,0 @@ -// By commy2 -#include "script_component.hpp" - -// Unmute unit if that player disconnects -if (isServer) then { - addMissionEventHandler ["HandleDisconnect", { - [_this select 0, "isPlayer"] call EFUNC(common,unmuteUnit); - }]; -}; - -if (!hasInterface) exitWith {}; - -// Handle early CBA_fnc_addPlayerEventHandler -if (!isNull ace_player) then { - [ace_player, "isPlayer"] call EFUNC(common,muteUnit); -}; - -// Mutes/unmutes units when the player changes -["unit", { - params ["_newPlayer", "_oldPlayer"]; - - // Mute the new player - [_newPlayer, "isPlayer"] call EFUNC(common,muteUnit); - - // Unmute the old player - if (alive _oldPlayer) then { - [_oldPlayer, "isPlayer"] call EFUNC(common,unmuteUnit); - }; -}] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/noradio/XEH_preInit.sqf b/addons/noradio/XEH_preInit.sqf new file mode 100644 index 0000000000..5be74ddf1b --- /dev/null +++ b/addons/noradio/XEH_preInit.sqf @@ -0,0 +1,38 @@ +// By commy2 +#include "script_component.hpp" + +if (isServer) then { + // Unmute unit if that player disconnects + addMissionEventHandler ["HandleDisconnect", { + TRACE_1("re-enabling voice",_this); + [_this select 0, "isPlayer"] call EFUNC(common,unmuteUnit); + }]; +}; + +if (hasInterface) then { + // Mutes/unmutes units when the player changes + ["unit", { + if (!GVAR(enabled)) exitWith {}; + + params ["_newPlayer", "_oldPlayer"]; + TRACE_2("player change",_newPlayer,_oldPlayer); + + // Mute the new player + [_newPlayer, "isPlayer"] call EFUNC(common,muteUnit); + + // Unmute the old player + if (alive _oldPlayer) then { + [_oldPlayer, "isPlayer"] call EFUNC(common,unmuteUnit); + }; + }, true] call CBA_fnc_addPlayerEventHandler; +}; + +[QGVAR(enabled), "CHECKBOX", [LSTRING(setting), LSTRING(setting_tooltip)], format ["ACE %1", localize ELSTRING(common,DisplayName)], true, true, { + params ["_enabled"]; + + if (_enabled) then { + [ACE_player, "isPlayer"] call EFUNC(common,muteUnit); + } else { + [ACE_player, "isPlayer"] call EFUNC(common,unmuteUnit); + }; +}] call CBA_settings_fnc_init; diff --git a/addons/noradio/stringtable.xml b/addons/noradio/stringtable.xml new file mode 100644 index 0000000000..3ac0d075bf --- /dev/null +++ b/addons/noradio/stringtable.xml @@ -0,0 +1,21 @@ + + + + + Mute Player + Spieler stummschalten + Muta Giocatore + 玩家靜音 + 玩家静音 + プレイヤーをミュート + + + Mutes the controlled player avatar. + Schaltet eigenen Spieleravatar stumm. + Muta l'avatar del giocatore controllato. + 靜音玩家所控制的角色。 + 静音玩家所控制的角色。 + プレイヤーに操作されているこのキャラをミュートします。 + + + diff --git a/addons/optionsmenu/ACE_Settings.hpp b/addons/optionsmenu/ACE_Settings.hpp index 0badbad660..bab67cd37f 100644 --- a/addons/optionsmenu/ACE_Settings.hpp +++ b/addons/optionsmenu/ACE_Settings.hpp @@ -1,11 +1,4 @@ class ACE_Settings { - class GVAR(optionMenuDisplaySize) { - value = 0; - typeName = "SCALAR"; - isClientSettable = 1; - displayName = CSTRING(uiScaing); - values[] = {"$str_medium", "$str_large", "$str_very_large"}; - }; class GVAR(showNewsOnMainMenu) { value = 1; typeName = "BOOL"; diff --git a/addons/optionsmenu/CfgEventHandlers.hpp b/addons/optionsmenu/CfgEventHandlers.hpp index dc5816df05..4f50c9613f 100644 --- a/addons/optionsmenu/CfgEventHandlers.hpp +++ b/addons/optionsmenu/CfgEventHandlers.hpp @@ -11,12 +11,6 @@ class Extended_PreInit_EventHandlers { }; }; -class Extended_PostInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); - }; -}; - class Extended_DisplayLoad_EventHandlers { class RscDisplayMain { GVAR(loadMainMenuBox) = QUOTE(_this call COMPILE_FILE(init_loadMainMenuBox)); diff --git a/addons/optionsmenu/CfgVehicles.hpp b/addons/optionsmenu/CfgVehicles.hpp index cbe03a4cfb..a00d8abc3e 100644 --- a/addons/optionsmenu/CfgVehicles.hpp +++ b/addons/optionsmenu/CfgVehicles.hpp @@ -1,27 +1,7 @@ class CfgVehicles { class ACE_Module; class ACE_moduleAllowConfigExport: ACE_Module { - scope = 2; - displayName = CSTRING(AllowConfigExport_Module_DisplayName); - //icon = ""; - category = "ACE"; - function = QUOTE(DFUNC(moduleAllowConfigExport)); - functionPriority = 1; - isGlobal = 1; - isSingular = 1; - isTriggerActivated = 0; - author = ECSTRING(common,ACETeam); - class Arguments { - class allowconfigurationExport { - displayName = CSTRING(AllowConfigExport_allowconfigurationExport_DisplayName); - description = CSTRING(AllowConfigExport_allowconfigurationExport_Description); - typeName = "BOOL"; - defaultValue = 1; - }; - }; - class ModuleDescription { - description = CSTRING(AllowConfigExport_Module_Description); - sync[] = {}; - }; + scope = 1; + displayName = "Deprecated ACE Module"; }; }; diff --git a/addons/optionsmenu/XEH_PREP.hpp b/addons/optionsmenu/XEH_PREP.hpp index f1ffe1ed98..becbe9904f 100644 --- a/addons/optionsmenu/XEH_PREP.hpp +++ b/addons/optionsmenu/XEH_PREP.hpp @@ -1,22 +1,2 @@ PREP(debugDumpToClipboard); -PREP(onListBoxSettingsChanged); -PREP(onListBoxShowSelectionChanged); -PREP(onSettingsMenuOpen); -PREP(onSliderPosChanged); -PREP(onServerSaveInputField); -PREP(onServerSettingsMenuOpen); -PREP(onServerListBoxShowSelectionChanged); -PREP(onCategorySelectChanged); -PREP(resetSettings); -PREP(serverResetSettings); -PREP(settingsMenuUpdateKeyView); -PREP(settingsMenuUpdateList); -PREP(serverSettingsMenuUpdateKeyView); -PREP(serverSettingsMenuUpdateList); -PREP(onServerCategorySelectChanged); -PREP(updateSetting); -PREP(exportSettings); -PREP(toggleIncludeClientSettings); -PREP(moduleAllowConfigExport); -PREP(stringEscape); diff --git a/addons/optionsmenu/XEH_postInit.sqf b/addons/optionsmenu/XEH_postInit.sqf deleted file mode 100644 index 2ef332446a..0000000000 --- a/addons/optionsmenu/XEH_postInit.sqf +++ /dev/null @@ -1,11 +0,0 @@ - -#include "script_component.hpp" - -["ace_settingsInitialized", { - GVAR(categories) pushBack ""; //Ensure All Catagories is at top - { - if !(_x select 8 in GVAR(categories)) then { - GVAR(categories) pushBack (_x select 8); - }; - }forEach EGVAR(common,settings); -}] call CBA_fnc_addEventHandler; diff --git a/addons/optionsmenu/XEH_preInit.sqf b/addons/optionsmenu/XEH_preInit.sqf index 57e017e054..46d58b5a8a 100644 --- a/addons/optionsmenu/XEH_preInit.sqf +++ b/addons/optionsmenu/XEH_preInit.sqf @@ -6,15 +6,9 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; -GVAR(clientSideOptions) = []; -GVAR(clientSideColors) = []; - -GVAR(serverConfigGeneration) = 0; -GVAR(ClientSettingsExportIncluded) = false; -GVAR(serverSideOptions) = []; -GVAR(serverSideColors) = []; -GVAR(serverSideValues) = []; -GVAR(categories) = []; -GVAR(currentCategorySelection) = 0; +if (hasInterface) then { + [[format ["ACE %1", localize LSTRING(DumpDebug)], localize LSTRING(DumpDebugTooltip)], QGVAR(MainMenuHelperDumpDebug)] call CBA_fnc_addPauseMenuOption; + [[format ["ACE %1", localize LSTRING(headBugFix)], localize LSTRING(headBugFixTooltip)], QGVAR(MainMenuHelperHeadBugFix)] call CBA_fnc_addPauseMenuOption; +}; ADDON = true; diff --git a/addons/optionsmenu/config.cpp b/addons/optionsmenu/config.cpp index 650f9eb74a..b17fe12cc3 100644 --- a/addons/optionsmenu/config.cpp +++ b/addons/optionsmenu/config.cpp @@ -3,7 +3,7 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {"ACE_moduleAllowConfigExport"}; + units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; @@ -23,13 +23,12 @@ class CfgAddons { }; #include "CfgEventHandlers.hpp" -#include "gui\define.hpp" -#include "gui\settingsMenu.hpp" -#include "gui\pauseMenu.hpp" - #include "CfgVehicles.hpp" #include "ACE_Settings.hpp" +#include "gui\mainMenu.hpp" +#include "gui\pauseMenu.hpp" + class ACE_Extensions { extensions[] += {"ace_clipboard"}; }; diff --git a/addons/optionsmenu/functions/fnc_exportSettings.sqf b/addons/optionsmenu/functions/fnc_exportSettings.sqf deleted file mode 100644 index 907f1d0899..0000000000 --- a/addons/optionsmenu/functions/fnc_exportSettings.sqf +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Author: Glowbal - * Export all config settings with their current values. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ACE_optionsmenu_fnc_exportSettings - * - * Public: No - */ - -#include "script_component.hpp" - -{ - /*_settingData = [ - _name, - _typeName, - _isClientSetable, - _localizedName, - _localizedDescription, - _possibleValues, - _isForced, - _defaultValue - ];*/ - _x params ["_name", "_typeName", "_isClientSetable", "_localizedName", "_localizedDescription", "_possibleValues", "_defaultValue"]; - - if (GVAR(ClientSettingsExportIncluded) || !_isClientSetable) then { - private _value = missionNamespace getVariable [_name, _defaultValue]; - private _formatedValue = switch (toLower _typeName) do { - case ("scalar"): { - format['value = %1;', _value]; - }; - case ("string"): { - format['value = "%1";', _value]; - }; - case ("bool"): { - if (!(_value isEqualType false)) then {ERROR("weird bool typename??");}; - _value = if ((_value isEqualType false) && {_value}) then {1} else {0}; - format ['value = %1;', _value]; - }; - case ("color"): { - _value params [["_r",1], ["_b",0], ["_g",1], ["_a",1]]; - format ["value[] = {%1, %2, %3, %4};", _r, _b, _g, _a]; - }; - default { - ERROR("unknown typeName"); - "" - }; - - }; - private _compiledConfigEntry = format [" -class %1 { - %2 - typeName = %3; - force = 1; -};", _name, _formatedValue, format['"%1"', _typeName]]; - - "ace_clipboard" callExtension _compiledConfigEntry; - }; -} forEach EGVAR(common,settings); - -"ace_clipboard" callExtension "--COMPLETE--"; - -[LSTRING(settingsExported)] call EFUNC(common,displayTextStructured); diff --git a/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf b/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf deleted file mode 100644 index 2426bb2f26..0000000000 --- a/addons/optionsmenu/functions/fnc_moduleAllowConfigExport.sqf +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Author: Glowbal - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ace_optionsmenu_fnc_moduleAllowConfigExport - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_logic"]; - -if (isMultiplayer) exitWith {}; - -if (_logic getVariable ["allowconfigurationExport", false]) then { - GVAR(serverConfigGeneration) = 1; -} else { - GVAR(serverConfigGeneration) = 0; -}; diff --git a/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf b/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf deleted file mode 100644 index 2824c2e2fa..0000000000 --- a/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Author: Glowbal - * Changes which category is selected - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ACE_optionsmenu_fnc_onCategorySelectChanged - * - * Public: No - */ - -#include "script_component.hpp" - -disableSerialization; -private _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu'; - -private _ctrlComboBox = (_settingsMenu displayCtrl 14); -GVAR(currentCategorySelection) = _ctrlComboBox lbValue (lbCurSel _ctrlComboBox); - -[true] call FUNC(settingsMenuUpdateList); diff --git a/addons/optionsmenu/functions/fnc_onListBoxSettingsChanged.sqf b/addons/optionsmenu/functions/fnc_onListBoxSettingsChanged.sqf deleted file mode 100644 index 6486a5e39b..0000000000 --- a/addons/optionsmenu/functions/fnc_onListBoxSettingsChanged.sqf +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Author: Glowbal - * Called when the listbox selection is changed for an options (eg: chaning a setting from false to true) - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ACE_optionsmenu_fnc_onListBoxSettingsChanged - * - * Public: No - */ - -#include "script_component.hpp" - -private _rightDropDownIndex = lbCurSel 400; //Index of right drop down -if (_rightDropDownIndex < 0) then {_rightDropDownIndex = 0;}; - -private _settingIndex = -1; -if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { - _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; -}; -if (_settingIndex == -1) exitWith {}; - -switch (GVAR(optionMenu_openTab)) do { - case (MENU_TAB_OPTIONS): { - if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(clientSideOptions)))) then { - _settingIndex = (GVAR(clientSideOptions) select _settingIndex) select 0; - [MENU_TAB_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting); - }; - [false] call FUNC(settingsMenuUpdateList); - }; - case (MENU_TAB_SERVER_OPTIONS): { - if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(serverSideOptions)))) then { - _settingIndex = (GVAR(serverSideOptions) select _settingIndex) select 0; - [MENU_TAB_SERVER_OPTIONS, _settingIndex, _rightDropDownIndex] call FUNC(updateSetting); - }; - [false] call FUNC(serverSettingsMenuUpdateList); - }; -}; diff --git a/addons/optionsmenu/functions/fnc_onListBoxShowSelectionChanged.sqf b/addons/optionsmenu/functions/fnc_onListBoxShowSelectionChanged.sqf deleted file mode 100644 index abade6aaee..0000000000 --- a/addons/optionsmenu/functions/fnc_onListBoxShowSelectionChanged.sqf +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Author: Glowbal - * Changes which tab is open (options or colors) - * - * Arguments: - * The tab to open (defined in script_component) - * - * Return Value: - * None - * - * Example: - * [MENU_TAB_COLORS] call ACE_optionsmenu_fnc_onListBoxShowSelectionChanged - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_openTab"]; -GVAR(optionMenu_openTab) = _openTab; - -disableSerialization; -private _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu'; - -switch (GVAR(optionMenu_openTab)) do { -case (MENU_TAB_OPTIONS): { - private _localizedHeader = format ["%1: %2", (localize LSTRING(OpenConfigMenu)), (localize LSTRING(TabOptions))]; - ctrlSetText [13, _localizedHeader]; - lbClear 400; - - (_settingsMenu displayCtrl 301) ctrlShow true; - - (_settingsMenu displayCtrl 400) ctrlShow true; - (_settingsMenu displayCtrl 410) ctrlShow false; - (_settingsMenu displayCtrl 411) ctrlShow false; - (_settingsMenu displayCtrl 412) ctrlShow false; - (_settingsMenu displayCtrl 413) ctrlShow false; - }; -case (MENU_TAB_COLORS): { - private _localizedHeader = format ["%1: %2", (localize LSTRING(OpenConfigMenu)), (localize LSTRING(TabColors))]; - ctrlSetText [13, _localizedHeader]; - - lbClear 400; - - (_settingsMenu displayCtrl 301) ctrlShow false; - - (_settingsMenu displayCtrl 400) ctrlShow false; - (_settingsMenu displayCtrl 410) ctrlShow true; - (_settingsMenu displayCtrl 411) ctrlShow true; - (_settingsMenu displayCtrl 412) ctrlShow true; - (_settingsMenu displayCtrl 413) ctrlShow true; - - (_settingsMenu displayCtrl 410) sliderSetRange [0, 255]; - (_settingsMenu displayCtrl 411) sliderSetRange [0, 255]; - (_settingsMenu displayCtrl 412) sliderSetRange [0, 255]; - (_settingsMenu displayCtrl 413) sliderSetRange [0, 255]; - }; -}; - -[true] call FUNC(settingsMenuUpdateList); diff --git a/addons/optionsmenu/functions/fnc_onServerCategorySelectChanged.sqf b/addons/optionsmenu/functions/fnc_onServerCategorySelectChanged.sqf deleted file mode 100644 index 2ac7d0c01d..0000000000 --- a/addons/optionsmenu/functions/fnc_onServerCategorySelectChanged.sqf +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Author: Glowbal - * Changes which category is selected - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ACE_optionsmenu_fnc_onCategorySelectChanged - * - * Public: No - */ - -#include "script_component.hpp" - -disableSerialization; -private _settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu'; - -private _ctrlComboBox = (_settingsMenu displayCtrl 14); -GVAR(currentCategorySelection) = lbCurSel _ctrlComboBox; - -[true] call FUNC(serverSettingsMenuUpdateList); diff --git a/addons/optionsmenu/functions/fnc_onServerListBoxShowSelectionChanged.sqf b/addons/optionsmenu/functions/fnc_onServerListBoxShowSelectionChanged.sqf deleted file mode 100644 index ab04df5ef5..0000000000 --- a/addons/optionsmenu/functions/fnc_onServerListBoxShowSelectionChanged.sqf +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Author: Glowbal - * Changes which tab is open (options or colors) - * - * Arguments: - * The tab to open (defined in script_component) - * - * Return Value: - * None - * - * Example: - * [MENU_TAB_COLORS] call ACE_optionsmenu_fnc_onListBoxShowSelectionChanged - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_openTab"]; -GVAR(optionMenu_openTab) = _openTab; - -disableSerialization; -private _settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu'; - -switch (GVAR(optionMenu_openTab)) do { -case (MENU_TAB_SERVER_OPTIONS): { - private _localizedHeader = format ["%1: %2", (localize LSTRING(OpenConfigMenu)), (localize LSTRING(TabOptions))]; - ctrlSetText [13, _localizedHeader]; - lbClear 400; - - (_settingsMenu displayCtrl 301) ctrlShow true; - - (_settingsMenu displayCtrl 400) ctrlShow true; - (_settingsMenu displayCtrl 410) ctrlShow false; - (_settingsMenu displayCtrl 411) ctrlShow false; - (_settingsMenu displayCtrl 412) ctrlShow false; - (_settingsMenu displayCtrl 413) ctrlShow false; - (_settingsMenu displayCtrl 414) ctrlShow false; - (_settingsMenu displayCtrl 415) ctrlShow false; - (_settingsMenu displayCtrl 416) ctrlShow false; - (_settingsMenu displayCtrl 416) ctrlEnable false; - }; -case (MENU_TAB_SERVER_COLORS): { - private _localizedHeader = format ["%1: %2", (localize LSTRING(OpenConfigMenu)), (localize LSTRING(TabColors))]; - ctrlSetText [13, _localizedHeader]; - - lbClear 400; - - (_settingsMenu displayCtrl 301) ctrlShow false; - - (_settingsMenu displayCtrl 400) ctrlShow false; - (_settingsMenu displayCtrl 410) ctrlShow true; - (_settingsMenu displayCtrl 411) ctrlShow true; - (_settingsMenu displayCtrl 412) ctrlShow true; - (_settingsMenu displayCtrl 413) ctrlShow true; - - (_settingsMenu displayCtrl 410) sliderSetRange [0, 255]; - (_settingsMenu displayCtrl 411) sliderSetRange [0, 255]; - (_settingsMenu displayCtrl 412) sliderSetRange [0, 255]; - (_settingsMenu displayCtrl 413) sliderSetRange [0, 255]; - - (_settingsMenu displayCtrl 414) ctrlShow false; - (_settingsMenu displayCtrl 415) ctrlShow false; - (_settingsMenu displayCtrl 416) ctrlShow false; - (_settingsMenu displayCtrl 416) ctrlEnable false; - }; -case (MENU_TAB_SERVER_VALUES): { - private _localizedHeader = format ["%1: %2", (localize LSTRING(OpenConfigMenu)), (localize LSTRING(TabValues))]; - ctrlSetText [13, _localizedHeader]; - - lbClear 400; - (_settingsMenu displayCtrl 301) ctrlShow false; - (_settingsMenu displayCtrl 400) ctrlShow false; - (_settingsMenu displayCtrl 410) ctrlShow false; - (_settingsMenu displayCtrl 411) ctrlShow false; - (_settingsMenu displayCtrl 412) ctrlShow false; - (_settingsMenu displayCtrl 413) ctrlShow false; - - (_settingsMenu displayCtrl 414) ctrlShow true; - (_settingsMenu displayCtrl 415) ctrlShow true; - (_settingsMenu displayCtrl 416) ctrlShow true; - (_settingsMenu displayCtrl 416) ctrlEnable true; - }; -}; - -[true] call FUNC(serverSettingsMenuUpdateList); diff --git a/addons/optionsmenu/functions/fnc_onServerSaveInputField.sqf b/addons/optionsmenu/functions/fnc_onServerSaveInputField.sqf deleted file mode 100644 index f98abfc97b..0000000000 --- a/addons/optionsmenu/functions/fnc_onServerSaveInputField.sqf +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Author: Glowbal - * Called when the listbox selection is changed for an options (eg: chaning a setting from false to true) - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ACE_optionsmenu_fnc_onListBoxSettingsChanged - * - * Public: No - */ - -#include "script_component.hpp" - -private _inputText = ctrlText 414; //Index of right drop down - -private _settingIndex = -1; -if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { - _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; -}; - -switch (GVAR(optionMenu_openTab)) do { - case (MENU_TAB_SERVER_VALUES): { - if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(serverSideValues)))) then { - try { - private _setting = (GVAR(serverSideValues) select _settingIndex); - private _settingName = _setting select 0; - - private _convertedValue = switch (toUpper (_setting select 1)) do { - case "STRING": { - ctrlSetText [414, _inputText call FUNC(stringEscape)]; - format ['%1', _inputText call FUNC(stringEscape)]; - }; - case "ARRAY": {format [call compile "[%1]", _inputText]}; - case "SCALAR": {parseNumber _inputText;}; - default {throw "Error"}; - }; - [MENU_TAB_SERVER_VALUES, _settingName, _convertedValue] call FUNC(updateSetting); - } catch { - }; - }; - [false] call FUNC(serverSettingsMenuUpdateList); - }; -}; diff --git a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf deleted file mode 100644 index 5e8b9b7cf6..0000000000 --- a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Author: Glowbal - * Called from the onLoad of ACE_settingsMenu dialog. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [onLoadEvent] call ACE_optionsmenu_fnc_onSettingsMenuOpen - * - * Public: No - */ - -#include "script_component.hpp" - -if (GVAR(serverConfigGeneration) == 0 || isMultiplayer) exitWith {closeDialog 145246;}; - -// Filter only user setable setting -GVAR(serverSideOptions) = []; -GVAR(serverSideColors) = []; -GVAR(serverSideValues) = []; -{ - _x params ["_name", "_typeName", "_isClientSetable", "_localizedName", "_localizedDescription", "_possibleValues", "_defaultValue"]; - - // Exclude client side options if they are not included for the export - if (!(_isClientSetable) || GVAR(ClientSettingsExportIncluded)) then { - // Append the current value to the setting metadata - private _setting = + _x; - _setting pushBack (missionNamespace getVariable (_x select 0)); - - // Categorize the setting according to types - // @todo: allow the user to modify other types of parameters? - if ((_typeName == "SCALAR" && count _possibleValues > 0) || (_x select 1) == "BOOL") then { - GVAR(serverSideOptions) pushBack _setting; - }; - if (_typeName == "COLOR") then { - GVAR(serverSideColors) pushBack _setting; - }; - if ((_typeName == "SCALAR" && count _possibleValues == 0) || _typeName == "ARRAY" || _typeName == "STRING") then { - GVAR(serverSideValues) pushBack _setting; - }; - }; -} forEach EGVAR(common,settings); - -//Delay a frame -[{ [MENU_TAB_SERVER_OPTIONS] call FUNC(onServerListBoxShowSelectionChanged) }, []] call CBA_fnc_execNextFrame; - -disableSerialization; -private _menu = uiNamespace getVariable "ACE_serverSettingsMenu"; -(_menu displayCtrl 1003) ctrlEnable false; - -if (GVAR(ClientSettingsExportIncluded)) then { - (_settingsMenu displayCtrl 1102) ctrlSetText localize (LSTRING(exClientSettings)); -} else { - (_settingsMenu displayCtrl 1102) ctrlSetText localize (LSTRING(inClientSettings)); -}; - - -lbClear (_menu displayCtrl 14); -{ - if (_x == "") then { - _x = localize (LSTRING(category_all)); - }; - (_menu displayCtrl 14) lbAdd _x; -} forEach GVAR(categories); - -(_menu displayCtrl 14) lbSetCurSel GVAR(currentCategorySelection); //All Catagoies diff --git a/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf deleted file mode 100644 index 1b86f95e82..0000000000 --- a/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Author: Glowbal - * Called from the onLoad of ACE_settingsMenu dialog. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [onLoadEvent] call ACE_optionsmenu_fnc_onSettingsMenuOpen - * - * Public: No - */ - -#include "script_component.hpp" - -// Filter only user setable setting -GVAR(clientSideOptions) = []; -GVAR(clientSideColors) = []; -private _clientSettableCategories = [""]; - -{ - // If the setting is user setable and not forced - if ((_x select 2) && !(_x select 6)) then { - // Append the current value to the setting metadata - private _setting = + _x; - _setting pushBack (missionNamespace getVariable (_x select 0)); - - // Categorize the setting according to types - // @todo: allow the user to modify other types of parameters? - if ((_x select 1) == "SCALAR" || (_x select 1) == "BOOL") then { - GVAR(clientSideOptions) pushBack _setting; - }; - if ((_x select 1) == "COLOR") then { - GVAR(clientSideColors) pushBack _setting; - }; - _clientSettableCategories pushBackUnique (_x select 8); //Add to list of user-settable categories - }; -} forEach EGVAR(common,settings); - -//Delay a frame -[{ [MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged) }, []] call CBA_fnc_execNextFrame; - -disableSerialization; -private _menu = uiNamespace getVariable "ACE_settingsMenu"; -(_menu displayCtrl 1002) ctrlEnable false; -(_menu displayCtrl 1003) ctrlEnable false; - -if (GVAR(serverConfigGeneration) == 0) then { - (_menu displayCtrl 1102) ctrlEnable false; - (_menu displayCtrl 1102) ctrlShow false; -}; - -lbClear (_menu displayCtrl 14); -{ - if (_x in _clientSettableCategories) then { //only show category if it has user-settable options - if (_x == "") then { - _x = localize LSTRING(category_all); - }; - private _Index = (_menu displayCtrl 14) lbAdd _x; - (_menu displayCtrl 14) lbSetValue [_Index, _forEachIndex]; - }; -} forEach GVAR(categories); - -(_menu displayCtrl 14) lbSetCurSel GVAR(currentCategorySelection); //All Catagoies diff --git a/addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf b/addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf deleted file mode 100644 index 979b305be5..0000000000 --- a/addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Author: PabstMirror - * Called when one of the color sliders is moved. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ACE_optionsmenu_fnc_onSliderPosChanged - * - * Public: No - */ - -#include "script_component.hpp" - -private _settingIndex = -1; -if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { - _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; -}; -if (_settingIndex == -1) exitWith {}; - -switch (GVAR(optionMenu_openTab)) do { - case (MENU_TAB_COLORS): { - - private _newColor = []; - { - _newColor pushBack ((sliderPosition _x) / 255); - } forEach [410, 411, 412, 413]; - - if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(clientSideColors)))) then { - _settingIndex = (GVAR(clientSideColors) select _settingIndex) select 0; - [MENU_TAB_COLORS, _settingIndex, _newColor] call FUNC(updateSetting); - }; - [false] call FUNC(settingsMenuUpdateList); - }; - case (MENU_TAB_SERVER_COLORS): { - - private _newColor = []; - { - _newColor pushBack ((sliderPosition _x) / 255); - } forEach [410, 411, 412, 413]; - - if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(clientSideColors)))) then { - _settingIndex = (GVAR(clientSideColors) select _settingIndex) select 0; - [MENU_TAB_SERVER_COLORS, _settingIndex, _newColor] call FUNC(updateSetting); - }; - [false] call FUNC(serverSettingsMenuUpdateList); - }; - default {}; -}; diff --git a/addons/optionsmenu/functions/fnc_resetSettings.sqf b/addons/optionsmenu/functions/fnc_resetSettings.sqf deleted file mode 100644 index f4957e58c8..0000000000 --- a/addons/optionsmenu/functions/fnc_resetSettings.sqf +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Author: Glowbal - * Resets all settings to default. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ACE_optionsmenu_fnc_onListBoxSettingsChanged - * - * Public: No - */ - -#include "script_component.hpp" - -{ - private _name = _x select 0; - private _default = _x select 7; - [MENU_TAB_OPTIONS, _name, _default] call FUNC(updateSetting); -} forEach GVAR(clientSideOptions); - -{ - private _name = _x select 0; - private _default = _x select 7; - [MENU_TAB_COLORS, _name, _default] call FUNC(updateSetting); -} forEach GVAR(clientSideColors); - -private _lastSelected = lnbCurSelRow 200; -[GVAR(optionMenu_openTab)] call FUNC(onListBoxShowSelectionChanged); -if (_lastSelected != -1) then { - lnbSetCurSelRow [200, _lastSelected]; -}; diff --git a/addons/optionsmenu/functions/fnc_serverResetSettings.sqf b/addons/optionsmenu/functions/fnc_serverResetSettings.sqf deleted file mode 100644 index a8abd217dd..0000000000 --- a/addons/optionsmenu/functions/fnc_serverResetSettings.sqf +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Author: Glowbal - * Resets all server settings to default. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ACE_optionsmenu_fnc_onListBoxSettingsChanged - * - * Public: No - */ - -#include "script_component.hpp" - -{ - private _name = _x select 0; - private _default = _x select 7; - [MENU_TAB_SERVER_OPTIONS, _name, _default] call FUNC(updateSetting); -} forEach GVAR(serverSideOptions); - -{ - private _name = _x select 0; - private _default = _x select 7; - [MENU_TAB_SERVER_COLORS, _name, _default] call FUNC(updateSetting); -} forEach GVAR(serverSideColors); - -{ - private _name = _x select 0; - private _default = _x select 7; - [MENU_TAB_SERVER_VALUES, _name, _default] call FUNC(updateSetting); -} forEach GVAR(serverSideVakyes); - -private _lastSelected = lnbCurSelRow 200; -[GVAR(optionMenu_openTab)] call FUNC(onserverListBoxShowSelectionChanged); -if (_lastSelected != -1) then { - lbSetCurSel [200, _lastSelected]; -}; diff --git a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf b/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf deleted file mode 100644 index 4b5b99547f..0000000000 --- a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateKeyView.sqf +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Author: Glowbal - * Updates the right half of the option menu for the currently selected option. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ACE_optionsmenu_fnc_settingsMenuUpdateKeyView - * - * Public: No - */ - -#include "script_component.hpp" - -disableSerialization; - -private _settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu'; - -private _collection = switch (GVAR(optionMenu_openTab)) do { - case MENU_TAB_SERVER_OPTIONS: {GVAR(serverSideOptions)}; - case MENU_TAB_SERVER_COLORS: {GVAR(serverSideColors)}; - case MENU_TAB_SERVER_VALUES: {GVAR(serverSideValues)}; - default {[]}; -}; - -private _settingIndex = -1; -if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { - _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; -}; - -if ((_settingIndex >= 0) && {_settingIndex <= (count _collection)}) then { - private _setting = _collection select _settingIndex; - - private _entryName = _setting select 0; - private _localizedName = _setting select 3; - private _localizedDescription = _setting select 4; - - if (_localizedName == "") then {_localizedName = _entryName;}; - (_settingsMenu displayCtrl 250) ctrlSetText _localizedName; - (_settingsMenu displayCtrl 251) ctrlSetText _localizedDescription; - (_settingsMenu displayCtrl 300) ctrlSetText _entryName; - - switch (GVAR(optionMenu_openTab)) do { - case (MENU_TAB_SERVER_OPTIONS): { - private _possibleValues = _setting select 5; - private _settingsValue = _setting select 9; - // Created disable/enable options for bools - if ((_setting select 1) == "BOOL") then { - lbClear 400; - lbAdd [400, (localize ELSTRING(common,No))]; - lbAdd [400, (localize ELSTRING(common,Yes))]; - _settingsValue = [0, 1] select _settingsValue; - } else { - lbClear 400; - { lbAdd [400, _x]; } forEach _possibleValues; - }; - (_settingsMenu displayCtrl 400) lbSetCurSel _settingsValue; - }; - case (MENU_TAB_SERVER_COLORS): { - private _currentColor = _setting select 9; - { - sliderSetPosition [_x, (255 * (_currentColor select _forEachIndex))]; - } forEach [410, 411, 412, 413]; - }; - case (MENU_TAB_SERVER_VALUES): { - // TODO implement - private _settingsValue = _setting select 9; - - // Created disable/enable options for bools - private _expectedType = switch (_setting select 1) do { - case "STRING": {LSTRING(stringType)}; - case "ARRAY": {LSTRING(arrayType)}; - case "SCALAR": {LSTRING(scalarType)}; - default {LSTRING(unknownType)}; - }; - (_settingsMenu displayCtrl 414) ctrlSetText format["%1", _settingsValue]; - (_settingsMenu displayCtrl 415) ctrlSetText format[localize _expectedType]; - }; - }; -} else { //no settings in list: - lbClear 400; - (_settingsMenu displayCtrl 250) ctrlSetText "No settings available"; - (_settingsMenu displayCtrl 251) ctrlSetText "No settings available"; - (_settingsMenu displayCtrl 300) ctrlSetText "No settings available"; -}; diff --git a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf b/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf deleted file mode 100644 index b9a9072ead..0000000000 --- a/addons/optionsmenu/functions/fnc_serverSettingsMenuUpdateList.sqf +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Author: Glowbal - * Updates the setting when the client has selected a new value. Saves to profilenamespace. - * - * Arguments: - * 0: Update the keylist as well - * - * Return Value: - * None - * - * Example: - * [false] call ACE_optionsmenu_fnc_settingsMenuUpdateList - * - * Public: No - */ - -#include "script_component.hpp" - -params [["_updateKeyView", true, [true]]]; - -disableSerialization; -private _settingsMenu = uiNamespace getVariable 'ACE_serverSettingsMenu'; -private _ctrlList = _settingsMenu displayCtrl 200; - -lnbClear _ctrlList; - -private _selectedCategory = GVAR(categories) select GVAR(currentCategorySelection); - -switch (GVAR(optionMenu_openTab)) do { - case (MENU_TAB_SERVER_OPTIONS): { - { - if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { - private _settingName = if ((_x select 3) != "") then { - (_x select 3); - } else { - (_x select 0); - }; - - private _settingsValue = _x select 9; - - // Created disable/enable options for bools - private _settingsText = if ((_x select 1) == "BOOL") then { - [(localize ELSTRING(common,No)), (localize ELSTRING(common,Yes))] select _settingsValue; - } else { - (_x select 5) select _settingsValue; - }; - - private _added = _ctrlList lnbAddRow [_settingName, _settingsText]; - _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; - }; - }forEach GVAR(serverSideOptions); - }; - case (MENU_TAB_SERVER_COLORS): { - { - if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { - private _color = +(_x select 9); - { - _color set [_forEachIndex, ((round (_x * 100))/100)]; - } forEach _color; - private _settingsColor = str _color; - private _settingName = if ((_x select 3) != "") then { - (_x select 3); - } else { - (_x select 0); - }; - - private _added = _ctrlList lnbAddRow [_settingName, _settingsColor]; - _ctrlList lnbSetColor [[_added, 1], (_x select 9)]; - _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; - }; - }forEach GVAR(serverSideColors); - }; - case (MENU_TAB_SERVER_VALUES): { - { - if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { - private _settingName = if ((_x select 3) != "") then { - (_x select 3); - } else { - (_x select 0); - }; - private _settingsValue = _x select 9; - if (!(_settingsValue isEqualType "")) then { - _settingsValue = format["%1", _settingsValue]; - }; - private _added = _ctrlList lnbAddRow [_settingName, _settingsValue]; - _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; - }; - }forEach GVAR(serverSideValues); - }; -}; -if (_updateKeyView) then { - [] call FUNC(serverSettingsMenuUpdateKeyView); -}; diff --git a/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf b/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf deleted file mode 100644 index ee2e5f25c1..0000000000 --- a/addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Author: Glowbal - * Updates the right half of the option menu for the currently selected option. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ACE_optionsmenu_fnc_settingsMenuUpdateKeyView - * - * Public: No - */ - -#include "script_component.hpp" - -disableSerialization; - -private _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu'; -private _ctrlList = _settingsMenu displayCtrl 200; - -private _collection = switch (GVAR(optionMenu_openTab)) do { - case MENU_TAB_OPTIONS: {GVAR(clientSideOptions)}; - case MENU_TAB_COLORS: {GVAR(clientSideColors)}; - default {[]}; -}; - -private _settingIndex = -1; -if (((lnbCurSelRow 200) >= 0) && {(lnbCurSelRow 200) < ((lnbSize 200) select 0)}) then { - _settingIndex = lnbValue [200, [(lnbCurSelRow 200), 0]]; -}; - -if ((_settingIndex >= 0) && {_settingIndex <= (count _collection)}) then { - private _setting = _collection select _settingIndex; - - private _entryName = _setting select 0; - private _localizedName = _setting select 3; - private _localizedDescription = _setting select 4; - - if (_localizedName == "") then {_localizedName = _entryName;}; - (_settingsMenu displayCtrl 250) ctrlSetText _localizedName; - (_settingsMenu displayCtrl 251) ctrlSetText _localizedDescription; - (_settingsMenu displayCtrl 300) ctrlSetText _entryName; - - switch (GVAR(optionMenu_openTab)) do { - case (MENU_TAB_OPTIONS): { - private _possibleValues = _setting select 5; - private _settingsValue = _setting select 9; - - // Created disable/enable options for bools - if ((_setting select 1) == "BOOL") then { - lbClear 400; - lbAdd [400, (localize ELSTRING(common,No))]; - lbAdd [400, (localize ELSTRING(common,Yes))]; - _settingsValue = [0, 1] select _settingsValue; - } else { - lbClear 400; - { lbAdd [400, _x]; } forEach _possibleValues; - }; - (_settingsMenu displayCtrl 400) lbSetCurSel _settingsValue; - }; - case (MENU_TAB_COLORS): { - private _currentColor = _setting select 9; - { - sliderSetPosition [_x, (255 * (_currentColor select _forEachIndex))]; - } forEach [410, 411, 412, 413]; - }; - }; -} else { //no settings in list: - lbClear 400; - (_settingsMenu displayCtrl 250) ctrlSetText "No settings available"; - (_settingsMenu displayCtrl 251) ctrlSetText "No settings available"; - (_settingsMenu displayCtrl 300) ctrlSetText "No settings available"; -}; diff --git a/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf b/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf deleted file mode 100644 index ea6f904ade..0000000000 --- a/addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Author: Glowbal - * Updates the setting when the client has selected a new value. Saves to profilenamespace. - * - * Arguments: - * 0: Update the keylist as well - * - * Return Value: - * None - * - * Example: - * [false] call ACE_optionsmenu_fnc_settingsMenuUpdateList - * - * Public: No - */ - -#include "script_component.hpp" - -params [["_updateKeyView", true, [true]]]; - -disableSerialization; -private _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu'; -private _ctrlList = _settingsMenu displayCtrl 200; - -lnbClear _ctrlList; - -private _selectedCategory = GVAR(categories) select GVAR(currentCategorySelection); - -switch (GVAR(optionMenu_openTab)) do { - case (MENU_TAB_OPTIONS): { - { - if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { - private _settingName = (_x select 3); - private _settingsValue = _x select 9; - - // Created disable/enable options for bools - private _settingsText = if ((_x select 1) == "BOOL") then { - [(localize ELSTRING(common,No)), (localize ELSTRING(common,Yes))] select _settingsValue; - } else { - private _values = _x select 5; - if !((!isNil "_values") && {_values isEqualType []} && {_settingsValue >= 0} && {_settingsValue < (count _values)}) exitWith { - ERROR_3("Setting (%1) has bad values (%2) for index (%3)", _settingName, _values, _settingsValue); - "ERROR" - }; - _values select _settingsValue; - }; - private _added = _ctrlList lnbAddRow [_settingName, _settingsText]; - _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; - }; - } forEach GVAR(clientSideOptions); - }; - case (MENU_TAB_COLORS): { - { - if (_selectedCategory == "" || {_selectedCategory == (_x select 8)}) then { - private _color = +(_x select 9); - { - _color set [_forEachIndex, ((round (_x * 100))/100)]; - } forEach _color; - private _settingsColor = str _color; - private _settingName = (_x select 3); - - private _added = _ctrlList lnbAddRow [_settingName, _settingsColor]; - _ctrlList lnbSetColor [[_added, 1], (_x select 9)]; - _ctrlList lnbSetValue [[_added, 0], _forEachIndex]; - }; - }forEach GVAR(clientSideColors); - }; -}; -if (_updateKeyView) then { - [] call FUNC(settingsMenuUpdateKeyView); -}; diff --git a/addons/optionsmenu/functions/fnc_stringEscape.sqf b/addons/optionsmenu/functions/fnc_stringEscape.sqf deleted file mode 100644 index 089fbeb054..0000000000 --- a/addons/optionsmenu/functions/fnc_stringEscape.sqf +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Author: Glowbal - * Parse the string for quotation marks, so it can be used for config export. - * - * Arguments: - * 0: string - * - * Return Value: - * parsed string - * - * Example: - * [] call ACE_optionsmenu_fnc_stringEscape - * - * Public: No - */ - -private _str = _this; - -private _isEven = { - params ["_array", "_index"]; - private _count = 0; - { - if (_forEachIndex <= _index && {_x == 39}) then { - _count = _count + 1; - }; - }forEach _array; - - _count %2 == 0; -}; - -// reg: 34 -// single: 39 -private _array = toArray _str; -{ - if (_x == 34) then { - _array set [_forEachIndex, 39]; - }; -}forEach _array; - -private _maxIndex = count _array; -for "_i" from 0 to _maxIndex /* step +1 */ do { - if (((_i + 1) < _maxIndex - 1) && {_array select _i == 39 && (_array select (_i + 1)) == 39}) then { - if ([_array, _i] call _isEven) then { - _array deleteAt _i; - _i = _i - 1; - _maxIndex = _maxIndex - 1; - }; - }; -}; - -{ - if (_x == 34) then { - _array set [_forEachIndex, 39]; - }; -}forEach _array; - -toString _array; diff --git a/addons/optionsmenu/functions/fnc_toggleIncludeClientSettings.sqf b/addons/optionsmenu/functions/fnc_toggleIncludeClientSettings.sqf deleted file mode 100644 index 2256620cf6..0000000000 --- a/addons/optionsmenu/functions/fnc_toggleIncludeClientSettings.sqf +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Author: Glowbal - * - * - * Arguments: - * none - * - * Return Value: - * None - * - * Example: - * call ace_optionsmenu_fnc_toggleIncludeClientSettings - * - * Public: No - */ - -#include "script_component.hpp" - -GVAR(ClientSettingsExportIncluded) = !(GVAR(ClientSettingsExportIncluded)); - -[] call FUNC(onServerSettingsMenuOpen); diff --git a/addons/optionsmenu/functions/fnc_updateSetting.sqf b/addons/optionsmenu/functions/fnc_updateSetting.sqf deleted file mode 100644 index ffec62d353..0000000000 --- a/addons/optionsmenu/functions/fnc_updateSetting.sqf +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Author: Glowbal - * Updates the setting when the client has selected a new value. Saves to profilenamespace and calls setSetting. - * - * Arguments: - * 0: The Tab Open - * 1: The setting's name - * 2: The new value either an index or a color OR - * - * Return Value: - * None - * - * Example: - * [MENU_TAB_COLORS, "ace_fireTruckColor", [1,0,0,1]] call ACE_optionsmenu_fnc_updateSetting - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_type", "_name", "_newValue"]; - -private _changed = false; - -switch (_type) do { - case (MENU_TAB_OPTIONS): { - { - if ((_x select 0) == _name) then { - - if ((_x select 1) == "BOOL") then { - _newValue = [false, true] select _newValue; - }; - - if !((_x select 9) isEqualTo _newValue) then { - _changed = true; - _x set [9, _newValue]; - } ; - - }; - } forEach GVAR(clientSideOptions); - }; - case (MENU_TAB_COLORS): { - { - if (((_x select 0) == _name) && {!((_x select 9) isEqualTo _newValue)}) then { - _changed = true; - _x set [9, _newValue]; - }; - } forEach GVAR(clientSideColors); - }; - case (MENU_TAB_SERVER_OPTIONS): { - { - if ((_x select 0) == _name) then { - - if ((_x select 1) == "BOOL") then { - _newValue = [false, true] select _newValue; - }; - - if !((_x select 9) isEqualTo _newValue) then { - _changed = true; - _x set [9, _newValue]; - } ; - - }; - } forEach GVAR(serverSideOptions); - }; - case (MENU_TAB_SERVER_COLORS): { - { - if (((_x select 0) == _name) && {!((_x select 9) isEqualTo _newValue)}) then { - _changed = true; - _x set [9, _newValue]; - }; - } forEach GVAR(serverSideColors); - }; - case (MENU_TAB_SERVER_VALUES): { - { - if (((_x select 0) == _name) && {!((_x select 9) isEqualTo _newValue)}) then { - _changed = true; - _x set [9, _newValue]; - }; - } forEach GVAR(serverSideValues); - }; -}; - -if (_changed) then { - if (GVAR(serverConfigGeneration) > 0) then { - if !(isMultiplayer) then { - missionNamespace setVariable [_name, _newValue]; - }; - } else { - profileNamespace setVariable [_name, _newValue]; - [_name, _newValue] call EFUNC(common,setSetting); - }; -}; diff --git a/addons/optionsmenu/gui/define.hpp b/addons/optionsmenu/gui/define.hpp deleted file mode 100644 index 9620bdd7e6..0000000000 --- a/addons/optionsmenu/gui/define.hpp +++ /dev/null @@ -1,101 +0,0 @@ -// define.hpp - -class ACE_gui_backgroundBase; -class ACE_gui_editBase; -class ACE_gui_buttonBase; -class ACE_gui_staticBase; -class ACE_gui_listNBox; -class ACE_gui_comboBoxBase; -class RscXSliderH; -class RscControlsGroupNoScrollbars; -class RscHTML; -class RscText; - - -class RscControlsGroupNoHScrollbars; -class RscPicture; -class RscButtonMenu; - - -#ifndef ACE_DEFINE_H -#define ACE_DEFINE_H - -#define true 1 -#define false 0 - -#define CT_STATIC 0 -#define CT_BUTTON 1 -#define CT_EDIT 2 -#define CT_SLIDER 3 -#define CT_COMBO 4 -#define CT_LISTBOX 5 -#define CT_TOOLBOX 6 -#define CT_CHECKBOXES 7 -#define CT_PROGRESS 8 -#define CT_HTML 9 -#define CT_STATIC_SKEW 10 -#define CT_ACTIVETEXT 11 -#define CT_TREE 12 -#define CT_STRUCTURED_TEXT 13 -#define CT_CONTEXT_MENU 14 -#define CT_CONTROLS_GROUP 15 -#define CT_SHORTCUTBUTTON 16 -#define CT_XKEYDESC 40 -#define CT_XBUTTON 41 -#define CT_XLISTBOX 42 -#define CT_XSLIDER 43 -#define CT_XCOMBO 44 -#define CT_ANIMATED_TEXTURE 45 -#define CT_OBJECT 80 -#define CT_OBJECT_ZOOM 81 -#define CT_OBJECT_CONTAINER 82 -#define CT_OBJECT_CONT_ANIM 83 -#define CT_LINEBREAK 98 -#define CT_ANIMATED_USER 99 -#define CT_MAP 100 -#define CT_MAP_MAIN 101 -#define CT_LISTNBOX 102 - -// Static styles -#define ST_POS 0x0F -#define ST_HPOS 0x03 -#define ST_VPOS 0x0C -#define ST_LEFT 0x00 -#define ST_RIGHT 0x01 -#define ST_CENTER 0x02 -#define ST_DOWN 0x04 -#define ST_UP 0x08 -#define ST_VCENTER 0x0c - -#define ST_TYPE 0xF0 -#define ST_SINGLE 0 -#define ST_MULTI 16 -#define ST_TITLE_BAR 32 -#define ST_PICTURE 48 -#define ST_FRAME 64 -#define ST_BACKGROUND 80 -#define ST_GROUP_BOX 96 -#define ST_GROUP_BOX2 112 -#define ST_HUD_BACKGROUND 128 -#define ST_TILE_PICTURE 144 -#define ST_WITH_RECT 160 -#define ST_LINE 176 - -#define ST_SHADOW 0x100 -#define ST_NO_RECT 0x200 // this style works for CT_STATIC in conjunction with ST_MULTI -#define ST_KEEP_ASPECT_RATIO 0x800 - -#define ST_TITLE ST_TITLE_BAR + ST_CENTER - -// Slider styles -#define SL_DIR 0x400 -#define SL_VERT 0 -#define SL_HORZ 0x400 - -#define SL_TEXTURES 0x10 - -// Listbox styles -#define LB_TEXTURES 0x10 -#define LB_MULTI 0x20 - -#endif diff --git a/addons/optionsmenu/gui/mainMenu.hpp b/addons/optionsmenu/gui/mainMenu.hpp new file mode 100644 index 0000000000..0b26df7017 --- /dev/null +++ b/addons/optionsmenu/gui/mainMenu.hpp @@ -0,0 +1,77 @@ +class RscControlsGroupNoHScrollbars; +class RscHTML; +class RscText; + +class RscStandardDisplay; +class RscDisplayMain: RscStandardDisplay { + class controls { + class InfoMods: RscControlsGroupNoHScrollbars { + class Controls; + }; + + class InfoNews: InfoMods { + class Controls: Controls { + class Background; + class BackgroundIcon; + class Icon; + class News; + class Notification; + class Button; + }; + }; + + class ACE_news_apex: InfoNews { + idc = IDC_MAIN_INFO; + y = "safezoneY + safezoneH - (3 * 2 + 1) * (pixelH * pixelGrid * 2) - 4 * (4 * pixelH)"; + + class Controls: Controls { + class Background: Background {}; + class BackgroundIcon: BackgroundIcon {}; + class Icon: Icon { + text = QPATHTOF(gui\aceMenuIcon_ca.paa); + }; + class CurrentVersionInfo: RscText { + idc = IDC_MAIN_INFO_CURRENT_VERSION_INFO; + style = 1; + text = ""; + sizeEx = "(pixelH * pixelGrid * 1.5)"; + font = "RobotoCondensedLight"; + shadow = 1; + colorBackground[] = {0,0,0,0}; + x = 0; + y = 0; + w = "(10 - 1.25 * 2) * (pixelW * pixelGrid * 2)"; + h = "1 * (pixelH * pixelGrid * 2)"; + onLoad = "(_this select 0) ctrlenable false;"; + }; + class HTTPVersionInfo: RscHTML { + idc = IDC_MAIN_INFO_NEWEST_VERSION_INFO; + shadow = 0; + + class H1 { + sizeEx = "(pixelH * pixelGrid * 1.5)"; + font = "RobotoCondensedLight"; + fontBold = "RobotoCondensedLight"; + align = "right"; + }; + class H2: H1 { + sizeEx = "(pixelH * pixelGrid * 1.5)"; + }; + class P: H1 { + sizeEx = "(pixelH * pixelGrid * 1.5)"; + }; + + x = 0; + y = "1 * (pixelH * pixelGrid * 2)"; + w = "(10 - 1.25 * 2) * (pixelW * pixelGrid * 2)"; + h = "1 * (pixelH * pixelGrid * 2)"; + onLoad = "(_this select 0) ctrlenable false;"; + }; + class Button: Button { + tooltip = "Download latest and report issues:"; + url = "https://github.com/acemod/ACE3/releases"; + }; + }; + }; + }; +}; diff --git a/addons/optionsmenu/gui/pauseMenu.hpp b/addons/optionsmenu/gui/pauseMenu.hpp index 304cd7e8d1..f48cecfd0f 100644 --- a/addons/optionsmenu/gui/pauseMenu.hpp +++ b/addons/optionsmenu/gui/pauseMenu.hpp @@ -1,179 +1,13 @@ - -class ACE_Open_SettingsMenu_BtnBase : ACE_gui_buttonBase { - class Attributes { - font = "RobotoCondensed"; - color = "#E5E5E5"; - align = "left"; - shadow = "true"; - }; - class AttributesImage { - font = "RobotoCondensed"; - color = "#E5E5E5"; - align = "left"; - }; - class HitZone { - left = 0.0; - top = 0.0; - right = 0.0; - bottom = 0.0; - }; - class ShortcutPos { - left = 0; - top = 0; - w = 0; - h = 0; - }; - class TextPos { - left = 0.01; - top = 0; - right = 0; - bottom = 0; - }; - animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; - animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)"; - color2[] = {0,0,0,1}; - color[] = {1,1,1,1}; - //colorBackground2[] = {0.75,0.75,0.75,1}; - //colorBackground[] = {0,0,0,0.8}; - colorBackground[] = {1, 0.647, 0, 0.5}; - colorBackground2[] = {1, 0.647, 0, 0.5}; - colorBackgroundFocused[] = {1, 1, 1, 0}; - colorDisabled[] = {1,1,1,0.25}; - colorFocused[] = {0,0,0,1}; - colorText[] = {1,1,1,1}; - //default = 0; - font = "RobotoCondensed"; - idc = -1; - period = 1.2; - periodFocus = 1.2; - periodOver = 1.2; - shadow = 0; - shortcuts[] = {}; - size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - soundClick[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundClick",0.09,1}; - soundEnter[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEnter",0.09,1}; - soundEscape[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEscape",0.09,1}; - soundPush[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundPush",0.09,1}; - style = "0x02 + 0xC0"; - text = CSTRING(OpenConfigMenu); - textureNoShortcut = "#(argb,8,8,3)color(0,0,0,0)"; - tooltip = ""; - tooltipColorBox[] = {1,1,1,1}; - tooltipColorShade[] = {0,0,0,0.65}; - tooltipColorText[] = {1,1,1,1}; - type = 16; - x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX)"; - y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY"; - w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - action = "(findDisplay 49) closeDisplay 0; createDialog 'ACE_settingsMenu';"; +class RscDisplayEmpty; +class GVAR(MainMenuHelperDumpDebug): RscDisplayEmpty { + onLoad = QUOTE(\ + [] call FUNC(debugDumpToClipboard);\ + (_this select 0) closeDisplay 0;\ + ); }; - -class RscStandardDisplay; -class RscDisplayMPInterrupt: RscStandardDisplay { - class controls { - class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {}; - }; -}; - -class RscDisplayInterruptEditorPreview: RscStandardDisplay { - class controls { - class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {}; - }; -}; - -class RscDisplayInterrupt: RscStandardDisplay { - class controls { - class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {}; - }; -}; - -class RscDisplayInterruptEditor3D: RscStandardDisplay { - class controls { - class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {}; - }; -}; - -class RscDisplayMovieInterrupt: RscStandardDisplay { - class controls { - class ACE_Open_settingsMenu_Btn: ACE_Open_SettingsMenu_BtnBase {}; - }; -}; - -class RscDisplayMain: RscStandardDisplay { - class controls { - class InfoMods: RscControlsGroupNoHScrollbars { - class Controls; - }; - - class InfoNews: InfoMods { - class Controls: Controls { - class Background; - class BackgroundIcon; - class Icon; - class News; - class Notification; - class Button; - }; - }; - - class ACE_news_apex: InfoNews { - idc = IDC_MAIN_INFO; - y = "safezoneY + safezoneH - (3 * 2 + 1) * (pixelH * pixelGrid * 2) - 4 * (4 * pixelH)"; - - class Controls: Controls { - class Background: Background {}; - class BackgroundIcon: BackgroundIcon {}; - class Icon: Icon { - text = QPATHTOF(gui\aceMenuIcon_ca.paa); - }; - class CurrentVersionInfo: RscText { - idc = IDC_MAIN_INFO_CURRENT_VERSION_INFO; - style = 1; - text = ""; - sizeEx = "(pixelH * pixelGrid * 1.5)"; - font = "RobotoCondensedLight"; - shadow = 1; - colorBackground[] = {0,0,0,0}; - x = 0; - y = 0; - w = "(10 - 1.25 * 2) * (pixelW * pixelGrid * 2)"; - h = "1 * (pixelH * pixelGrid * 2)"; - onLoad = "(_this select 0) ctrlenable false;"; - }; - class HTTPVersionInfo: RscHTML { - idc = IDC_MAIN_INFO_NEWEST_VERSION_INFO; - shadow = 0; - - class H1 { - sizeEx = "(pixelH * pixelGrid * 1.5)"; - font = "RobotoCondensedLight"; - fontBold = "RobotoCondensedLight"; - align = "right"; - }; - class H2: H1 { - sizeEx = "(pixelH * pixelGrid * 1.5)"; - }; - class P: H1 { - sizeEx = "(pixelH * pixelGrid * 1.5)"; - }; - - x = 0; - y = "1 * (pixelH * pixelGrid * 2)"; - w = "(10 - 1.25 * 2) * (pixelW * pixelGrid * 2)"; - h = "1 * (pixelH * pixelGrid * 2)"; - onLoad = "(_this select 0) ctrlenable false;"; - }; - class Button: Button { - tooltip = "Download latest and report issues:"; - url = "https://github.com/acemod/ACE3/releases"; - }; - }; - }; - }; +class GVAR(MainMenuHelperHeadBugFix): RscDisplayEmpty { + onLoad = QUOTE(\ + 0 spawn EFUNC(common,headBugFix);\ + (_this select 0) closeDisplay 0;\ + ); }; diff --git a/addons/optionsmenu/gui/settingsMenu.hpp b/addons/optionsmenu/gui/settingsMenu.hpp deleted file mode 100644 index e9265e59fd..0000000000 --- a/addons/optionsmenu/gui/settingsMenu.hpp +++ /dev/null @@ -1,487 +0,0 @@ -#define SIZEX (((safezoneW / safezoneH) min 1.2)) -#define SIZEY (SIZEX / 1.2) -#define X_ORIGINAL(num) (num * (SIZEX / 40) + (safezoneX + (safezoneW - SIZEX)/2)) -#define Y_ORIGINAL(num) (num * (SIZEY / 25) + (safezoneY + (safezoneH - (SIZEX / 1.2))/2)) -#define W_ORIGINAL(num) (num * (SIZEX / 40)) -#define H_ORIGINAL(num) (num * (SIZEY / 25)) - -#define X_MAKEITBIGGA(num) (num * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)) -#define Y_MAKEITBIGGA(num) (num * (safeZoneH / 30) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)) -#define W_MAKEITBIGGA(num) (num * (safeZoneH / 40)) -#define H_MAKEITBIGGA(num) (num * (safeZoneH / 30)) - -#define X_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(optionMenuDisplaySize)), 0)]), X_ORIGINAL(num), X_MAKEITBIGGA(num))]) -#define Y_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(optionMenuDisplaySize)), 0)]), Y_ORIGINAL(num), Y_MAKEITBIGGA(num))]) -#define W_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(optionMenuDisplaySize)), 0)]), W_ORIGINAL(num), W_MAKEITBIGGA(num))]) -#define H_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(optionMenuDisplaySize)), 0)]), H_ORIGINAL(num), H_MAKEITBIGGA(num))]) - -class ACE_settingsMenu { - idd = 145246; - movingEnable = false; - onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', _this select 0)]; [] call FUNC(onSettingsMenuOpen);); - onUnload = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', nil)]; saveProfileNamespace;); - - class controlsBackground { - class HeaderBackground: ACE_gui_backgroundBase { - idc = -1; - type = CT_STATIC; - x = X_PART(1); - y = Y_PART(1); - w = W_PART(38); - h = H_PART(1); - style = ST_LEFT + ST_SHADOW; - font = "RobotoCondensed"; - SizeEx = H_PART(1); - colorText[] = {0.95, 0.95, 0.95, 0.75}; - colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; - text = ""; - }; - class CenterBackground: HeaderBackground { - y = Y_PART(2.1); - h = H_PART(2.5); - text = ""; - colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; - colorBackground[] = {0,0,0,"(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; - }; - class LeftBackground: CenterBackground { - y = Y_PART(4.8); - h = H_PART(17.4); - w = W_PART(25); - }; - class RightBackground: LeftBackground { - x = X_PART(26.1); - w = W_PART(12.9); - }; - class RightBackgroundHeader: RightBackground { - h = H_PART(1.4); - colorBackground[] = {0,0,0,1}; - }; - }; - - class controls { - class HeaderName { - idc = 1; - type = CT_STATIC; - x = X_PART(1); - y = Y_PART(1); - w = W_PART(38); - h = H_PART(1); - style = ST_LEFT + ST_SHADOW; - font = "RobotoCondensed"; - SizeEx = H_PART(1); - colorText[] = {0.95, 0.95, 0.95, 0.75}; - colorBackground[] = {0,0,0,0}; - text = CSTRING(OpenConfigMenu); - }; - class labelSubHeader: ACE_gui_staticBase { - idc = 13; - x = X_PART(2); - y = Y_PART(3.4); - w = W_PART(15); - h = H_PART(1); - text = ""; - }; - class categorySelection: ACE_gui_comboBoxBase { - idc = 14; - x = X_PART(14); - y = Y_PART(3.4); - w = W_PART(9); - h = H_PART(1); - text = ""; - onLBSelChanged = QUOTE( call FUNC(onCategorySelectChanged)); - SizeEx = H_PART(0.9); - }; - class selectionAction_1: ACE_gui_buttonBase { - idc = 1000; - text = CSTRING(TabOptions); - x = X_PART(1); - y = Y_PART(2.1); - w = W_PART(9.5); - h = H_PART(1); - animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; - animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)"; - animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)"; - animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)"; - color[] = {1, 1, 1, 1}; - color2[] = {0,0,0, 1}; - colorBackgroundFocused[] = {1,1,1,1}; - colorBackground[] = {1,1,1,1}; - colorbackground2[] = {1,1,1,1}; - colorDisabled[] = {1,1,1,1}; - colorFocused[] = {0,0,0,1}; - periodFocus = 1; - periodOver = 1; - action = QUOTE([MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged);); - SizeEx = H_PART(1); - Size = H_PART(1); - }; - class selectionAction_2: selectionAction_1 { - idc = 1001; - text = CSTRING(TabColors); - x = X_PART(10.5); - action = QUOTE([MENU_TAB_COLORS] call FUNC(onListBoxShowSelectionChanged);); - }; - class selectionAction_3: selectionAction_1 { - idc = 1002; - text = ""; - x = X_PART(20); - action = ""; - }; - class selectionAction_4: selectionAction_1 { - idc = 1003; - text = ""; - x = X_PART(29.5); - action = ""; - }; - class listBoxSettingsList: ACE_gui_listNBox { - idc = 200; - x = X_PART(2); - y = Y_PART(5.5); - w = W_PART(23); - h = H_PART(15); - SizeEx = H_ORIGINAL(0.8); - colorBackground[] = {0, 0, 0, 0.9}; - colorSelectBackground[] = {0, 0, 0, 0.9}; - columns[] = {0.0, 0.6}; - onLBSelChanged = QUOTE(_this call FUNC(settingsMenuUpdateKeyView)); - }; - class labelTitle: ACE_gui_staticBase { - idc = 250; - x = X_PART(27.1); - y = Y_PART(5.1); - w = W_PART(11); - h = H_PART(1); - text = ""; - SizeEx = H_PART(1); - }; - class labelKey: ACE_gui_staticBase { //Variable Name - idc = 300; - x = X_PART(27.1); - y = Y_PART(6.2); - w = W_PART(11); - h = H_PART(1); - text = ""; - SizeEx = H_PART(0.65); - }; - class Label2: labelKey { - idc = 301; - y = Y_PART(7.3); - text = CSTRING(Setting); - SizeEx = H_PART(1); - }; - class comboBox1: ACE_gui_comboBoxBase { - idc = 400; - x = X_PART(31.1); - y = Y_PART(7.3); - w = W_PART(7); - h = H_PART(1); - onLBSelChanged = QUOTE( call FUNC(onListBoxSettingsChanged)); - SizeEx = H_PART(0.9); - }; - class sliderBar1: RscXSliderH { - idc = 410; - x = X_PART(27.1); - y = Y_PART(7.3); - w = W_PART(11); - h = H_PART(0.75); - onSliderPosChanged = QUOTE(_this call FUNC(onSliderPosChanged)); - color[] = {1,0,0,0.4}; - colorActive[] = {1,0,0,1}; - }; - class sliderBar2: sliderBar1 { - idc = 411; - y = Y_PART(8.2); - color[] = {0,1,0,0.4}; - colorActive[] = {0,1,0,1}; - }; - class sliderBar3: sliderBar1 { - idc = 412; - y = Y_PART(9.1); - color[] = {0,0,1,0.4}; - colorActive[] = {0,0,1,1}; - }; - class sliderBar4: sliderBar1 { - idc = 413; - y = Y_PART(10); - color[] = {1,1,1,0.4}; - colorActive[] = {1,1,1,1}; - }; - class labelDesc: ACE_gui_staticBase { - idc = 251; - x = X_PART(27.1); - y = Y_PART(11); - w = W_PART(11); - h = H_PART(11); - text = ""; - style = ST_LEFT + ST_MULTI; - lineSpacing = 1; - SizeEx = H_PART(0.8); - }; - class actionClose: ACE_gui_buttonBase { - idc = 10; - text = "$STR_DISP_CLOSE"; - x = X_PART(1); - y = Y_PART(22.3); - w = W_PART(7.5); - h = H_PART(1); - style = ST_LEFT; - animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.8)"; - animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.5)"; - animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)"; - animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)"; - color[] = {1, 1, 1, 1}; - color2[] = {0,0,0, 1}; - colorBackgroundFocused[] = {1,1,1,1}; - colorBackground[] = {1,1,1,1}; - colorbackground2[] = {1,1,1,1}; - colorDisabled[] = {0.5,0.5,0.5,0.8}; - colorFocused[] = {0,0,0,1}; - periodFocus = 1; - periodOver = 1; - action = "closedialog 0;"; - SizeEx = H_PART(1); - Size = H_PART(1); - }; - class action_reset: actionClose { - idc = 1100; - text = CSTRING(ResetAll); - x = X_PART(9.5); - action = QUOTE([] call FUNC(resetSettings)); - }; - class action_exportServerConfig: actionClose { - idc = 1102; - text = CSTRING(OpenExport); - x = X_PART(18); - action = QUOTE(if (GVAR(serverConfigGeneration) > 0) then {closeDialog 0; createDialog 'ACE_serverSettingsMenu';}); - }; - class action_debug: actionClose { - idc = 1102; - text = CSTRING(DumpDebug); - x = X_PART(26.1); - action = QUOTE([] call FUNC(debugDumpToClipboard)); - tooltip = CSTRING(DumpDebugTooltip); - }; - class action_headBugFix: actionClose { - idc = 1102; - text = CSTRING(headBugFix); - x = X_PART(34); - w = W_PART(5); - action = QUOTE(0 spawn EFUNC(common,headBugFix); closedialog 0;); - tooltip = CSTRING(headBugFixTooltip); - }; - }; -}; -class ACE_serverSettingsMenu: ACE_settingsMenu { - onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_serverSettingsMenu', _this select 0)]; [] call FUNC(onServerSettingsMenuOpen);); - onUnload = QUOTE(uiNamespace setVariable [ARR_2('ACE_serverSettingsMenu', nil)];); - class controls: controls { - class HeaderName { - idc = 1; - type = CT_STATIC; - x = X_PART(1); - y = Y_PART(1); - w = W_PART(38); - h = H_PART(1); - style = ST_LEFT + ST_SHADOW; - font = "RobotoCondensed"; - SizeEx = H_PART(1); - colorText[] = {0.95, 0.95, 0.95, 0.75}; - colorBackground[] = {0,0,0,0}; - text = CSTRING(OpenConfigMenu); - }; - class labelSubHeader: ACE_gui_staticBase { - idc = 13; - x = X_PART(2); - y = Y_PART(3.4); - w = W_PART(30); - h = H_PART(1); - text = ""; - }; - class categorySelection: ACE_gui_comboBoxBase { - idc = 14; - x = X_PART(14); - y = Y_PART(3.4); - w = W_PART(9); - h = H_PART(1); - text = ""; - onLBSelChanged = QUOTE( call FUNC(onServerCategorySelectChanged)); - SizeEx = H_PART(0.9); - }; - class selectionAction_1: ACE_gui_buttonBase { - idc = 1000; - text = CSTRING(TabOptions); - x = X_PART(1); - y = Y_PART(2.1); - w = W_PART(9.5); - h = H_PART(1); - animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; - animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)"; - animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)"; - animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)"; - color[] = {1, 1, 1, 1}; - color2[] = {0,0,0, 1}; - colorBackgroundFocused[] = {1,1,1,1}; - colorBackground[] = {1,1,1,1}; - colorbackground2[] = {1,1,1,1}; - colorDisabled[] = {1,1,1,1}; - colorFocused[] = {0,0,0,1}; - periodFocus = 1; - periodOver = 1; - action = QUOTE([MENU_TAB_SERVER_OPTIONS] call FUNC(onServerListBoxShowSelectionChanged);); - }; - class selectionAction_2: selectionAction_1 { - idc = 1001; - text = CSTRING(TabColors); - x = X_PART(10.5); - action = QUOTE([MENU_TAB_SERVER_COLORS] call FUNC(onServerListBoxShowSelectionChanged);); - }; - class selectionAction_3: selectionAction_1 { - idc = 1002; - text = CSTRING(TabValues); - x = X_PART(20); - action = QUOTE([MENU_TAB_SERVER_VALUES] call FUNC(onServerListBoxShowSelectionChanged);); - }; - class selectionAction_4: selectionAction_1 { - idc = 1003; - text = ""; - x = X_PART(29.5); - action = ""; - }; - class listBoxSettingsList: ACE_gui_listNBox { - idc = 200; - x = X_PART(2); - y = Y_PART(5.5); - w = W_PART(23); - h = H_PART(15); - SizeEx = H_ORIGINAL(0.8); - colorBackground[] = {0, 0, 0, 0.9}; - colorSelectBackground[] = {0, 0, 0, 0.9}; - columns[] = {0.0, 0.6}; - onLBSelChanged = QUOTE(_this call FUNC(serverSettingsMenuUpdateKeyView)); - }; - class labelTitle: ACE_gui_staticBase { - idc = 250; - x = X_PART(27.1); - y = Y_PART(5.1); - w = W_PART(11); - h = H_PART(1); - text = ""; - SizeEx = H_PART(1); - }; - class labelKey: ACE_gui_staticBase { //Variable Name - idc = 300; - x = X_PART(27.1); - y = Y_PART(6.2); - w = W_PART(11); - h = H_PART(1); - text = ""; - SizeEx = H_PART(0.65); - }; - class Label2: labelKey { - idc = 301; - y = Y_PART(7.3); - text = CSTRING(Setting); - SizeEx = H_PART(1); - }; - class comboBox1: ACE_gui_comboBoxBase { - idc = 400; - x = X_PART(31.1); - y = Y_PART(7.3); - w = W_PART(7); - h = H_PART(1); - onLBSelChanged = QUOTE( call FUNC(onListBoxSettingsChanged)); - SizeEx = H_PART(0.9); - }; - class sliderBar1: RscXSliderH { - idc = 410; - x = X_PART(27.1); - y = Y_PART(7.3); - w = W_PART(11); - h = H_PART(0.75); - onSliderPosChanged = QUOTE(_this call FUNC(onSliderPosChanged)); - color[] = {1,0,0,0.4}; - colorActive[] = {1,0,0,1}; - }; - class sliderBar2: sliderBar1 { - idc = 411; - y = Y_PART(8.2); - color[] = {0,1,0,0.4}; - colorActive[] = {0,1,0,1}; - }; - class sliderBar3: sliderBar1 { - idc = 412; - y = Y_PART(9.1); - color[] = {0,0,1,0.4}; - colorActive[] = {0,0,1,1}; - }; - class sliderBar4: sliderBar1 { - idc = 413; - y = Y_PART(10); - color[] = {1,1,1,0.4}; - colorActive[] = {1,1,1,1}; - }; - class inputField1: ACE_gui_editBase { - idc = 414; - x = X_PART(27.1); - y = Y_PART(7.3); - w = W_PART(11); - h = H_PART(0.75); - }; - class inputFieldTypeLabel: ACE_gui_staticBase { - idc = 415; - x = X_PART(27.1); - y = Y_PART(8.2); - w = W_PART(11); - h = H_PART(0.75); - text = ""; - style = ST_LEFT + ST_MULTI; - lineSpacing = 1; - SizeEx = H_PART(0.8); - }; - class saveInputButton: selectionAction_1 { - idc = 416; - text = CSTRING(SaveInput); - x = X_PART(27.1); - y = Y_PART(9.1); - w = W_PART(11); - h = H_PART(1); - action = QUOTE([] call FUNC(onServerSaveInputField);); - }; - class labelDesc: ACE_gui_staticBase { - idc = 251; - x = X_PART(27.1); - y = Y_PART(11); - w = W_PART(11); - h = H_PART(11); - text = ""; - style = ST_LEFT + ST_MULTI; - lineSpacing = 1; - SizeEx = H_PART(0.8); - }; - class actionClose; - class action_reset: actionClose { - idc = 1100; - text = CSTRING(ResetAll); - x = X_PART(26.1); - action = QUOTE([] call FUNC(serverResetSettings)); - }; - class action_exportServerConfig: actionClose { - idc = 1101; - text = CSTRING(Export); - x = X_PART(1); - action = QUOTE([] call FUNC(exportSettings)); - }; - class action_toggleIncludeClientSettings: actionClose { - idc = 1102; - text = CSTRING(inClientSettings); - x = X_PART(9); - action = QUOTE([] call FUNC(toggleIncludeClientSettings)); - }; - }; -}; diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml index fda346cf3f..6ebc553748 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -1,357 +1,116 @@  - - ACE Options - ACE-Optionen - Opciones ACE - Ustawienia ACE - ACE Nastavení - Options ACE - ACE Настройки - Opções do ACE - ACE Beállítások - Opzioni ACE - ACE オプション - ACE 옵션 - ACE 设定 - ACE 設定 + + Debug To Clipboard + Debug do schowka + Depurar al portapapeles + Debug do schránky + Debug in die Zwischenablage + Depuração para área de transferência + Debug vers le presse-papier + Debug a vágólapra + Отладка в буфер обмена + Debug su Blocco Note + クリップボードにデバッグ + 디버그를 클립보드로 + 复制除错讯息至剪贴簿 + 複製除錯訊息至剪貼簿 - - Fix Animation - Behebe Animation - Arreglar animación - Фикс анимации - Opravit animace - Napraw animację - Corriger animation - Animációk kijavítása - Sistema l'animazione - Arrumar Animação - アニメーションを修正 - 동작 고정 + + Sends debug information to RPT and clipboard. + Wysyła informacje o debugowaniu do RPT oraz schowka. + Envía información de depuración al RPT y el portapapeles. + Pošle debug informace do RPT a schránky. + Protokolliert Debug-Informationen im RPT und speichert sie in der Zwischenablage. + Envia informação de depuração para RPT e área de transferência. + Copie le Debug dans le RPT et le presse-papier + Debug információt küld az RPT-be és a vágólapra. + Отправляет отладочную информацию в RPT и буфер обмена. + Invia informazioni di debug all'RPT e al Blocco Note + デバッグ情報を RPT とクリップボードに送った。 + 디버그 정보를 보고하기 및 클립보드에 복사하기 위해 보냅니다. + 复制除错讯息至剪贴簿与RPT报告档中。 + 複製除錯訊息至剪貼簿與RPT報告檔中。 + + + Headbug Fix + Behebe Headbug + Fix Headbug + HeadBug + "Fejhiba" fix + Corrigir Headbug + Fix Headbug + Fix Headbug + Corregir error de cabeza (headbug) + Sistema Bug della Testa + ヘッドバグ修正 + 헤드버그 수정 修复动作BUG 修復動作BUG - - Reset All - Alles zurücksetzen - Reiniciar todo - Полный сброс - Vyresetovat vše - Resetuj wszystko - Défaut - Minden visszaállítása - Resetta tutto - Resetar Tudo - すべて初期化 - 모두 초기화 - 重置为预设值 - 重置為預設值 + + Resets your animation state. + Setzt die derzeitige Animation zurück. + Resetuje aktualną animację. + Réinitialise l'état de l'animation + Visszaállítja az animációs állapotodat. + Redefine seu estado de animação. + Исправляет баг с зациклившейся анимацией. + Resetovat aktuální animaci. + Restablece tu estado de animación. + Resetta il tuo stato animazione + 現在のアニメーションの状況を初期化します。 + 자신의 동작 상태 초기화 + 当ACE发生动作BUG时,点此修复。 + 當ACE發生動作BUG時,點此修復。 - - Colors - Couleurs - Farben - Colores - Цвета - Barvy - Kolory - Színek - Colori - Cores - - 색상 - 颜色 - 顏色 + + ACE News + Noticias ACE + ACE-Neuigkeiten + Notícias do ACE + Wiadomości ACE + ACE Zprávy + Nouveautés ACE + ACE hírek + Новости ACE + Novità ACE + ACE ニュース + ACE 새소식 + ACE新闻 + ACE新聞 - - Options - Optionen - Opciones - Opcje - Nastavení - Options - Настройки - Opções - Beállítások - Opzioni - オプション - 옵션 - 设定 - 設定 + + Show News on Main Menu + Mostrar noticias en el menú principal + Zeige Neuigkeiten im Hauptmenü + Mostrar notícias no menu principal + Pokazuj wiadomości ACE w menu głównym + Affiche les nouveautés sur l'écran principal + Hírek mutatása a főmenüben + Показывать новости в Главном Меню + Zobrazit zprávy v hlavním menu + Mostra News nel Menù Princinpale + メイン画面にニュースを表示します + 메인메뉴에 새소식을 표시합니다 + 显示新闻消息于主选单 + 顯示新聞消息於主選單 - - Values - Valores - Значения - Hodnoty - Wartości - Valeurs - Werte - Értékek - Valori - Valores - - - 数值 - 數值 - - - Setting: - Nastavení: - Einstellung: - Установки: - Ajuste: - Ustaw: - Paramètres - Opció: - Parametri: - Opção: - 設定: - 설정: - 设定: - 設定: - - - Export - Exportieren - Exportar - Экспорт - Exportovat - Eksport - Exporter - Exportálás - Esporta - Exportar - 出力 - 내보내기 - 输出 - 輸出 - - - Open Export Menu - Öffne Exportmenü - Abrir menú de exportación - Открыть меню экспорта - Otevřít exportovací menu - Eksport ustawień - Ouvrir le menu d'exportation - Exportálási menü megnyitása - Apri menù esportazione - Abrir menu de exportação - 出力メニューを開く - 내보내기 메뉴 열기 - 开启输出选单 - 開啟輸出選單 - - - String input. - Zeichenketteneingabe - Introducir cadena de texto. - Строчный ввод. - Wpisywanie tekstu. - Vkládání textu. - Entrée - String bevitel. - Stringa di unput. - Input de String - 文字列の入力 - 문자열 입력 - 输入数值 - 輸入數值 - - - Array. Seperate elements by using ,. - Array. Teile unterschiedliche Elemente mit ,. - Matriz. Separa elementos usando ,. - Массив. Разделяйте элемены, используя запятую. - Tablica. Oddziel elementy używając ,. - Tableau. Séparation par ,. - Tabulka. Odděl elementy použitím ,. - Array. Válasszad el az elemeket vesszővel. - Vettor. Separa gli elementi usando ,. - Vetor. Separe elementos usando *,*. - アレイ。,を使うことで区切れます。 - 배열. 요소를 ,. 로 나눔 - 阵列。使用','来做每个值的区隔 - 陣列。使用','來做每個值的區隔 - - - Number - Zahl - Número - Число - Číslo - Cyfra - Nombre - Szám - Numero - Número - - 숫자 - 数字 - 數字 - - - Uknown input type - Unbekannter Eingabetyp - Tipo de entrada desconocida - Неизвестный тип ввода - Neznámý vstup - Nieznany rodzaj danych - Type d'entrée inconnue - Ismeretlen beviteli típus - Input inserito sconosciuto - Tipo desonhecido de input - 不明な入力です - 불분명한 입력입니다 - 未知输入类型 - 未知輸入類型 - - - Save input - Speichere Eingabe - Guardar entrada - Сохранить ввод - Uložit vstup - Zapisz dane - Sauvegarder - Bevitel elmentése - Salva input - Salvar input - 入力を保存 - 입력 저장 - 储存输入 - 儲存輸入 - - - Include Client Settings - Schließe Client-Einstellungen ein - Incluir configuración de cliente - Включить настройки клиента - Zahrnout nastavení klienta - Zaw. ustaw. klienta - Inclure paramètres client - Kliens-beállítások melléklése - Includi i parametri del client - Incluir opções do cliente - クライアント設定を含む - 클라이언트 설정 포함 - 包含客户端设定 - 包含客戶端設定 - - - Exclude Client Settings - Schließe Client-Einstellungen aus - Excluir configuración de cliente - Исключить настройки клиента - Nezahrnout nastavení klienta - Wyklucz ustawienia klienta - Exclure paramètres client - Kliens-beállítások elhagyása - Escludi i parametri del client - Excluir opções do cliente - クライアント設定を実行する - 클라이언트 설정 제외 - 不包含客户端设定 - 不包含客戶端設定 - - - Settings exported to clipboard - Einstellungen in die Zwischenablage exportiert - Configuración exportada al portapapeles - Настройки экспортированы в буфер обмена - Nastevení exportována do schránky - Ustawienia wyeksportowano do schowka - Paramètres exportés dans le presse papier - Beállítások exportálva a vágólapba - Parametri esportati alla clipboard - Opções exportadas para o clipboard. - クリップボードに設定を出力する - 클립보드로 설정 내보내기 - 设定输出至剪贴簿 - 設定輸出至剪貼簿 - - - Option Menu UI Scaling - Menu option: taille de l'UI - Skalowanie UI menu ustawień - Měřítko UI v menu nastavení - Размер интерфейса меню настройки - Opción de escalado del menú IU - Nutzeroberflächen-Skalierung - Beállításmenü kezelőfelületének skálázása - Escalar o menu de opções - Proporzioni della interfaccia utente - オプション メニューにあるユーザ インタフェイスの大きさ - 옵션메뉴 UI 비례도 - 调整设定选单视窗大小 - 調整設定選單視窗大小 - - - Allow Config Export [ACE] - Pozwól na eksport ustawień - [ACE] Permitir exportar configuración - Erlaube Config-Export [ACE] - Povolit export natavení [ACE] - [ACE] Permitir exportação de configurações - Autoriser l'exportation de la configuration [ACE] - Konfiguráció-exportálás engedélyezése [ACE] - Разрешить экспорт настроек [ACE] - Consenti Esportazione del Config [ACE] - 設定の出力を許可 [ACE] - 설정 내보내기 허가 [ACE] - 允许配置导出 [ACE] - 允許配置導出 [ACE] - - - Allow - Zezwól - Permitir - Erlaube - Povolit - Permitir - Autoriser - Engedélyezés - Разрешить - Consenti - 許可 - 허가 - 允许 - 允許 - - - Allow export of all settings to a server config formatted. - Zezwól na eksport wszystkich ustawień do formatu konfiguracji serwera. - Permitir la exportación de todos los ajustes de configuración a un servidor con formato. - Erlaube alle Einstellungen in einer Server-Config zu exportieren. - Povolit exportovat všechna nastavení do formátu server configu. - Permitir exportação de todas as configurações para uma configuração formatada de servidor. - Autorise l'exportation des toutes les options vers un fichier de configuration - Az összes beállítás szerver-konfigurációba való exportálásának engedélyezése. - Разрешить экспорт всех настроек в формате серверного конфига. - Consenti esportazione di tutti i parametri ad config formato per server. - 全ての設定をサーバ用設定の形式へと出力できるようにします。 - 모든 설정을 서버 설정 형식으로 내보내는것을 허락합니다. - 允许导出所有设定成伺服器配置格式的档案。 - 允許導出所有設定成伺服器配置格式的檔案。 - - - When allowed, you have access to the settings modification and export in SP. Clicking export will place the formated config on your clipboard. - Jeżeli ustawione na zezwól, wtedy będziesz mieć dostęp do ekranu modyfikacji wszystich ustawień i zmiennych ACE, a także będziesz mieć możliwość eksportu tychże ustawień do formatu rozpoznawalnego przez userconfig serwera. Kliknięcie opcji Eksportuj skopiuje wszystkie ustawienia do schowka. Działa tylko w trybie SP. - Cuando esta permitido, se tiene acceso a los ajustes de modificación y exportación en SP. Pulsar en exportar copiara la configuración al portapapeles. - Wenn erlaubt, können die Einstellungsmodifikationen angezeigt und im SP exportiert werden. Wenn auf "Exportieren" geklickt wird, wird eine formatierte Config-Datei in der Zwischenablage abgespeichert. - Pokud je povoleno, budete mít přístup k modifikaci nastavení a exportování v SP. Kliknutím na export umístníte formátovaný config do vaší schránky. - Quando permitido, você tem acesso à modificação de definições e exportação em SP. Clicando em exportação colocará a configuração formatada em sua área de transferência. - Quand autorisé, vous pouvez accéder aux modifications et à l'exporation en solo. Cliquer sur exporter placera la configuration dans le presse-papier - Engedélyezéskor hozzáférést kapsz a beállítások módosításához és exportálásához egyjátékos módban. Exportáláskor a formázott konfiguráció a vágólapra kerül. - Когда разршен, у вас появляется доступ к модификации настроек и экспорту их в одинночном режиме. Нажатие на кнопку Экспорт поместит форматированные настройки в буфер обмена. - Quando consentito, hai accesso alle modifiche delle impostazioni ed esportazione in SP. Cliccando Esporta piazzera il config formattato sul tuo Blocco Note. - 許可の場合、あなたは設定の変更と出力をシングルプレイで可能です。出力をクリックすると、サーバ用設定の形式となっている設定がクリップボードに保存されます。 - 허락하는 경우 싱글플레이에서 설정의 변경과 내보내기가 가능해집니다. 내보내기를 눌러서 서버 형성의 설정을 클립보드로 보냅니다. - 当本功能开启时,你将能在单人模式中调整并输出设定。点击输出按钮后将会让相关设定参数复制到剪贴簿上。 - 當本功能開啟時,你將能在單人模式中調整並輸出設定。點擊輸出按鈕後將會讓相關設定參數複製到剪貼簿上。 + + Logistics + Logistik + Logistyka + Logística + Логистика + Logistika + Logística + Logistica + Logistique + ロジスティクス + 보급 + 后勤设定 + 後勤設定 Hide @@ -465,131 +224,5 @@ 下方 下方 - - Debug To Clipboard - Debug do schowka - Depurar al portapapeles - Debug do schránky - Debug in die Zwischenablage - Depuração para área de transferência - Debug vers le presse-papier - Debug a vágólapra - Отладка в буфер обмена - Debug su Blocco Note - クリップボードにデバッグ - 디버그를 클립보드로 - 复制除错讯息至剪贴簿 - 複製除錯訊息至剪貼簿 - - - Sends debug information to RPT and clipboard. - Wysyła informacje o debugowaniu do RPT oraz schowka. - Envía información de depuración al RPT y el portapapeles. - Pošle debug informace do RPT a schránky. - Protokolliert Debug-Informationen im RPT und speichert sie in der Zwischenablage. - Envia informação de depuração para RPT e área de transferência. - Copie le Debug dans le RPT et le presse-papier - Debug információt küld az RPT-be és a vágólapra. - Отправляет отладочную информацию в RPT и буфер обмена. - Invia informazioni di debug all'RPT e al Blocco Note - デバッグ情報を RPT とクリップボードに送ります。 - 디버그 정보를 보고하기 및 클립보드에 복사하기 위해 보냅니다. - 复制除错讯息至剪贴簿与RPT报告档中。 - 複製除錯訊息至剪貼簿與RPT報告檔中。 - - - Headbug Fix - Behebe Headbug - Fix Headbug - HeadBug - "Fejhiba" fix - Corrigir Headbug - Fix Headbug - Fix Headbug - Corregir error de cabeza (headbug) - Sistema Bug della Testa - ヘッドバグ修正 - 헤드버그 수정 - 修复动作BUG - 修復動作BUG - - - Resets your animation state. - Setzt die derzeitige Animation zurück. - Resetuje aktualną animację. - Réinitialise l'état de l'animation - Visszaállítja az animációs állapotodat. - Redefine seu estado de animação. - Исправляет баг с зациклившейся анимацией. - Resetovat aktuální animaci. - Restablece tu estado de animación. - Resetta il tuo stato animazione - 現在のアニメーションの状況を初期化します。 - 자신의 동작 상태 초기화 - 当ACE发生动作BUG时,点此修复。 - 當ACE發生動作BUG時,點此修復。 - - - ACE News - Noticias ACE - ACE-Neuigkeiten - Notícias do ACE - Wiadomości ACE - ACE Zprávy - Nouveautés ACE - ACE hírek - Новости ACE - Novità ACE - ACE ニュース - ACE 새소식 - ACE新闻 - ACE新聞 - - - Show News on Main Menu - Mostrar noticias en el menú principal - Zeige Neuigkeiten im Hauptmenü - Mostrar notícias no menu principal - Pokazuj wiadomości ACE w menu głównym - Affiche les nouveautés sur l'écran principal - Hírek mutatása a főmenüben - Показывать новости в Главном Меню - Zobrazit zprávy v hlavním menu - Mostra News nel Menù Princinpale - メイン画面にニュースを表示します - 메인메뉴에 새소식을 표시합니다 - 显示新闻消息于主选单 - 顯示新聞消息於主選單 - - - All Categories - Alle Kategorien - Wszystkie kategorie - Todas categorias - Все категории - Všechny Kategorie - Todas las categorías - Tutte le Categorie - Toutes les catégories - 全カテゴリ - 모든 카테고리 - 全局设定 - 全局設定 - - - Logistics - Logistik - Logistyka - Logística - Логистика - Logistika - Logística - Logistica - Logistique - ロジスティクス - 보급 - 后勤设定 - 後勤設定 - diff --git a/addons/overheating/ACE_Settings.hpp b/addons/overheating/ACE_Settings.hpp index fc3237da0f..5a4b8941e9 100644 --- a/addons/overheating/ACE_Settings.hpp +++ b/addons/overheating/ACE_Settings.hpp @@ -1,5 +1,6 @@ class ACE_Settings { class GVAR(displayTextOnJam) { + category = CSTRING(DisplayName); typeName = "BOOL"; isClientSettable = 1; value = 1; @@ -7,6 +8,7 @@ class ACE_Settings { description = CSTRING(DisplayTextOnJam_description); }; class GVAR(showParticleEffects) { + category = CSTRING(DisplayName); typeName = "BOOL"; isClientSettable = 1; value = 1; @@ -14,6 +16,7 @@ class ACE_Settings { description = CSTRING(showParticleEffects_description); }; class GVAR(showParticleEffectsForEveryone) { + category = CSTRING(DisplayName); typeName = "BOOL"; isClientSettable = 1; value = 0; @@ -21,24 +24,29 @@ class ACE_Settings { description = CSTRING(showParticleEffectsForEveryone_description); }; class GVAR(overheatingDispersion) { + category = CSTRING(DisplayName); typeName = "BOOL"; value = 1; displayName = CSTRING(overheatingDispersion_displayName); description = CSTRING(overheatingDispersion_description); }; class GVAR(unJamOnreload) { + category = CSTRING(DisplayName); typeName = "BOOL"; value = 0; displayName = CSTRING(unJamOnreload_displayName); description = CSTRING(unJamOnreload_description); }; class GVAR(unJamFailChance) { + category = CSTRING(DisplayName); typeName = "SCALAR"; value = 0.1; displayName = CSTRING(unJamFailChance_displayName); description = CSTRING(unJamFailChance_description); + sliderSettings[] = {0, 1, 0.1, 2}; }; class GVAR(enabled) { + category = CSTRING(DisplayName); typeName = "BOOL"; value = 1; displayName = CSTRING(enabled_displayName); diff --git a/addons/overheating/functions/fnc_calculateCooling.sqf b/addons/overheating/functions/fnc_calculateCooling.sqf index ced682d6d7..2986bcb9c7 100644 --- a/addons/overheating/functions/fnc_calculateCooling.sqf +++ b/addons/overheating/functions/fnc_calculateCooling.sqf @@ -19,6 +19,7 @@ params ["_temperature", "_barrelMass", "_totalTime"]; +if (_temperature < 1) exitWith {0}; // If a long time passed since the last shot, there's no need to calculate anything; the weapon should be cool if (_totalTime > 1800) exitWith {0}; diff --git a/addons/overheating/functions/fnc_firedEH.sqf b/addons/overheating/functions/fnc_firedEH.sqf index d690b85aa7..e9bf89eef7 100644 --- a/addons/overheating/functions/fnc_firedEH.sqf +++ b/addons/overheating/functions/fnc_firedEH.sqf @@ -20,76 +20,68 @@ TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectil BEGIN_COUNTER(firedEH); -if ((_unit distance ACE_player) > 3000 //Ignore far away shots +if ((_unit distance ACE_player) > 3000 || {(_muzzle != (primaryWeapon _unit)) && {_muzzle != (handgunWeapon _unit)}}) exitWith { // Only rifle or pistol muzzles (ignore grenades / GLs) END_COUNTER(firedEH); }; -// Compute new temperature if the unit is the local player -if (_unit == ACE_player) then { - _this call FUNC(overheat); -}; - // Get current temperature from the unit variable private _temperature = _unit getVariable [format [QGVAR(%1_temp), _weapon], 0]; private _scaledTemperature = linearConversion [0, 1000, _temperature, 0, 1, true]; TRACE_2("Unit fired with temp:",_unit,_temperature); -//Get weapon data from cache: +// Get weapon data from cache: ([_weapon] call FUNC(getWeaponData)) params ["_dispersion", "_slowdownFactor", "_jamChance"]; TRACE_4("weapon data from cache",_weapon,_dispersion,_slowdownFactor,_jamChance); -// Dispersion and bullet slow down -if (GVAR(overheatingDispersion)) then { - // Exit if GVAR(pseudoRandomList) isn't synced yet - if (isNil QGVAR(pseudoRandomList)) exitWith {ERROR("No pseudoRandomList sync");}; +if (_scaledTemperature > 0.1) then { + // Dispersion and bullet slow down + if (GVAR(overheatingDispersion)) then { + if (isNil QGVAR(pseudoRandomList)) exitWith {ERROR("No pseudoRandomList sync");}; - //Dispersion: 0 mils @ 0°C, 0.5 mils @ 333°C, 2.2 mils @ 666°C, 5 mils at 1000°C - _dispersion = _dispersion * 0.28125 * (_scaledTemperature^2); + //Dispersion: 0 mils @ 0°C, 0.5 mils @ 333°C, 2.2 mils @ 666°C, 5 mils at 1000°C + _dispersion = _dispersion * 0.28125 * (_scaledTemperature^2); - _slowdownFactor = _slowdownFactor * linearConversion [0.666, 1, _scaledTemperature, 0, -0.1, true]; + _slowdownFactor = _slowdownFactor * linearConversion [0.666, 1, _scaledTemperature, 0, -0.1, true]; - // Get the pseudo random values for dispersion from the remaining ammo count - (GVAR(pseudoRandomList) select ((_unit ammo _weapon) mod (count GVAR(pseudoRandomList)))) params ["_dispersionX", "_dispersionY"]; + // Get the pseudo random values for dispersion from the remaining ammo count + (GVAR(pseudoRandomList) select ((_unit ammo _weapon) mod (count GVAR(pseudoRandomList)))) params ["_dispersionX", "_dispersionY"]; - TRACE_4("change",_dispersion,_slowdownFactor,_dispersionX,_dispersionY); + TRACE_4("change",_dispersion,_slowdownFactor,_dispersionX,_dispersionY); - TRACE_PROJECTILE_INFO(_projectile); - [_projectile, _dispersionX * _dispersion, _dispersionY * _dispersion, _slowdownFactor * vectorMagnitude (velocity _projectile)] call EFUNC(common,changeProjectileDirection); - TRACE_PROJECTILE_INFO(_projectile); -}; - - -// ------ LOCAL AND NEARBY PLAYERS DEPENDING ON SETTINGS ------------ -// Particle effects only apply to the local player and, depending on settings, to other nearby players -if (_unit != ACE_player && (!GVAR(showParticleEffectsForEveryone) || {_unit distance ACE_player > 20})) exitWith { - END_COUNTER(firedEH); -}; - -//Particle Effects: -if (GVAR(showParticleEffects) && {(CBA_missionTime > ((_unit getVariable [QGVAR(lastDrop), -1000]) + 0.40)) && {_scaledTemperature > 0.1}}) then { - _unit setVariable [QGVAR(lastDrop), CBA_missionTime]; - - private _direction = (_unit weaponDirection _weapon) vectorMultiply 0.25; - private _position = (position _projectile) vectorAdd (_direction vectorMultiply (4*(random 0.30))); - - // Refract SFX, beginning at temp 100°C and maxs out at 500°C - private _intensity = linearConversion [0.1, 0.5, _scaledTemperature, 0, 1, true]; - TRACE_3("refract",_direction,_position,_intensity); - if (_intensity > 0) then { - drop [ - "\A3\data_f\ParticleEffects\Universal\Refract", "", "Billboard", 10, 2, _position, _direction, 0, 1.2, 1.0, - 0.1, [0.10,0.25], [[0.6,0.6,0.6,0.3 * _intensity],[0.2,0.2,0.2,0.05 * _intensity]], [0,1], 0.1, 0.05, "", "", ""]; + TRACE_PROJECTILE_INFO(_projectile); + [_projectile, _dispersionX * _dispersion, _dispersionY * _dispersion, _slowdownFactor * vectorMagnitude (velocity _projectile)] call EFUNC(common,changeProjectileDirection); + TRACE_PROJECTILE_INFO(_projectile); }; - // Smoke SFX, beginning at temp 150°C - private _intensity = linearConversion [0.15, 1, _scaledTemperature, 0, 1, true]; - TRACE_3("smoke",_direction,_position,_intensity); - if (_intensity > 0) then { - drop [ - ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 12, 1, 16], "", "Billboard", 10, 1.2, _position, - [0,0,0.15], 100 + random 80, 1.275, 1, 0.025, [0.15,0.43], [[0.6,0.6,0.6,0.5 * _intensity],[0.2,0.2,0.2,0.15 * _intensity]], - [0,1], 1, 0.04, "", "", ""]; + + // Particle Effects + if (GVAR(showParticleEffects) + && {GVAR(showParticleEffectsForEveryone) || {_unit == ACE_player} || {_unit distance ACE_player <= 20}} + && {CBA_missionTime > (_unit getVariable [QGVAR(lastDrop), -1000]) + 0.40}) then { + + _unit setVariable [QGVAR(lastDrop), CBA_missionTime]; + + private _direction = (_unit weaponDirection _weapon) vectorMultiply 0.25; + private _position = (position _projectile) vectorAdd (_direction vectorMultiply (4*(random 0.30))); + + // Refract SFX, beginning at temp 100°C and maxs out at 500°C + private _intensity = linearConversion [0.1, 0.5, _scaledTemperature, 0, 1, true]; + TRACE_3("refract",_direction,_position,_intensity); + if (_intensity > 0) then { + drop [ + "\A3\data_f\ParticleEffects\Universal\Refract", "", "Billboard", 10, 2, _position, _direction, 0, 1.2, 1.0, + 0.1, [0.10,0.25], [[0.6,0.6,0.6,0.3 * _intensity],[0.2,0.2,0.2,0.05 * _intensity]], [0,1], 0.1, 0.05, "", "", ""]; + }; + // Smoke SFX, beginning at temp 150°C + private _intensity = linearConversion [0.15, 1, _scaledTemperature, 0, 1, true]; + TRACE_3("smoke",_direction,_position,_intensity); + if (_intensity > 0) then { + drop [ + ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 12, 1, 16], "", "Billboard", 10, 1.2, _position, + [0,0,0.15], 100 + random 80, 1.275, 1, 0.025, [0.15,0.43], [[0.6,0.6,0.6,0.5 * _intensity],[0.2,0.2,0.2,0.15 * _intensity]], + [0,1], 1, 0.04, "", "", ""]; + }; }; }; @@ -97,20 +89,34 @@ if (GVAR(showParticleEffects) && {(CBA_missionTime > ((_unit getVariable [QGVAR( // Only compute jamming for the local player if (_unit != ACE_player) exitWith {END_COUNTER(firedEH);}; -_jamChance = _jamChance * ([[0.5, 1, 2, 8, 20, 150], 5 * _scaledTemperature] call EFUNC(common,interpolateFromArray)); +// Compute new temperature once every 3 bullets +if ((_unit ammo _weapon) % 3 == 0) then { + _this call FUNC(overheat); +}; -// increase jam chance on dusty grounds if prone (and at ground level) -if ((stance _unit == "PRONE") && {((getPosATL _unit) select 2) < 1}) then { - private _surface = configFile >> "CfgSurfaces" >> ((surfaceType getPosASL _unit) select [1]); - if (isClass _surface) then { - TRACE_1("dust",getNumber (_surface >> "dust")); - _jamChance = _jamChance + (getNumber (_surface >> "dust")) * _jamChance; +private _value = 5 * _scaledTemperature; +private _array = [0.5, 1, 2, 8, 20, 150]; +_jamChance = _jamChance * linearConversion [0, 1, _value % 1, _array select floor _value, _array select ceil _value]; + +TRACE_3("check for random jam",_unit,_weapon,_jamChance); + +private _randomNumber = random 1; + +// Fail early if we know that we won't have a malfunction regardless of the ground type. +if (_randomNumber < _jamChance * 2) then { + if (_randomNumber > _jamChance) then { + // Increase jam chance on dusty grounds if prone (and at ground level) + if ((stance _unit == "PRONE") && {((getPosATL _unit) select 2) < 1}) then { + private _surface = configFile >> "CfgSurfaces" >> ((surfaceType getPosASL _unit) select [1]); + if (isClass _surface) then { + TRACE_1("dust",getNumber (_surface >> "dust")); + _jamChance = _jamChance + (getNumber (_surface >> "dust")) * _jamChance; + }; + }; + }; + if (_randomNumber < _jamChance) then { + [_unit, _weapon] call FUNC(jamWeapon); }; }; -TRACE_3("check for random jam",_unit,_weapon,_jamChance); -if ((random 1) < _jamChance) then { - [_unit, _weapon] call FUNC(jamWeapon); -}; - END_COUNTER(firedEH); diff --git a/addons/overheating/functions/fnc_overheat.sqf b/addons/overheating/functions/fnc_overheat.sqf index c29f2d5dd1..cc30e2ad22 100644 --- a/addons/overheating/functions/fnc_overheat.sqf +++ b/addons/overheating/functions/fnc_overheat.sqf @@ -23,27 +23,25 @@ params ["_unit", "_weapon", "", "", "_ammo", "", "_projectile"]; TRACE_4("params",_unit,_weapon,_ammo,_projectile); -// Only do heat calculations every 3 bullets -if (((_unit ammo _weapon) % 3) != 0) exitWith {}; - BEGIN_COUNTER(overheat); // Get bullet parameters -private _bulletMass = GVAR(cacheAmmoData) getVariable _ammo; -if (isNil "_bulletMass") then { +private _energyIncrement = GVAR(cacheAmmoData) getVariable _ammo; +if (isNil "_energyIncrement") then { _bulletMass = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_BulletMass"); if (_bulletMass == 0) then { // If the bullet mass is not configured, estimate it _bulletMass = 3.4334 + 0.5171 * (getNumber (configFile >> "CfgAmmo" >> _ammo >> "hit") + getNumber (configFile >> "CfgAmmo" >> _ammo >> "caliber")); }; - GVAR(cacheAmmoData) setVariable [_ammo, _bulletMass]; -}; + + // Projectile motion is roughly equal to Barrel heat + // Ref: https://en.wikipedia.org/wiki/Physics_of_firearms + // Muzzle Engergy = 1/2 * m * v^2 = (1/2 * 0.001 g/kg * bulletMass (grams) * v^2) + // Multiple by 3 becase we only calc every 3rd bullet: (3 * 1/2 * 0.001) = 0.0015 + private _energyIncrement = 0.0015 * _bulletMass * (vectorMagnitudeSqr velocity _projectile); -// Projectile motion is roughly equal to Barrel heat -// Ref: https://en.wikipedia.org/wiki/Physics_of_firearms -// Muzzle Engergy = 1/2 * m * v^2 = (1/2 * 0.001 g/kg * bulletMass (grams) * v^2) -// Multiple by 3 becase we only calc every 3rd bullet: (3 * 1/2 * 0.001) = 0.0015 -private _energyIncrement = 0.0015 * _bulletMass * (vectorMagnitudeSqr velocity _projectile); + GVAR(cacheAmmoData) setVariable [_ammo, _energyIncrement]; +}; // Increase overheating depending on how obstrusive is the current supressor, // if any. Typical arma supressors have visibleFire=0.5 and audibleFire=0.3, @@ -64,7 +62,7 @@ if (_silencer != "") then { _energyIncrement = _energyIncrement * _silencerCoef; }; -TRACE_2("heat",_bulletMass,_energyIncrement); +TRACE_1("heat",_energyIncrement); [_unit, _weapon, _energyIncrement] call FUNC(updateTemperature); diff --git a/addons/overheating/stringtable.xml b/addons/overheating/stringtable.xml index 834dcf4c09..57e14a50e2 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -1,6 +1,14 @@  + + Overheating + Heißlaufen + Surriscaldamento + 過熱 + 过热 + 過熱 + Display text on jam Zeige Text bei Ladehemmung @@ -226,7 +234,7 @@ Megakadt a fegyver! Arma travada! Arma inceppata! - 武器が詰まった! + 武器が詰まった! 탄걸림! 武器卡弹! 武器卡彈! @@ -305,7 +313,7 @@ Cső kicserélése folyamatban... Substituindo cano... Sostituendo la canna... - 銃身を交換中・・・ + 銃身を交換しています・・・ 총열 교체중... 换枪管中... 換槍管中... @@ -369,7 +377,7 @@ Conferindo temperatura... Controllando la temperatura... Проверка температуры... - 温度を測っている・・・ + 温度を測っています・・・ 무기 온도 확인중... 检查枪管温度中... 檢查槍管溫度中... @@ -394,7 +402,7 @@ Vérification de la température des canons de rechange... Проверка температуры запасных стволов... Kontroluji teplotu náhradní hlavně... - 予備銃身の温度を測っている・・・ + 予備銃身の温度を測っています・・・ Sprawdzanie temperatury zapasowych luf... Prüfe Temperatur der Wechselläufe ... 총열 온도 확인중... diff --git a/addons/overpressure/ACE_Settings.hpp b/addons/overpressure/ACE_Settings.hpp index f2ddb5e302..58e0d3d8ac 100644 --- a/addons/overpressure/ACE_Settings.hpp +++ b/addons/overpressure/ACE_Settings.hpp @@ -4,5 +4,6 @@ class ACE_Settings { description = CSTRING(distanceCoefficient_toolTip); typeName = "SCALAR"; value = 1; + sliderSettings[] = {-1, 10, 5, 1}; }; }; diff --git a/addons/overpressure/functions/fnc_firedEHBB.sqf b/addons/overpressure/functions/fnc_firedEHBB.sqf index 101d5f0281..e501034ef7 100644 --- a/addons/overpressure/functions/fnc_firedEHBB.sqf +++ b/addons/overpressure/functions/fnc_firedEHBB.sqf @@ -54,6 +54,8 @@ if (_distance < _backblastRange) then { if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then { [_unit, _damage, "body", "backblast"] call EFUNC(medical,addDamageToUnit); } else { + TRACE_1("",isDamageAllowed _x); + if (!isDamageAllowed _x) exitWith {}; // Skip damage if not allowed _unit setDamage (damage _unit + _damage); }; }; diff --git a/addons/overpressure/functions/fnc_overpressureDamage.sqf b/addons/overpressure/functions/fnc_overpressureDamage.sqf index ec970efd2e..ccb9a4014c 100644 --- a/addons/overpressure/functions/fnc_overpressureDamage.sqf +++ b/addons/overpressure/functions/fnc_overpressureDamage.sqf @@ -59,6 +59,8 @@ TRACE_3("cache",_overpressureAngle,_overpressureRange,_overpressureDamage); if (isClass (configFile >> "CfgPatches" >> "ACE_Medical")) then { [_x, _damage, "body", "backblast"] call EFUNC(medical,addDamageToUnit); } else { + TRACE_1("",isDamageAllowed _x); + if (!isDamageAllowed _x) exitWith {}; // Skip damage if not allowed _x setDamage (damage _x + _damage); }; diff --git a/addons/parachute/CfgEventHandlers.hpp b/addons/parachute/CfgEventHandlers.hpp index f972afc2ca..8fa46b49f3 100644 --- a/addons/parachute/CfgEventHandlers.hpp +++ b/addons/parachute/CfgEventHandlers.hpp @@ -16,11 +16,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; - -class Extended_Respawn_EventHandlers { - class CAManBase { - class ADDON { - respawn = QUOTE(call COMPILE_FILE(XEH_respawn)); - }; - }; -}; diff --git a/addons/parachute/CfgVehicles.hpp b/addons/parachute/CfgVehicles.hpp index e734962a0e..402ff9497e 100644 --- a/addons/parachute/CfgVehicles.hpp +++ b/addons/parachute/CfgVehicles.hpp @@ -9,23 +9,18 @@ class CfgVehicles { }; }; - class Man; - class CAManBase: Man { - class ACE_SelfActions { - class ACE_CutParachute { - displayName = CSTRING(CutParachute); - exceptions[] = {"isNotInside"}; - condition = QUOTE([_player] call FUNC(checkCutParachute)); - statement = QUOTE([_player] call FUNC(cutParachute)); - showDisabled = 0; - priority = 2.9; - icon = QPATHTOF(UI\cut_ca.paa); - }; - }; - }; - class Helicopter; class ParachuteBase: Helicopter { + class ACE_SelfActions { + class ACE_CutParachute { + displayName = CSTRING(CutParachute); + condition = QUOTE(_target getVariable [ARR_2(QQGVAR(canCut),false)]); + statement = QUOTE([ARR_2(_player,_target)] call FUNC(cutParachute)); + showDisabled = 0; + priority = 2.9; + icon = QPATHTOF(UI\cut_ca.paa); + }; + }; MACRO_HASRESERVE }; class ParachuteWest: ParachuteBase { @@ -43,13 +38,13 @@ class CfgVehicles { class NonSteerable_Parachute_F: Parachute { MACRO_HASRESERVE }; - class Paraglide: ParachuteWest{ + class Paraglide: ParachuteWest { MACRO_HASRESERVE }; - class Steerable_Parachute_F: Paraglide{ + class Steerable_Parachute_F: Paraglide { MACRO_HASRESERVE }; - class Parachute_02_base_F: parachuteBase { + class Parachute_02_base_F: ParachuteBase { MACRO_HASRESERVE }; class B_Parachute_02_F: Parachute_02_base_F { @@ -98,7 +93,7 @@ class CfgVehicles { ace_reserveParachute = ""; ace_hasReserveParachute = 0; }; - + class ACE_NonSteerableReserveParachute: ACE_ReserveParachute { ParachuteClass = "NonSteerable_Parachute_F"; }; diff --git a/addons/parachute/XEH_PREP.hpp b/addons/parachute/XEH_PREP.hpp index c2567b8468..6edd22c260 100644 --- a/addons/parachute/XEH_PREP.hpp +++ b/addons/parachute/XEH_PREP.hpp @@ -1,9 +1,5 @@ - -PREP(doLanding); -PREP(handleInfoDisplayChanged); -PREP(hideAltimeter); -PREP(onEachFrame); -PREP(showAltimeter); PREP(cutParachute); -PREP(checkCutParachute); -PREP(storeParachute); +PREP(handleInfoDisplayChanged); +PREP(handleReserve); +PREP(hideAltimeter); +PREP(showAltimeter); diff --git a/addons/parachute/XEH_postInit.sqf b/addons/parachute/XEH_postInit.sqf index 1570d3cd98..73ea9276a1 100644 --- a/addons/parachute/XEH_postInit.sqf +++ b/addons/parachute/XEH_postInit.sqf @@ -19,25 +19,22 @@ if (!hasInterface) exitWith {}; ["ACE3 Equipment", QGVAR(showAltimeter), localize LSTRING(showAltimeter), { // Conditions: canInteract - if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; - if (!('ACE_Altimeter' in assignedItems ace_player)) exitWith {false}; - if (!(missionNamespace getVariable [QGVAR(AltimeterActive), false])) then { + if ( + !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) || + {!('ACE_Altimeter' in assignedItems ACE_player)} + ) exitWith { false }; + + if !(GETMVAR(GVAR(AltimeterActive),false)) then { [ACE_player] call FUNC(showAltimeter); } else { call FUNC(hideAltimeter); }; + true }, {false}, [24, [false, false, false]], false] call CBA_fnc_addKeybind; -GVAR(PFH) = false; -["vehicle",{ - if (!GVAR(PFH) && {(vehicle ACE_player) isKindOf "ParachuteBase"}) then { - GVAR(PFH) = true; - [FUNC(onEachFrame), 0.1, []] call CALLSTACK(CBA_fnc_addPerFrameHandler); - }; -}] call CBA_fnc_addPlayerEventHandler; +// Handle reserve chute based on current backpack (fires when parachute opens too) +["loadout", FUNC(handleReserve), true] call CBA_fnc_addPlayerEventHandler; -// don't show speed and height when in expert mode +// Don't show vanilla speed and height when in expert mode ["ace_infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call CBA_fnc_addEventHandler; - -["loadout", FUNC(storeParachute)] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/parachute/XEH_preInit.sqf b/addons/parachute/XEH_preInit.sqf index 227fa9e38c..e5fa52644b 100644 --- a/addons/parachute/XEH_preInit.sqf +++ b/addons/parachute/XEH_preInit.sqf @@ -21,4 +21,14 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +[ + QGVAR(hideAltimeter), + "CHECKBOX", + [LSTRING(HideAltimeter), LSTRING(HideAltimeter_tooltip)], + format ["ACE %1", localize ELSTRING(common,DisplayName)], + true, + false, + {[QGVAR(hideAltimeter), _this, false] call EFUNC(common,cbaSettings_settingChanged)} +] call cba_settings_fnc_init; + ADDON = true; diff --git a/addons/parachute/XEH_respawn.sqf b/addons/parachute/XEH_respawn.sqf deleted file mode 100644 index 31e3ff2ae2..0000000000 --- a/addons/parachute/XEH_respawn.sqf +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Author: joko // Jonas - * Reset the parachute system. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * None - * - * Public: No - */ -#include "script_component.hpp" -ACE_player setVariable [QGVAR(chuteIsCut), false]; \ No newline at end of file diff --git a/addons/parachute/functions/fnc_checkCutParachute.sqf b/addons/parachute/functions/fnc_checkCutParachute.sqf deleted file mode 100644 index 67fd842f92..0000000000 --- a/addons/parachute/functions/fnc_checkCutParachute.sqf +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Author: joko // Jonas - * Reset the parachute system. - * - * Arguments: - * 0: Object - * - * Return Value: - * Boolean - * - * Example: - * [player] call FUNC(checkCutParachute); - * - * Public: No - */ -#include "script_component.hpp" -params ["_unit"]; -(vehicle _unit isKindOf 'ParachuteBase' && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getVariable [QGVAR(hasReserve),false])) diff --git a/addons/parachute/functions/fnc_cutParachute.sqf b/addons/parachute/functions/fnc_cutParachute.sqf index 34b808d9d8..af56235ba0 100644 --- a/addons/parachute/functions/fnc_cutParachute.sqf +++ b/addons/parachute/functions/fnc_cutParachute.sqf @@ -1,6 +1,6 @@ /* - * Author: joko // Jonas - * Cut Parachute and delete Old + * Author: joko, Jonas, SilentSpike + * Perform the cut parachute action (move unit out and delete) * * Arguments: * 0: Object @@ -9,13 +9,11 @@ * None * * Example: - * [player] call FUNC(cutParachute); + * [player, vehicle player] call FUNC(cutParachute); * * Public: No */ #include "script_component.hpp" -params ["_unit"]; -private _vehicle = vehicle _unit; -_unit action ["GetOut", _vehicle]; -deleteVehicle _vehicle; -_unit setVariable [QGVAR(chuteIsCut), true, true]; +params ["_unit", "_parachute"]; +_unit action ["GetOut", _parachute]; +deleteVehicle _parachute; diff --git a/addons/parachute/functions/fnc_doLanding.sqf b/addons/parachute/functions/fnc_doLanding.sqf deleted file mode 100644 index b80bc44d00..0000000000 --- a/addons/parachute/functions/fnc_doLanding.sqf +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Author: Garth 'L-H' de Wet - * Performs the landing animation fix - * - * Arguments: - * 0: unit - * - * Return Value: - * None - * - * Example: - * [player] call ACE_Parachute_fnc_doLanding; - * - * Public: No - */ -#include "script_component.hpp" - -params ["_unit"]; - -GVAR(PFH) = false; - -[_unit, "AmovPercMevaSrasWrflDf_AmovPknlMstpSrasWrflDnon", 2] call EFUNC(common,doAnimation); - -_unit setVariable [QGVAR(chuteIsCut), false, true]; - -[{ - (_this select 0) params ["_time", "_unit"]; - - if (CBA_missionTime > _time + 1) then { - [_unit, "Crouch"] call EFUNC(common,doGesture); - [_this select 1] call CALLSTACK(CBA_fnc_removePerFrameHandler); - }; -}, 1, [CBA_missionTime, _unit]] call CALLSTACK(CBA_fnc_addPerFrameHandler); diff --git a/addons/parachute/functions/fnc_handleInfoDisplayChanged.sqf b/addons/parachute/functions/fnc_handleInfoDisplayChanged.sqf index 7bb500912e..644bd29c94 100644 --- a/addons/parachute/functions/fnc_handleInfoDisplayChanged.sqf +++ b/addons/parachute/functions/fnc_handleInfoDisplayChanged.sqf @@ -18,7 +18,7 @@ params ["_dialog", "_type"]; // don't do anything in noob mode -if (cadetMode) exitWith {}; +if (!GVAR(hideAltimeter)) exitWith {}; switch (_type) do { case ("Parachute"): { diff --git a/addons/parachute/functions/fnc_handleReserve.sqf b/addons/parachute/functions/fnc_handleReserve.sqf new file mode 100644 index 0000000000..7a42d25ed9 --- /dev/null +++ b/addons/parachute/functions/fnc_handleReserve.sqf @@ -0,0 +1,42 @@ +/* + * Author: joko, Jonas, SilentSpike + * Cache reserve parachute on player unit when their inventory changes and add it when they open their parachute + * + * Arguments: + * None + * + * Return Value: + * 0: Unit + * + * Example: + * [player] call ace_parachute_fnc_handleReserve + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_unit"]; +private _backpack = backpack _unit; + +if ( + _backpack == "" && + {(vehicle _unit) isKindOf "ParachuteBase"} && + {GETVAR(_unit,GVAR(hasReserve),false)} +) then { + // Case where unit has just opened parachute and reserve should be added + _unit addBackpackGlobal (GETVAR(_unit,GVAR(backpackClass),"ACE_NonSteerableReserveParachute")); + SETVAR(vehicle _unit,GVAR(canCut),true); // Mark the parachute cuttable since reserve is present +} else { + // Case where inventory has changed otherwise (including when reserve is added) + private _backpackCfg = configFile >> "CfgVehicles" >> _backpack; + private _hasReserve = getNumber (_backpackCfg >> "ace_hasReserveParachute") == 1; + + // Cache reserve parachute state and class when backpack changes + SETVAR(_unit,GVAR(hasReserve),_hasReserve); + if (_hasReserve) then { + SETVAR(_unit,GVAR(backpackClass),getText (_backpackCfg >> "ace_reserveParachute")); + } else { + SETVAR(_unit,GVAR(backpackClass),""); + }; +}; diff --git a/addons/parachute/functions/fnc_hideAltimeter.sqf b/addons/parachute/functions/fnc_hideAltimeter.sqf index dd7d29fce4..50f1eac503 100644 --- a/addons/parachute/functions/fnc_hideAltimeter.sqf +++ b/addons/parachute/functions/fnc_hideAltimeter.sqf @@ -15,4 +15,4 @@ */ #include "script_component.hpp" GVAR(AltimeterActive) = false; -(["ACE_Altimeter"] call BIS_fnc_rscLayer) cutText ["","PLAIN",0,true]; +"ACE_Altimeter" cutText ["","PLAIN",0,true]; diff --git a/addons/parachute/functions/fnc_onEachFrame.sqf b/addons/parachute/functions/fnc_onEachFrame.sqf deleted file mode 100644 index f25fca8f49..0000000000 --- a/addons/parachute/functions/fnc_onEachFrame.sqf +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Author: Garth 'L-H' de Wet - * Checks whether the unit should preform landing. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * call ACE_Parachute_fnc_onEachFrame; - * - * Public: No - */ -#include "script_component.hpp" -private _player = ACE_player; -if (!GVAR(PFH)) exitWith {[(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler);}; -if (isNull _player) exitWith {[(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler);GVAR(PFH) = false;}; -if !((vehicle _player) isKindOf "ParachuteBase") exitWith {[(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler);GVAR(PFH) = false;}; -if (isTouchingGround _player) exitWith {[(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler);GVAR(PFH) = false;}; - -private _pos = getPosASL (vehicle _player); - -if ((lineIntersects [_pos, _pos vectorAdd [0,0,-0.5], vehicle _player, _player]) || {((ASLtoATL _pos) select 2) < 0.75}) then { - [(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler); - GVAR(PFH) = false; -// I believe this will not work for Zeus units. - deleteVehicle (vehicle _player); - [_player] call FUNC(doLanding); -}; diff --git a/addons/parachute/functions/fnc_showAltimeter.sqf b/addons/parachute/functions/fnc_showAltimeter.sqf index ff9a560fd8..ed3367ddd8 100644 --- a/addons/parachute/functions/fnc_showAltimeter.sqf +++ b/addons/parachute/functions/fnc_showAltimeter.sqf @@ -17,32 +17,33 @@ params ["_unit"]; -(["ACE_Altimeter"] call BIS_fnc_rscLayer) cutRsc ["ACE_Altimeter", "PLAIN", 0, true]; +"ACE_Altimeter" cutRsc ["ACE_Altimeter", "PLAIN", 0, true]; if (isNull (uiNamespace getVariable ["ACE_Altimeter", displayNull])) exitWith {}; GVAR(AltimeterActive) = true; [{ - if (!GVAR(AltimeterActive)) exitWith {[_this select 1] call CALLSTACK(CBA_fnc_removePerFrameEventHandler)}; + if (!GVAR(AltimeterActive)) exitWith {[_this select 1] call CBA_fnc_removePerFrameEventHandler}; disableSerialization; (_this select 0) params ["_display", "_unit", "_oldHeight", "_prevTime"]; - if !("ACE_Altimeter" in assignedItems _unit) exitWith {[_this select 1] call CALLSTACK(CBA_fnc_removePerFrameEventHandler); call FUNC(hideAltimeter)}; + if !("ACE_Altimeter" in assignedItems _unit) exitWith {[_this select 1] call CBA_fnc_removePerFrameEventHandler; call FUNC(hideAltimeter)}; private _HeightText = _display displayCtrl 1100; private _DecendRate = _display displayCtrl 1000; private _TimeText = _display displayCtrl 1001; + private _hour = floor daytime; private _minute = floor ((daytime - _hour) * 60); private _height = ((getPosASL _unit) select 2) + EGVAR(common,mapAltitude); private _curTime = CBA_missionTime; private _timeDiff = _curTime - _prevTime; - private _descentRate = if(_timeDiff > 0) then {floor((_oldHeight - _height) / _timeDiff)} else {0}; + private _descentRate = if (_timeDiff > 0) then {floor((_oldHeight - _height) / _timeDiff)} else {0}; _TimeText ctrlSetText (format ["%1:%2",[_hour, 2] call EFUNC(common,numberToDigitsString),[_minute, 2] call EFUNC(common,numberToDigitsString)]); - _HeightText ctrlSetText (format ["%1", floor(_height)]); + _HeightText ctrlSetText (format ["%1", floor _height]); _DecendRate ctrlSetText (format ["%1", _descentRate max 0]); (_this select 0) set [2, _height]; (_this select 0) set [3, _curTime]; -}, 0.2, [uiNamespace getVariable ["ACE_Altimeter", displayNull], _unit,floor ((getPosASL _unit) select 2), CBA_missionTime]] call CALLSTACK(CBA_fnc_addPerFrameHandler); +}, 0.2, [uiNamespace getVariable ["ACE_Altimeter", displayNull], _unit, floor ((getPosASL _unit) select 2), CBA_missionTime]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/parachute/functions/fnc_storeParachute.sqf b/addons/parachute/functions/fnc_storeParachute.sqf deleted file mode 100644 index adc513fbf9..0000000000 --- a/addons/parachute/functions/fnc_storeParachute.sqf +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Author: joko // Jonas - * Add the Reserve Parachute to Units or Save Backpack if is a Parachute in Unit - * - * Arguments: - * None - * - * Return Value: - * 0: Unit - * - * Example: - * call ace_parachute_fnc_storeParachute - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_unit"]; -private _backpack = backpack _unit; - -if ((vehicle _unit) isKindOf "ParachuteBase" && {backpack _unit == ""} && {!(_unit getVariable [QGVAR(chuteIsCut),false])} && {_unit getVariable [QGVAR(hasReserve),false]}) then { - _unit addBackpackGlobal (_unit getVariable[QGVAR(backpackClass),"ACE_NonSteerableParachute"]); -} else { - if ((getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute")) == 1) then { - _unit setVariable[QGVAR(backpackClass),getText(configFile >> "CfgVehicles" >> _backpack >> "ace_reserveParachute"),true]; - }; - if (!(_unit getVariable [QGVAR(chuteIsCut),false]) && {!(animationState _unit == 'para_pilot')}) then { - _unit setVariable [QGVAR(hasReserve),[false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute")),true]; - }; -}; diff --git a/addons/parachute/stringtable.xml b/addons/parachute/stringtable.xml index 3d8408aacf..820aa822d1 100644 --- a/addons/parachute/stringtable.xml +++ b/addons/parachute/stringtable.xml @@ -97,5 +97,17 @@ 备用降落伞 備用降落傘 + + Hide Freefall Altimeter + Freifall-Höhenmesser verstecken + 降下時に高度計を非表示 + Nascondi Altimetro in Caduta Libera + + + Hides the altitude and speed shown while free falling or parachuting. + Blendet den Höhen- und Geschwindigkeitsmesser während des Fallschirmspringens aus. + 自由降下時かパラシュート中に高度と速度を非表示にします。 + Nasconde l'altitudine e la velocità mostrate durante la caduta libera o paracadutandosi. + diff --git a/addons/pylons/ACE_Settings.hpp b/addons/pylons/ACE_Settings.hpp index 696fcc1eeb..242b5c472d 100644 --- a/addons/pylons/ACE_Settings.hpp +++ b/addons/pylons/ACE_Settings.hpp @@ -19,6 +19,7 @@ class ACE_Settings { description = CSTRING(SearchDistance_description); value = 15; typeName = "SCALAR"; + sliderSettings[] = {0, 50, 15, 1}; }; class GVAR(timePerPylon) { category = CSTRING(Category_Pylons); @@ -26,6 +27,7 @@ class ACE_Settings { description = CSTRING(TimePerPylon_description); value = 5; typeName = "SCALAR"; + sliderSettings[] = {0, 10, 5, 1}; }; class GVAR(requireEngineer) { category = CSTRING(Category_Pylons); diff --git a/addons/pylons/XEH_postInit.sqf b/addons/pylons/XEH_postInit.sqf index ff3d4f83d6..8dae8d4552 100644 --- a/addons/pylons/XEH_postInit.sqf +++ b/addons/pylons/XEH_postInit.sqf @@ -15,7 +15,7 @@ "", {[_target] call FUNC(showDialog)}, { - private _vehicles = _target nearObjects ["LandVehicle", GVAR(searchDistance) + 10]; + private _vehicles = nearestObjects [_target, ["Air", "LandVehicle", "Slingload_base_F", "ReammoBox_F"], GVAR(searchDistance) + 10]; private _filter = ["transportAmmo", QEGVAR(rearm,defaultSupply)] select (["ace_rearm"] call EFUNC(common,isModLoaded)); private _rearmVehicles = {(getNumber (configFile >> "CfgVehicles" >> typeOf _x >> _filter)) > 0} count _vehicles; @@ -43,4 +43,6 @@ addMissionEventHandler ["HandleDisconnect", LINKFUNC(handleDisconnect)]; }; + + GVAR(searchDistanceSqr) = GVAR(searchDistance) ^ 2; }] call CBA_fnc_addEventHandler; diff --git a/addons/pylons/functions/fnc_canConfigurePylons.sqf b/addons/pylons/functions/fnc_canConfigurePylons.sqf index 9582c69bd3..c679b9592d 100644 --- a/addons/pylons/functions/fnc_canConfigurePylons.sqf +++ b/addons/pylons/functions/fnc_canConfigurePylons.sqf @@ -18,8 +18,10 @@ params ["_unit", "_aircraft"]; -if (GVAR(requireEngineer) && {!(_unit getUnitTrait "engineer")}) exitWith {false}; +if (GVAR(requireEngineer) && {!([_unit] call EFUNC(common,isEngineer))}) exitWith {false}; if (GVAR(requireToolkit) && {!([_unit, "ToolKit"] call EFUNC(common,hasItem))}) exitWith {false}; -(!isEngineOn _aircraft && {[_unit, _aircraft] call EFUNC(common,canInteractWith)}) +if ((_unit distanceSqr _aircraft) > GVAR(searchDistanceSqr)) exitWith {false}; + +[_unit, _aircraft] call EFUNC(common,canInteractWith) diff --git a/addons/pylons/functions/fnc_configurePylons.sqf b/addons/pylons/functions/fnc_configurePylons.sqf index 665f7ccdbc..2fbc91e949 100644 --- a/addons/pylons/functions/fnc_configurePylons.sqf +++ b/addons/pylons/functions/fnc_configurePylons.sqf @@ -69,6 +69,6 @@ if (_currentPylon == count _pylonsToConfigure) exitWith {}; [format [localize LSTRING(Stopped), _currentPylon + 1], false, 5] call EFUNC(common,displayText); }, format [localize LSTRING(ReplacingPylon), _currentPylon + 1, count _pylonsToConfigure], - {true}, + {GVAR(isCurator) || {(ace_player distanceSqr GVAR(currentAircraft)) <= GVAR(searchDistanceSqr)}}, ["isNotInZeus"] ] call EFUNC(common,progressBar); diff --git a/addons/pylons/functions/fnc_handleDisconnect.sqf b/addons/pylons/functions/fnc_handleDisconnect.sqf index c53d0ada17..f255b36535 100644 --- a/addons/pylons/functions/fnc_handleDisconnect.sqf +++ b/addons/pylons/functions/fnc_handleDisconnect.sqf @@ -20,7 +20,6 @@ params ["", "", "_uid"]; private _aircraft = GVAR(currentAircraftNamespace) getVariable ["_uid", objNull]; if (!isNull _aircraft) then { _aircraft setVariable [QGVAR(currentUser), objNull, true]; - [_aircraft, "blockEngine", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); GVAR(currentAircraftNamespace) setVariable [_uid, nil, true]; // Remove var from namespace, no need to keep objNull }; diff --git a/addons/pylons/functions/fnc_onButtonClose.sqf b/addons/pylons/functions/fnc_onButtonClose.sqf index ef93f3f1bf..fa06f3d506 100644 --- a/addons/pylons/functions/fnc_onButtonClose.sqf +++ b/addons/pylons/functions/fnc_onButtonClose.sqf @@ -17,5 +17,4 @@ GVAR(currentAircraft) setVariable [QGVAR(currentUser), objNull, true]; GVAR(currentAircraftNamespace) setVariable [getPlayerUID ace_player, nil, true]; // Remove var from namespace, no need to keep objNull -[GVAR(currentAircraft), "blockEngine", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); closeDialog 2; diff --git a/addons/pylons/functions/fnc_showDialog.sqf b/addons/pylons/functions/fnc_showDialog.sqf index 3e2cf8a4a8..b0f9b6c271 100644 --- a/addons/pylons/functions/fnc_showDialog.sqf +++ b/addons/pylons/functions/fnc_showDialog.sqf @@ -26,7 +26,6 @@ if (!isNull _currentUser) exitWith { }; _aircraft setVariable [QGVAR(currentUser), ace_player, true]; GVAR(currentAircraftNamespace) setVariable [getPlayerUID ace_player, _aircraft, true]; -[_aircraft, "blockEngine", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); GVAR(isCurator) = _isCurator; GVAR(currentAircraft) = _aircraft; @@ -138,3 +137,13 @@ _edit ctrlAddEventHandler ["KeyDown", LINKFUNC(onNameChange)]; private _checkbox = _display displayCtrl ID_CHECKBOX_MIRROR; _checkbox ctrlAddEventHandler ["CheckedChanged", {[(_this select 1) == 1] call FUNC(onPylonMirror)}]; + +if (!GVAR(isCurator)) then { + [{ + isNull (GVAR(currentAircraft) getVariable [QGVAR(currentUser), objNull]) || + {(ace_player distanceSqr GVAR(currentAircraft)) > GVAR(searchDistanceSqr)} + }, { + [localize LSTRING(TooFar), false, 5] call EFUNC(common,displayText); + call FUNC(onButtonClose); + }] call CBA_fnc_waitUntilAndExecute; +}; diff --git a/addons/pylons/stringtable.xml b/addons/pylons/stringtable.xml index dbb42f3734..cfbb2cab37 100644 --- a/addons/pylons/stringtable.xml +++ b/addons/pylons/stringtable.xml @@ -7,6 +7,7 @@ LOADOUT AEREO 飛機武裝配置 飞机武装配置 + 항공기 무장 Loadouts for %1 @@ -14,6 +15,7 @@ Loadouts per %1 %1用的武裝配置 %1用的武装配置 + %1 무장 Configure Pylons @@ -21,6 +23,7 @@ Configura Piloni 定義派龍架 定义派龙架 + 파일런 설정 Pylons @@ -28,6 +31,7 @@ Piloni 派龍架 派龙架 + 파일런 <empty> @@ -35,6 +39,7 @@ <vuoto> <空> <空> + <비어있음> Pylons that are colored red will have to be manually rearmed. @@ -42,6 +47,7 @@ I Piloni di colore rosso devono essere riarmati manualmente. 以紅色標記出的派龍架必須以手動方式進行彈藥整補。 以红色标记出的派龙架必须以手动方式进行弹药整补。 + 붉은색의 파일런은 수동으로 재무장해야 합니다. %1 is already configuring this aircraft! @@ -49,6 +55,7 @@ % sta già configurando questo aereo! %1已經正在定義此飛機的武裝配置! %1已经正在定义此飞机的武装配置! + 이미 이 항공기에 장착되어 있음 (%1) Replacing pylon %1 out of %2... @@ -56,6 +63,7 @@ Sostituendo pilone %1 al posto di %2... 共有%2個派龍架,正在整補%1號派龍架中... 共有%2个派龙架,正在整补%1号派龙架中... + 교체중 (%2 -> %1) Stopped at pylon %1! @@ -63,6 +71,15 @@ Fermato al pilone %1! 已停止在%1號派龍架! 已停止在%1号派龙架! + %1 파일런이 멈춤 + + + Vehicle too far + Veicolo troppo lontano + 차량이 너무 멈 + 載具過遠 + 载具过远 + 車両が遠すぎます Enable Pylons Menu @@ -70,6 +87,7 @@ Abilita Menu Piloni 啟用派龍架選單 启用派龙架选单 + 파일런 메뉴 활성 Enable pylon configuration menu for aircraft. @@ -77,6 +95,7 @@ Abilita il menù di configurazione piloni per aereo. 啟用後可透過派龍架選單來定義飛機的武裝配置。 启用后可透过派龙架选单来定义飞机的武装配置。 + 항공기의 파일런 설정 메뉴를 활성합니다. Rearm New Pylons @@ -84,6 +103,7 @@ Riarma Nuovi Piloni 重新武裝新的派龍架 重新武装新的派龙架 + 새파일런 재무장 Automatically rearm new pylons from the nearest rearm vehicle. @@ -91,6 +111,7 @@ Riarma automaticamente i nuovi piloni dal veicoli di riarmo più vicino. 自動從附近的整補載具中為派龍架進行彈藥整補。 自动从附近的整补载具中为派龙架进行弹药整补。 + 근처의 재무장 차량에서 빈 파일런을 자동으로 재무장 합니다. Time Per Pylon @@ -98,6 +119,7 @@ Tempo Per Pilone 派龍架整補所需時間(個別) 派龙架整补所需时间(个别) + 파일런당 시간 The time it takes to replace each pylon (in seconds). @@ -105,6 +127,7 @@ Il tempo che impiega ogni pilone ad essere sostituito (in secondi). 每個派龍架需花多久時間進行整補(單位為秒)。 每个派龙架需花多久时间进行整补(单位为秒)。 + 파일런을 재설정 하는데 걸리는 시간 (초) Search Distance @@ -112,6 +135,7 @@ Distanza di Ricerca 搜索距離 搜索距离 + 검색 반경 The distance an aircraft needs to be from a rearm vehicle. @@ -119,6 +143,7 @@ La distanza necessaria per un aereo da un veicolo di riarmo. 設定飛機必須距離整補載具多少公尺才能進行彈藥整補。 设定飞机必须距离整补载具多少公尺才能进行弹药整补。 + 항공기에서 재보급 가능한 재무장 차량을 찾습니다. Require Engineer @@ -126,6 +151,7 @@ Necessita Ingegnere 需要工兵 需要工兵 + 정비병 요구 Require an engineer. @@ -133,6 +159,7 @@ Necessita un ingegnere. 需要工兵才能進行彈藥整補。 需要工兵才能进行弹药整补。 + 정비병이 필요합니다. Require Toolkit @@ -140,6 +167,7 @@ Necessita Kit Riparazione 需要工具包 需要工具包 + 툴킷 요구 Require a toolkit in inventory. @@ -147,6 +175,7 @@ Necessita un kit di riparazione nell'inventario 需要工具包才能進行彈藥整補。 需要工具包才能进行弹药整补。 + 툴킷이 필요합니다. diff --git a/addons/quickmount/CfgVehicles.hpp b/addons/quickmount/CfgVehicles.hpp index 0d141d7bc3..702f7cab4e 100644 --- a/addons/quickmount/CfgVehicles.hpp +++ b/addons/quickmount/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(Category); function = QFUNC(moduleInit); - scope = 2; + scope = 1; isGlobal = 1; isTriggerActivated = 0; isDisposable = 0; diff --git a/addons/quickmount/functions/fnc_getInNearest.sqf b/addons/quickmount/functions/fnc_getInNearest.sqf index 5215f6a33b..4b5debc2aa 100644 --- a/addons/quickmount/functions/fnc_getInNearest.sqf +++ b/addons/quickmount/functions/fnc_getInNearest.sqf @@ -87,8 +87,15 @@ if (!isNull _target && TRACE_3("Geting In Turret",_x,_role,_turretPath); } else { if (_cargoIndex > -1) then { - ACE_player action ["GetInCargo", _target, _cargoIndex]; - TRACE_3("Geting In Cargo",_x,_role,_cargoIndex); + // GetInCargo expects the index of the seat in the "cargo" array from fullCrew + // See description: https://community.bistudio.com/wiki/fullCrew + private _cargoActionIndex = -1; + { + if ((_x select 2) == _cargoIndex) exitWith {_cargoActionIndex = _forEachIndex}; + } forEach (fullCrew [_target, "cargo", true]); + + ACE_player action ["GetInCargo", _target, _cargoActionIndex]; + TRACE_4("Geting In Cargo",_x,_role,_cargoActionIndex,_cargoIndex); } else { ACE_player action ["GetIn" + _role, _target]; TRACE_2("Geting In",_x,_role); diff --git a/addons/quickmount/stringtable.xml b/addons/quickmount/stringtable.xml index ce9bb9465f..2032af7a44 100644 --- a/addons/quickmount/stringtable.xml +++ b/addons/quickmount/stringtable.xml @@ -9,6 +9,7 @@ 快速搭乘 快速搭乘 Szybkie wsiadanie + 빠른 탑승 Vehicle quick mount @@ -18,6 +19,7 @@ 車両クイック マウント 快速搭乘载具 快速搭乘載具 + 빠른 차량 탑승 Quickly enter the vehicle you are directly looking at. @@ -27,6 +29,7 @@ 快速进入你正在看的载具之中 快速進入你正在看的載具之中 Szybko wsiądź do pojazdu, na który patrzysz. + 빠르게 당신이 보고 있는 가까운 차량에 탑승합니다. Vehicle Full @@ -36,6 +39,7 @@ 载具已满 載具已滿 Pojazd pełny + 만차 Distance @@ -45,6 +49,7 @@ 距离 距離 Odległość + 거리 Maximum distance to check for vehicles. @@ -54,6 +59,7 @@ 最大可检查载具的距离. 最大可檢查載具的距離. Maksymalna odległość do pojazdu. + 탑승 가능한 차량과의 거리 Vehicle Locked @@ -63,6 +69,7 @@ 载具已上锁 載具已上鎖 Pojazd zablokowany + 차량 잠김 Maximum Speed (km/h) @@ -72,6 +79,7 @@ 最高速度 (公里/小时) 最高速度 (公里/小時) Maksymalna prędkość (km/h) + 최대 속도 (km/h) Maximum vehicle speed (km/h) allowed for player entry @@ -81,6 +89,7 @@ 设置玩家能在最高多少的速度之下进入载具。 設置玩家能在最高多少的速度之下進入載具。 Maksymalna prędkość pojazdu (km/h) pozwalająca graczowi wsiąść. + 플레이어가 탑승 가능한 목표 차량의 최대 속도 Prioritize Seat @@ -90,6 +99,7 @@ 优先座位 優先座位 Priorytet zajmowanych pozycji + 좌석 우선순위 지정 Seat priority on entry @@ -99,6 +109,7 @@ 优先想进入哪个座位。 優先想進入哪個座位。 Priorytet pozycji w pojeździe + 탑승할 좌석의 우선순위를 지정합니다. diff --git a/addons/rangecard/CfgWeapons.hpp b/addons/rangecard/CfgWeapons.hpp index 0ad18f83e1..659b0ecfcb 100644 --- a/addons/rangecard/CfgWeapons.hpp +++ b/addons/rangecard/CfgWeapons.hpp @@ -4,7 +4,7 @@ class CfgWeapons { class CBA_MiscItem_ItemInfo; class ACE_RangeCard: ACE_ItemCore { - author[] = {"Ruthberg"}; + author = "Ruthberg"; scope = 2; displayName = CSTRING(Name); descriptionShort = CSTRING(Description); diff --git a/addons/rangecard/functions/fnc_calculateRangeCard.sqf b/addons/rangecard/functions/fnc_calculateRangeCard.sqf index 694d234caf..5bb12e220a 100644 --- a/addons/rangecard/functions/fnc_calculateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_calculateRangeCard.sqf @@ -46,7 +46,7 @@ private _bulletPos = [0, 0, 0]; private _bulletVelocity = [0, 0, 0]; private _bulletAccel = [0, 0, 0]; private _bulletSpeed = 0; -private _gravity = [0, sin(_scopeBaseAngle) * -9.80665, cos(_scopeBaseAngle) * -9.80665]; +private _gravity = [0, sin(_scopeBaseAngle) * -GRAVITY, cos(_scopeBaseAngle) * -GRAVITY]; private _deltaT = 1 / _simSteps; private _speedOfSound = 0; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { diff --git a/addons/rangecard/functions/fnc_updateRangeCard.sqf b/addons/rangecard/functions/fnc_updateRangeCard.sqf index 064abea6b0..9ab6fc6341 100644 --- a/addons/rangecard/functions/fnc_updateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_updateRangeCard.sqf @@ -156,10 +156,10 @@ if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) t private _cacheEntry = missionNamespace getVariable format[QGVAR(%1_%2_%3_%4_%5), _zeroRange, _boreHeight, _ammoClass, _weaponClass, missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]]; if (isNil {_cacheEntry}) then { private _scopeBaseAngle = if (!_useABConfig) then { - private _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngleVanilla:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight]; + private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZero:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight]; (parseNumber _zeroAngle) } else { - private _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngle:%1:%2:%3:%4:%5:%6:%7:%8:%9", _zeroRange, _muzzleVelocity, _boreHeight, EGVAR(scopes,zeroReferenceTemperature), EGVAR(scopes,zeroReferenceBarometricPressure), EGVAR(scopes,zeroReferenceHumidity), _bc, _dragModel, _atmosphereModel]; + private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZeroAB:%1:%2:%3:%4:%5:%6:%7:%8:%9", _zeroRange, _muzzleVelocity, _boreHeight, EGVAR(scopes,zeroReferenceTemperature), EGVAR(scopes,zeroReferenceBarometricPressure), EGVAR(scopes,zeroReferenceHumidity), _bc, _dragModel, _atmosphereModel]; (parseNumber _zeroAngle) }; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false] && missionNamespace getVariable [QEGVAR(advanced_ballistics,ammoTemperatureEnabled), false]) then { @@ -167,10 +167,10 @@ if (isNil {_cacheEntry}) then { private _mvShift = [_ammoConfig select 9, _x] call EFUNC(advanced_ballistics,calculateAmmoTemperatureVelocityShift); private _mv = _muzzleVelocity + _mvShift; - [_scopeBaseAngle,_boreHeight,_airFriction,_mv,_x,EGVAR(scopes,zeroReferenceBarometricPressure),EGVAR(scopes,zeroReferenceHumidity),100,4,1,GVAR(rangeCardEndRange),_bc,_dragModel,_atmosphereModel,_transonicStabilityCoef,_forEachIndex,_useABConfig] call FUNC(calculateRangeCard); + [_scopeBaseAngle,_boreHeight,_airFriction,_mv,_x,EGVAR(scopes,zeroReferenceBarometricPressure),EGVAR(scopes,zeroReferenceHumidity),200,4,1,GVAR(rangeCardEndRange),_bc,_dragModel,_atmosphereModel,_transonicStabilityCoef,_forEachIndex,_useABConfig] call FUNC(calculateRangeCard); } forEach [-15, -5, 5, 10, 15, 20, 25, 30, 35]; } else { - [_scopeBaseAngle,_boreHeight,_airFriction,_muzzleVelocity,15,EGVAR(scopes,zeroReferenceBarometricPressure),EGVAR(scopes,zeroReferenceHumidity),100,4,1,GVAR(rangeCardEndRange),_bc,_dragModel,_atmosphereModel,_transonicStabilityCoef,3,_useABConfig] call FUNC(calculateRangeCard); + [_scopeBaseAngle,_boreHeight,_airFriction,_muzzleVelocity,15,EGVAR(scopes,zeroReferenceBarometricPressure),EGVAR(scopes,zeroReferenceHumidity),200,4,1,GVAR(rangeCardEndRange),_bc,_dragModel,_atmosphereModel,_transonicStabilityCoef,3,_useABConfig] call FUNC(calculateRangeCard); }; for "_i" from 0 to 9 do { diff --git a/addons/rangecard/functions/script_component.hpp b/addons/rangecard/functions/script_component.hpp index fdc4a3d486..d4a493206b 100644 --- a/addons/rangecard/functions/script_component.hpp +++ b/addons/rangecard/functions/script_component.hpp @@ -1 +1 @@ -#include "\z\ace\addons\rangecard\script_component.hpp" \ No newline at end of file +#include "\z\ace\addons\rangecard\script_component.hpp" diff --git a/addons/rangecard/script_component.hpp b/addons/rangecard/script_component.hpp index 76106720bc..a83f40931f 100644 --- a/addons/rangecard/script_component.hpp +++ b/addons/rangecard/script_component.hpp @@ -15,10 +15,3 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" - -#define MOA_TO_MRAD(d) (d * 3.43774677) // Conversion factor: 54 / (5 * PI) -#define MRAD_TO_MOA(d) (d * 0.29088821) // Conversion factor: (5 * PI) / 54 -#define DEG_TO_MOA(d) (d * 60) // Conversion factor: 60 -#define MOA_TO_DEG(d) (d / 60) // Conversion factor: 1 / 60 -#define DEG_TO_MRAD(d) (d * 17.45329252) // Conversion factor: (50 * PI) / 9 -#define MRAD_TO_DEG(d) (d / 17.45329252) // Conversion factor: 9 / (50 * PI) diff --git a/addons/realisticnames/CfgWeapons.hpp b/addons/realisticnames/CfgWeapons.hpp index 5e0032f780..fc873ccf10 100644 --- a/addons/realisticnames/CfgWeapons.hpp +++ b/addons/realisticnames/CfgWeapons.hpp @@ -546,6 +546,16 @@ class CfgWeapons { }; }; + class autocannon_40mm_VTOL_01: autocannon_40mm_CTWS { + displayName = "L/60 Bofors Autocannon"; + class AP: AP { + displayName = "L/60 Bofors Autocannon"; + }; + class HE: HE { + displayName = "L/60 Bofors Autocannon"; + }; + }; + class autocannon_30mm_CTWS: autocannon_Base_F { displayName = "Mk44 Bushmaster II"; class AP: autocannon_Base_F { diff --git a/addons/rearm/ACE_Settings.hpp b/addons/rearm/ACE_Settings.hpp index 2e0fae277f..2bd4eec450 100644 --- a/addons/rearm/ACE_Settings.hpp +++ b/addons/rearm/ACE_Settings.hpp @@ -1,6 +1,6 @@ class ACE_Settings { class GVAR(level) { - category = ECSTRING(OptionsMenu,CategoryLogistics); + category = CSTRING(DisplayName); displayName = CSTRING(RearmSettings_level_DisplayName); description = CSTRING(RearmSettings_level_Description); value = 0; @@ -8,6 +8,7 @@ class ACE_Settings { values[] = {CSTRING(RearmSettings_vehicle), CSTRING(RearmSettings_magazine), CSTRING(RearmSettings_caliber)}; }; class GVAR(supply) { + category = CSTRING(DisplayName); displayName = CSTRING(RearmSettings_supply_DisplayName); description = CSTRING(RearmSettings_supply_Description); value = 0; diff --git a/addons/rearm/CfgEventHandlers.hpp b/addons/rearm/CfgEventHandlers.hpp index 17edc1dc30..077779a642 100644 --- a/addons/rearm/CfgEventHandlers.hpp +++ b/addons/rearm/CfgEventHandlers.hpp @@ -28,7 +28,7 @@ class Extended_PostInit_EventHandlers { class Extended_Respawn_EventHandlers { class CAManBase { class ADDON { - respawn = QUOTE(call COMPILE_FILE(XEH_respawn)); + respawn = QUOTE(call FUNC(handleRespawn)); }; }; }; diff --git a/addons/rearm/CfgVehicles.hpp b/addons/rearm/CfgVehicles.hpp index 56bf0ec7ba..7c442e4df9 100644 --- a/addons/rearm/CfgVehicles.hpp +++ b/addons/rearm/CfgVehicles.hpp @@ -17,13 +17,13 @@ class CBA_Extended_EventHandlers; class CfgVehicles { class ACE_Module; class ACE_moduleRearmSettings: ACE_Module { - scope = 2; + scope = 1; displayName = CSTRING(RearmSettings_Module_DisplayName); icon = QPATHTOF(ui\icon_module_rearm.paa); category = "ACE_Logistics"; function = QFUNC(moduleRearmSettings); functionPriority = 1; - isGlobal = 0; + isGlobal = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); class Arguments { diff --git a/addons/rearm/XEH_PREP.hpp b/addons/rearm/XEH_PREP.hpp index 05377af37a..dc34fbd9e9 100644 --- a/addons/rearm/XEH_PREP.hpp +++ b/addons/rearm/XEH_PREP.hpp @@ -1,4 +1,3 @@ - PREP(addMagazineToSupply); PREP(addRearmActions); PREP(addVehicleMagazinesToSupply); @@ -11,7 +10,6 @@ PREP(disable); PREP(dropAmmo); PREP(getAllRearmTurrets); PREP(getCaliber); -PREP(getHardpointMagazines); PREP(getMaxMagazines); PREP(getNeedRearmMagazines); PREP(getSupplyCount); @@ -19,6 +17,7 @@ PREP(getTurretConfigMagazines); PREP(getTurretMagazineAmmo); PREP(grabAmmo); PREP(handleKilled); +PREP(handleRespawn); PREP(handleUnconscious); PREP(hasEnoughSupply); PREP(initSupplyVehicle); diff --git a/addons/rearm/functions/fnc_dropAmmo.sqf b/addons/rearm/functions/fnc_dropAmmo.sqf index 61e744fcf5..30b8b9d67d 100644 --- a/addons/rearm/functions/fnc_dropAmmo.sqf +++ b/addons/rearm/functions/fnc_dropAmmo.sqf @@ -38,7 +38,8 @@ if (_actionID != -1) then { _unit removeAction _actionID; _unit setVariable [QGVAR(ReleaseActionID), nil]; }; -[_unit, "forceWalk", QGVAR(vehRearm), false] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", "ACE_rearm", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_rearm", false] call EFUNC(common,statusEffect_set); if (_unholster) then { REARM_UNHOLSTER_WEAPON diff --git a/addons/rearm/functions/fnc_getHardpointMagazines.sqf b/addons/rearm/functions/fnc_getHardpointMagazines.sqf deleted file mode 100644 index 61a9591cd7..0000000000 --- a/addons/rearm/functions/fnc_getHardpointMagazines.sqf +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Author: PabstMirror - * Gets possible magazines that can be added to a pylon. - * - * Arguments: - * 0: Pylon config - * - * Return Value: - * Magazines - * - * Example: - * [config] call ace_rearm_fnc_getHardpointMagazines - * - * Public: No - */ -#include "script_component.hpp" - -ACE_DEPRECATED(QFUNC(getHardpointMagazines),"3.12.0","getCompatiblePylonMagazines"); - -params ["_pylonConfig"]; - -private _return = GVAR(hardpointGroupsCache) getVariable (str _pylonConfig); -if (isNil "_return") then { - _return = []; - private _hardpoints = (getArray (_pylonConfig >> "hardpoints")) apply {toLower _x}; - private _maxWeight = if (isNumber (_pylonConfig >> "maxWeight")) then {getNumber (_pylonConfig >> "maxWeight")} else {1e5}; - private _mags = configProperties [configFile >> "CfgMagazines", "(isClass _x) && {isArray (_x >> 'hardpoints')}"]; - { - if ((getNumber (_x >> "mass")) < _maxWeight) then { - private _magHardpoints = (getArray (_x >> "hardpoints")) apply {toLower _x}; - if (!((_hardpoints arrayIntersect _magHardpoints) isEqualTo [])) then { - _return pushBack configName _x; - }; - }; - } forEach _mags; - if ((str _pylonConfig) != "") then { - GVAR(hardpointGroupsCache) setVariable [(str _pylonConfig), _return]; - }; -}; - -_return; diff --git a/addons/rearm/functions/fnc_grabAmmo.sqf b/addons/rearm/functions/fnc_grabAmmo.sqf index 105141feda..13159987f2 100644 --- a/addons/rearm/functions/fnc_grabAmmo.sqf +++ b/addons/rearm/functions/fnc_grabAmmo.sqf @@ -19,7 +19,8 @@ params ["_dummy", "_unit"]; REARM_HOLSTER_WEAPON; -[_unit, "forceWalk", QGVAR(vehRearm), true] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", "ACE_rearm", true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_rearm", true] call EFUNC(common,statusEffect_set); [ TIME_PROGRESSBAR(5), diff --git a/addons/rearm/XEH_respawn.sqf b/addons/rearm/functions/fnc_handleRespawn.sqf similarity index 63% rename from addons/rearm/XEH_respawn.sqf rename to addons/rearm/functions/fnc_handleRespawn.sqf index 5148894f98..26cb918c0e 100644 --- a/addons/rearm/XEH_respawn.sqf +++ b/addons/rearm/functions/fnc_handleRespawn.sqf @@ -1,3 +1,18 @@ +/* + * Author: unknown + * Called when a unit is Respawned + * + * Arguments: + * 0: The Unit + * + * Return Value: + * None + * + * Example: + * [bob] call ACE_rearm_fnc_handleRespawn + * + * Public: No + */ #include "script_component.hpp" params ["_unit"]; diff --git a/addons/rearm/functions/fnc_rearm.sqf b/addons/rearm/functions/fnc_rearm.sqf index bca193f621..e9d65c43b4 100644 --- a/addons/rearm/functions/fnc_rearm.sqf +++ b/addons/rearm/functions/fnc_rearm.sqf @@ -48,6 +48,9 @@ if (_magazineDisplayName == "") then { {(_this select 0) call FUNC(rearmSuccess)}, "", format [localize LSTRING(RearmAction), getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName"), _magazineDisplayName], - {true}, + { + param [0] params ["_target", "_unit"]; + (_unit distanceSqr _target) <= REARM_ACTION_DISTANCE_SQR + }, ["isnotinside"] ] call EFUNC(common,progressBar); diff --git a/addons/rearm/functions/fnc_rearmEntireVehicle.sqf b/addons/rearm/functions/fnc_rearmEntireVehicle.sqf index b0fe9f7ccf..47dde150e6 100644 --- a/addons/rearm/functions/fnc_rearmEntireVehicle.sqf +++ b/addons/rearm/functions/fnc_rearmEntireVehicle.sqf @@ -17,14 +17,17 @@ */ #include "script_component.hpp" -params ["_truck", "", "_vehicle"]; +params ["_truck", "_player", "_vehicle"]; [ TIME_PROGRESSBAR(10), - [_truck, _vehicle], + [_truck, _player, _vehicle], FUNC(rearmEntireVehicleSuccess), "", format [localize LSTRING(BasicRearmAction), getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], - {true}, + { + param [0] params ["", "_player", "_vehicle"]; + (_player distanceSqr _vehicle) <= REARM_ACTION_DISTANCE_SQR + }, ["isnotinside"] ] call EFUNC(common,progressBar); diff --git a/addons/rearm/functions/fnc_takeSuccess.sqf b/addons/rearm/functions/fnc_takeSuccess.sqf index e9d8b1daaa..9e6be0fe1c 100644 --- a/addons/rearm/functions/fnc_takeSuccess.sqf +++ b/addons/rearm/functions/fnc_takeSuccess.sqf @@ -28,7 +28,8 @@ if (GVAR(supply) > 0) then { }; if !(_success) exitWith {WARNING_2("takeSuccess failed to take [%1] from [%2]",_magazineClass,_truck);}; -[_unit, "forceWalk", QGVAR(vehRearm), true] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", "ACE_rearm", true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_rearm", true] call EFUNC(common,statusEffect_set); private _dummy = [_unit, _magazineClass] call FUNC(createDummy); [_dummy, _unit] call FUNC(pickUpAmmo); diff --git a/addons/rearm/script_component.hpp b/addons/rearm/script_component.hpp index 92e279950c..a80dab55b2 100644 --- a/addons/rearm/script_component.hpp +++ b/addons/rearm/script_component.hpp @@ -19,6 +19,7 @@ #define REARM_ACTION_DISTANCE 7 +#define REARM_ACTION_DISTANCE_SQR 49 #define REARM_CALIBERS [ 6, 7, 8, 13, 19, 20, 25, 30, 35, 39, 40, 60, 70, 80, 82, 100, 105, 120, 122, 125, 155, 230, 250] #define REARM_DURATION_TAKE [ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 4, 5, 5, 5, 5, 13, 10] diff --git a/addons/rearm/stringtable.xml b/addons/rearm/stringtable.xml index 7d7de5b811..ef7c2e3662 100644 --- a/addons/rearm/stringtable.xml +++ b/addons/rearm/stringtable.xml @@ -1,6 +1,14 @@ - + + + Rearm + Aufmunitionierung + Riarmo + 整裝 + 整装 + 再武装 + Rearm Settings Aufmunitioniereinstellungen @@ -11,10 +19,10 @@ Impostazioni Riarmo Parámetros de rearme Options de réarmement - 再武装設定 재보급 설정 整装设定 整裝設定 + 再武装設定 This module allows you to tweak rearm system settings. @@ -114,6 +122,7 @@ 弹药补给 彈藥補給 Zapas amunicji + 탄약 보급 How much ammunition does an ammo truck carry? @@ -123,6 +132,7 @@ 弹药卡车会携带多少的弹药? 彈藥卡車會攜帶多少的彈藥? Ile amunicji przewozi ciężarówka? + 탄약 차량은 얼마나 많은 양의 탄약을 가질 수 있음? Unlimited ammo supply @@ -132,6 +142,7 @@ 无限弹药 無限彈藥 Nielimitowany zapas amunicji + 무한의 탄약 Limited ammo supply based on caliber @@ -141,6 +152,7 @@ 基于口径限制弹药数量 基於口徑限制彈藥數量 Zapas amunicji zależny od kalibru + 구경에 따라 제한된 탄약 Only specific Magazines @@ -150,6 +162,7 @@ 只有指定的弹药 只有指定的彈藥 Tylko konkretne magazynki + 특정 탄약만 Check remaining ammunition @@ -159,6 +172,7 @@ 检查剩余的弹药 檢查剩餘的彈藥 Sprawdź ilość amunicji + 남은 탄약 확인 Checking remaining ammunition... @@ -168,6 +182,7 @@ 正在检查剩余的弹药中... 正在檢查剩餘的彈藥中... Sprawdzanie ilości amunicji... + 남은 탄약 확인중... There is ammunition worth %1 points left. @@ -177,6 +192,7 @@ 还剩下%1多的弹药. 還剩下%1多的彈藥. Pozostało %1 punktów amunicji. + 여기에는 최소 %1 포인트의 탄약이 남았습니다. The following ammunition is left:%1 @@ -186,6 +202,7 @@ 以下剩余的弹药:%1 以下剩餘的彈藥:%1 Pozostała amunicja: %1 + 다음의 탄약이 남음 : %1 There is no ammunition left. @@ -195,6 +212,7 @@ 已经没有剩余的弹药了. 已經沒有剩餘的彈藥了. Brak amunicji w zapasie. + 여기에는 탄약이 남지 않았습니다. Rearm @@ -475,7 +493,7 @@ Hydra 70 HE Hydra 70 HE Hydra 70 HE - ハイドラ 70 りゅう弾 + ハイドラ 70 HE Hydra 70 고폭탄 九头蛇 70 高爆弹 九頭蛇 70 高爆彈 @@ -490,7 +508,7 @@ S-8 HE S-8 HE S-8 HE - S-8 りゅう弾 + S-8 HE S-8 고폭탄 S-8 高爆弹 S-8 高爆彈 @@ -505,7 +523,7 @@ Hydra 70 AP Hydra 70 AP Hydra 70 AP - ハイドラ 70 徹甲弾 + ハイドラ 70 AP Hydra 70 철갑탄 九头蛇 70 反人员弹 九頭蛇 70 反人員彈 @@ -520,7 +538,7 @@ S-8 AP S-8 AP S-8 AP - S-8 徹甲弾 + S-8 AP S-8 철갑탄 S-8 反人员弹 S-8 反人員彈 diff --git a/addons/refuel/ACE_Settings.hpp b/addons/refuel/ACE_Settings.hpp index a25c36a2ba..6904d33431 100644 --- a/addons/refuel/ACE_Settings.hpp +++ b/addons/refuel/ACE_Settings.hpp @@ -5,11 +5,13 @@ class ACE_Settings { description = CSTRING(RefuelSettings_speed_Description); value = 1; typeName = "SCALAR"; + sliderSettings[] = {0, 25, 1, 1}; }; class GVAR(hoseLength) { category = ECSTRING(OptionsMenu,CategoryLogistics); displayName = CSTRING(RefuelSettings_hoseLength_DisplayName); value = 12; typeName = "SCALAR"; + sliderSettings[] = {0, 50, 12, 1}; }; }; diff --git a/addons/refuel/CfgVehicles.hpp b/addons/refuel/CfgVehicles.hpp index e7d77e4510..cf4d590df8 100644 --- a/addons/refuel/CfgVehicles.hpp +++ b/addons/refuel/CfgVehicles.hpp @@ -46,13 +46,13 @@ class CBA_Extended_EventHandlers; class CfgVehicles { class ACE_Module; class ACE_moduleRefuelSettings: ACE_Module { - scope = 2; + scope = 1; displayName = CSTRING(RefuelSettings_Module_DisplayName); icon = QPATHTOF(ui\icon_module_refuel.paa); category = "ACE_Logistics"; function = QFUNC(moduleRefuelSettings); functionPriority = 1; - isGlobal = 0; + isGlobal = 1; isTriggerActivated = 0; author = ECSTRING(common,ACETeam); class Arguments { @@ -377,6 +377,9 @@ class CfgVehicles { GVAR(hooks)[] = {{0.99,-3.47,-0.67},{-1.04,-3.47,-0.67}}; GVAR(fuelCargo) = 10000; }; + class Truck_02_water_base_F: Truck_02_fuel_base_F { + GVAR(fuelCargo) = REFUEL_DISABLED_FUEL; + }; class B_Truck_01_fuel_F: B_Truck_01_mover_F { transportFuel = 0; //3k diff --git a/addons/refuel/functions/fnc_canTurnOn.sqf b/addons/refuel/functions/fnc_canTurnOn.sqf index e9de5c205c..98173e0fa4 100644 --- a/addons/refuel/functions/fnc_canTurnOn.sqf +++ b/addons/refuel/functions/fnc_canTurnOn.sqf @@ -27,5 +27,4 @@ if (isNull _unit || !(_nozzle getVariable [QGVAR(isRefueling), false]) && {[_nozzle getVariable QGVAR(source)] call FUNC(getFuel) != 0} && {!isNull (_nozzle getVariable [QGVAR(sink), objNull])} && - {(fuel (_nozzle getVariable QGVAR(sink))) < 1} && - {!(isEngineOn (_nozzle getVariable QGVAR(sink)))} + {(fuel (_nozzle getVariable QGVAR(sink))) < 1} diff --git a/addons/refuel/functions/fnc_refuel.sqf b/addons/refuel/functions/fnc_refuel.sqf index e294a43497..f23e0aae5b 100644 --- a/addons/refuel/functions/fnc_refuel.sqf +++ b/addons/refuel/functions/fnc_refuel.sqf @@ -64,10 +64,6 @@ if (_maxFuel == 0) then { private _finished = false; private _fueling = _nozzle getVariable [QGVAR(isRefueling), false]; if (_fueling) then { - if (isEngineOn _sink) exitWith { - _nozzle setVariable [QGVAR(lastTickMissionTime), nil]; - _nozzle setVariable [QGVAR(isRefueling), false, true]; - }; private _fuelInSource = [_source] call FUNC(getFuel); if (_fuelInSource == 0) exitWith { [LSTRING(Hint_SourceEmpty), 2, _unit] call EFUNC(common,displayTextStructured); diff --git a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf index fca638fc25..95c853a217 100644 --- a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf +++ b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf @@ -24,6 +24,7 @@ _unit setVariable [QGVAR(hint), nil]; \ call EFUNC(interaction,hideMouseHint); \ [_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set); \ + [_unit, "blockThrow", "ACE_refuel", false] call EFUNC(common,statusEffect_set); \ [_idPFH] call CBA_fnc_removePerFrameHandler; params ["_unit", "_nozzle"]; diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 1c2382c21c..5049adfee6 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -88,6 +88,7 @@ params [ _unit action ["SwitchWeapon", _unit, _unit, 299]; [_unit, "forceWalk", "ACE_refuel", true] call EFUNC(common,statusEffect_set); + [_unit, "blockThrow", "ACE_refuel", true] call EFUNC(common,statusEffect_set); [_unit, _nozzle] call FUNC(startNozzleInHandsPFH); }, diff --git a/addons/refuel/stringtable.xml b/addons/refuel/stringtable.xml index 32aace7924..00cdb7e308 100644 --- a/addons/refuel/stringtable.xml +++ b/addons/refuel/stringtable.xml @@ -41,7 +41,7 @@ Quanto velocemente dovrebbe essere rifornito un veicolo? Cuán rápido se reabastecen los vehículos? A quelle vitesse devrait être ravitaillé un véhicule ? - どのくらいの速さで車両へ給油しますか? + どのくらいの速さで車両へ給油しますか? 차량이 얼마나 빨리 재급유될 수 있습니까? 载具多快会加油完毕? 載具多快會加油完畢? @@ -86,7 +86,7 @@ Prendendo manicotto benzina... Tomando surtidor... Prise de la pompe... - 給油ノズルを取っている・・・ + 給油ノズルを取っています・・・ 주유기 획득중... 拿取燃料喷嘴中... 拿取燃料噴嘴中... @@ -116,7 +116,7 @@ Collegando manicotto benzina... Conectando surtidor... Connection de la pompe... - 給油ノズルを接続している・・・ + 給油ノズルを接続しています・・・ 주유기 꼽는중... 连结燃料喷嘴中... 連結燃料噴嘴中... @@ -176,7 +176,7 @@ Controllando la benzina rimanente... Verificando combustible remanente,,, Vérifie le carburant restant... - 残燃料を見ている・・・ + 残燃料を見ています・・・ 남은 연료 확인중... 检查剩余燃料中... 檢查剩餘燃料中... @@ -278,6 +278,7 @@ 給油を始められなかった 無法開啟燃料噴嘴 无法开启燃料喷嘴 + 주유기를 켤 수 없습니다. %1 Liters fueled @@ -394,7 +395,7 @@ Riponendo la manica della benzina... Devolviendo el surtidor... Retourne la pompe - 給油ノズルを戻している・・・ + 給油ノズルを戻しています・・・ 주유기 반환중 放回燃料喷嘴中... 放回燃料噴嘴中... @@ -438,6 +439,7 @@ 加油软管长度 加油軟管長度 Długość węża paliwowego + 주유기 호스 길이 Fuel Cargo Volume @@ -447,6 +449,7 @@ Capacità Carburante Cargo 儲油量 储油量 + 연료통 크기 @@ -457,6 +460,7 @@ La capacità del carburante disponibile per il rifornimento (-1 disabilita, -10 se infinito) 設定有多少油料可供載具進行加油(-1時關閉,-10為無限油量) 设定有多少油料可供载具进行加油(-1时关闭,-10为无限油量) + 재급유에 사용 할 수 있는 연료량 (-1=비활성, -10=무한) Refuel Hose attach coordinates @@ -466,6 +470,7 @@ Coordinate del tubo di rifornimento 加油軟管安裝位置 加油软管安装位置 + 재급유기 부착 좌표 Model coordinates used to attach refuel hose @@ -475,6 +480,7 @@ Coordinate del modello utilizzate per il fissaggio del tubo 設定加油軟管會安裝到模型的哪個位置上 设定加油软管会安装到模型的哪个位置上 + 재급유기 부착에 쓰이는 모델 좌표 diff --git a/addons/reload/ACE_Settings.hpp b/addons/reload/ACE_Settings.hpp index 72d26b46cf..82e9f32637 100644 --- a/addons/reload/ACE_Settings.hpp +++ b/addons/reload/ACE_Settings.hpp @@ -1,5 +1,6 @@ class ACE_Settings { class GVAR(displayText) { + category = ECSTRING(common,ACEKeybindCategoryWeapons); typeName = "BOOL"; isClientSettable = 1; value = 1; diff --git a/addons/reload/stringtable.xml b/addons/reload/stringtable.xml index d1f7e0318c..2a7764dc04 100644 --- a/addons/reload/stringtable.xml +++ b/addons/reload/stringtable.xml @@ -28,7 +28,7 @@ A lőszer ellenőrzése az új tárad behelyezésekor újratöltés közben. Controlla le munizioni rimanenti nel caricatore in fase di cambio caricatore. Confere a munição no seu novo carregador ao recarregar a arma - あたらしく装填された弾倉の弾薬を確認します。 + 新しく装填された弾倉の弾薬を確認します。 재장전시 새탄창에 있는 탄약을 확인합니다. 在重新装填时检查新弹匣上的弹药. 在重新裝填時檢查新彈匣上的彈藥. @@ -92,7 +92,7 @@ Töltényheveder összekötése folyamatban... Attaccando la tracolla... Ligando cintos... - ベルトをつなげている・・・ + ベルトをつなげています・・・ 벨트 연결중... 连接弹链中... 連接彈鏈中... diff --git a/addons/reloadlaunchers/stringtable.xml b/addons/reloadlaunchers/stringtable.xml index ccbca809f0..eef4c9e50a 100644 --- a/addons/reloadlaunchers/stringtable.xml +++ b/addons/reloadlaunchers/stringtable.xml @@ -12,7 +12,7 @@ Kilövö betöltése Carica lanciamissili Recarregar lançador - ランチャーを装填 + ランチャーに装填 무기 재장전 装载发射器 裝載發射器 @@ -28,7 +28,7 @@ Kilövő betöltés alatt... Caricando il lanciamissili... Recarregando lançador... - ランチャーを装填している・・・ + ランチャーに装填中・・・ 무기 재장전중... 装载发射器中... 裝載發射器中... @@ -44,7 +44,7 @@ Kilövő betöltve Lanciamissili caricato Lançador Carregado - ランチャーの装填完了 + ランチャーに装填完了 무기 재장전됨 发射器装载完毕 發射器裝載完畢 @@ -60,7 +60,7 @@ %1 betöltése Caricato %1 Recarregar %1 - %1 へ装填 + %1 を装填 %1 장전 装载%1 裝載%1 diff --git a/addons/repair/ACE_Settings.hpp b/addons/repair/ACE_Settings.hpp index 5abb46f610..ea3994caec 100644 --- a/addons/repair/ACE_Settings.hpp +++ b/addons/repair/ACE_Settings.hpp @@ -29,6 +29,7 @@ class ACE_Settings { typeName = "SCALAR"; value = 0.6; category = ECSTRING(OptionsMenu,CategoryLogistics); + sliderSettings[] = {0, 1, 0.6, 2}; }; class GVAR(repairDamageThreshold_engineer) { displayName = CSTRING(repairDamageThreshold_Engineer_name); @@ -36,6 +37,7 @@ class ACE_Settings { typeName = "SCALAR"; value = 0.4; category = ECSTRING(OptionsMenu,CategoryLogistics); + sliderSettings[] = {0, 1, 0.4, 2}; }; class GVAR(consumeItem_toolKit) { displayName = CSTRING(consumeItem_ToolKit_name); diff --git a/addons/repair/CfgEden.hpp b/addons/repair/CfgEden.hpp index 1c1263755b..be92ec6689 100644 --- a/addons/repair/CfgEden.hpp +++ b/addons/repair/CfgEden.hpp @@ -63,6 +63,28 @@ class Cfg3DEN { condition = "(1 - objectBrain) * (1 - objectVehicle)"; defaultValue = 0; }; + class GVAR(editorLoadedTracks) { + displayName = CSTRING(editorLoadedTracks); + tooltip = CSTRING(editorLoadedTracks_tooltip); + property = QGVAR(editorLoadedTracks); + control = "Edit"; + expression = "_this setVariable ['%s',_value];"; + defaultValue = "[0,1] select (_this isKindOf 'Tank')"; // must match pre init script + validate = "number"; + condition = "objectHasInventoryCargo"; + typeName = "NUMBER"; + }; + class GVAR(editorLoadedWheels) { + displayName = CSTRING(editorLoadedWheels); + tooltip = CSTRING(editorLoadedWheels_tooltip); + property = QGVAR(editorLoadedWheels); + control = "Edit"; + expression = "_this setVariable ['%s',_value];"; + defaultValue = "[0,1] select (_this isKindOf 'Car')"; // must match pre init script + validate = "number"; + condition = "objectHasInventoryCargo"; + typeName = "NUMBER"; + }; }; }; }; diff --git a/addons/repair/CfgEditorSubcategories.hpp b/addons/repair/CfgEditorSubcategories.hpp new file mode 100644 index 0000000000..3010929ec5 --- /dev/null +++ b/addons/repair/CfgEditorSubcategories.hpp @@ -0,0 +1,5 @@ +class CfgEditorSubcategories { + class GVAR(subcategory) { + displayName = ECSTRING(main,Category_Logistics); + }; +}; diff --git a/addons/repair/CfgMoves.hpp b/addons/repair/CfgMoves.hpp new file mode 100644 index 0000000000..4e42310851 --- /dev/null +++ b/addons/repair/CfgMoves.hpp @@ -0,0 +1,9 @@ +class CfgMovesBasic; +class CfgMovesMaleSdr: CfgMovesBasic { + class States { + class Campaign_Base; + class Acts_carFixingWheel: Campaign_Base { + soundOverride = ""; + }; + }; +}; diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp index 29dca0209a..a67b3035fc 100644 --- a/addons/repair/CfgVehicles.hpp +++ b/addons/repair/CfgVehicles.hpp @@ -20,7 +20,7 @@ class CBA_Extended_EventHandlers_base; class CfgVehicles { class ACE_Module; class ACE_moduleRepairSettings: ACE_Module { - scope = 2; + scope = 1; displayName = CSTRING(moduleName); icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa); category = "ACE_Logistics"; @@ -118,7 +118,7 @@ class CfgVehicles { class Module_F; class ACE_moduleAssignEngineerRoles: Module_F { - scope = 2; + scope = 1; displayName = CSTRING(AssignEngineerRole_Module_DisplayName); icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa); category = "ACE_Logistics"; @@ -162,7 +162,7 @@ class CfgVehicles { }; }; class ACE_moduleAssignRepairVehicle: Module_F { - scope = 2; + scope = 1; displayName = CSTRING(AssignRepairVehicle_Module_DisplayName); icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa); category = "ACE_Logistics"; @@ -234,7 +234,7 @@ class CfgVehicles { }; }; class ACE_moduleAddSpareParts: Module_F { - scope = 2; + scope = 1; displayName = CSTRING(AddSpareParts_Module_DisplayName); icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa); category = "ACE_Logistics"; @@ -321,7 +321,8 @@ class CfgVehicles { accuracy = 0.2; vehicleClass = "ACE_Logistics_Items"; - destrType = "DesturctNo"; // scripted delayed destruction + editorCategory = "EdCat_Supplies"; + editorSubcategory = QGVAR(subcategory); }; class ACE_Track: ACE_RepairItem_Base { @@ -335,7 +336,7 @@ class CfgVehicles { mapSize = 0.5; // damage handling - armor = 0.6; + armor = 1000; armorStructural = 1; minTotalDamageThreshold = 0.01; explosionShielding = 1; @@ -350,6 +351,8 @@ class CfgVehicles { QPATHTO_R(data\trailObjects_steel_destruct.rvmat) }; }; + + editorPreview = QPATHTOF(data\preview_track.jpg); }; class ACE_Wheel: ACE_RepairItem_Base { @@ -364,7 +367,7 @@ class CfgVehicles { mapSize = 0.7; // damage handling - armor = 0.05; + armor = 120; armorStructural = 1; minTotalDamageThreshold = 0.01; explosionShielding = 1; @@ -396,6 +399,8 @@ class CfgVehicles { QPATHTO_R(data\trailObjects_steel_destruct.rvmat) }; }; + + editorPreview = QPATHTOF(data\preview_wheel.jpg); }; // disable vanilla repair diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf index 5c94924a5c..2f0bbe7869 100644 --- a/addons/repair/XEH_postInit.sqf +++ b/addons/repair/XEH_postInit.sqf @@ -5,14 +5,3 @@ // wheels [QGVAR(setWheelHitPointDamage), {(_this select 0) setHitPointDamage [_this select 1, _this select 2]}] call CBA_fnc_addEventHandler; - -if (isServer) then { - ["ace_settingsInitialized", { - TRACE_1("ace_settingsInitialized eh", GVAR(addSpareParts)); - if (!GVAR(addSpareParts)) exitWith {}; - if (!(["ace_cargo"] call EFUNC(common,isModLoaded))) exitWith {}; - - ["Car", "Init", {[_this select 0, 1, "ACE_Wheel"] call FUNC(addSpareParts)}, true, [], true] call CBA_fnc_addClassEventHandler; - ["Tank", "Init", {[_this select 0, 1, "ACE_Track"] call FUNC(addSpareParts)}, true, [], true] call CBA_fnc_addClassEventHandler; - }] call CBA_fnc_addEventHandler; -}; diff --git a/addons/repair/XEH_preInit.sqf b/addons/repair/XEH_preInit.sqf index 8e6a606f0f..ca76ce5758 100644 --- a/addons/repair/XEH_preInit.sqf +++ b/addons/repair/XEH_preInit.sqf @@ -12,4 +12,27 @@ PREP_RECOMPILE_END; [{deleteVehicle _this}, _object, 5] call CBA_fnc_waitAndExecute; }] call CBA_fnc_addClassEventHandler; +// load tracks and wheels +if (isServer) then { + private _fnc_addSpareItems = { + if (!GVAR(addSpareParts)) exitWith {}; + params ["_vehicle"]; + + private _spareTracks = _vehicle getVariable QGVAR(editorLoadedTracks); + if (isNil "_spareTracks") then { + _spareTracks = [0, 1] select (_vehicle isKindOf "Tank"); // must match eden attribute default + }; + [_vehicle, _spareTracks, "ACE_Track"] call FUNC(addSpareParts); + + private _spareWheels = _vehicle getVariable QGVAR(editorLoadedWheels); + if (isNil "_spareWheels") then { + _spareWheels = [0, 1] select (_vehicle isKindOf "Car"); // must match eden attribute default + }; + [_vehicle, _spareWheels, "ACE_Wheel"] call FUNC(addSpareParts); + }; + + ["Tank", "initPost", _fnc_addSpareItems] call CBA_fnc_addClassEventHandler; + ["Car", "initPost", _fnc_addSpareItems] call CBA_fnc_addClassEventHandler; +}; + ADDON = true; diff --git a/addons/repair/config.cpp b/addons/repair/config.cpp index a8904a0a0a..8e71005eb2 100644 --- a/addons/repair/config.cpp +++ b/addons/repair/config.cpp @@ -16,7 +16,9 @@ class CfgPatches { #include "ACE_Repair.hpp" #include "ACE_Settings.hpp" -#include "CfgEventHandlers.hpp" #include "CfgActions.hpp" -#include "CfgVehicles.hpp" #include "CfgEden.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgMoves.hpp" +#include "CfgVehicles.hpp" +#include "CfgEditorSubcategories.hpp" diff --git a/addons/repair/data/ace_track.p3d b/addons/repair/data/ace_track.p3d index 53ac8971a7..83ffb9e675 100644 Binary files a/addons/repair/data/ace_track.p3d and b/addons/repair/data/ace_track.p3d differ diff --git a/addons/repair/data/preview_track.jpg b/addons/repair/data/preview_track.jpg new file mode 100644 index 0000000000..9ccae6e5f3 Binary files /dev/null and b/addons/repair/data/preview_track.jpg differ diff --git a/addons/repair/data/preview_wheel.jpg b/addons/repair/data/preview_wheel.jpg new file mode 100644 index 0000000000..fc290ed92e Binary files /dev/null and b/addons/repair/data/preview_wheel.jpg differ diff --git a/addons/repair/data/trailObjects_steel_damage.rvmat b/addons/repair/data/trailObjects_steel_damage.rvmat index 1850a7396c..f797f4ac61 100644 --- a/addons/repair/data/trailObjects_steel_damage.rvmat +++ b/addons/repair/data/trailObjects_steel_damage.rvmat @@ -38,10 +38,10 @@ class Stage3 { texture = "a3\data_f\destruct\damage_metal_mc.paa"; uvSource = "tex"; class uvTransform { - aside[] = {3,0,0}; - up[] = {0,3,0}; - dir[] = {0,0,0}; - pos[] = {0.1,0.23,0}; + aside[] = {3,0,0}; + up[] = {0,3,0}; + dir[] = {0,0,0}; + pos[] = {0.1,0.23,0}; }; }; diff --git a/addons/repair/functions/fnc_moduleRepairSettings.sqf b/addons/repair/functions/fnc_moduleRepairSettings.sqf index cfd363e99f..4bbd505006 100644 --- a/addons/repair/functions/fnc_moduleRepairSettings.sqf +++ b/addons/repair/functions/fnc_moduleRepairSettings.sqf @@ -17,8 +17,6 @@ params ["_logic"]; -if (!isServer) exitWith {}; - [_logic, QGVAR(engineerSetting_Repair), "engineerSetting_Repair"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(engineerSetting_Wheel), "engineerSetting_Wheel"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(consumeItem_ToolKit), "consumeItem_ToolKit"] call EFUNC(common,readSettingFromModule); diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index 0f39ca14db..aeaafb4f97 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -177,6 +177,9 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then { }; }; +private _soundPosition = AGLToASL (_caller modelToWorldVisual (_caller selectionPosition "RightHand")); +["Acts_carFixingWheel", _soundPosition, nil, 50] call EFUNC(common,playConfigSound3D); + // Get repair time private _repairTime = [ configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(repairTimes) >> configName _config, diff --git a/addons/repair/stringtable.xml b/addons/repair/stringtable.xml index 98fca94d12..bf19678a41 100644 --- a/addons/repair/stringtable.xml +++ b/addons/repair/stringtable.xml @@ -59,7 +59,7 @@ Cambiando rueda... Sostituendo la ruota... Remplacement de la roue... - タイヤを交換中・・・ + タイヤを交換しています・・・ 바퀴 교체중... 更换轮胎中... 更換輪胎中... @@ -74,7 +74,7 @@ Rueda cambiada Ruota sostituita Roue remplacée - タイヤを履き替え + タイヤを交換した 바퀴 교체됨 轮胎更换完毕 輪胎更換完畢 @@ -105,7 +105,7 @@ Quitando rueda... Rimuovendo la ruota... Démontage de la roue... - タイヤを外している・・ + タイヤを外しています・・・ 바퀴 제거중... 卸下轮胎中... 卸下輪胎中... @@ -150,7 +150,7 @@ Cambiando oruga... Sostituendo il cingolo... Remplacement de la chenille... - 履帯を交換中・・・ + 履帯を交換しています・・・ 궤도 교체중... 更换履带中... 更換履帶中... @@ -195,7 +195,7 @@ Quitando oruga... Rimuovendo il cingolo... Enlèvement de la chenille... - 履帯を外している・・・ + 履帯を外しています・・・ 궤도 제거중... 卸下履带中... 卸下履帶中... @@ -240,7 +240,7 @@ Reparando vehículo... Riparando il veicolo... Réparation du véhicule... - 車両を修理中・・・ + 車両を修理しています・・・ 차량 수리중... 维修载具中... 維修載具中... @@ -255,7 +255,7 @@ Lugares de reparación completa Luoghi Riparazione Completa Lieu de réparation complète - 完全修理をできる場所 + 完全修理できる場所 완전수리 구역 完整维修地点 完整維修地點 @@ -270,7 +270,7 @@ V které oblasti může být vozidlo plně opraveno? In quali luoghi è possibile riparare completamente un veicolo? Où peuvent être réparés complètement les véhicules ? - どのような場所で車両の完全な修理を出来るようにしますか? + どのような場所で車両の完全な修理を出来るようにしますか? 어느 구역에서 차량을 완전히 수리할 수 있게 합니까? 什么位置可以完整维修载具? 什麼位置可以完整維修載具? @@ -285,7 +285,7 @@ Permitir reparación completa Consenti Riparazione Completa Autoriser les réparations complètes. - 完全な修理をさせる + 完全修理を許可 완전 수리 활성화 允许完整维修 允許完整維修 @@ -300,7 +300,7 @@ Kdo může provést úplné opravy na vozidle? Chi può eseguire una riparazione completa su un veicolo? Qui peut faire une réparation complète ? - 誰が車両の完全な修理を出来るようにしますか? + 誰が車両の完全な修理を出来るようにしますか? 누가 완전 수리를 할 수 있습니까? 谁可以完整维修载具? 誰可以完整維修載具? @@ -330,7 +330,7 @@ Přidat náhradní díly do vozidla (vyžaduje úložný prostor)? Aggiungi parti di ricambio ai veicoli (richiede componente Cargo)? Ajouter des pièces de rechage aux véhicules ? (à besoin du système de cargaison) - 車両へ予備部品を追加しますか(カーゴ コンポーネントが必要)? + 車両へ予備部品を追加しますか(カーゴ コンポーネントが必要)? 차량에 예비 부품을 더합니까?(짐칸 요소 필요) 添加载具备件 (需相关货物组件)? 添加載具備件 (需相關貨物組件)? @@ -392,7 +392,7 @@ Riparando... javítása... Ремонтируем... - 修理中・・・ + 修理しています・・・ 수리중... 维修中... 維修中... @@ -408,7 +408,7 @@ Riparando %1... %1 javítása... Ремонтируем %1... - %1 を修理中・・・ + %1 を修理しています・・・ %1 수리중... 维修%1中... 維修%1中... @@ -1061,7 +1061,7 @@ Poskytuje rozsáhlý systém oprav pro všechny typy vozidel. Fornisce un sistema di riparazione per tutti i tipi di veicoli. Fournit un système de réparation pour tous les types de véhicules. - 車両の全種類に修理システムを適用しますか? + 車両の全種類に修理システムを適用しますか? 모든 차량에 대해 수리 시스템을 제공합니다. 提供修复系统给所有载具 提供修復系統給所有載具 @@ -1104,6 +1104,7 @@ 只有维修专精兵 只有維修專精兵 Tylko zaawansowani mechanicy + 고급 정비공만 Allow Wheel @@ -1130,7 +1131,7 @@ ¿Quién puede quitar y cambiar las ruedas? Chi può rimuovere e sostituire le ruote? Qui peut enlever et remplacer les roues ? - 誰がタイヤの除去と交換を出来るようにしますか? + 誰がタイヤの除去と交換を出来るようにしますか? 누가 바퀴를 제거 및 교체할 수 있습니까? 谁可维修轮胎? 誰可維修輪胎? @@ -1160,7 +1161,7 @@ ¿Quién puede realizar reparaciones? Chi può eseguire riparazioni? Qui peut réparer ? - 誰が修理を出来るようににしますか? + 誰が修理を出来るようににしますか? 누가 수리를 할 수 있습니까? 谁可以进行维修操作? 誰可以進行維修操作? @@ -1190,7 +1191,7 @@ Jaké maximální poškození může být opraveno pomocí opravárenské sady? Qual'è il danno massimo che può essere riparato con il Toolkit? Quel est le maximum de dommages réparable par une trousse à outils ? - ツールキットで修理できる、最大の損傷許容範囲を設定しますか? + ツールキットで修理できる、最大の損傷許容範囲を設定しますか? 어느정도의 피해까지 툴킷으로 수리가 가능합니까? 工具包可以修复的最大损坏值? 工具包可以修復的最大損壞值? @@ -1220,7 +1221,7 @@ Jaké maximální poškození může být opraveno pomoci inženýra? Qual'è il danno massimo che può essere riparato da un Geniere? Quel est le maximum de dommages qui peuvent être réparés par un ingénieur ? - 工兵が修理できる、最大の損傷許容範囲を設定しますか? + 工兵が修理できる、最大の損傷許容範囲を設定しますか? 정비공은 어느정도의 피해까지 수리할 수 있습니까? 工兵可以修复的最大损坏值? 工兵可以修復的最大損壞值? @@ -1250,7 +1251,7 @@ Má být odstraněna sada nástroju po použití? Il Toolkit dev'essere rimosso dopo l'uso? La trousse à outils devrait-elle être enlevée après usage ? - ツールキットを使うと削除しますか? + ツールキットを使うと削除しますか? 툴킷을 사용하면 제거를 합니까? 要在使用后删除工具包吗? 要在使用後刪除工具包嗎? @@ -1265,7 +1266,7 @@ En cualquier sitio Ovunque N'importe où - だれでも + どこでも 어디서나 任何地点 任何地點 @@ -1429,6 +1430,7 @@ 专精 專精 Zaaw. mechanik + 고급 정비공 Assign one or multiple units as an engineer @@ -1515,7 +1517,7 @@ Je vozidlo klasifikováno jako opravárenské? Il veicolo è classificato dome veicolo riparazioni? Le véhicule est-il considéré comme un véhicule de réparation ? - 車両を修理車両と指定しますか? + 車両を修理車両と指定しますか? 이 차량을 정비 차량으로 분류합니까? 此载具是维修载具吗? 此載具是維修載具嗎? @@ -1605,7 +1607,7 @@ Je objekt klasifikován jako opravárenské zařízení? L'oggetto è classificato come struttura riparazioni? L'objet est-il considéré comme une installation de réparation ? - オブジェクトを修理施設として指定しますか? + オブジェクトを修理施設として指定しますか? 이 시설을 정비 시설로 분류합니까? 此设施是维修设施吗? 此設施是維修設施嗎? @@ -1770,7 +1772,7 @@ Položka vyžaduje odstraněná/vyměněná kola Oggetti richiesti per riparare/rimuovere ruote Items exigés pour enlever/remplacer les roues - タイヤの除去と交換にアイテムを必要としますか? + タイヤの除去と交換にアイテムを必要としますか? 바퀴를 제거/교체하는데 필요한 물건 需要特定物品来移除/更换车轮 需要特定物品來移除/更換車輪 @@ -1790,5 +1792,29 @@ 引擎必须先关闭才能开始进行维修 引擎必須先關閉才能開始進行維修 + + Spare Tracks + Ersatzketten + 予備履帯 + Cingoli di Scorta + + + Number of spare tracks in cargo. + Anzahl der Ersatzketten im Laderaum. + カーゴ内にある予備履帯の数を指定します。 + Numero dei cingoli di scorta nel cargo. + + + Spare Wheels + Ersatzreifen + 予備タイヤ + Ruote di Scorta + + + Number of spare wheels in cargo. + Anzahl der Ersatzreifen im Laderaum. + カーゴ内にある予備タイヤの数を指定します。 + Numero delle ruote di scorta nel cargo. + diff --git a/addons/respawn/ACE_Settings.hpp b/addons/respawn/ACE_Settings.hpp index 7f0c4f9d96..d9dd41134e 100644 --- a/addons/respawn/ACE_Settings.hpp +++ b/addons/respawn/ACE_Settings.hpp @@ -1,19 +1,24 @@ class ACE_Settings { class GVAR(savePreDeathGear) { + category = CSTRING(DisplayName); displayName = CSTRING(SavePreDeathGear_DisplayName); description = CSTRING(SavePreDeathGear_Description); value = 0; typeName = "BOOL"; }; class GVAR(removeDeadBodiesDisconnected) { + category = CSTRING(DisplayName); displayName = CSTRING(RemoveDeadBodiesDisconnected_DisplayName); description = CSTRING(RemoveDeadBodiesDisconnected_Description); value = 1; typeName = "BOOL"; }; - class GVAR(bodyRemoveTimer) { - value = 0; - typeName = "SCALAR"; - }; + // Not used anywhere??? + // class GVAR(bodyRemoveTimer) { + // category = CSTRING(DisplayName); + // displayName = CSTRING(DeadBodyRemoveTimer); + // value = 0; + // typeName = "SCALAR"; + // }; }; diff --git a/addons/respawn/CfgVehicles.hpp b/addons/respawn/CfgVehicles.hpp index 4bf84590ae..847b32fe84 100644 --- a/addons/respawn/CfgVehicles.hpp +++ b/addons/respawn/CfgVehicles.hpp @@ -7,8 +7,8 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(Module_DisplayName); function = QFUNC(module); - scope = 2; - isGlobal = 0; + scope = 1; + isGlobal = 1; icon = QPATHTOF(UI\Icon_Module_Respawn_ca.paa); class Arguments { diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml index 703cd7e450..47a9f7b756 100644 --- a/addons/respawn/stringtable.xml +++ b/addons/respawn/stringtable.xml @@ -1,6 +1,13 @@  + + Respawn + Riapparizione + 重生 + 重生 + リスポン + Deploy in 5 seconds... Déploiement dans 5 secondes... @@ -220,7 +227,7 @@ Felszerelés elmentése? Сохранять снаряжение? Salva Equipaggiamento? - 装備を保存? + 装備を保存? 장비를 저장합니까? 储存装备? 儲存裝備? @@ -236,7 +243,7 @@ Az egység halála előtti felszerelésével való respawnolása? Возрождать солдата с тем же снаряжением, которое было на нем при смерти? Respawna con l'equipaggiamento che il soldato aveva appena prima di morire? - ユニットが死ぬ前に持っていた装備でリスポンしますか? + ユニットが死ぬ前に持っていた装備でリスポンしますか? 죽기 전에 가지고 있던 장비로 재배치합니까? 是否在重生时载入死亡前的装备? 是否在重生時載入死亡前的裝備? @@ -252,7 +259,7 @@ Holttestek eltávolítása? Удалять трупы? Rimuovi corpi? - 死体を削除? + 死体を削除? 시체를 제거합니까? 删除尸体? 刪除屍體? @@ -268,11 +275,18 @@ Játékosi testek eltávolítása távozás után? Удалять трупы игроков после дисконнекта? Rimuovi i corpi dei giocatori quando si disconnettono? - 切断後はプレイヤーの死体を削除しますか? + 切断後はプレイヤーの死体を削除しますか? 접속이 끊긴 플레이어의 시체를 제거합니까? 要删除已离线的玩家尸体吗? 要刪除已離線的玩家屍體嗎? + + Body remove timer + Timer rimozione corpo + 屍體移除計時器 + 尸体移除计时器 + 死体削除タイマー + This module enables you to configure ACE functionality specific to respawns. Moduł ten pozwala dostosować ustawienia odrodzenia (respawnu). @@ -283,7 +297,7 @@ Ce module permet de régler les options de Respawn Questo modulo ti permette di configurare le funzionalità ACE specifiche dei respawn. Este módulo permite configurar parámetros relacionados con la reaparición - あなたが設定した ACE 機能をリスポンへ設定できます。 + このモジュールを有効化するとリスポンへ ACE 機能を設定できます。 이 모듈은 ACE 재배치의 자세한 설정을 변결할 수 있게 해줍니다. 该模块使您可以设定ACE的重生功能 該模塊使您可以設定ACE的重生功能 diff --git a/addons/safemode/stringtable.xml b/addons/safemode/stringtable.xml index fa9b951908..2e259bc9d3 100644 --- a/addons/safemode/stringtable.xml +++ b/addons/safemode/stringtable.xml @@ -40,7 +40,7 @@ Zabezpieczono broń Zbraň zajistěna Biztonsági kapcsoló helyretolása - Поставить на предохранитель + Поставлено на предохранитель Sécurité mise Sicura inserita Colocar Segurança @@ -56,7 +56,7 @@ Odbezpieczono broń Zbraň odjištěna Biztonságos mód megszüntetve - Снят с предохранителя + Снято с предохранителя Sécurité enlevée Sicura tolta Tirou Segurança diff --git a/addons/sandbag/functions/fnc_deploy.sqf b/addons/sandbag/functions/fnc_deploy.sqf index af7d5c0a2f..da22483835 100644 --- a/addons/sandbag/functions/fnc_deploy.sqf +++ b/addons/sandbag/functions/fnc_deploy.sqf @@ -19,6 +19,7 @@ params ["_unit"]; // prevent the placing unit from running [_unit, "forceWalk", "ACE_Sandbag", true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Sandbag", true] call EFUNC(common,statusEffect_set); // create the sandbag private _sandBag = createVehicle ["ACE_SandbagObject_NoGeo", [0, 0, 0], [], 0, "NONE"]; diff --git a/addons/sandbag/functions/fnc_deployCancel.sqf b/addons/sandbag/functions/fnc_deployCancel.sqf index 6cb38e4f73..bd5e1a0d86 100644 --- a/addons/sandbag/functions/fnc_deployCancel.sqf +++ b/addons/sandbag/functions/fnc_deployCancel.sqf @@ -22,6 +22,7 @@ if (_key != 1 || {GVAR(deployPFH) == -1}) exitWith {}; // enable running again [_unit, "forceWalk", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set); // delete placement dummy deleteVehicle GVAR(sandBag); diff --git a/addons/sandbag/functions/fnc_deployConfirm.sqf b/addons/sandbag/functions/fnc_deployConfirm.sqf index 68328cca67..29fca46f54 100644 --- a/addons/sandbag/functions/fnc_deployConfirm.sqf +++ b/addons/sandbag/functions/fnc_deployConfirm.sqf @@ -19,6 +19,7 @@ params ["_unit"]; // enable running again [_unit, "forceWalk", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set); // remove sandbag from inventory _unit removeItem "ACE_Sandbag_empty"; diff --git a/addons/sandbag/stringtable.xml b/addons/sandbag/stringtable.xml index 555dcab416..4559e43b00 100644 --- a/addons/sandbag/stringtable.xml +++ b/addons/sandbag/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -25,7 +25,7 @@ Saco de arena (vacio) Sac de sable (vide) Pytel na písek (prázdný) - Sacco di Sabbia (Vuoto) + Sacco di Sabbia (vuoto) Homokzsák (üres) Saco de Areia (vazio) 土のう (空) diff --git a/addons/scopes/ACE_Settings.hpp b/addons/scopes/ACE_Settings.hpp index 4bef108cbf..04e0e92ffb 100644 --- a/addons/scopes/ACE_Settings.hpp +++ b/addons/scopes/ACE_Settings.hpp @@ -1,5 +1,6 @@ class ACE_Settings { class GVAR(enabled) { + category = CSTRING(DisplayName); typeName = "BOOL"; value = 1; displayName = CSTRING(enabled_displayName); @@ -7,6 +8,7 @@ class ACE_Settings { }; // ACE_ScopeAdjust_Vertical and ACE_ScopeAdjust_Horizontal will be populated with default values instead of [0,0] class GVAR(forceUseOfAdjustmentTurrets) { + category = CSTRING(DisplayName); typeName = "BOOL"; value = 0; displayName = CSTRING(forceUseOfAdjustmentTurrets_displayName); @@ -15,6 +17,7 @@ class ACE_Settings { // Auto corrects the zeroing in both vanilla- and advanced ballistics class GVAR(correctZeroing) { + category = CSTRING(DisplayName); typeName = "BOOL"; value = 1; displayName = CSTRING(correctZeroing_displayName); @@ -22,6 +25,7 @@ class ACE_Settings { }; // Enables the use of the 'defaultZeroRange' setting to overwrite the discreteDistance[] config class GVAR(overwriteZeroRange) { + category = CSTRING(DisplayName); typeName = "BOOL"; value = 0; displayName = CSTRING(overwriteZeroRange_displayName); @@ -29,35 +33,61 @@ class ACE_Settings { }; // Only affects scopes with elevation adjustment turrets (ACE_ScopeAdjust_Vertical != [0,0]) class GVAR(defaultZeroRange) { + category = CSTRING(DisplayName); typeName = "SCALAR"; value = 100; displayName = CSTRING(defaultZeroRange_displayName); description = CSTRING(defaultZeroRange_description); + sliderSettings[] = {0, 1000, 100, 0}; }; // Only relevant when advanced ballistics is enabled class GVAR(zeroReferenceTemperature) { + category = CSTRING(DisplayName); typeName = "SCALAR"; value = 15; displayName = CSTRING(zeroReferenceTemperature_displayName); description = CSTRING(zeroReferenceTemperature_description); + sliderSettings[] = {-55, 55, 15, 0}; }; class GVAR(zeroReferenceBarometricPressure) { + category = CSTRING(DisplayName); typeName = "SCALAR"; value = 1013.25; displayName = CSTRING(zeroReferenceBarometricPressure_displayName); description = CSTRING(zeroReferenceBarometricPressure_description); + sliderSettings[] = {0, 1013.25, 1013.25, 2}; }; class GVAR(zeroReferenceHumidity) { + category = CSTRING(DisplayName); typeName = "SCALAR"; value = 0.0; displayName = CSTRING(zeroReferenceHumidity_displayName); description = CSTRING(zeroReferenceHumidity_description); + sliderSettings[] = {0, 1, 0, 2}; }; class GVAR(deduceBarometricPressureFromTerrainAltitude) { + category = CSTRING(DisplayName); typeName = "BOOL"; value = 0; displayName = CSTRING(deduceBarometricPressureFromTerrainAltitude_displayName); description = CSTRING(deduceBarometricPressureFromTerrainAltitude_description); }; + + class GVAR(useLegacyUI) { + category = CSTRING(DisplayName); + typeName = "BOOL"; + value = 0; + isClientSettable = 1; + displayName = CSTRING(useLegacyUI_displayName); + description = CSTRING(useLegacyUI_description); + }; + + class GVAR(simplifiedZeroing) { + category = CSTRING(DisplayName); + typeName = "BOOL"; + value = 0; + displayName = CSTRING(simplifiedZeroing_displayName); + description = CSTRING(simplifiedZeroing_description); + }; }; diff --git a/addons/scopes/CfgVehicles.hpp b/addons/scopes/CfgVehicles.hpp index 8a7e2f6189..b1e76d4401 100644 --- a/addons/scopes/CfgVehicles.hpp +++ b/addons/scopes/CfgVehicles.hpp @@ -13,12 +13,22 @@ class CfgVehicles { //icon = QPATHTOF(UI\...); // TODO exceptions[] = {"notOnMap", "isNotInside", "isNotSwimming", "isNotSitting"}; }; + class GVAR(resetZero) { + // Updates the zero reference + displayName = CSTRING(ResetZero); + condition = QUOTE([ACE_player] call FUNC(canResetZero)); + statement = QUOTE([ACE_player] call FUNC(resetZero)); + showDisabled = 0; + priority = 0.2; + //icon = QPATHTOF(UI\...); // TODO + exceptions[] = {"notOnMap", "isNotInside", "isNotSwimming", "isNotSitting"}; + }; }; }; }; class ACE_Module; class GVAR(ModuleSettings): ACE_Module { - scope = 2; + scope = 1; displayName = CSTRING(DisplayName); //icon = ""; // needs an icon category = "ACE"; @@ -82,6 +92,12 @@ class CfgVehicles { typeName = "BOOL"; defaultValue = 0; }; + class simplifiedZeroing { + displayName = CSTRING(simplifiedZeroing_displayName); + description = CSTRING(simplifiedZeroing_description); + typeName = "BOOL"; + defaultValue = 0; + }; }; class ModuleDescription { description = CSTRING(Description); diff --git a/addons/scopes/CfgWeapons.hpp b/addons/scopes/CfgWeapons.hpp index 555cd94ab6..2a5be51ee0 100644 --- a/addons/scopes/CfgWeapons.hpp +++ b/addons/scopes/CfgWeapons.hpp @@ -220,6 +220,7 @@ class CfgWeapons { class DMR_07_base_F: Rifle_Long_Base_F { ACE_RailHeightAboveBore = 5.07109; + ACE_IronSightBaseAngle = -0.00160721; }; class arifle_MX_Base_F: Rifle_Base_F { @@ -228,115 +229,150 @@ class CfgWeapons { }; class arifle_MX_SW_F: arifle_MX_Base_F { ACE_RailHeightAboveBore = 2.40874; + ACE_IronSightBaseAngle = 0.216372; }; class arifle_MXM_F: arifle_MX_Base_F { ACE_RailHeightAboveBore = 2.40323; + ACE_IronSightBaseAngle = 0.157545; }; class arifle_SPAR_01_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 3.20768; + ACE_IronSightBaseAngle = -0.166678; }; class arifle_SPAR_02_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 3.22175; + ACE_IronSightBaseAngle = -0.184641; }; class arifle_SPAR_03_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 3.71491; + ACE_IronSightBaseAngle = -0.134908; }; class LMG_Mk200_F: Rifle_Long_Base_F { ACE_RailHeightAboveBore = 2.68925; + ACE_IronSightBaseAngle = 0.0182228; }; class LMG_Zafir_F: Rifle_Long_Base_F { ACE_RailHeightAboveBore = 0.996651; + ACE_IronSightBaseAngle = 0.19812212; }; class LMG_03_base_F: Rifle_Long_Base_F { ACE_RailHeightAboveBore = 4.24282; + ACE_IronSightBaseAngle = 0.00181939; }; class pdw2000_base_F: Rifle_Short_Base_F { ACE_RailHeightAboveBore = 3.08883; + ACE_RailBaseAngle = 0.019366; + ACE_IronSightBaseAngle = 0.0399664; }; class arifle_AKS_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 0; + ACE_IronSightBaseAngle = 0.00574991; }; class arifle_AKM_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 0; + ACE_IronSightBaseAngle = 0.006273; }; class arifle_AK12_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 3.82508; + ACE_IronSightBaseAngle = 0.0276926; }; class arifle_CTAR_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 6.07588; + ACE_IronSightBaseAngle = 0.0151815; }; class arifle_CTARS_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 6.0787; + ACE_IronSightBaseAngle = 0.0125245; }; class arifle_ARX_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 2.81635; + ACE_IronSightBaseAngle = 0.113024; }; class arifle_katiba_Base_F: Rifle_Base_F {}; class arifle_Katiba_F: arifle_katiba_Base_F { ACE_RailHeightAboveBore = 5.75468; + ACE_IronSightBaseAngle = 0.0863227; }; class arifle_Katiba_C_F: arifle_katiba_Base_F { ACE_RailHeightAboveBore = 5.75468; + ACE_IronSightBaseAngle = 0.083419; }; class arifle_Katiba_GL_F: arifle_katiba_Base_F { ACE_RailHeightAboveBore = 5.75468; + ACE_IronSightBaseAngle = 0.0863227; }; class arifle_MX_F: arifle_MX_Base_F { ACE_RailHeightAboveBore = 2.80201; + ACE_IronSightBaseAngle = 0.19502; }; class arifle_MX_GL_F: arifle_MX_Base_F { ACE_RailHeightAboveBore = 2.80201; + ACE_IronSightBaseAngle = 0.17142857; }; class arifle_MXC_F: arifle_MX_Base_F { ACE_RailHeightAboveBore = 2.40874; + ACE_IronSightBaseAngle = 0.0154129; }; class SDAR_base_F: Rifle_Base_F {}; class arifle_SDAR_F: SDAR_base_F { ACE_RailHeightAboveBore = 0; + ACE_IronSightBaseAngle = -0.0237516; }; class SMG_01_Base: Rifle_Short_Base_F { ACE_RailHeightAboveBore = 4.85355; + ACE_RailBaseAngle = 0.0250956; + ACE_IronSightBaseAngle = -0.159239; }; class SMG_02_base_F: Rifle_Short_Base_F { ACE_RailHeightAboveBore = 4.41831; + ACE_RailBaseAngle = 0.0217724; + ACE_IronSightBaseAngle = 0.434847; }; class SMG_05_base_F: Rifle_Short_Base_F { ACE_RailHeightAboveBore = 4.05169; + ACE_RailBaseAngle = 0.019366; + ACE_IronSightBaseAngle = -0.122823; }; class Tavor_base_F: Rifle_Base_F {}; class arifle_TRG20_F: Tavor_base_F { ACE_RailHeightAboveBore = 4.30954; + ACE_IronSightBaseAngle = 0.0338428; }; class arifle_TRG21_F: Tavor_base_F { ACE_RailHeightAboveBore = 4.30954; + ACE_IronSightBaseAngle = 0.0317759; }; class arifle_TRG21_GL_F: arifle_TRG21_F { ACE_RailHeightAboveBore = 4.30954; + ACE_IronSightBaseAngle = -0.03428571; }; class mk20_base_F: Rifle_Base_F {}; class arifle_Mk20_F: mk20_base_F { ACE_RailHeightAboveBore = 4.57255; + ACE_IronSightBaseAngle = -0.153292; }; class arifle_Mk20C_F: mk20_base_F { ACE_RailHeightAboveBore = 4.41539; + ACE_IronSightBaseAngle = -0.137835; }; class arifle_Mk20_GL_F: mk20_base_F { ACE_RailHeightAboveBore = 4.41539; + ACE_IronSightBaseAngle = -0.1532926; }; class EBR_base_F: Rifle_Long_Base_F {}; @@ -351,30 +387,39 @@ class CfgWeapons { class srifle_EBR_F: EBR_base_F { ACE_RailHeightAboveBore = 1.98812; + ACE_IronSightBaseAngle = -0.00601782; }; class srifle_LRR_F: LRR_base_F { ACE_RailHeightAboveBore = 3.20864; + ACE_IronSightBaseAngle = -0.0302847; }; class srifle_GM6_F: GM6_base_F { ACE_RailHeightAboveBore = 4.75572; + ACE_IronSightBaseAngle = -0.165062; }; class srifle_DMR_01_F: DMR_01_base_F { ACE_RailHeightAboveBore = 2.83284; + ACE_IronSightBaseAngle = 0.234393; }; class srifle_DMR_02_F: DMR_02_base_F { ACE_RailHeightAboveBore = 3.43913; + ACE_IronSightBaseAngle = 0.013878; }; class srifle_DMR_03_F: DMR_03_base_F { ACE_RailHeightAboveBore = 4.0795; + ACE_IronSightBaseAngle = 0.0138099; }; class srifle_DMR_04_F: DMR_04_base_F { ACE_RailHeightAboveBore = 2.38022; + ACE_RailBaseAngle = 0.0171842; }; class srifle_DMR_05_blk_F: DMR_05_base_F { ACE_RailHeightAboveBore = 3.91334; + ACE_IronSightBaseAngle = 0.0123425; }; class srifle_DMR_06_camo_F: DMR_06_base_F { ACE_RailHeightAboveBore = 3.27488; + ACE_IronSightBaseAngle = 0.018227; }; class MMG_01_base_F; @@ -382,8 +427,10 @@ class CfgWeapons { class MMG_01_hex_F: MMG_01_base_F { ACE_RailHeightAboveBore = 4.73961; + ACE_IronSightBaseAngle = -0.0101613; }; class MMG_02_camo_F: MMG_02_base_F { ACE_RailHeightAboveBore = 5.01913; + ACE_IronSightBaseAngle = 0.0136377; }; }; diff --git a/addons/scopes/RscTitles.hpp b/addons/scopes/RscTitles.hpp index 1a4bcc99c3..a15cbbed67 100644 --- a/addons/scopes/RscTitles.hpp +++ b/addons/scopes/RscTitles.hpp @@ -51,7 +51,7 @@ class RscTitles { class ACE_Scopes_Zeroing_Horizontal : RscText { idc = 13; type = 0; - style = 0; + style = 2; sizeEx = 0.04; lineSpacing = 1; font = "RobotoCondensed"; @@ -62,7 +62,7 @@ class RscTitles { x = (0.5 - 0.4 / 2 + 0.6*0.4) * safezoneW + safezoneX; y = (0 + 0.47*0.3) * safezoneH + safezoneY; - w = 0.04 * safezoneW; + w = 0.019 * safezoneW; h = 0.025 * safezoneH; }; }; diff --git a/addons/scopes/XEH_PREP.hpp b/addons/scopes/XEH_PREP.hpp index a8489fe585..58b4e494f2 100644 --- a/addons/scopes/XEH_PREP.hpp +++ b/addons/scopes/XEH_PREP.hpp @@ -4,10 +4,13 @@ PREP(adjustZero); PREP(applyScopeAdjustment); PREP(calculateZeroAngleCorrection); PREP(canAdjustZero); +PREP(canResetZero); PREP(firedEH); +PREP(getBaseAngle); PREP(getBoreHeight); PREP(getCurrentZeroRange); PREP(getOptics); PREP(initModuleSettings); PREP(inventoryCheck); +PREP(resetZero); PREP(showZeroing); diff --git a/addons/scopes/XEH_postInit.sqf b/addons/scopes/XEH_postInit.sqf index 83fad08077..075ea48a76 100644 --- a/addons/scopes/XEH_postInit.sqf +++ b/addons/scopes/XEH_postInit.sqf @@ -13,7 +13,6 @@ GVAR(Optics) = ["", "", ""]; GVAR(Guns) = ["", "", ""]; GVAR(canAdjustElevation) = [false, false, false]; GVAR(canAdjustWindage) = [false, false, false]; -GVAR(boreHeight) = [0, 0, 0]; GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]]; ["ace_settingsInitialized", { diff --git a/addons/scopes/functions/fnc_adjustScope.sqf b/addons/scopes/functions/fnc_adjustScope.sqf index 75ba045bcc..f670fc1720 100644 --- a/addons/scopes/functions/fnc_adjustScope.sqf +++ b/addons/scopes/functions/fnc_adjustScope.sqf @@ -26,11 +26,10 @@ if (!GVAR(enabled)) exitWith {false}; private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); if (_weaponIndex < 0) exitWith {false}; -private _adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; - if (!(GVAR(canAdjustElevation) select _weaponIndex) && (_turretAndDirection in [ELEVATION_UP, ELEVATION_DOWN])) exitWith {false}; if (!(GVAR(canAdjustWindage) select _weaponIndex) && (_turretAndDirection in [WINDAGE_UP, WINDAGE_DOWN])) exitWith {false}; +private _adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; private _zeroing = _adjustment select _weaponIndex; _zeroing params ["_elevation", "_windage", "_zero"]; @@ -52,8 +51,8 @@ if (_majorStep) then { }; }; -_elevation = round(_elevation * 10) / 10; -_windage = round(_windage * 10) / 10; +_elevation = round(_elevation / MIN_INCREMENT) * MIN_INCREMENT; +_windage = round(_windage / MIN_INCREMENT) * MIN_INCREMENT; if ((_elevation + _zero) < _maxVertical select 0 or (_elevation + _zero) > _maxVertical select 1) exitWith {false}; if (_windage < _maxHorizontal select 0 or _windage > _maxHorizontal select 1) exitWith {false}; diff --git a/addons/scopes/functions/fnc_adjustZero.sqf b/addons/scopes/functions/fnc_adjustZero.sqf index bc04c45236..b551d6b2c7 100644 --- a/addons/scopes/functions/fnc_adjustZero.sqf +++ b/addons/scopes/functions/fnc_adjustZero.sqf @@ -1,6 +1,6 @@ /* * Author: KoffeinFlummi, Ruthberg - * Updates the zero reference for the current scope + * Updates the zero adjustment of the current scope * * Arguments: * 0: Unit @@ -19,16 +19,24 @@ params ["_unit"]; if (vehicle _unit != _unit) exitWith {false}; -private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); +private _weaponClass = currentWeapon _unit; +private _weaponIndex = [_unit, _weaponClass] call EFUNC(common,getWeaponIndex); if (_weaponIndex < 0) exitWith {false}; private _adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; private _zeroing = _adjustment select _weaponIndex; _zeroing params ["_elevation", "_windage", "_zero"]; -_zero = round((_zero + _elevation) * 10) / 10; +_zero = round((_zero + _elevation) / MIN_INCREMENT) * MIN_INCREMENT; _elevation = 0; +private _opticsClass = ([_unit] call FUNC(getOptics)) select _weaponIndex; +if (_zero != 0) then { + profileNamespace setVariable [format[QGVAR(PersistentZero_%1_%2), _weaponClass, _opticsClass], _zero]; +} else { + profileNamespace setVariable [format[QGVAR(PersistentZero_%1_%2), _weaponClass, _opticsClass], nil]; +}; + [_unit, _elevation, _windage, _zero] call FUNC(applyScopeAdjustment); true diff --git a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf index 37f83384a6..f4d6959754 100644 --- a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf +++ b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf @@ -33,14 +33,16 @@ playSound selectRandom ["ACE_Scopes_Click_1", "ACE_Scopes_Click_2", "ACE_Scopes_ // slightly rotate the player if looking through optic if (cameraView == "GUNNER") then { - // Convert adjustmentDifference from mils to degrees - _adjustmentDifference = _adjustmentDifference apply {MRAD_TO_DEG(_x)}; - _adjustmentDifference params ["_elevationDifference", "_windageDifference"]; - private _pitchBankYaw = [_unit] call EFUNC(common,getPitchBankYaw); - _pitchBankYaw params ["_pitch", "_bank", "_yaw"]; - _pitch = _pitch + _elevationDifference; - _yaw = _yaw + _windageDifference; - [_unit, _pitch, _bank, _yaw] call EFUNC(common,setPitchBankYaw); + if (!GVAR(simplifiedZeroing)) then { + // Convert adjustmentDifference from mils to degrees + _adjustmentDifference = _adjustmentDifference apply {MRAD_TO_DEG(_x)}; + _adjustmentDifference params ["_elevationDifference", "_windageDifference"]; + private _pitchBankYaw = [_unit] call EFUNC(common,getPitchBankYaw); + _pitchBankYaw params ["_pitch", "_bank", "_yaw"]; + _pitch = _pitch + _elevationDifference; + _yaw = _yaw + _windageDifference; + [_unit, _pitch, _bank, _yaw] call EFUNC(common,setPitchBankYaw); + }; } else { [] call FUNC(showZeroing); }; diff --git a/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf b/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf index 5197a94e70..4573a1c97a 100644 --- a/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf +++ b/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf @@ -32,11 +32,15 @@ if (_initSpeedCoef < 0) then { _initSpeed = _initSpeed * (-1 * _initSpeedCoef); }; -private _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngleVanilla:%1:%2:%3:%4", _oldZeroRange, _initSpeed, _airFriction, 0]; +private _zeroAngle = "ace_advanced_ballistics" callExtension format ["replicateVanillaZero:%1:%2:%3", _oldZeroRange, _initSpeed, _airFriction]; private _vanillaZero = parseNumber _zeroAngle; +#ifdef DISABLE_DISPERSION + _vanillaZero = 0; +#endif + private _trueZero = if (!_advancedBallistics) then { - _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngleVanilla:%1:%2:%3:%4", _newZeroRange, _initSpeed, _airFriction, _boreHeight]; + _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZero:%1:%2:%3:%4", _newZeroRange, _initSpeed, _airFriction, _boreHeight]; (parseNumber _zeroAngle) } else { // Get Weapon and Ammo Configurations @@ -49,7 +53,7 @@ private _trueZero = if (!_advancedBallistics) then { _WeaponCacheEntry = _weapon call EFUNC(advanced_ballistics,readWeaponDataFromConfig); }; - _AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable"]; + _AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocityVariationSD"]; _WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"]; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,barrelLengthInfluenceEnabled), false]) then { @@ -57,7 +61,12 @@ private _trueZero = if (!_advancedBallistics) then { _initSpeed = _initSpeed + _barrelVelocityShift; }; - _zeroAngle = "ace_advanced_ballistics" callExtension format ["zeroAngle:%1:%2:%3:%4:%5:%6:%7:%8:%9", _newZeroRange, _initSpeed, _boreHeight, GVAR(zeroReferenceTemperature), GVAR(zeroReferenceBarometricPressure), GVAR(zeroReferenceHumidity), _ballisticCoefficients select 0, _dragModel, _atmosphereModel]; + if (missionNamespace getVariable [QEGVAR(advanced_ballistics,ammoTemperatureEnabled), false]) then { + private _ammoTemperatureVelocityShift = ([_ammoTempMuzzleVelocityShifts, GVAR(zeroReferenceTemperature)] call EFUNC(advanced_ballistics,calculateAmmoTemperatureVelocityShift)); + _initSpeed = _initSpeed + _ammoTemperatureVelocityShift; + }; + + _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZeroAB:%1:%2:%3:%4:%5:%6:%7:%8:%9", _newZeroRange, _initSpeed, _boreHeight, GVAR(zeroReferenceTemperature), GVAR(zeroReferenceBarometricPressure), GVAR(zeroReferenceHumidity), _ballisticCoefficients select 0, _dragModel, _atmosphereModel]; (parseNumber _zeroAngle) }; diff --git a/addons/scopes/functions/fnc_canAdjustZero.sqf b/addons/scopes/functions/fnc_canAdjustZero.sqf index 037fedd1b5..996e6ae7fc 100644 --- a/addons/scopes/functions/fnc_canAdjustZero.sqf +++ b/addons/scopes/functions/fnc_canAdjustZero.sqf @@ -1,6 +1,6 @@ /* * Author: KoffeinFlummi, Ruthberg - * Changes the adjustment for the current scope + * Checks if the unit can change the zero adjustment of the current scope * * Arguments: * 0: Unit @@ -19,6 +19,7 @@ params ["_unit"]; if (cameraView == "GUNNER") exitWith {false}; if (vehicle _unit != _unit) exitWith {false}; +if (GVAR(simplifiedZeroing)) exitWith {false}; if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {false}; private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); diff --git a/addons/scopes/functions/fnc_canResetZero.sqf b/addons/scopes/functions/fnc_canResetZero.sqf new file mode 100644 index 0000000000..fe9def4a19 --- /dev/null +++ b/addons/scopes/functions/fnc_canResetZero.sqf @@ -0,0 +1,31 @@ +/* + * Author: KoffeinFlummi, Ruthberg + * Checks if the unit can reset the zero adjustment of the current scope + * + * Arguments: + * 0: Unit + * + * Return Value: + * Can we reset the zero reference? + * + * Example: + * [player] call ace_scopes_fnc_canResetZero + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit"]; + +if (cameraView == "GUNNER") exitWith {false}; +if (vehicle _unit != _unit) exitWith {false}; +if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {false}; + +private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); +if (_weaponIndex < 0) exitWith {false}; + +private _adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; +private _zero = (_adjustment select _weaponIndex) select 2; + +// You can only reset your zero reference, if it is not 0 already +_zero != 0 diff --git a/addons/scopes/functions/fnc_firedEH.sqf b/addons/scopes/functions/fnc_firedEH.sqf index 670db51fe0..6d63f9107a 100644 --- a/addons/scopes/functions/fnc_firedEH.sqf +++ b/addons/scopes/functions/fnc_firedEH.sqf @@ -23,23 +23,31 @@ if (!(_ammo isKindOf "BulletBase")) exitWith {}; private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); if (_weaponIndex < 0) exitWith {}; -private _adjustment = ACE_player getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; +private _adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; private _zeroing = +(_adjustment select _weaponIndex); TRACE_1("Adjusting With",_zeroing); // Convert zeroing from mils to degrees _zeroing = _zeroing vectorMultiply MRAD_TO_DEG(1); -if (GVAR(correctZeroing)) then { +if (GVAR(correctZeroing) || GVAR(simplifiedZeroing)) then { private _advancedBallistics = missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]; - private _boreHeight = GVAR(boreHeight) select _weaponIndex; + private _baseAngle = (_unit getVariable [QGVAR(baseAngle), [0,0,0]]) select _weaponIndex; + private _boreHeight = (_unit getVariable [QGVAR(boreHeight), [0,0,0]]) select _weaponIndex; private _oldZeroRange = currentZeroing _unit; private _newZeroRange = [_unit] call FUNC(getCurrentZeroRange); private _zeroCorrection = missionNamespace getVariable format[QGVAR(%1_%2_%3_%4_%5_%6_%7), _oldZeroRange, _newZeroRange, _boreHeight, _weapon, _ammo, _magazine, _advancedBallistics]; if (isNil "_zeroCorrection") then { _zeroCorrection = [_oldZeroRange, _newZeroRange, _boreHeight, _weapon, _ammo, _magazine, _advancedBallistics] call FUNC(calculateZeroAngleCorrection); }; - _zeroing = _zeroing vectorAdd [0, 0, _zeroCorrection]; + if (GVAR(simplifiedZeroing)) then { + _zeroing = [0, 0, _zeroCorrection - _baseAngle]; + } else { + _zeroing = _zeroing vectorAdd [0, 0, _zeroCorrection - _baseAngle]; + }; +#ifdef DISABLE_DISPERSION + _projectile setVelocity (_unit weaponDirection currentWeapon _unit) vectorMultiply (vectorMagnitude (velocity _projectile)); +#endif }; if (_zeroing isEqualTo [0, 0, 0]) exitWith {}; diff --git a/addons/scopes/functions/fnc_getBaseAngle.sqf b/addons/scopes/functions/fnc_getBaseAngle.sqf new file mode 100644 index 0000000000..d529fef2f4 --- /dev/null +++ b/addons/scopes/functions/fnc_getBaseAngle.sqf @@ -0,0 +1,37 @@ +/* + * Author: Ruthberg + * Gets the base angle of the weapon & optic combination with the given weapon index + * + * Arguments: + * 0: Unit + * 1: Weapon index + * + * Return Value: + * base angle + * + * Example: + * [player, 0] call ace_scopes_fnc_getBaseAngle + * + * Public: Yes + */ +#include "script_component.hpp" + +params ["_unit", "_weaponIndex"]; + +if (_weaponIndex < 0 || {_weaponIndex > 2}) exitWith { 0 }; + +private _weaponClass = [primaryWeapon _unit, secondaryWeapon _unit, handgunWeapon _unit] select _weaponIndex; +private _opticsClass = ([_unit] call FUNC(getOptics)) select _weaponIndex; + +private _weaponConfig = configFile >> "CfgWeapons" >> _weaponClass; +private _baseAngle = getNumber(_weaponConfig >> "ACE_IronSightBaseAngle"); + +if (_opticsClass != "") then { + if (isNumber (_weaponConfig >> "ACE_RailBaseAngle")) then { + _baseAngle = getNumber(_weaponConfig >> "ACE_RailBaseAngle"); + } else { + _baseAngle = DEFAULT_RAIL_BASE_ANGLE; + }; +}; + +_baseAngle diff --git a/addons/scopes/functions/fnc_getBoreHeight.sqf b/addons/scopes/functions/fnc_getBoreHeight.sqf index 98fb75f78a..b76a9c7f9e 100644 --- a/addons/scopes/functions/fnc_getBoreHeight.sqf +++ b/addons/scopes/functions/fnc_getBoreHeight.sqf @@ -10,18 +10,18 @@ * bore height * * Example: - * [player] call ace_scopes_fnc_getBoreHeight + * [player, 0] call ace_scopes_fnc_getBoreHeight * * Public: Yes */ #include "script_component.hpp" -params ["_player", "_weaponIndex"]; +params ["_unit", "_weaponIndex"]; -if (_weaponIndex < 0 || {_weaponIndex > 2}) exitWith { 0 }; +if (_weaponIndex < 0 || {_weaponIndex > 2}) exitWith { 0 }; -private _weaponClass = [primaryWeapon _player, secondaryWeapon _player, handgunWeapon _player] select _weaponIndex; -private _opticsClass = ([_player] call FUNC(getOptics)) select _weaponIndex; +private _weaponClass = [primaryWeapon _unit, secondaryWeapon _unit, handgunWeapon _unit] select _weaponIndex; +private _opticsClass = ([_unit] call FUNC(getOptics)) select _weaponIndex; if (_opticsClass == "") then { _opticsClass = _weaponClass; }; @@ -47,8 +47,8 @@ if (isNumber (_opticConfig >> "ACE_ScopeHeightAboveRail")) then { case 2: { _scopeHeightAboveRail = 4.0; }; // High power scope default { switch (_weaponIndex) do { - case 0: { _scopeHeightAboveRail = 0.5; }; // Rifle iron sights - case 2: { _scopeHeightAboveRail = 0.3; }; // Pistol iron sights + case 0: { _scopeHeightAboveRail = 2.0; }; // Rifle iron sights + case 2: { _scopeHeightAboveRail = 1.0; }; // Pistol iron sights }; }; }; diff --git a/addons/scopes/functions/fnc_getCurrentZeroRange.sqf b/addons/scopes/functions/fnc_getCurrentZeroRange.sqf index 7af8d2e3e9..2da5f32eb0 100644 --- a/addons/scopes/functions/fnc_getCurrentZeroRange.sqf +++ b/addons/scopes/functions/fnc_getCurrentZeroRange.sqf @@ -21,6 +21,10 @@ if (!GVAR(enabled)) exitWith { currentZeroing _unit }; private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); if (_weaponIndex < 0) exitWith { currentZeroing _unit }; +if (GVAR(simplifiedZeroing)) exitWith { + private _adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; + ((_adjustment select _weaponIndex) select 0) +}; private _optic = GVAR(Optics) select _weaponIndex; private _opticConfig = if (_optic != "") then { diff --git a/addons/scopes/functions/fnc_initModuleSettings.sqf b/addons/scopes/functions/fnc_initModuleSettings.sqf index 92742afd14..db5d5cd8a5 100644 --- a/addons/scopes/functions/fnc_initModuleSettings.sqf +++ b/addons/scopes/functions/fnc_initModuleSettings.sqf @@ -30,8 +30,7 @@ if !(_activated) exitWith {}; [_logic, QGVAR(zeroReferenceBarometricPressure), "zeroReferenceBarometricPressure"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(zeroReferenceHumidity), "zeroReferenceHumidity"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(deduceBarometricPressureFromTerrainAltitude), "deduceBarometricPressureFromTerrainAltitude"] call EFUNC(common,readSettingFromModule); - GVAR(defaultZeroRange) = 0 max GVAR(defaultZeroRange) min 1000; -GVAR(zeroReferenceTemperature) = -55 max GVAR(zeroReferenceTemperature) max 55; +GVAR(zeroReferenceTemperature) = -55 max GVAR(zeroReferenceTemperature) min 55; GVAR(zeroReferenceBarometricPressure) = 0 max GVAR(zeroReferenceBarometricPressure) min 1013.25; GVAR(zeroReferenceHumidity) = 0 max GVAR(zeroReferenceHumidity) min 1.0; diff --git a/addons/scopes/functions/fnc_inventoryCheck.sqf b/addons/scopes/functions/fnc_inventoryCheck.sqf index 817d301221..fa0fa426c6 100644 --- a/addons/scopes/functions/fnc_inventoryCheck.sqf +++ b/addons/scopes/functions/fnc_inventoryCheck.sqf @@ -25,32 +25,50 @@ private _newOptics = [_player] call FUNC(getOptics); if (_newOptics select _forEachIndex != _x) then { private _opticConfig = configFile >> "CfgWeapons" >> (_newOptics select _forEachIndex); private _opticType = getNumber(_opticConfig >> "ItemInfo" >> "opticType"); - private _verticalIncrement = -1; - if (isNumber (_opticConfig >> "ACE_ScopeAdjust_VerticalIncrement")) then { - _verticalIncrement = getNumber (_opticConfig >> "ACE_ScopeAdjust_VerticalIncrement"); - }; - private _horizontalIncrement = -1; - if (isNumber (_opticConfig >> "ACE_ScopeAdjust_HorizontalIncrement")) then { - _horizontalIncrement = getNumber (_opticConfig >> "ACE_ScopeAdjust_HorizontalIncrement"); - }; private _maxVertical = []; - if (isArray (_opticConfig >> "ACE_ScopeAdjust_Vertical")) then { - _maxVertical = getArray (_opticConfig >> "ACE_ScopeAdjust_Vertical"); - }; + private _verticalIncrement = -1; private _maxHorizontal = []; - if (isArray (_opticConfig >> "ACE_ScopeAdjust_Horizontal")) then { - _maxHorizontal = getArray (_opticConfig >> "ACE_ScopeAdjust_Horizontal"); - }; - if (GVAR(forceUseOfAdjustmentTurrets) && _opticType == 2) then { - if (_maxVertical isEqualTo []) then { _maxVertical = [-4, 30]; }; - if (_maxHorizontal isEqualTo []) then { _maxHorizontal = [-6, 6]; }; - if (_verticalIncrement == -1) then { _verticalIncrement = 0.1; }; - if (_horizontalIncrement == -1) then { _horizontalIncrement = 0.1; }; + private _horizontalIncrement = -1; + if (GVAR(simplifiedZeroing)) then { + private _maxDistanceZoomMax = 300; + private _maxDiscreteDistanceSize = 0; + { + _maxDistanceZoomMax = _maxDistanceZoomMax max (getNumber ( _x >> "distanceZoomMax")); + _maxDiscreteDistanceSize = _maxDiscreteDistanceSize max (count getArray (_x >> "discreteDistance")); + } forEach ("isArray (_x >> 'discreteDistance')" configClasses (_opticConfig >> "ItemInfo" >> "OpticsModes")); + if (_maxDiscreteDistanceSize < 2 && {getNumber (_opticConfig >> "ACE_ScopeAdjust_VerticalIncrement") != 0}) then { + _maxVertical = [50, _maxDistanceZoomMax]; + _verticalIncrement = 50; + } else { + _maxVertical = [0, 0]; + _verticalIncrement = 0; + }; + _maxHorizontal = [0, 0]; + _horizontalIncrement = 0; } else { - if (_maxVertical isEqualTo []) then { _maxVertical = [0, 0]; }; - if (_maxHorizontal isEqualTo []) then { _maxHorizontal = [0, 0]; }; - if (_verticalIncrement == -1) then { _verticalIncrement = 0; }; - if (_horizontalIncrement == -1) then { _horizontalIncrement = 0; }; + if (isNumber (_opticConfig >> "ACE_ScopeAdjust_VerticalIncrement")) then { + _verticalIncrement = getNumber (_opticConfig >> "ACE_ScopeAdjust_VerticalIncrement"); + }; + if (isNumber (_opticConfig >> "ACE_ScopeAdjust_HorizontalIncrement")) then { + _horizontalIncrement = getNumber (_opticConfig >> "ACE_ScopeAdjust_HorizontalIncrement"); + }; + if (isArray (_opticConfig >> "ACE_ScopeAdjust_Vertical")) then { + _maxVertical = getArray (_opticConfig >> "ACE_ScopeAdjust_Vertical"); + }; + if (isArray (_opticConfig >> "ACE_ScopeAdjust_Horizontal")) then { + _maxHorizontal = getArray (_opticConfig >> "ACE_ScopeAdjust_Horizontal"); + }; + if (GVAR(forceUseOfAdjustmentTurrets) && _opticType == 2) then { + if (_maxVertical isEqualTo []) then { _maxVertical = [-4, 30]; }; + if (_maxHorizontal isEqualTo []) then { _maxHorizontal = [-6, 6]; }; + if (_verticalIncrement == -1) then { _verticalIncrement = 0.1; }; + if (_horizontalIncrement == -1) then { _horizontalIncrement = 0.1; }; + } else { + if (_maxVertical isEqualTo []) then { _maxVertical = [0, 0]; }; + if (_maxHorizontal isEqualTo []) then { _maxHorizontal = [0, 0]; }; + if (_verticalIncrement == -1) then { _verticalIncrement = 0; }; + if (_horizontalIncrement == -1) then { _horizontalIncrement = 0; }; + }; }; (GVAR(scopeAdjust) select _forEachIndex) set [0, _maxVertical]; (GVAR(scopeAdjust) select _forEachIndex) set [1, _verticalIncrement]; @@ -61,34 +79,32 @@ private _newOptics = [_player] call FUNC(getOptics); }; } forEach GVAR(Optics); +private _unitBaseAngle = +(_player getVariable [QGVAR(baseAngle), [0,0,0]]); +private _unitBoreHeight = +(_player getVariable [QGVAR(boreHeight), [0,0,0]]); + private _newGuns = [primaryWeapon _player, secondaryWeapon _player, handgunWeapon _player]; { if ((_newOptics select _x) != (GVAR(Optics) select _x) || (_newGuns select _x != GVAR(Guns) select _x)) then { - // The optic or the weapon changed, set adjustment to zero - if (!((_adjustment select _forEachIndex) isEqualTo [0, 0, 0])) then { - _adjustment set [_forEachIndex, [0, 0, 0]]; - _updateAdjustment = true; - }; - - GVAR(boreHeight) set [_x, [_player, _x] call FUNC(getBoreHeight)]; - + _unitBaseAngle set [_x, [_player, _x] call FUNC(getBaseAngle)]; + _unitBoreHeight set [_x, [_player, _x] call FUNC(getBoreHeight)]; if ((_newOptics select _x) == "") then { - // Check if the weapon comes with an integrated optic - private _weaponConfig = configFile >> "CfgWeapons" >> (_newGuns select _x); - private _verticalIncrement = 0; - if (isNumber (_weaponConfig >> "ACE_ScopeAdjust_VerticalIncrement")) then { - _verticalIncrement = getNumber (_weaponConfig >> "ACE_ScopeAdjust_VerticalIncrement"); - }; - private _horizontalIncrement = 0; - if (isNumber (_weaponConfig >> "ACE_ScopeAdjust_HorizontalIncrement")) then { - _horizontalIncrement = getNumber (_weaponConfig >> "ACE_ScopeAdjust_HorizontalIncrement"); - }; + // Check if the weapon comes with an integrated optic + private _weaponConfig = configFile >> "CfgWeapons" >> (_newGuns select _x); private _maxVertical = [0, 0]; - if (isArray (_weaponConfig >> "ACE_ScopeAdjust_Vertical")) then { - _maxVertical = getArray (_weaponConfig >> "ACE_ScopeAdjust_Vertical"); - }; + private _verticalIncrement = 0; private _maxHorizontal = [0, 0]; - if (isArray (_weaponConfig >> "ACE_ScopeAdjust_Horizontal")) then { + private _horizontalIncrement = 0; + if (GVAR(simplifiedZeroing)) then { + private _maxZeroing = 300 max (getNumber (_weaponConfig >> "maxZeroing")); + private _maxDiscreteDistanceSize = count getArray (configFile >> "CfgWeapons" >> (_newGuns select _x) >> "discreteDistance"); + if (_maxDiscreteDistanceSize < 2 && {getNumber (_weaponConfig >> "ACE_ScopeAdjust_VerticalIncrement") != 0}) then { + _maxVertical = [50, _maxZeroing]; + _verticalIncrement = 50; + }; + } else { + _verticalIncrement = getNumber (_weaponConfig >> "ACE_ScopeAdjust_VerticalIncrement"); + _horizontalIncrement = getNumber (_weaponConfig >> "ACE_ScopeAdjust_HorizontalIncrement"); + _maxVertical = getArray (_weaponConfig >> "ACE_ScopeAdjust_Vertical"); _maxHorizontal = getArray (_weaponConfig >> "ACE_ScopeAdjust_Horizontal"); }; TRACE_5("",_newGuns select _x,_verticalIncrement,_horizontalIncrement,_maxVertical,_maxHorizontal); @@ -99,9 +115,32 @@ private _newGuns = [primaryWeapon _player, secondaryWeapon _player, handgunWeapo GVAR(canAdjustElevation) set [_x, (_verticalIncrement > 0) && !(_maxVertical isEqualTo [0, 0])]; GVAR(canAdjustWindage) set [_x, (_horizontalIncrement > 0) && !(_maxHorizontal isEqualTo [0, 0])]; }; + + // The optic or the weapon changed, reset the adjustment + private _persistentZero = profileNamespace getVariable [format[QGVAR(PersistentZero_%1_%2), _newGuns select _x, _newOptics select _x], 0]; + ((GVAR(scopeAdjust) select _x) select 0) params ["_minElevation", "_maxElevation"]; + if (!(_persistentZero isEqualType 0) || {_persistentZero < _minElevation || _persistentZero > _maxElevation}) then { + _persistentZero = 0; + }; + private _defaultElevation = [0, 300] select GVAR(simplifiedZeroing); + if (!((_adjustment select _forEachIndex) isEqualTo [_defaultElevation, 0, _persistentZero])) then { + _adjustment set [_forEachIndex, [_defaultElevation, 0, _persistentZero]]; + _updateAdjustment = true; + }; } } forEach [0, 1, 2]; +if (GVAR(correctZeroing) || GVAR(simplifiedZeroing)) then { + if (!(_unitBaseAngle isEqualTo (_player getVariable [QGVAR(baseAngle), [0,0,0]]))) then { + TRACE_2("syncing",_unitBaseAngle,_player getVariable QGVAR(baseAngle)); + _player setVariable [QGVAR(baseAngle), _unitBaseAngle, true]; + }; + if (!(_unitBoreHeight isEqualTo (_player getVariable [QGVAR(boreHeight), [0,0,0]]))) then { + TRACE_2("syncing",_unitBoreHeight,_player getVariable QGVAR(boreHeight)); + _player setVariable [QGVAR(boreHeight), _unitBoreHeight, true]; + }; +}; + if (_updateAdjustment) then { [ACE_player, QGVAR(Adjustment), _adjustment, 0.5] call EFUNC(common,setVariablePublic); }; diff --git a/addons/scopes/functions/fnc_resetZero.sqf b/addons/scopes/functions/fnc_resetZero.sqf new file mode 100644 index 0000000000..8d083cf2ee --- /dev/null +++ b/addons/scopes/functions/fnc_resetZero.sqf @@ -0,0 +1,38 @@ +/* + * Author: KoffeinFlummi, Ruthberg + * Resets the zero adjustment of the current scope + * + * Arguments: + * 0: Unit + * + * Return Value: + * true + * + * Example: + * [player] call ace_scopes_fnc_resetZero + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit"]; + +if (vehicle _unit != _unit) exitWith {false}; + +private _weaponClass = currentWeapon _unit; +private _weaponIndex = [_unit, _weaponClass] call EFUNC(common,getWeaponIndex); +if (_weaponIndex < 0) exitWith {false}; + +private _adjustment = _unit getVariable [QGVAR(Adjustment), [[0, 0, 0], [0, 0, 0], [0, 0, 0]]]; +private _zeroing = _adjustment select _weaponIndex; +_zeroing params ["_elevation", "_windage", "_zero"]; + +_elevation = round((_zero + _elevation) / MIN_INCREMENT) * MIN_INCREMENT; +_zero = 0; + +private _opticsClass = ([_unit] call FUNC(getOptics)) select _weaponIndex; +profileNamespace setVariable [format[QGVAR(PersistentZero_%1_%2), _weaponClass, _opticsClass], nil]; + +[_unit, _elevation, _windage, _zero] call FUNC(applyScopeAdjustment); + +true diff --git a/addons/scopes/functions/fnc_showZeroing.sqf b/addons/scopes/functions/fnc_showZeroing.sqf index cf74e38842..533d68f7e1 100644 --- a/addons/scopes/functions/fnc_showZeroing.sqf +++ b/addons/scopes/functions/fnc_showZeroing.sqf @@ -35,8 +35,34 @@ private _zeroing = _adjustment select _weaponIndex; _zeroing params ["_elevation", "_windage"]; private _vertical = _display displayCtrl 12; private _horizontal = _display displayCtrl 13; -_vertical ctrlSetText (str _elevation); -_horizontal ctrlSetText (str _windage); +if (GVAR(simplifiedZeroing)) then { + _vertical ctrlSetText format["%1 m", round(_elevation)]; + _horizontal ctrlSetText ""; +} else { + if (GVAR(useLegacyUI)) then { + _vertical ctrlSetText (str _elevation); + _horizontal ctrlSetText (str _windage); + } else { + if (_elevation == 0) then { + _vertical ctrlSetText "0"; + } else { + if (_elevation > 0) then { + _vertical ctrlSetText (str _elevation); + } else { + _vertical ctrlSetText format[localize LSTRING(DisplayAdjustmentDown), abs(_elevation)]; + }; + }; + if (_windage == 0) then { + _horizontal ctrlSetText "0"; + } else { + if (_windage > 0) then { + _horizontal ctrlSetText format[localize LSTRING(DisplayAdjustmentRight), abs(_windage)]; + } else { + _horizontal ctrlSetText format[localize LSTRING(DisplayAdjustmentLeft), abs(_windage)]; + }; + }; + }; +}; // Set the time when to hide the knobs GVAR(timeToHide) = diag_tickTime + 3.0; diff --git a/addons/scopes/script_component.hpp b/addons/scopes/script_component.hpp index cc6acebc98..9e867a9bd2 100644 --- a/addons/scopes/script_component.hpp +++ b/addons/scopes/script_component.hpp @@ -14,6 +14,12 @@ #define MINOR_INCREMENT false #define MAJOR_INCREMENT true +#define MIN_INCREMENT 0.05 // mrad + +#define DEFAULT_RAIL_BASE_ANGLE 0.0086 // deg + +// #define DISABLE_DISPERSION + #ifdef DEBUG_ENABLED_SCOPES #define DEBUG_MODE_FULL #endif @@ -22,6 +28,4 @@ #define DEBUG_SETTINGS DEBUG_SETTINGS_SCOPES #endif -#define MRAD_TO_DEG(d) (d / 17.45329252) // Conversion factor: 9 / (50 * PI) - #include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/scopes/stringtable.xml b/addons/scopes/stringtable.xml index 939e23feb6..855b364ee5 100644 --- a/addons/scopes/stringtable.xml +++ b/addons/scopes/stringtable.xml @@ -158,7 +158,7 @@ Barometric pressure at which the scope was zeroed Luftdruck bei dem das Zielfernrohr genullt wurde - 気圧の参照 + スコープがゼロインされる気圧 조준경 영점조준시 기압 Ciśnienie barometryczne, przy którym celownik został wyzerowany Pression barométrique de référence pour le zérotage des optiques @@ -210,6 +210,34 @@ 在不同高度上会有不同的大气压力 在不同高度上會有不同的大氣壓力 + + Use legacy UI + Vorheriges UI verwenden + Usa UI precedente + 使用舊版介面 + 使用旧版介面 + 昔の UI を使用 + + + Displays elevation and windage with signed numbers + Anzeige der Absehenverstellungen mit vorzeichenbehafteten Zahlen + Visualizza l'elevazione e la derivazione con i numeri firmati + 使用帶著標籤的數字顯示歸零遠近與風偏程度 + 使用带着标签的数字显示归零远近与风偏程度 + 印付きの数字で仰角と横風を表示 + + + Simplified zeroing + Vereinfachte Nullung + 簡略なゼロイン + Azzeramento semplificato + + + Replicates the vanilla zeroing system for riflescopes. + Repliziert das Vanilla-Zeroing-System für Zielfernrohre. + 標準で使われるライフルスコープ用のゼロイン システムを複製します。 + Replica il sistema di azzeramento vanilla per le ottiche. + Minor adjustment up Kleine Korrektur hoch @@ -344,7 +372,7 @@ Zresetuj wyzerowanie Сбросить корректировку Establecer ajuste a cero - Resetta i valori del tiro + Imposta i valori dell'azzeramento RAZ corrections Állítások nullázása Zerar ajuste @@ -354,10 +382,16 @@ 设定归零 設定歸零 + + Reset zero adjustment + Nullung zurücksetzen + ゼロイン調節を初期化 + Resetta i valori dell'azzeramento + This module adds windage and elevation adjustment turrets on high power rifle scopes. Dieses Modul fügt Absehenverstellung (horizontal und vertikal) zu Zielfernrohren hinzu. - モジュールは高倍率ライフル スコープにおいて横風と仰角の調節ができます。 + このモジュールは高倍率ライフル スコープにおいて横風と仰角の調節ができます。 이 모듈은 고성능 조준경에 조준 나사를 이용한 편차 및 고도 조절 기능을 더해줍니다. Ten moduł włącza pokrętła kalibracyjne poprawki na wiatr oraz poprawki wysokości dla celowników o dużym powiększeniu. Ce module ajoute les tambours de correction de la hausse et de dérive sur les optiques de visée à fort grossissement. @@ -365,5 +399,32 @@ 此模块可为高倍率瞄准镜新增归零风偏,距离用的调整纽。 此模塊可為高倍率瞄準鏡新增歸零風偏,距離用的調整紐。 + + %1D + %1T + %1B + %1D + %1D + %1D + %1D + + + %1L + %1L + %1G + %1L + %1L + %1L + %1L + + + %1R + %1R + %1D + %1R + %1R + %1R + %1R + diff --git a/addons/slideshow/stringtable.xml b/addons/slideshow/stringtable.xml index 42a049b9bb..3abaa07592 100644 --- a/addons/slideshow/stringtable.xml +++ b/addons/slideshow/stringtable.xml @@ -168,6 +168,7 @@ Imposta Nome 設定名稱 设定名称 + 이름 설정 Name that will be used for main interaction entry (to distinguish multiple slideshows). Default: "Slides" @@ -178,6 +179,7 @@ Nome che sarà utilizzato per le principali interazioni (per distinguere le multiple diapositive). Predefinito: "Slides" 設定該幻燈片的標題名稱 (用來區分多個不同標題的幻燈片) 預設名稱: "幻燈片" 设定该幻灯片的标题名称 (用来区分多个不同标题的幻灯片) 预设名称: "幻灯片" + 상위 상호작용 이름 (여러개의 슬라이드 쇼를 구분하기 위해 사용됨) 기본: "Slides" Slide Duration diff --git a/addons/smallarms/CfgMagazines.hpp b/addons/smallarms/CfgMagazines.hpp index a9cc718258..ac55a86f6b 100644 --- a/addons/smallarms/CfgMagazines.hpp +++ b/addons/smallarms/CfgMagazines.hpp @@ -6,36 +6,6 @@ class CfgMagazines { // 2. Remove tracers at bottom of magazine. // 3. Do string updates. - // 5.56mm //////////////////////////////////// - - class 30Rnd_556x45_Stanag : CA_Magazine { - displayname = "5.56mm 30Rnd Mag"; - displaynameshort = "5.56mm"; - - tracersEvery = 0; - lastRoundsTracer = 0; - }; - - class 30Rnd_556x45_Stanag_Tracer_Red: 30Rnd_556x45_Stanag { - displayname = "5.56mm 30Rnd Tracer Mag"; - displaynameshort = "5.56mm"; - }; - - class 30Rnd_556x45_Stanag_Tracer_Green: 30Rnd_556x45_Stanag { - displayname = "5.56mm 30Rnd Tracer Mag"; - displaynameshort = "5.56mm"; - }; - - class 30Rnd_556x45_Stanag_Tracer_Yellow: 30Rnd_556x45_Stanag { - displayname = "5.56mm 30Rnd Tracer Mag"; - displaynameshort = "5.56mm"; - }; - - class 20Rnd_556x45_UW_mag: 30Rnd_556x45_Stanag { - displayname = "5.56mm 20Rnd MEA Mag"; - displaynameshort = "5.56mm MEA"; - }; - // 6.5mm ////////////////////////////////////////// class 30Rnd_65x39_caseless_mag : CA_Magazine { // MX!! diff --git a/addons/spectator/ACE_Settings.hpp b/addons/spectator/ACE_Settings.hpp index 6030414908..ef74580428 100644 --- a/addons/spectator/ACE_Settings.hpp +++ b/addons/spectator/ACE_Settings.hpp @@ -1,11 +1,13 @@ class ACE_Settings { class GVAR(enableAI) { + category = CSTRING(Module_DisplayName); displayName = CSTRING(ai_DisplayName); description = CSTRING(ai_Description); typeName = "BOOL"; value = 0; }; class GVAR(restrictModes) { + category = CSTRING(Module_DisplayName); displayName = CSTRING(modes_DisplayName); description = CSTRING(modes_Description); typeName = "SCALAR"; @@ -13,6 +15,7 @@ class ACE_Settings { values[] = {CSTRING(modes_all), CSTRING(modes_unit), "$STR_A3_Spectator_free_camera_tooltip", "$STR_A3_Spectator_1pp_camera_tooltip", "$STR_A3_Spectator_3pp_camera_tooltip"}; }; class GVAR(restrictVisions) { + category = CSTRING(Module_DisplayName); displayName = CSTRING(visions_DisplayName); description = CSTRING(visions_Description); typeName = "SCALAR"; diff --git a/addons/spectator/CfgVehicles.hpp b/addons/spectator/CfgVehicles.hpp index 861a619833..772c0fec5f 100644 --- a/addons/spectator/CfgVehicles.hpp +++ b/addons/spectator/CfgVehicles.hpp @@ -1,7 +1,7 @@ class CfgVehicles { class ACE_Module; class GVAR(moduleSettings): ACE_Module { - scope = 2; + scope = 1; displayName = CSTRING(Settings_DisplayName); icon = QPATHTOF(data\Icon_Module_Spectator_ca.paa); category = "ACE"; @@ -75,7 +75,7 @@ class CfgVehicles { class VirtualMan_F; class GVAR(virtual): VirtualMan_F { author = ECSTRING(common,ACETeam); - displayName = CSTRING(DisplayName); + displayName = CSTRING(Settings_DisplayName); scope = 2; scopeArsenal = 0; scopeCurator = 0; diff --git a/addons/spectator/XEH_PREP.hpp b/addons/spectator/XEH_PREP.hpp index fdcb6a22cb..ddca0c226c 100644 --- a/addons/spectator/XEH_PREP.hpp +++ b/addons/spectator/XEH_PREP.hpp @@ -17,6 +17,7 @@ PREP(ui_handleChildDestroyed); PREP(ui_handleKeyDown); PREP(ui_handleKeyUp); PREP(ui_handleListClick); +PREP(ui_handleLoad); PREP(ui_handleMapClick); PREP(ui_handleMapDraw); PREP(ui_handleMouseButtonDblClick); @@ -42,7 +43,6 @@ PREP(handleFired); PREP(moduleSpectatorSettings); PREP(respawnTemplate); PREP(setFocus); -PREP(stageSpectator); PREP(switchFocus); // Public functions @@ -54,10 +54,3 @@ PREP(updateCameraModes); PREP(updateSides); PREP(updateUnits); PREP(updateVisionModes); - -// Deprecated (temp) -PREP(interrupt); -DFUNC(updateSpectatableSides) = { - ACE_DEPRECATED(QFUNC(updateSpectatableSides),"3.12.0",QFUNC(updateSides)); - _this call FUNC(updateSides); -}; diff --git a/addons/spectator/XEH_postInit.sqf b/addons/spectator/XEH_postInit.sqf index 462d036328..715dbe1c3d 100644 --- a/addons/spectator/XEH_postInit.sqf +++ b/addons/spectator/XEH_postInit.sqf @@ -24,8 +24,6 @@ if (isServer) then { }] call CBA_fnc_addEventHandler; }; -[QGVAR(stageSpectator), FUNC(stageSpectator)] call CBA_fnc_addEventHandler; - // A virtual spectator cannot exist without an interface if (hasInterface) then { // Local player (not ACE_Player) must be initalized to check diff --git a/addons/spectator/config.cpp b/addons/spectator/config.cpp index 3ff6000fdc..6daa59a752 100644 --- a/addons/spectator/config.cpp +++ b/addons/spectator/config.cpp @@ -21,7 +21,7 @@ class CfgPatches { class CfgRespawnTemplates { class ADDON { - displayName = CSTRING(DisplayName); + displayName = CSTRING(Module_DisplayName); onPlayerKilled = QFUNC(respawnTemplate); onPlayerRespawn = QFUNC(respawnTemplate); respawnTypes[] = {1,2,3,4,5}; diff --git a/addons/spectator/functions/fnc_cam.sqf b/addons/spectator/functions/fnc_cam.sqf index 74b7d23d73..992476d53f 100644 --- a/addons/spectator/functions/fnc_cam.sqf +++ b/addons/spectator/functions/fnc_cam.sqf @@ -17,6 +17,7 @@ #include "script_component.hpp" params ["_init"]; +TRACE_1("cam",_init); // No change if (_init isEqualTo !isNil QGVAR(camera)) exitWith {}; @@ -38,7 +39,7 @@ if (_init) then { // Follow camera related GVAR(camDistance) = 0; - GVAR(camDistanceTemp) = 0; + GVAR(camDistanceTrue) = 0; GVAR(camYaw) = 0; GVAR(camPitch) = 0; @@ -78,6 +79,10 @@ if (_init) then { // Store camera GVAR(camera) = _camera; + // Create agent used to fix draw3D in free camera for case where player is perma-dead + GVAR(camAgentFree) = createAgent [QGVAR(virtual), [0,0,0], [], 0, "NONE"]; + GVAR(camAgentFree) enableSimulation false; // Prevent falling into water + // Create dummy target used for follow camera GVAR(camDummy) = "Logic" createVehicleLocal getPosASLVisual GVAR(camFocus); @@ -119,8 +124,12 @@ if (_init) then { // Remove camera variable GVAR(camera) = nil; + // Destroy free camera agent + deleteVehicle GVAR(camAgentFree); + GVAR(camAgentFree) = nil; + // Destroy dummy target - deleteVehicle (GVAR(camDummy)); + deleteVehicle GVAR(camDummy); GVAR(camDummy) = nil; // Stop tracking everything @@ -132,7 +141,7 @@ if (_init) then { GVAR(camHasTarget) = nil; GVAR(camTargetInVehicle) = nil; GVAR(camDistance) = nil; - GVAR(camDistanceTemp) = nil; + GVAR(camDistanceTrue) = nil; GVAR(camYaw) = nil; GVAR(camPitch) = nil; GVAR(camSlow) = nil; diff --git a/addons/spectator/functions/fnc_cam_prepareTarget.sqf b/addons/spectator/functions/fnc_cam_prepareTarget.sqf index abdce831b4..81bec1504e 100644 --- a/addons/spectator/functions/fnc_cam_prepareTarget.sqf +++ b/addons/spectator/functions/fnc_cam_prepareTarget.sqf @@ -18,20 +18,24 @@ #include "script_component.hpp" private _focus = vehicle (param [0, objNull, [objNull]]); +TRACE_1("cam_prepareTarget",_focus); if !(isNull _focus) then { - // Interpolate zoom + // Zooming takes place smoothly over multiple frames + // _zoom is target set by user, _zoomTrue is actual value each frame private _zoom = [0, GVAR(camDistance)] select (GVAR(camMode) == MODE_FOLLOW); - private _zoomTemp = GVAR(camDistanceTemp); + private _zoomTrue = GVAR(camDistanceTrue); - if (_zoomTemp != _zoom) then { - _zoomTemp = [_zoomTemp, _zoom, 10, GVAR(camDeltaTime)] call BIS_fnc_lerp; - GVAR(camDistanceTemp) = _zoomTemp; + // Interpolate zoom each frame until desired zoom is reached + if (_zoomTrue != _zoom) then { + _zoomTrue = (_zoomTrue * (1 - GVAR(camDeltaTime) * 10)) + (_zoom * GVAR(camDeltaTime) * 10); + GVAR(camDistanceTrue) = _zoomTrue; + TRACE_2("new zoom",GVAR(camDeltaTime),_zoomTrue); }; // The distance at which to place camera from the focus pivot private _bbd = [_focus] call BIS_fnc_getObjectBBD; - private _distance = (_bbd select 1) + _zoomTemp; + private _distance = (_bbd select 1) + _zoomTrue; // The pivot on the target vehicle private _isMan = _focus isKindOf "Man"; diff --git a/addons/spectator/functions/fnc_cam_setCameraMode.sqf b/addons/spectator/functions/fnc_cam_setCameraMode.sqf index 8d1c53d71c..02238ed91e 100644 --- a/addons/spectator/functions/fnc_cam_setCameraMode.sqf +++ b/addons/spectator/functions/fnc_cam_setCameraMode.sqf @@ -62,7 +62,7 @@ if (!isNull _focus || _newMode == MODE_FREE) then { if (_newMode == MODE_FREE) then { _camera cameraEffect ["Internal", "BACK"]; - player switchCamera "INTERNAL"; + switchCamera GVAR(camAgentFree); // Fix draw3D while in free camera for case where player is perma-dead _camera setDir getDirVisual _camera; if (!isNull _focus) then { diff --git a/addons/spectator/functions/fnc_compat_spectatorBI.sqf b/addons/spectator/functions/fnc_compat_spectatorBI.sqf index 3c90585aa5..0024664c88 100644 --- a/addons/spectator/functions/fnc_compat_spectatorBI.sqf +++ b/addons/spectator/functions/fnc_compat_spectatorBI.sqf @@ -42,7 +42,10 @@ if (_respawn in [4,5]) then { // Switch to a virtual unit so draw3D continues to work private _grp = createGroup [sideLogic, true]; -private _virtual = _grp createUnit [QGVAR(virtual),[0,0,0],[],0,""]; +private _virtual = _grp createUnit [QGVAR(virtual),[0,0,0],[],0,"NONE"]; + +// Prevent unit falling into water (compatibility for some addons) +_virtual enableSimulation false; // Transfer assigned zeus if applicable private _zeus = getAssignedCuratorLogic player; diff --git a/addons/spectator/functions/fnc_interrupt.sqf b/addons/spectator/functions/fnc_interrupt.sqf deleted file mode 100644 index 60c733db38..0000000000 --- a/addons/spectator/functions/fnc_interrupt.sqf +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Author: SilentSpike - * Deprecated. Technically never publically documented, but just in case. - */ -#include "script_component.hpp" - -params [["_reason", "", [""]], ["_interrupt", true, [true]]]; - -ACE_DEPRECATED(QFUNC(interrupt),"3.12.0","just close and reopen spectator"); - -// Nothing to do when spectator is closed -if !(GVAR(isSet)) exitWith {}; - -if (_reason == "") exitWith { WARNING("Invalid Reason"); }; -if (_interrupt) then { - GVAR(interrupts) pushBack _reason; -} else { - GVAR(interrupts) = GVAR(interrupts) - [_reason]; -}; - -if (GVAR(interrupts) isEqualTo []) then { - if (isNull SPEC_DISPLAY) then { - [true] call FUNC(ui); - }; -} else { - if !(isNull SPEC_DISPLAY) then { - [false] call FUNC(ui); - }; -}; diff --git a/addons/spectator/functions/fnc_respawnTemplate.sqf b/addons/spectator/functions/fnc_respawnTemplate.sqf index 24a0e358f4..14cd6c053d 100644 --- a/addons/spectator/functions/fnc_respawnTemplate.sqf +++ b/addons/spectator/functions/fnc_respawnTemplate.sqf @@ -23,6 +23,7 @@ #include "script_component.hpp" params [["_newCorpse",objNull,[objNull]], ["_oldKiller",objNull,[objNull]], ["_respawn",0,[0]], ["_respawnDelay",0,[0]]]; +TRACE_4("respawnTemplate",_newCorpse,_oldKiller,_respawn,_respawnDelay); // Compatibility handled via spectator display XEH if (_respawn in [0,1,4,5]) exitWith { diff --git a/addons/spectator/functions/fnc_setCameraAttributes.sqf b/addons/spectator/functions/fnc_setCameraAttributes.sqf index 734503e25e..c9a272407b 100644 --- a/addons/spectator/functions/fnc_setCameraAttributes.sqf +++ b/addons/spectator/functions/fnc_setCameraAttributes.sqf @@ -42,10 +42,6 @@ params [ ["_direction",nil,[0]] ]; -if (count _this > 5) then { - ACE_DEPRECATED("Use of ""tilt"", ""zoom"" and ""speed"" camera attributes","3.12.0","N/A") -}; - // Apply if camera exists if !(isNil QGVAR(camera)) then { // These functions are smart and handle unavailable inputs diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index 3d8a6ab5bf..ca829559e7 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -101,6 +101,7 @@ if (_set) then { // Hide/Unhide the player if enabled and alive if (alive player) then { private _hidden = (_hide && _set); + TRACE_1("",_hidden); // Ignore damage (vanilla and ace_medical) player allowDamage !_hidden; @@ -110,8 +111,13 @@ if (alive player) then { [player, _hidden, QGVAR(isSet), side group player] call EFUNC(common,switchToGroupSide); // Ghosts can't talk - [player, QGVAR(isSet)] call EFUNC(common,hideUnit); - [player, QGVAR(isSet)] call EFUNC(common,muteUnit); + if (_hidden) then { + [player, QGVAR(isSet)] call EFUNC(common,hideUnit); + [player, QGVAR(isSet)] call EFUNC(common,muteUnit); + } else { + [player, QGVAR(isSet)] call EFUNC(common,unhideUnit); + [player, QGVAR(isSet)] call EFUNC(common,unmuteUnit); + }; }; // Reset interruptions @@ -119,6 +125,6 @@ GVAR(interrupts) = []; // Mark spectator state for reference GVAR(isSet) = _set; -player setVariable [QGVAR(isSet), true, true]; +player setVariable [QGVAR(isSet), _set, true]; ["ace_spectatorSet", [_set, player]] call CBA_fnc_globalEvent; diff --git a/addons/spectator/functions/fnc_stageSpectator.sqf b/addons/spectator/functions/fnc_stageSpectator.sqf deleted file mode 100644 index 86b67f2f88..0000000000 --- a/addons/spectator/functions/fnc_stageSpectator.sqf +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Author: SilentSpike - * Stores and hides a player safely out of the way (used by setSpectator on living players) - * - * Units will be gathered at marker ace_spectator_respawn (or [0,0,0] by default) - * Upon unstage, units will be moved to the position they were in before staging - * - * Arguments: - * 0: Unit to handle - * 1: Stage/Unstage - * - * Return Value: - * None - * - * Example: - * [player, true] call ace_spectator_fnc_stageSpectator - * - * Public: No - */ - -#include "script_component.hpp" - -ACE_DEPRECATED(QFUNC(stageSpectator),"3.12.0",[ARR_2(QFUNC(setSpectator),"'s new 3rd parameter")] joinString ""); - -params [["_unit",player,[objNull]], ["_set",true,[true]]]; - -// No change, no service (but allow spectators to be reset) -if !(_set || (GETVAR(_unit,GVAR(isStaged),false))) exitWith {}; - -if !(local _unit) exitWith { - [QGVAR(stageSpectator), [_unit, _set], _unit] call CBA_fnc_targetEvent; -}; - -// Prevent unit falling into water -_unit enableSimulation !_set; - -// Move to/from group as appropriate -[_unit, _set, QGVAR(isStaged), side group _unit] call EFUNC(common,switchToGroupSide); - -if (_set) then { - // Position should only be saved on first entry - if !(GETVAR(_unit,GVAR(isStaged),false)) then { - SETVAR(_unit,GVAR(preStagePos),getPosATL _unit); - - // Handle players respawning via pause menu (or script) - private _id = _unit addEventHandler ["Respawn",{ - params ["_unit"]; - [_unit] call FUNC(stageSpectator); - }]; - - SETVAR(_unit,GVAR(respawnEH),_id); - }; - - // Ghosts can't talk - [_unit, QGVAR(isStaged)] call EFUNC(common,hideUnit); - [_unit, QGVAR(isStaged)] call EFUNC(common,muteUnit); - - // Position defaults to [0,0,0] if marker doesn't exist - _unit setPos (markerPos QGVAR(respawn)); -} else { - // Physical beings can talk - [_unit, QGVAR(isStaged)] call EFUNC(common,unhideUnit); - [_unit, QGVAR(isStaged)] call EFUNC(common,unmuteUnit); - - // Restore original position and delete stored value - _unit setPosATL (GETVAR(_unit,GVAR(preStagePos),getPosATL _unit)); - SETVAR(_unit,GVAR(preStagePos),nil); - - // Remove the respawn handling - _unit removeEventHandler ["Respawn",GETVAR(_unit,GVAR(respawnEH),-1)]; - SETVAR(_unit,GVAR(respawnEH),nil); -}; - -// Spectators ignore damage (vanilla and ace_medical) -_unit allowDamage !_set; -_unit setVariable [QEGVAR(medical,allowDamage), !_set]; - -// No theoretical change if an existing spectator was reset -if !(_set isEqualTo (GETVAR(_unit,GVAR(isStaged),false))) then { - // Mark spectator state for reference - _unit setVariable [QGVAR(isStaged), _set]; -}; - -// If display exists already update the entity list to hide player -if !(isNull SPEC_DISPLAY) then { - [] call FUNC(ui_updateListEntities); -}; diff --git a/addons/spectator/functions/fnc_ui.sqf b/addons/spectator/functions/fnc_ui.sqf index 69ee454d8b..8fe9339153 100644 --- a/addons/spectator/functions/fnc_ui.sqf +++ b/addons/spectator/functions/fnc_ui.sqf @@ -17,6 +17,7 @@ #include "script_component.hpp" params ["_init"]; +TRACE_1("ui",_init); // No change if (_init isEqualTo !isNull SPEC_DISPLAY) exitWith {}; @@ -29,6 +30,15 @@ while {dialog} do { closeDialog 0; }; +// Controls some PP effects, but a little unclear which +BIS_fnc_feedback_allowPP = !_init; + +// Removes death blur if present +if !(isNil "BIS_DeathBlur") then { + BIS_DeathBlur ppEffectAdjust [0]; + BIS_DeathBlur ppEffectCommit 0; +}; + // Note that init and destroy intentionally happen in reverse order // Init: Vars > Display > UI Stuff // Destroy: UI Stuff > Display > Vars diff --git a/addons/spectator/functions/fnc_ui_draw3D.sqf b/addons/spectator/functions/fnc_ui_draw3D.sqf index 185d8f9dd9..36ec3d0098 100644 --- a/addons/spectator/functions/fnc_ui_draw3D.sqf +++ b/addons/spectator/functions/fnc_ui_draw3D.sqf @@ -18,7 +18,7 @@ #define HEIGHT_OFFSET 1.5 BEGIN_COUNTER(updateCursor); -private _camTarget = GVAR(camFocus); +private _camTarget = missionNamespace getVariable [QGVAR(camFocus), objNull]; private _camTargetVeh = vehicle _camTarget; private _cursorObject = objNull; diff --git a/addons/spectator/functions/fnc_ui_handleKeyDown.sqf b/addons/spectator/functions/fnc_ui_handleKeyDown.sqf index 696ba2e652..2ac7a049b7 100644 --- a/addons/spectator/functions/fnc_ui_handleKeyDown.sqf +++ b/addons/spectator/functions/fnc_ui_handleKeyDown.sqf @@ -197,13 +197,4 @@ if ((_key in (actionKeys "CuratorInterface")) && {!isNull (getAssignedCuratorLog true }; -// Handle acre spectate headset down (if present) -if ( - ["acre_sys_radio"] call EFUNC(common,isModLoaded) && - { [_key, [_shift, _ctrl, _alt]] isEqualTo ((["ACRE2", "HeadSet"] call CBA_fnc_getKeybind) select 5) } -) exitWith { - [] call acre_sys_core_fnc_toggleHeadset; - true -}; - false // default to unhandled diff --git a/addons/spectator/functions/fnc_ui_handleLoad.sqf b/addons/spectator/functions/fnc_ui_handleLoad.sqf new file mode 100644 index 0000000000..1afa5ce123 --- /dev/null +++ b/addons/spectator/functions/fnc_ui_handleLoad.sqf @@ -0,0 +1,25 @@ +/* + * Author: SilentSpike, Jonpas + * Function used to handle load event. + * + * Arguments: + * 0: Spectator display + * + * Return Value: + * None + * + * Example: + * _this call ace_spectator_fnc_ui_handleLoad + * + * Public: No + */ +#include "script_component.hpp" + +params ["_display"]; + +uiNamespace setVariable [QGVAR(display), _display]; + +// Handle ACRE2 Toggle Spectator (if present) +if (!isNil "acre_api_fnc_addDisplayPassthroughKeys") then { + [_display] call acre_api_fnc_addDisplayPassthroughKeys; +}; diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index 9c7dc249a3..6efe569ec8 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -1,7 +1,15 @@  - + + Spectator + Zuschauer + Spettatore + 旁觀者 + 旁观者 + スペクテイター + + ACE Spectator ACE Zuschauer ACE スペクテイター @@ -10,21 +18,7 @@ ACE 旁观者 ACE 旁觀者 Obserwator ACE - - - Spectator Settings - Zuschauer-Einstellungen - Ustawienia obserwatora - Preferências de Espectador - Настройки спектатора - Nastavení pozorovatele - Ajustes de espectador - Impostazioni Spettatore - Réglages de spectateur - スペクテイター設定 - 관전자 설정 - 旁观者设定 - 旁觀者設定 + ACE 관전자 Configure how the spectator system will operate by default. @@ -48,6 +42,7 @@ AI Abilitate 可觀察AI 可观察AI + AI 활성 Make AI viewable in spectator @@ -56,6 +51,7 @@ Permette la visibilità delle AI in spettatore 開啟此功能後可在觀察者模式下觀察AI單位。 开启此功能后可在观察者模式下观察AI单位。 + 관전자가 AI를 관전 할 수 있습니다. Camera modes @@ -82,7 +78,7 @@ Módy kamery které mohou být použity. Modalità che la camera può utilizzare. Modes de caméra qui peuvent être utilisés - カメラ モードを使えます。 + カメラ モードを設定できます。 사용할 수 있는 카메라 모드들 입니다 设定可使用的摄影机模式 設定可使用的攝影機模式 @@ -142,7 +138,7 @@ Módy zobrazení které mohou být použity. Modalità visuali che possono essere usate. Modes de visions qui peuvent être utilisés - ビジョン モードを使えます。 + ビジョン モードを設定できます。 사용할 수 있는 시야 모드들 입니다 设定可使用的视觉模式 設定可使用的視覺模式 @@ -261,6 +257,7 @@ Icone 單位圖示 单位图示 + 아이콘 Projectiles @@ -269,6 +266,7 @@ Proiettili 顯示彈道 显示弹道 + 발사체 Next Unit @@ -307,6 +305,7 @@ Modalità Visiva 視覺模式 视觉模式 + 보기 모드 Slow Speed @@ -315,6 +314,7 @@ Bassa Velocità 慢速度 慢速度 + 느린 속도 diff --git a/addons/spectator/ui.hpp b/addons/spectator/ui.hpp index f26572f6d5..7a49c72a86 100644 --- a/addons/spectator/ui.hpp +++ b/addons/spectator/ui.hpp @@ -10,6 +10,7 @@ class RscPictureKeepAspect; class RscText; class RscToolbox; class RscTree; +class EGVAR(common,CompassControl); // Based on RscDisplayEGSpectator (sadly Arma doesn't like display inheritance) class GVAR(display) { @@ -17,8 +18,8 @@ class GVAR(display) { enableSimulation = 1; movingEnable = 0; closeOnMissionEnd = 1; - - onLoad = QUOTE(with uiNameSpace do {GVAR(display) = _this select 0};); + + onLoad = QUOTE(_this call FUNC(ui_handleLoad)); onKeyDown = QUOTE(_this call FUNC(ui_handleKeyDown)); onKeyUp = QUOTE(_this call FUNC(ui_handleKeyUp)); @@ -454,6 +455,6 @@ class GVAR(display) { }; }; }; + class compass: EGVAR(common,CompassControl) {}; }; }; - diff --git a/addons/spottingscope/CfgVehicles.hpp b/addons/spottingscope/CfgVehicles.hpp index fa2574cb8d..f360be45c9 100644 --- a/addons/spottingscope/CfgVehicles.hpp +++ b/addons/spottingscope/CfgVehicles.hpp @@ -18,6 +18,14 @@ class CfgVehicles { }; }; + class ThingX; + class ACE_SpottingScope_Tube: ThingX { + author = ECSTRING(common,ACETeam); + scope = 1; + displayName = CSTRING(DisplayName); + model = QPATHTOF(data\ace_spottingscope_tube.p3d); + }; + class LandVehicle; class StaticWeapon: LandVehicle { class Turrets; @@ -74,6 +82,21 @@ class CfgVehicles { getOutAction = "PlayerProne"; editorSubcategory = "EdSubcat_Turrets"; + threat[] = {0.7, 0.3, 0}; + accuracy = 0.12; + cost = 10000; + icon = "\A3\Static_F_Gamma\data\UI\map_StaticTurret_AT_CA.paa"; + + class SpeechVariants { + class Default { + speechSingular[] = {"veh_infantry_SF_s"}; + speechPlural[] = {"veh_infantry_SF_p"}; + }; + }; + textSingular = "$STR_A3_nameSound_veh_infantry_SF_s"; + textPlural = "$STR_A3_nameSound_veh_infantry_SF_p"; + nameSound = "veh_infantry_SF_s"; + class Turrets: Turrets { class MainTurret: MainTurret { minTurn = -45; @@ -123,6 +146,26 @@ class CfgVehicles { opticsDisablePeripherialVision = 1; }; }; + + // damage handling + armor = 80; + + class Damage { + tex[] = {}; + mat[] = { + QPATHTO_R(data\ace_spottingscope_metal.rvmat), + QPATHTO_R(data\ace_spottingscope_metal_damage.rvmat), + QPATHTO_R(data\ace_spottingscope_metal_destruct.rvmat), + QPATHTO_R(data\ace_spottingscope_glass.rvmat), + QPATHTO_R(data\ace_spottingscope_glass_damage.rvmat), + QPATHTO_R(data\ace_spottingscope_glass_destruct.rvmat), + QPATHTO_R(data\ace_spottingscope_rubber.rvmat), + QPATHTO_R(data\ace_spottingscope_rubber_damage.rvmat), + QPATHTO_R(data\ace_spottingscope_rubber_damage.rvmat) + }; + }; + + editorPreview = QPATHTOF(data\preview_spottingscope.jpg); }; class ACE_B_SpottingScope: ACE_SpottingScopeObject { @@ -152,6 +195,24 @@ class CfgVehicles { crew = "I_spotter_F"; }; + class ACE_B_T_SpottingScope: ACE_SpottingScopeObject { + author = ECSTRING(common,ACETeam); + _generalMacro = "ACE_B_T_SpottingScope"; + scope = 2; + side = 1; + faction = "BLU_T_F"; + crew = "B_T_Spotter_F"; + }; + + class ACE_O_T_SpottingScope: ACE_SpottingScopeObject { + author = ECSTRING(common,ACETeam); + _generalMacro = "ACE_O_T_SpottingScope"; + scope = 2; + side = 0; + faction = "OPF_T_F"; + crew = "O_T_Spotter_F"; + }; + class Item_Base_F; class ACE_Item_SpottingScope: Item_Base_F { author[] = {"Rocko", "Scubaman3D"}; @@ -159,6 +220,9 @@ class CfgVehicles { scopeCurator = 2; displayName = CSTRING(DisplayName); vehicleClass = "Items"; + editorCategory = "EdCat_Equipment"; + editorSubcategory = "EdSubcat_InventoryItems"; + editorPreview = QPATHTOF(data\preview_spottingscope.jpg); class TransportItems { MACRO_ADDITEM(ACE_SpottingScope,1); }; diff --git a/addons/spottingscope/CfgWeapons.hpp b/addons/spottingscope/CfgWeapons.hpp index 9f4368d2ac..9548b30aee 100644 --- a/addons/spottingscope/CfgWeapons.hpp +++ b/addons/spottingscope/CfgWeapons.hpp @@ -5,6 +5,7 @@ class CfgWeapons { class ACE_SpottingScope: ACE_ItemCore { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(DisplayName); descriptionShort = ""; picture = QPATHTOF(UI\w_spottingscope_ca.paa); diff --git a/addons/spottingscope/XEH_preInit.sqf b/addons/spottingscope/XEH_preInit.sqf index b47cf6628d..e80d5e4ef9 100644 --- a/addons/spottingscope/XEH_preInit.sqf +++ b/addons/spottingscope/XEH_preInit.sqf @@ -6,4 +6,14 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +["ACE_SpottingScopeObject", "killed", { + params ["_wreck"]; + + private _tube = "ACE_SpottingScope_tube" createVehicle [0,0,0]; + _tube setDir (getDir _wreck - 180); + _tube setPosASL AGLToASL (_wreck modelToWorld (_wreck selectionPosition "destructionEffect")); + _tube setVelocity [1 - random 2, 1 - random 2, 4]; + _tube addTorque (vectorNormalized [1 - random 2, 1 - random 2, 1 - random 2] vectorMultiply 4); +}] call CBA_fnc_addClassEventHandler; + ADDON = true; diff --git a/addons/spottingscope/config.cpp b/addons/spottingscope/config.cpp index 4fa5bd4d58..5e8576eb59 100644 --- a/addons/spottingscope/config.cpp +++ b/addons/spottingscope/config.cpp @@ -3,7 +3,7 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {"ACE_B_SpottingScope", "ACE_O_SpottingScope", "ACE_I_SpottingScope", "ACE_Item_SpottingScope"}; + units[] = {"ACE_B_SpottingScope", "ACE_O_SpottingScope", "ACE_I_SpottingScope", "ACE_B_T_SpottingScope", "ACE_O_T_SpottingScope", "ACE_Item_SpottingScope"}; weapons[] = {"ACE_SpottingScope"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_apl", "ace_interaction"}; diff --git a/addons/spottingscope/data/ace_spottingscope.p3d b/addons/spottingscope/data/ace_spottingscope.p3d index 2298b9c8f9..74ded32045 100644 Binary files a/addons/spottingscope/data/ace_spottingscope.p3d and b/addons/spottingscope/data/ace_spottingscope.p3d differ diff --git a/addons/spottingscope/data/ace_spottingscope_glass.rvmat b/addons/spottingscope/data/ace_spottingscope_glass.rvmat index bce3c40b59..c23549f1c8 100644 --- a/addons/spottingscope/data/ace_spottingscope_glass.rvmat +++ b/addons/spottingscope/data/ace_spottingscope_glass.rvmat @@ -1,96 +1,89 @@ -class StageTI -{ - texture="a3\data_f\Default_ti_ca.paa"; +class StageTI { + texture = "a3\data_f\Default_ti_ca.paa"; }; -ambient[]={0.301,0.63999999,0.68000001,1}; -diffuse[]={0.301,0.63999999,0.68000001,1}; -forcedDiffuse[]={0.2,0.34999999,0.2,0}; -emmisive[]={0,0,0,1}; -specular[]={0.67450982,0.64313728,0.50196081,1}; -specularPower=550; -PixelShaderID="Super"; -VertexShaderID="Super"; -class Stage1 -{ - texture="z\ace\addons\spottingscope\data\ace_spottingscope_nohq.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +ambient[] = {0.301,0.63999999,0.68000001,1}; +diffuse[] = {0.301,0.63999999,0.68000001,1}; +forcedDiffuse[] = {0.2,0.34999999,0.2,0}; +emmisive[] = {0,0,0,1}; +specular[] = {0.67450982,0.64313728,0.50196081,1}; +specularPower = 550; +PixelShaderID = "Super"; +VertexShaderID = "Super"; + +class Stage1 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_nohq.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage2 -{ - texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; - uvSource="tex"; - class uvTransform - { - aside[]={6,0,0}; - up[]={0,6,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage2 { + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource = "tex"; + class uvTransform { + aside[] = {6,0,0}; + up[] = {0,6,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage3 -{ - texture="#(argb,8,8,3)color(0,0,0,0,MC)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage3 { + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage4 -{ - texture="z\ace\addons\spottingscope\data\ace_spottingscope_as.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage4 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_as.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage5 -{ - texture="z\ace\addons\spottingscope\data\ace_spottingscope_smdi.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage5 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_smdi.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage6 -{ - texture="#(ai,32,128,1)fresnel(4.01,2.86)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage6 { + texture = "#(ai,32,128,1)fresnel(4.01,2.86)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage7 -{ - texture="a3\data_f\env_land_co.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage7 { + texture = "a3\data_f\env_land_co.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; diff --git a/addons/spottingscope/data/ace_spottingscope_glass_damage.rvmat b/addons/spottingscope/data/ace_spottingscope_glass_damage.rvmat new file mode 100644 index 0000000000..18105269f8 --- /dev/null +++ b/addons/spottingscope/data/ace_spottingscope_glass_damage.rvmat @@ -0,0 +1,84 @@ +class StageTI { + texture = "a3\data_f\default_ti_ca.paa"; +}; + +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {0,0,0,1}; +specular[] = {0.1,0.1,0.1,1}; +specularPower = 1000; +PixelShaderID = "Super"; +VertexShaderID = "Super"; + +class Stage1 { + texture = "a3\data_f\destruct\damage_glass_laminated_nohq.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {2,2,0}; + up[] = {-2,2,0}; + dir[] = {0,0,0}; + pos[] = {-0.05,0.7,0}; + }; +}; + +class Stage2 { + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,dt)"; + uvSource = "tex"; + class uvTransform { + aside[] = {2,2,0}; + up[] = {-2,2,0}; + dir[] = {0,0,0}; + pos[] = {-0.05,0.7,0}; + }; +}; + +class Stage3 { + texture = "a3\data_f\destruct\damage_glass_laminated_ca.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {2,0,0}; + up[] = {0,2,0}; + dir[] = {0,0,0}; + pos[] = {-0.05,0.7,0}; + }; +}; + +class Stage4 { + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,1}; + }; +}; + +class Stage5 { + texture = "a3\data_f\destruct\damage_glass_laminated_smdi.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage6 { + texture = "#(ai,64,64,1)fresnel(1.1,0.4)"; + uvSource = "none"; +}; + +class Stage7 { + useWorldEnvMap = "true"; + texture = "a3\data_f\env_land_ca.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; diff --git a/addons/spottingscope/data/ace_spottingscope_glass_destruct.rvmat b/addons/spottingscope/data/ace_spottingscope_glass_destruct.rvmat new file mode 100644 index 0000000000..6b0e949b00 --- /dev/null +++ b/addons/spottingscope/data/ace_spottingscope_glass_destruct.rvmat @@ -0,0 +1,78 @@ +class StageTI { + texture = "a3\data_f\default_ti_ca.paa"; +}; + +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {0,0,0,1}; +specular[] = {0.1,0.1,0.1,1}; +specularPower = 1000; +PixelShaderID = "Super"; +VertexShaderID = "Super"; + +class Stage1 { + texture = "a3\data_f\destruct\damage_glass_tempered_nohq.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {2,2,0}; + up[] = {-2,2,0}; + dir[] = {0,0,0}; + pos[] = {-0.05,0.7,0}; + }; +}; + +class Stage2 { + texture = "a3\data_f\destruct\damage_glass_tempered_ca.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {2,0,0}; + up[] = {0,2,0}; + dir[] = {0,0,0}; + pos[] = {-0.05,0.7,0}; + }; +}; + +class Stage3 { + texture = "a3\data_f\destruct\damage_glass_tempered_ca.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {2,0,0}; + up[] = {0,2,0}; + dir[] = {0,0,0}; + pos[] = {-0.05,0.7,0}; + }; +}; + +class Stage4 { + texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource = "tex"; + class uvTransform { + aside[] = {2,0,0}; + up[] = {0,2,0}; + dir[] = {0,0,1}; + pos[] = {0,0,1}; + }; +}; + +class Stage5 { + texture = "a3\data_f\destruct\damage_glass_tempered_smdi.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage6 { + texture = "#(ai,64,64,1)fresnel(1.1,0.4)"; + uvSource = "none"; +}; + +class Stage7 { + useWorldEnvMap = "true"; + texture = "a3\data_f\env_land_ca.paa"; + uvSource="none"; +}; diff --git a/addons/spottingscope/data/ace_spottingscope_item.p3d b/addons/spottingscope/data/ace_spottingscope_item.p3d deleted file mode 100644 index d2de0edf1c..0000000000 Binary files a/addons/spottingscope/data/ace_spottingscope_item.p3d and /dev/null differ diff --git a/addons/spottingscope/data/ace_spottingscope_metal.rvmat b/addons/spottingscope/data/ace_spottingscope_metal.rvmat index 54cfcafeb8..cc610359b0 100644 --- a/addons/spottingscope/data/ace_spottingscope_metal.rvmat +++ b/addons/spottingscope/data/ace_spottingscope_metal.rvmat @@ -1,92 +1,85 @@ -ambient[]={1,1,1,1}; -diffuse[]={1,1,1,1}; -forcedDiffuse[]={0,0,0,0}; -emmisive[]={0,0,0,1}; -specular[]={0.2,0.2,0.2,0}; -specularPower=100; -PixelShaderID="Super"; -VertexShaderID="Super"; -class Stage1 -{ - texture="z\ace\addons\spottingscope\data\ace_spottingscope_nohq.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {0,0,0,1}; +specular[] = {0.2,0.2,0.2,0}; +specularPower = 100; +PixelShaderID = "Super"; +VertexShaderID = "Super"; + +class Stage1 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_nohq.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage2 -{ - texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; - uvSource="tex"; - class uvTransform - { - aside[]={6,0,0}; - up[]={0,6,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage2 { + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource = "tex"; + class uvTransform { + aside[] = {6,0,0}; + up[] = {0,6,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage3 -{ - texture="#(argb,8,8,3)color(0,0,0,0,MC)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage3 { + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage4 -{ - texture="z\ace\addons\spottingscope\data\ace_spottingscope_as.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage4 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_as.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage5 -{ - texture="z\ace\addons\spottingscope\data\ace_spottingscope_smdi.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage5 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_smdi.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage6 -{ - texture="#(ai,32,128,1)fresnel(4.01,2.86)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage6 { + texture = "#(ai,32,128,1)fresnel(4.01,2.86)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage7 -{ - texture="a3\data_f\env_land_co.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage7 { + texture = "a3\data_f\env_land_co.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; diff --git a/addons/spottingscope/data/ace_spottingscope_metal_damage.rvmat b/addons/spottingscope/data/ace_spottingscope_metal_damage.rvmat new file mode 100644 index 0000000000..e5f86e3252 --- /dev/null +++ b/addons/spottingscope/data/ace_spottingscope_metal_damage.rvmat @@ -0,0 +1,85 @@ +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {0,0,0,1}; +specular[] = {0.2,0.2,0.2,0}; +specularPower = 100; +PixelShaderID = "Super"; +VertexShaderID = "Super"; + +class Stage1 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_nohq.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage2 { + texture = "a3\data_f\destruct\damage_metal_cdt.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {5,0,0}; + up[] = {0,5,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage3 { + texture = "a3\data_f\destruct\damage_metal_mc.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {3,0,0}; + up[] = {0,3,0}; + dir[] = {0,0,0}; + pos[] = {0.1,0.23,0}; + }; +}; + +class Stage4 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_as.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage5 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_smdi.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage6 { + texture = "#(ai,32,128,1)fresnel(4.01,2.86)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage7 { + texture = "a3\data_f\env_land_co.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; diff --git a/addons/spottingscope/data/ace_spottingscope_metal_destruct.rvmat b/addons/spottingscope/data/ace_spottingscope_metal_destruct.rvmat new file mode 100644 index 0000000000..cb20b42b6e --- /dev/null +++ b/addons/spottingscope/data/ace_spottingscope_metal_destruct.rvmat @@ -0,0 +1,85 @@ +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {0,0,0,1}; +specular[] = {0.2,0.2,0.2,0}; +specularPower = 100; +PixelShaderID = "Super"; +VertexShaderID = "Super"; + +class Stage1 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_nohq.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage2 { + texture = "a3\data_f\destruct\destruct_rust_cdt.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {8,8,0}; + up[] = {-8,8,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage3 { + texture = "a3\data_f\destruct\destruct_rust_mca.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {2,0,0}; + up[] = {0,2,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage4 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_as.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage5 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_smdi.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage6 { + texture = "#(ai,32,128,1)fresnel(4.01,2.86)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage7 { + texture = "a3\data_f\env_land_co.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; diff --git a/addons/spottingscope/data/ace_spottingscope_rubber.rvmat b/addons/spottingscope/data/ace_spottingscope_rubber.rvmat index c31f850e7d..cce570415e 100644 --- a/addons/spottingscope/data/ace_spottingscope_rubber.rvmat +++ b/addons/spottingscope/data/ace_spottingscope_rubber.rvmat @@ -1,85 +1,79 @@ -ambient[]={1,1,1,1}; -diffuse[]={1,1,1,1}; -forcedDiffuse[]={0,0,0,0}; -emmisive[]={0,0,0,1}; -specular[]={0.25,0.25,0.25,1}; -specularPower=90; -PixelShaderID="Super"; -VertexShaderID="Super"; -class Stage1 -{ - texture="z\ace\addons\spottingscope\data\ace_spottingscope_nohq.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {0,0,0,1}; +specular[] = {0.25,0.25,0.25,1}; +specularPower = 90; +PixelShaderID = "Super"; +VertexShaderID = "Super"; + +class Stage1 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_nohq.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage2 -{ - texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; - uvSource="tex"; - class uvTransform - { - aside[]={6,0,0}; - up[]={0,6,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage2 { + texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource = "tex"; + class uvTransform { + aside[] = {6,0,0}; + up[] = {0,6,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage3 -{ - texture="#(argb,8,8,3)color(0,0,0,0,MC)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage3 { + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage4 -{ - texture="z\ace\addons\spottingscope\data\ace_spottingscope_as.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage4 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_as.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage5 -{ - texture="z\ace\addons\spottingscope\data\ace_spottingscope_smdi.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage5 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_smdi.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; -class Stage6 -{ - texture="#(ai,64,64,1)fresnel(1.5,1.22)"; - uvSource="none"; + +class Stage6 { + texture = "#(ai,64,64,1)fresnel(1.5,1.22)"; + uvSource = "none"; }; -class Stage7 -{ - texture="a3\data_f\env_land_co.paa"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; + +class Stage7 { + texture = "a3\data_f\env_land_co.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; }; diff --git a/addons/spottingscope/data/ace_spottingscope_rubber_damage.rvmat b/addons/spottingscope/data/ace_spottingscope_rubber_damage.rvmat new file mode 100644 index 0000000000..b79659c7d7 --- /dev/null +++ b/addons/spottingscope/data/ace_spottingscope_rubber_damage.rvmat @@ -0,0 +1,79 @@ +ambient[] = {1,1,1,1}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {0,0,0,1}; +specular[] = {0.25,0.25,0.25,1}; +specularPower = 90; +PixelShaderID = "Super"; +VertexShaderID = "Super"; + +class Stage1 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_nohq.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage2 { + texture = "a3\data_f\destruct\destr_rubber_half_dt.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {5,0,0}; + up[] = {0,5,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage3 { + texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource = "tex"; + class uvTransform { + aside[] = {3,0,0}; + up[] = {0,3,0}; + dir[] = {0,0,0}; + pos[] = {0.1,0.23,0}; + }; +}; + +class Stage4 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_as.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage5 { + texture = "z\ace\addons\spottingscope\data\ace_spottingscope_smdi.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; + +class Stage6 { + texture = "#(ai,64,64,1)fresnel(1.5,1.22)"; + uvSource = "none"; +}; + +class Stage7 { + texture = "a3\data_f\env_land_co.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,0}; + pos[] = {0,0,0}; + }; +}; diff --git a/addons/spottingscope/data/ace_spottingscope_tube.p3d b/addons/spottingscope/data/ace_spottingscope_tube.p3d new file mode 100644 index 0000000000..c83199d50b Binary files /dev/null and b/addons/spottingscope/data/ace_spottingscope_tube.p3d differ diff --git a/addons/spottingscope/data/material_dummy.p3d b/addons/spottingscope/data/material_dummy.p3d new file mode 100644 index 0000000000..ef8cd713ab Binary files /dev/null and b/addons/spottingscope/data/material_dummy.p3d differ diff --git a/addons/spottingscope/data/model.cfg b/addons/spottingscope/data/model.cfg index 71eb918bf7..86d50db6ca 100644 --- a/addons/spottingscope/data/model.cfg +++ b/addons/spottingscope/data/model.cfg @@ -1,10 +1,10 @@ -class CfgSkeletons -{ +class CfgSkeletons { class Default { isDiscrete = 1; skeletonInherit = ""; skeletonBones[] = {}; }; + class ace_spottingscope_skeleton: Default { isDiscrete = 1; skeletonInherit = "Default"; @@ -13,19 +13,23 @@ class CfgSkeletons "main_gun","main_turret", "leg_01","", "leg_02","", - "leg_03","" + "leg_03","", + "hideTurret","" }; }; }; + class CfgModels { class Default { sectionsInherit = ""; sections[] = {}; skeletonName = ""; }; + class ace_spottingscope: Default { skeletonName = "ace_spottingscope_skeleton"; sectionsInherit = "Default"; + class animations { class mainTurret { type = "rotationY"; @@ -51,20 +55,35 @@ class CfgModels { type = "rotation"; source = "fold_legs"; selection = "leg_01"; - axis="leg_01_axis"; + axis = "leg_01_axis"; minValue = 0; maxValue = 1; - angle0="rad +00"; - angle1="rad +55"; + angle0 = "rad +00"; + angle1 = "rad +55"; }; class leg_02: leg_01 { selection = "leg_02"; - axis="leg_02_axis"; + axis = "leg_02_axis"; }; class leg_03: leg_01 { selection = "leg_03"; - axis="leg_03_axis"; + axis = "leg_03_axis"; + }; + class hideTube { + type = "hide"; + source = "damage"; + selection = "main_gun"; + minValue = 0.0; + maxValue = 1.0; + hideValue = 1.0; + animPeriod = 0.0; + initPhase = 0.0; }; }; }; + + class ace_spottingscope_tube: Default { + skeletonName = "ace_spottingscope_skeleton"; + sectionsInherit = "Default"; + }; }; diff --git a/addons/spottingscope/data/preview_spottingscope.jpg b/addons/spottingscope/data/preview_spottingscope.jpg new file mode 100644 index 0000000000..ebd7a9d522 Binary files /dev/null and b/addons/spottingscope/data/preview_spottingscope.jpg differ diff --git a/addons/switchunits/ACE_Settings.hpp b/addons/switchunits/ACE_Settings.hpp index e3fc653cb2..31c74f2889 100644 --- a/addons/switchunits/ACE_Settings.hpp +++ b/addons/switchunits/ACE_Settings.hpp @@ -1,42 +1,50 @@ class ACE_Settings { class GVAR(enableSwitchUnits) { + category = CSTRING(DisplayName); value = 0; typeName = "BOOL"; }; class GVAR(switchToWest) { + category = CSTRING(DisplayName); displayName = CSTRING(SwitchToWest_DisplayName); description = CSTRING(SwitchToWest_Description); value = 0; typeName = "BOOL"; }; class GVAR(switchToEast) { + category = CSTRING(DisplayName); displayName = CSTRING(SwitchToEast_DisplayName); description = CSTRING(SwitchToEast_Description); value = 0; typeName = "BOOL"; }; class GVAR(switchToIndependent) { + category = CSTRING(DisplayName); displayName = CSTRING(SwitchToIndependent_DisplayName); description = CSTRING(SwitchToIndependent_Description); value = 0; typeName = "BOOL"; }; class GVAR(switchToCivilian) { + category = CSTRING(DisplayName); displayName = CSTRING(SwitchToCivilian_DisplayName); description = CSTRING(SwitchToCivilian_Description); value = 0; typeName = "BOOL"; }; class GVAR(enableSafeZone) { + category = CSTRING(DisplayName); displayName = CSTRING(EnableSafeZone_DisplayName); description = CSTRING(EnableSafeZone_Description); value = 1; typeName = "BOOL"; }; class GVAR(safeZoneRadius) { + category = CSTRING(DisplayName); displayName = CSTRING(SafeZoneRadius_DisplayName); description = CSTRING(SafeZoneRadius_Description); value = 100; typeName = "SCALAR"; + sliderSettings[] = {0, 1000, 100, 0}; }; }; diff --git a/addons/switchunits/CfgVehicles.hpp b/addons/switchunits/CfgVehicles.hpp index 1e12cc03d6..bb07eb541c 100644 --- a/addons/switchunits/CfgVehicles.hpp +++ b/addons/switchunits/CfgVehicles.hpp @@ -3,9 +3,9 @@ class CfgVehicles { class ACE_ModuleSwitchUnits: ACE_Module { author = ECSTRING(common,ACETeam); category = "ACE"; - displayName = CSTRING(Module_DisplayName); + displayName = CSTRING(DisplayName); function = FUNC(module); - scope = 2; + scope = 1; isGlobal = 1; icon = QPATHTOF(UI\Icon_Module_SwitchUnits_ca.paa); class Arguments { diff --git a/addons/switchunits/functions/fnc_module.sqf b/addons/switchunits/functions/fnc_module.sqf index 5170cebfb9..c7762855a4 100644 --- a/addons/switchunits/functions/fnc_module.sqf +++ b/addons/switchunits/functions/fnc_module.sqf @@ -17,8 +17,6 @@ */ #include "script_component.hpp" -if !(isServer) exitWith {}; - params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; @@ -33,6 +31,6 @@ GVAR(Module) = true; [_logic, QGVAR(EnableSafeZone), "EnableSafeZone"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(SafeZoneRadius), "SafeZoneRadius"] call EFUNC(common,readSettingFromModule); -[QGVAR(EnableSwitchUnits), true, false, true] call EFUNC(common,setSetting); +["CBA_settings_setSettingMission", [QGVAR(EnableSwitchUnits), true, true]] call CBA_fnc_localEvent; INFO("SwitchUnits Module Initialized."); diff --git a/addons/switchunits/stringtable.xml b/addons/switchunits/stringtable.xml index 18c43bfe2d..cf222f5804 100644 --- a/addons/switchunits/stringtable.xml +++ b/addons/switchunits/stringtable.xml @@ -1,6 +1,13 @@  + + Switch Units + Cambio Unità + 切換單位 + 切换单位 + ユニット切り替え + Switched unit Einheit gewechselt @@ -10,7 +17,7 @@ Cambiado de unidad Unité changée Egység átváltva - Cambia unità + Unità cambiata Trocado de unidade ユニットを切り替え 切换单位 @@ -48,22 +55,6 @@ 这单位太接近敌人了 這單位太接近敵人了 - - SwitchUnits System - System zmiany stron - Sistema de cambio de unidad - Einheiten-Wechsel-System - Systém výměny stran - Sistema de troca de unidades - Système de changement d'unité - Egységváltó-rendszer - Переключение между юнитами - Sistema Cambio Unità - SwitchUnits システム - 切换单位系统 - 切換單位系統 - 인원 전환 시스템 - Switch to West? Zmiana na Zachód? @@ -75,7 +66,7 @@ Átváltás BLUFOR-ra? На синих? Cambia per BLUFOR? - 同盟軍へ切り替えますか? + 同盟軍へ切り替えますか? 切换至蓝方? 切換至藍方? 청군으로 전환합니까? @@ -91,7 +82,7 @@ Nyugat-fakciós egységekre való váltás engedélyezése? Разрешить переключаться на синих юнитов? Consenti passaggio ad unità BLUFOR? - 同盟軍側ユニットへ切り替えられるようにしますか? + 同盟軍側ユニットへ切り替えられるようにしますか? 允许切换至蓝方? 允許切換至藍方? 청군 인원으로 전환합니까? @@ -107,7 +98,7 @@ Átváltás OPFOR-ra? На красных? Cambia per OPFOR? - OPFOR軍側へ切り替えますか? + OPFOR軍側へ切り替えますか? 切换至红方? 切換至紅方? 대항군으로 전환합니까? @@ -123,7 +114,7 @@ Kelet-fakciós egységekre való váltás engedélyezése? Разрешить переключаться на красных юнитов? Consenti passaggio ad unità OPFOR? - OPFOR軍側ユニットへ切り替えられるようにしますか? + OPFOR軍側ユニットへ切り替えられるようにしますか? 允许切换至红方? 允許切換至紅方? 대항군 인원으로 전환합니까? @@ -139,7 +130,7 @@ Átváltás INDFOR-ra? На независимых? Cambia per INDFOR? - 独立軍へ切り替えますか? + 独立軍へ切り替えますか? 切换至独立方? 切換至獨立方? 독립군 으로 전환합니까? @@ -155,7 +146,7 @@ Független egységekre való váltás engedélyezése? Разрешить переключаться на независимых юнитов? Consenti passaggio ad unità INDFOR? - 独立軍側ユニットへ切り替えられるようにしますか? + 独立軍側ユニットへ切り替えられるようにしますか? 允许切换至独立方? 允許切換至獨立方? 독립군 인원으로 전환합니까? @@ -171,7 +162,7 @@ Átváltás civilre? На гражданских? Cambia per Civili? - 市民へ切り替えますか? + 市民へ切り替えますか? 민간인으로 전환합니까? 切换至平民方? 切換至平民方? @@ -187,7 +178,7 @@ Civil egységekre való váltás engedélyezése? Разрешить переключаться на гражданских юнитов? Consenti passaggio ad unità civili? - 市民側ユニットへ切り替えられるようにしますか? + 市民側ユニットへ切り替えられるようにしますか? 민간인으로 전환하는걸 허가합니까? 允许切换至平民方? 允許切換至平民方? @@ -203,7 +194,7 @@ Biztonságos zóna engedélyezése? Безопасная зона Abilita Zona Sicura? - 安全地帯を有効にしますか? + 安全地帯を有効にしますか? 안전 지대 활성화? 启用安全区? 啟用安全區? @@ -219,7 +210,7 @@ Engedélyezve legyen-e egy biztonságos zóna az ellenségek körül? A játékosok nem tudnak a biztonságos zónán belüli egységekre váltani. Включить безопасную зону вокруг вражеских юнитов? Игроки не могут переключаться на юнитов, находящихся в безопасной зоне. Abilita una zona sicura attorno ad unità nemiche? I giocatori non possono cambiare ad unità dentro la zona sicura. - 敵ユニットから逃れる安全地帯を有効にしますか?プレイヤーは安全地帯内のユニットへ切り替えできません。 + 敵ユニットから逃れる安全地帯を有効にしますか?プレイヤーは安全地帯内のユニットへ切り替えできません。 적 주위로 안전 지대를 활성화합니까? 안전 지대 내에서는 플레이어가 인원 전환을 할 수 없습니다. 启用敌方周围安全地带? 玩家不能切换到安全区内的单位 啟用敵方周圍安全地帶? 玩家不能切換到安全區內的單位 diff --git a/addons/tacticalladder/CfgVehicles.hpp b/addons/tacticalladder/CfgVehicles.hpp index 564a034614..591f2c86af 100644 --- a/addons/tacticalladder/CfgVehicles.hpp +++ b/addons/tacticalladder/CfgVehicles.hpp @@ -21,6 +21,7 @@ class CfgVehicles { class Bag_Base; class ACE_TacticalLadder_Pack: Bag_Base { scope = 2; + author = ECSTRING(common,ACETeam); displayName = CSTRING(DisplayName); descriptionShort = ""; model = QPATHTOF(data\ace_tacticalladder_pack.p3d); diff --git a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf index f66dd79a25..098429bcec 100644 --- a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf +++ b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf @@ -24,6 +24,7 @@ if (_key != 1 || {isNull GVAR(ladder)}) exitWith {}; // enable running again [_unit, "forceWalk", "ACE_Ladder", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Ladder", false] call EFUNC(common,statusEffect_set); detach GVAR(ladder); diff --git a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf index 1eb47abf48..9f1c5c14bb 100644 --- a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf +++ b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf @@ -20,6 +20,7 @@ params ["_unit", "_ladder"]; // enable running again [_unit, "forceWalk", "ACE_Ladder", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Ladder", false] call EFUNC(common,statusEffect_set); private _pos1 = getPosASL _ladder; private _pos2 = AGLToASL (_ladder modelToWorld (_ladder selectionPosition "check2")); diff --git a/addons/tacticalladder/functions/fnc_positionTL.sqf b/addons/tacticalladder/functions/fnc_positionTL.sqf index c47733dd5a..a52211884c 100644 --- a/addons/tacticalladder/functions/fnc_positionTL.sqf +++ b/addons/tacticalladder/functions/fnc_positionTL.sqf @@ -22,6 +22,7 @@ params ["_unit", "_ladder"]; // prevent the placing unit from running [_unit, "forceWalk", "ACE_Ladder", true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Ladder", true] call EFUNC(common,statusEffect_set); { _ladder animate [_x, 0]; diff --git a/addons/tagging/CfgVehicles.hpp b/addons/tagging/CfgVehicles.hpp index 1ba838aab6..204e902641 100644 --- a/addons/tagging/CfgVehicles.hpp +++ b/addons/tagging/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(Tagging); function = QFUNC(moduleInit); - scope = 2; + scope = 1; isGlobal = 1; icon = QPATHTOF(UI\Icon_Module_Tagging_ca.paa); class Arguments { diff --git a/addons/tagging/functions/fnc_moduleInit.sqf b/addons/tagging/functions/fnc_moduleInit.sqf index 8b2d42a010..7430ce4981 100644 --- a/addons/tagging/functions/fnc_moduleInit.sqf +++ b/addons/tagging/functions/fnc_moduleInit.sqf @@ -17,8 +17,6 @@ */ #include "script_component.hpp" -if (!isServer) exitWith {}; - params ["_logic", "", "_activated"]; if (!_activated) exitWith {}; diff --git a/addons/tagging/functions/fnc_quickTag.sqf b/addons/tagging/functions/fnc_quickTag.sqf index 7f0a1d706e..63a93e9946 100644 --- a/addons/tagging/functions/fnc_quickTag.sqf +++ b/addons/tagging/functions/fnc_quickTag.sqf @@ -22,19 +22,22 @@ if (GVAR(quickTag) == 0) exitWith {}; params ["_unit"]; private _possibleTags = []; +private _useRandom = false; // Last Used if (GVAR(quickTag) == 1) then { private _lastUsedTagClass = _unit getVariable [QGVAR(lastUsedTag), nil]; - if (!isNil "_lastUsedTagClass") then { + if (isNil "_lastUsedTagClass") then { + _useRandom = true; + } else { private _lastUsedTag = GVAR(cachedTags) select {(_x select 0) == _lastUsedTagClass}; _possibleTags = _lastUsedTag; }; }; // Random X -if (GVAR(quickTag == 2)) then { +if ((GVAR(quickTag) == 2) || _useRandom) then { private _xTags = GVAR(cachedTags) select {(_x select 0) in ["ACE_XBlack", "ACE_XRed", "ACE_XGreen", "ACE_XBlue"]}; _possibleTags = _xTags; }; diff --git a/addons/tagging/stringtable.xml b/addons/tagging/stringtable.xml index 8b6a9ff638..ec79c4960a 100644 --- a/addons/tagging/stringtable.xml +++ b/addons/tagging/stringtable.xml @@ -26,7 +26,7 @@ 定義噴漆系統預設設定 - Quick Tag + Spray Paint - Quick Tag Быстрый маркер クイック タグ Szybkie tagowanie @@ -40,7 +40,7 @@ Action performed on main tag interaction point. Действие, выполняемое при выборе главного пункта меню маркировки. - インタラクション ポインにむけてタグ付けをします。 + インタラクション ポイントにむけてタグ付けをします。 Akcja wykonywana na głównym punkcie interakcji tagu. Aktion, die am Haupt-Interaktionspunkt ausgeführt werden soll. 이 동작은 상호작용에서 뿌리기를 할 수 있게 해준다 @@ -52,7 +52,7 @@ Last Used Повторить последний - 最後の使用 + 前回と同じ Ostatnio użyte Zuletzt benutzt 최근 사용 @@ -64,7 +64,7 @@ Random X Случайный Х - 無作為な X印 + 無作為なX印 Losowy X Zufällig X 무작위 X @@ -110,7 +110,7 @@ X černě X em preto Черный Х - 黒の X印 + 黒のX印 검정 X 黑色X标记 黑色X標記 @@ -125,7 +125,7 @@ X červeně X em vermelho Красный Х - 赤の X印 + 赤のX印 빨간 X 红色X标记 紅色X標記 @@ -140,7 +140,7 @@ X zeleně X em verde Зеленый Х - 緑の X印 + 緑のX印 초록 X 绿色X标记 綠色X標記 @@ -155,7 +155,7 @@ X modře X em azul Синий Х - 青の X印 + 青のX印 파랑 X 蓝色X标记 藍色X標記 diff --git a/addons/trenches/CfgWeapons.hpp b/addons/trenches/CfgWeapons.hpp index b7946d0d98..de79bc277f 100644 --- a/addons/trenches/CfgWeapons.hpp +++ b/addons/trenches/CfgWeapons.hpp @@ -1,6 +1,6 @@ class CfgWeapons { - class CBA_MiscItem_ItemInfo; class ACE_ItemCore; + class CBA_MiscItem_ItemInfo; class ACE_EntrenchingTool: ACE_ItemCore { author = ECSTRING(common,ACETeam); diff --git a/addons/trenches/README.md b/addons/trenches/README.md index 7ebfbe238b..8b4a0d7a36 100644 --- a/addons/trenches/README.md +++ b/addons/trenches/README.md @@ -4,6 +4,16 @@ ace_trenches Adds item 'ACE_entrenchingtool' Adds 2 trenches; Envelope - Small & Envelop - Big +### Whitelist surfaces for digging +Single surfaces can be whitelisted by adding `ACE_canDig = 1` into `CfgSurfaces`. +Example: +```cpp +class CfgSurfaces { + class myAwesomeSurface { + ACE_canDig = 1; + }; +}; +``` ## Maintainers diff --git a/addons/trenches/functions/fnc_placeCancel.sqf b/addons/trenches/functions/fnc_placeCancel.sqf index b3d6bf78da..1eaf7298a1 100644 --- a/addons/trenches/functions/fnc_placeCancel.sqf +++ b/addons/trenches/functions/fnc_placeCancel.sqf @@ -22,6 +22,7 @@ if (_key != 1 || {GVAR(digPFH) == -1}) exitWith {}; // enable running again [_unit, "forceWalk", "ACE_Trenches", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Trenches", false] call EFUNC(common,statusEffect_set); // delete placement dummy deleteVehicle GVAR(trench); diff --git a/addons/trenches/functions/fnc_placeConfirm.sqf b/addons/trenches/functions/fnc_placeConfirm.sqf index 7e5e94de8d..08c774d8c9 100644 --- a/addons/trenches/functions/fnc_placeConfirm.sqf +++ b/addons/trenches/functions/fnc_placeConfirm.sqf @@ -19,6 +19,7 @@ params ["_unit"]; // enable running again [_unit, "forceWalk", "ACE_Trenches", false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Trenches", false] call EFUNC(common,statusEffect_set); // remove dig pfh [GVAR(digPFH)] call CBA_fnc_removePerFrameHandler; diff --git a/addons/trenches/functions/fnc_placeTrench.sqf b/addons/trenches/functions/fnc_placeTrench.sqf index 6a9e29d767..94826fb346 100644 --- a/addons/trenches/functions/fnc_placeTrench.sqf +++ b/addons/trenches/functions/fnc_placeTrench.sqf @@ -28,6 +28,7 @@ TRACE_1("",GVAR(trenchPlacementData)); // prevent the placing unit from running [_unit, "forceWalk", "ACE_Trenches", true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", "ACE_Trenches", true] call EFUNC(common,statusEffect_set); // create the trench private _trench = createVehicle [_noGeoModel, [0, 0, 0], [], 0, "NONE"]; diff --git a/addons/trenches/stringtable.xml b/addons/trenches/stringtable.xml index 161e3eae39..a0413a3346 100644 --- a/addons/trenches/stringtable.xml +++ b/addons/trenches/stringtable.xml @@ -1,11 +1,11 @@ - + Entrenching Tool Klappspaten Saperka - Pala + Pala da Trincea Pala para trincheras Outil de tranchée Polní lopatka @@ -20,7 +20,7 @@ Entrenching Tool Saperka, używana do budowy wnęk Mit dem Klappspaten können Erdwälle oder Gräben ausgehoben werden. - Pala + Pala da Trincea Pala para trincheras Outil de tranchée Polní lopatky se používají k zákopovým a jiným pracem. @@ -123,7 +123,7 @@ Confirm Dig Graben bestätigen Potwierdź kopanie - Conferma Scava + Conferma Scavo Confirmar cavado Confirmer la creusée Potvrdit kopání @@ -138,7 +138,7 @@ Cancel Dig Graben abbrechen Anuluj kopanie - Cancella Scava + Annulla Scavo Cancelar cavado Annuler la creusée Zrušit kopání @@ -190,7 +190,7 @@ 塹壕を掘りつづける Graben fortsetzen 계속해서 참호파기 - Continua a Scavare la Trincea + Continuando a Scavare la Trincea 继续盖掩体 繼續蓋掩體 @@ -204,7 +204,7 @@ 塹壕を消す Schützengraben entfernen 참호 제거 - Rimuove Trincea + Rimuovi Trincea 移除掩体 移除掩體 @@ -215,7 +215,7 @@ Retirement de la tranchée Убирание окопа Odstraňuji zákop - 塹壕を消している + 塹壕を消しています Entferne Schützengraben 참호 제거중... Rimuovendo la Trincea diff --git a/addons/tripod/CfgWeapons.hpp b/addons/tripod/CfgWeapons.hpp index 5cbeb1faf6..4e609f4f3d 100644 --- a/addons/tripod/CfgWeapons.hpp +++ b/addons/tripod/CfgWeapons.hpp @@ -3,7 +3,7 @@ class CfgWeapons { class CBA_MiscItem_ItemInfo; class ACE_Tripod: ACE_ItemCore { - author[] = {"Rocko", "Scubaman3D"}; + author = "Rocko, Scubaman3D"; scope = 2; displayName = CSTRING(DisplayName); descriptionShort = ""; diff --git a/addons/tripod/functions/fnc_adjust.sqf b/addons/tripod/functions/fnc_adjust.sqf index b12f713ace..b81f9fa961 100644 --- a/addons/tripod/functions/fnc_adjust.sqf +++ b/addons/tripod/functions/fnc_adjust.sqf @@ -25,6 +25,7 @@ GVAR(adjustPFH) = [{ if (!(_unit getVariable [QGVAR(adjusting), false]) || {isNull _tripod} || {_unit distance _tripod > 5}) exitWith { call EFUNC(interaction,hideMouseHint); + [_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); [_unit, "DefaultAction", _unit getVariable [QGVAR(Adjust), -1]] call EFUNC(common,removeActionEventHandler); @@ -37,6 +38,7 @@ GVAR(adjustPFH) = [{ }, 0, [_unit, _tripod]] call CBA_fnc_addPerFrameHandler; +[_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); // add mouse button action and hint [localize "STR_ACE_Tripod_Done", "", localize "STR_ACE_Tripod_ScrollAction"] call EFUNC(interaction,showMouseHint); diff --git a/addons/ui/CfgVehicles.hpp b/addons/ui/CfgVehicles.hpp index 563cf22ce1..4cafe37429 100644 --- a/addons/ui/CfgVehicles.hpp +++ b/addons/ui/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(ModuleName); function = QFUNC(moduleInit); - scope = 2; + scope = 1; isGlobal = 1; icon = QUOTE(PATHTOF(UI\Icon_Module_UI_ca.paa)); class Arguments { diff --git a/addons/ui/functions/fnc_moduleInit.sqf b/addons/ui/functions/fnc_moduleInit.sqf index 6a3e74aa67..a8328c653d 100644 --- a/addons/ui/functions/fnc_moduleInit.sqf +++ b/addons/ui/functions/fnc_moduleInit.sqf @@ -17,8 +17,6 @@ */ #include "script_component.hpp" -if (!isServer) exitWith {}; - params ["_logic", "_units", "_activated"]; if (!_activated) exitWith {}; diff --git a/addons/ui/stringtable.xml b/addons/ui/stringtable.xml index 70fb157a69..11013cf28b 100644 --- a/addons/ui/stringtable.xml +++ b/addons/ui/stringtable.xml @@ -48,7 +48,7 @@ Permitir IU Selecionável Permettre l'IU selective Включить настраиваемый интерфейс - 選択できるユーザ インタフェイスを有効化します + UI 選択性を許可 Zezwól na selektywne UI Erlaube selektives UI 선택적 사용자 인터페이스 허가 @@ -555,7 +555,7 @@ A modificação da interface do usuário está desabilitada. Modifications de l'interface utilisateur désactivé. Изменение пользовательского интерфейса запрещено. - 変更されたユーザ インタフェイスを無効化します。 + ユーザ インタフェイスの変更は無効化されています。 Modyfikacja interfejsu użytkownika jest wyłączona. Die Modifizierung des UI ist deaktiviert. 사용자 인터페이스 변경이 비활성화 되어있습니다. @@ -568,7 +568,7 @@ Não é possível modificar um elemento forçado da interface do usuário. Impossible de modifier un élément de l'interface utilisateur forcé. Невозможно изменить зафиксированный элемент пользовательского интерфейса. - ユーザー インタフェイス要素は変更できません。 + ユーザー インタフェイス要素の強制はできません。 Nie można modyfikować wymuszonego elementu interfejsu użytkownika. Gesperrte UI-Elemente können nicht modifiziert werden. 강제 사용자 인터페이스는 변경하실 수 없습니다. diff --git a/addons/vehiclelock/ACE_Settings.hpp b/addons/vehiclelock/ACE_Settings.hpp index f8a431410f..75073f4f8f 100644 --- a/addons/vehiclelock/ACE_Settings.hpp +++ b/addons/vehiclelock/ACE_Settings.hpp @@ -1,20 +1,25 @@ class ACE_Settings { class GVAR(defaultLockpickStrength) { + category = CSTRING(DisplayName); displayName = CSTRING(DefaultLockpickStrength_DisplayName); description = CSTRING(DefaultLockpickStrength_Description); value = 10; typeName = "SCALAR"; + sliderSettings[] = {-1, 60, 5, 1}; }; class GVAR(lockVehicleInventory) { + category = CSTRING(DisplayName); displayName = CSTRING(LockVehicleInventory_DisplayName); description = CSTRING(LockVehicleInventory_Description); value = 0; typeName = "BOOL"; }; class GVAR(vehicleStartingLockState) { + category = CSTRING(DisplayName); displayName = CSTRING(VehicleStartingLockState_DisplayName); description = CSTRING(VehicleStartingLockState_Description); value = -1; typeName = "SCALAR"; + sliderSettings[] = {-1, 2, -1, -1}; // ToDo: Make this a list? }; }; diff --git a/addons/vehiclelock/CfgVehicles.hpp b/addons/vehiclelock/CfgVehicles.hpp index 4c51fae072..3038e3f99c 100644 --- a/addons/vehiclelock/CfgVehicles.hpp +++ b/addons/vehiclelock/CfgVehicles.hpp @@ -82,8 +82,8 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(Module_DisplayName); function = QFUNC(moduleInit); - scope = 2; - isGlobal = 0; + scope = 1; + isGlobal = 1; isSingular = 1; icon = QPATHTOF(UI\Icon_Module_VehicleLock_ca.paa); functionPriority = 0; diff --git a/addons/vehiclelock/CfgWeapons.hpp b/addons/vehiclelock/CfgWeapons.hpp index 9fe53d8760..8c7f7b137a 100644 --- a/addons/vehiclelock/CfgWeapons.hpp +++ b/addons/vehiclelock/CfgWeapons.hpp @@ -1,6 +1,6 @@ class CfgWeapons { - class CBA_MiscItem_ItemInfo; class ACE_ItemCore; + class CBA_MiscItem_ItemInfo; class ACE_key_master: ACE_ItemCore { scopeArsenal = 0; diff --git a/addons/vehiclelock/functions/fnc_moduleInit.sqf b/addons/vehiclelock/functions/fnc_moduleInit.sqf index b6c3f38426..cf9d1eb79c 100644 --- a/addons/vehiclelock/functions/fnc_moduleInit.sqf +++ b/addons/vehiclelock/functions/fnc_moduleInit.sqf @@ -17,8 +17,6 @@ */ #include "script_component.hpp" -if (!isServer) exitWith {}; - params ["_logic", "_syncedUnits", "_activated"]; TRACE_3("params",_logic,_syncedUnits,_activated); diff --git a/addons/vehiclelock/stringtable.xml b/addons/vehiclelock/stringtable.xml index 2ad5d7b22e..60563b8935 100644 --- a/addons/vehiclelock/stringtable.xml +++ b/addons/vehiclelock/stringtable.xml @@ -1,6 +1,13 @@  + + Vehicle Lock + Blocco Veicolo + 載具上鎖 + 载具上锁 + 車両の施錠 + Unlock Vehicle Fahrzeug aufschließen @@ -10,7 +17,7 @@ Odemknout vozidlo Jármű nyitása Открыть машину - Sblocca il veicolo + Sblocca il Veicolo Destravar veículo 車両の鍵を開ける 차량 잠금열기 @@ -26,7 +33,7 @@ Zamknout vozidlo Jármű zárása Закрыть машину - Chiudi il veicolo a chiave + Chiudi il Veicolo a chiave Travar Veículo 車両を施錠 차량 잠그기 @@ -188,7 +195,7 @@ Jármű-zár beállítás Запирание транспорта Impostazioni Blocco Veicolo - 車両の施錠の設定 + 車両の施錠設定 차량 잠금 설정 载具上锁设置 載具上鎖設置 diff --git a/addons/vehicles/CfgAmmo.hpp b/addons/vehicles/CfgAmmo.hpp index 96dd290625..8706a56570 100644 --- a/addons/vehicles/CfgAmmo.hpp +++ b/addons/vehicles/CfgAmmo.hpp @@ -1,25 +1,7 @@ class CfgAmmo { - - class Missile_AGM_02_F; - class M_Mo_120mm_AT: Missile_AGM_02_F { - cost = 400000; // Stop it from aiming at FUCKING RABBITS. - weaponLockSystem = 2; - }; - - class M_Mo_120mm_AT_LG: M_Mo_120mm_AT { - cost = 400000; - weaponLockSystem = 4; - }; - class MissileBase; class M_Mo_82mm_AT: MissileBase { - cost = 400000; - weaponLockSystem = 2; - }; - - class M_Mo_82mm_AT_LG: M_Mo_82mm_AT { - cost = 400000; - weaponLockSystem = 4; + cost = 400000; // Stop it from aiming at FUCKING RABBITS. }; }; diff --git a/addons/vehicles/CfgWeapons.hpp b/addons/vehicles/CfgWeapons.hpp index 78a82abccf..530a6913c7 100644 --- a/addons/vehicles/CfgWeapons.hpp +++ b/addons/vehicles/CfgWeapons.hpp @@ -46,24 +46,6 @@ class CfgWeapons { class far: close {}; }; - class autocannon_Base_F; - class autocannon_30mm_CTWS: autocannon_Base_F { - class AP: autocannon_Base_F { - magazines[] = {"60Rnd_30mm_APFSDS_shells","60Rnd_30mm_APFSDS_shells_Tracer_Red","60Rnd_30mm_APFSDS_shells_Tracer_Green","60Rnd_30mm_APFSDS_shells_Tracer_Yellow","140Rnd_30mm_MP_shells","140Rnd_30mm_MP_shells_Tracer_Red","140Rnd_30mm_MP_shells_Tracer_Green","140Rnd_30mm_MP_shells_Tracer_Yellow"}; - magazineReloadTime = 0; - }; - - muzzles[] = {"AP"}; - }; - class autocannon_40mm_CTWS: autocannon_Base_F { - class AP: autocannon_Base_F { - magazines[] = {"40Rnd_40mm_APFSDS_shells","40Rnd_40mm_APFSDS_Tracer_Red_shells","40Rnd_40mm_APFSDS_Tracer_Green_shells","40Rnd_40mm_APFSDS_Tracer_Yellow_shells","60Rnd_40mm_GPR_shells","60Rnd_40mm_GPR_Tracer_Red_shells","60Rnd_40mm_GPR_Tracer_Green_shells","60Rnd_40mm_GPR_Tracer_Yellow_shells"}; - magazineReloadTime = 0; - }; - - muzzles[] = {"AP"}; - }; - // make static weapons compatible with 100rnd mag variants class HMG_static: HMG_01 { magazines[] = {"500Rnd_127x99_mag","500Rnd_127x99_mag_Tracer_Red","500Rnd_127x99_mag_Tracer_Green","500Rnd_127x99_mag_Tracer_Yellow","200Rnd_127x99_mag","200Rnd_127x99_mag_Tracer_Red","200Rnd_127x99_mag_Tracer_Green","200Rnd_127x99_mag_Tracer_Yellow","100Rnd_127x99_mag","100Rnd_127x99_mag_Tracer_Red","100Rnd_127x99_mag_Tracer_Green","100Rnd_127x99_mag_Tracer_Yellow"}; diff --git a/addons/viewdistance/ACE_Settings.hpp b/addons/viewdistance/ACE_Settings.hpp index 356c7d86f2..63c2a5d19a 100644 --- a/addons/viewdistance/ACE_Settings.hpp +++ b/addons/viewdistance/ACE_Settings.hpp @@ -39,6 +39,7 @@ class ACE_Settings { value = 10000; // Value, NOT index. 10000 is the maximum in A3 displayName = CSTRING(limit_DisplayName); description = CSTRING(limit_setting); + sliderSettings[] = {500, 12000, 10000, 0}; }; class GVAR(objectViewDistanceCoeff) { category = CSTRING(Module_DisplayName); diff --git a/addons/viewdistance/CfgVehicles.hpp b/addons/viewdistance/CfgVehicles.hpp index 4c6639370c..db82b7bd92 100644 --- a/addons/viewdistance/CfgVehicles.hpp +++ b/addons/viewdistance/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { category = "ACE"; function = QUOTE(DFUNC(initModule)); displayName = CSTRING(Module_DisplayName); - scope = 2; + scope = 1; isGlobal = 1; isSingular = 1; //icon = ""; // needs an icon diff --git a/addons/viewdistance/functions/fnc_initModule.sqf b/addons/viewdistance/functions/fnc_initModule.sqf index 3afd3ccd6a..ad6b3852b4 100644 --- a/addons/viewdistance/functions/fnc_initModule.sqf +++ b/addons/viewdistance/functions/fnc_initModule.sqf @@ -18,8 +18,6 @@ #include "script_component.hpp" -if (!isServer) exitWith {}; - params ["_logic", "_units", "_activated"]; if (!_activated) exitWith { diff --git a/addons/weaponselect/XEH_postInit.sqf b/addons/weaponselect/XEH_postInit.sqf index b19059cff1..4706363271 100644 --- a/addons/weaponselect/XEH_postInit.sqf +++ b/addons/weaponselect/XEH_postInit.sqf @@ -196,6 +196,18 @@ if (!hasInterface) exitWith {}; {false}, [10, [false, false, false]], false] call CBA_fnc_addKeybind; //9 Key +["ACE3 Vehicles", QGVAR(CollisionLights), localize LSTRING(CollisionLights), { + // Conditions: canInteract + if (!([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith))) exitWith {false}; + // Conditions: specific + if ((ACE_player isEqualTo (vehicle ACE_player)) || {ACE_player != (driver (vehicle ACE_player))}) exitWith {false}; + + // Statement + (vehicle ACE_player) setCollisionLight !(isCollisionLightOn (vehicle ACE_player)); + true +}, +{false}, +[0, [false, false, false]]] call CBA_fnc_addKeybind; // Register fire event handler ["ace_firedPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler; diff --git a/addons/weaponselect/stringtable.xml b/addons/weaponselect/stringtable.xml index 0d1f63d112..d2f17dfe35 100644 --- a/addons/weaponselect/stringtable.xml +++ b/addons/weaponselect/stringtable.xml @@ -369,5 +369,13 @@ 发射烟雾发射器 發射煙霧發射器 + + Toggle Collision Lights + Attiva Luci di Collisione + 충돌 표시등 토글 + 切換碰撞燈 + 切换碰撞灯 + 衝突防止灯を切り替え + diff --git a/addons/weather/ACE_Settings.hpp b/addons/weather/ACE_Settings.hpp index d41b9d7b95..e2eb4590b7 100644 --- a/addons/weather/ACE_Settings.hpp +++ b/addons/weather/ACE_Settings.hpp @@ -1,32 +1,24 @@ class ACE_Settings { - class GVAR(enableServerController) { - displayName = CSTRING(enableServerController_DisplayName); - description = CSTRING(enableServerController_Description); + class GVAR(enabled) { + category = CSTRING(Module_DisplayName); + displayName = CSTRING(enabled_DisplayName); + description = CSTRING(enabled_Description); typeName = "BOOL"; value = 1; }; - class GVAR(useACEWeather) { - displayName = CSTRING(useACEWeather_DisplayName); - description = CSTRING(useACEWeather_Description); - typeName = "BOOL"; - value = 1; - }; - class GVAR(syncWind) { - displayName = CSTRING(syncWind_DisplayName); - description = CSTRING(syncWind_Description); - typeName = "BOOL"; - value = 1; - }; - class GVAR(syncMisc) { - displayName = CSTRING(syncMisc_DisplayName); - description = CSTRING(syncMisc_Description); - typeName = "BOOL"; - value = 1; - }; - class GVAR(serverUpdateInterval) { - displayName = CSTRING(serverUpdateInterval_DisplayName); - description = CSTRING(serverUpdateInterval_Description); + class GVAR(updateInterval) { + category = CSTRING(Module_DisplayName); + displayName = CSTRING(updateInterval_DisplayName); + description = CSTRING(updateInterval_Description); typeName = "SCALAR"; value = 60; + sliderSettings[] = {0, 300, 0, 0}; + }; + class GVAR(windSimulation) { + category = CSTRING(Module_DisplayName); + displayName = CSTRING(windSimulation_DisplayName); + description = CSTRING(windSimulation_Description); + typeName = "BOOL"; + value = 1; }; }; diff --git a/addons/weather/CfgVehicles.hpp b/addons/weather/CfgVehicles.hpp index eedffd7900..cab16183a8 100644 --- a/addons/weather/CfgVehicles.hpp +++ b/addons/weather/CfgVehicles.hpp @@ -1,7 +1,7 @@ class CfgVehicles { class ACE_Module; class GVAR(ModuleSettings): ACE_Module { - scope = 2; + scope = 1; displayName = CSTRING(Module_DisplayName); icon = QPATHTOF(UI\Icon_Module_Wind_ca.paa); category = "ACE"; @@ -12,36 +12,24 @@ class CfgVehicles { isTriggerActivated = 0; author = ECSTRING(common,ACETeam); class Arguments { - class enableServerController { - displayName = CSTRING(enableServerController_DisplayName); - description = CSTRING(enableServerController_Description); + class enabled { + displayName = CSTRING(enabled_DisplayName); + description = CSTRING(enabled_Description); typeName = "BOOL"; defaultValue = 1; }; - class useACEWeather { - displayName = CSTRING(useACEWeather_DisplayName); - description = CSTRING(useACEWeather_Description); - typeName = "BOOL"; - defaultValue = 1; - }; - class syncWind { - displayName = CSTRING(syncWind_DisplayName); - description = CSTRING(syncWind_Description); - typeName = "BOOL"; - defaultValue = 1; - }; - class syncMisc { - displayName = CSTRING(syncMisc_DisplayName); - description = CSTRING(syncMisc_Description); - typeName = "BOOL"; - defaultValue = 1; - }; - class serverUpdateInterval { - displayName = CSTRING(serverUpdateInterval_DisplayName); - description = CSTRING(serverUpdateInterval_Description); + class updateInterval { + displayName = CSTRING(updateInterval_DisplayName); + description = CSTRING(updateInterval_Description); typeName = "NUMBER"; defaultValue = 60; }; + class windSimulation { + displayName = CSTRING(windSimulation_DisplayName); + description = CSTRING(windSimulation_Description); + typeName = "BOOL"; + defaultValue = 1; + }; }; class ModuleDescription { description = CSTRING(Module_Description); diff --git a/addons/weather/XEH_PREP.hpp b/addons/weather/XEH_PREP.hpp index b13b938892..48788c0546 100644 --- a/addons/weather/XEH_PREP.hpp +++ b/addons/weather/XEH_PREP.hpp @@ -12,12 +12,9 @@ PREP(calculateWindChill); PREP(calculateWindSpeed); PREP(displayWindInfo); PREP(getMapData); -PREP(getWind); PREP(initModuleSettings); PREP(initWind); -PREP(serverController); -PREP(updateAceWeather); PREP(updateHumidity); -PREP(updateRain); PREP(updateTemperature); +PREP(updateWeather); PREP(updateWind); diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf index 09fc2909e3..51350226e1 100644 --- a/addons/weather/XEH_postInit.sqf +++ b/addons/weather/XEH_postInit.sqf @@ -1,28 +1,5 @@ #include "script_component.hpp" -// Randomization -GVAR(temperatureShift) = 3 - random 6; -GVAR(badWeatherShift) = (random 1) ^ 2 * 10; -GVAR(humidityShift) = (5 - random 10) / 100; - -GVAR(wind_period_start_time) = CBA_missionTime; - -"ACE_WIND_PARAMS" addPublicVariableEventHandler { GVAR(wind_period_start_time) = CBA_missionTime; }; -if (!isServer) then { - "ACE_MISC_PARAMS" addPublicVariableEventHandler { - TRACE_1("MISC PARAMS PVEH",ACE_MISC_PARAMS); - if (GVAR(syncMisc)) then { - 30 setRainbow (ACE_MISC_PARAMS select 0); - 30 setFog (ACE_MISC_PARAMS select 1); - }; - GVAR(temperatureShift) = (ACE_MISC_PARAMS select 2); - GVAR(badWeatherShift) = (ACE_MISC_PARAMS select 3); - GVAR(humidityShift) = (ACE_MISC_PARAMS select 4); - call FUNC(updateTemperature); - call FUNC(updateHumidity); - }; -}; - GVAR(WindInfo) = false; ["ACE3 Common", QGVAR(WindInfoKey), localize LSTRING(WindInfoKeyToggle), { @@ -48,27 +25,3 @@ GVAR(WindInfo) = false; (["RscWindIntuitive"] call BIS_fnc_rscLayer) cutText ["", "PLAIN", 2]; }, [0, [false, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key) - -simulWeatherSync; - - - - -["ace_settingsInitialized",{ - // Create a 1 sec delay PFEH to update wind/temp/humidity - GVAR(nextUpdateTempAndHumidity) = 0; - [{ - BEGIN_COUNTER(weatherPFEH); - - [] call FUNC(updateWind); //Every 1 second - - if (CBA_missionTime >= GVAR(nextUpdateTempAndHumidity)) then { - [] call FUNC(updateTemperature); //Every 20 seconds - [] call FUNC(updateHumidity); //Every 20 seconds - GVAR(nextUpdateTempAndHumidity) = 20 + CBA_missionTime; - }; - - END_COUNTER(weatherPFEH); - }, 1, []] call CBA_fnc_addPerFrameHandler; - -}] call CBA_fnc_addEventHandler; diff --git a/addons/weather/XEH_postServerInit.sqf b/addons/weather/XEH_postServerInit.sqf index 92cd53e337..433c161979 100644 --- a/addons/weather/XEH_postServerInit.sqf +++ b/addons/weather/XEH_postServerInit.sqf @@ -1,32 +1,16 @@ #include "script_component.hpp" -// Rain -GVAR(rain_next_period) = -1; -GVAR(rain_period_count) = 0; -GVAR(current_rain) = 0; -GVAR(rain_current_range) = -1+(random 2); -GVAR(rain_period_start_time) = CBA_missionTime; -GVAR(ACE_rain) = rain; - -// Wind -call FUNC(initWind); - ["ace_settingsInitialized", { - TRACE_3("ace_settingsInitialized eh",GVAR(enableServerController),GVAR(serverUpdateInterval),GVAR(useACEWeather)); + if (!GVAR(enabled)) exitWith {}; - if (GVAR(enableServerController)) then { - [FUNC(serverController), GVAR(serverUpdateInterval)] call CBA_fnc_addPerFrameHandler; + GVAR(temperatureShift) = random [-SD_TO_MIN_MAX(4), 0, SD_TO_MIN_MAX(4)]; // Gauss(0, 4) + GVAR(badWeatherShift) = random [-SD_TO_MIN_MAX(2) + 4, 4, 4 + SD_TO_MIN_MAX(2)]; // Gauss(4, 2) + GVAR(humidityShift) = random [-SD_TO_MIN_MAX(0.065), 0, SD_TO_MIN_MAX(0.065)]; // Gauss(0, 0.065) + + if (GVAR(windSimulation)) then { + call FUNC(initWind); + [FUNC(updateWind), 1] call CBA_fnc_addPerFrameHandler; }; + [FUNC(updateWeather), GVAR(updateInterval)] call CBA_fnc_addPerFrameHandler; - if (GVAR(useACEWeather)) then { - GVAR(nextUpdateRain) = 0; - - addMissionEventHandler ["EachFrame", { - if (CBA_missionTime >= GVAR(nextUpdateRain)) then { - [] call FUNC(updateRain); // Every 2 seconds - GVAR(nextUpdateRain) = 2 + CBA_missionTime; - }; - 0 setRain GVAR(ACE_rain); // Update rain every frame - }]; - }; }] call CBA_fnc_addEventHandler; diff --git a/addons/weather/functions/fnc_calculateBarometricPressure.sqf b/addons/weather/functions/fnc_calculateBarometricPressure.sqf index 29b8fa7877..0749004c21 100644 --- a/addons/weather/functions/fnc_calculateBarometricPressure.sqf +++ b/addons/weather/functions/fnc_calculateBarometricPressure.sqf @@ -15,4 +15,4 @@ */ #include "script_component.hpp" -((1013.25 - 10 * overcast) * (1 - (0.0065 * (EGVAR(common,mapAltitude) + _this)) / (KELVIN(GVAR(currentTemperature)) + 0.0065 * EGVAR(common,mapAltitude))) ^ 5.255754495); +((1013.25 - 10 * GVAR(currentOvercast)) * (1 - (0.0065 * (EGVAR(common,mapAltitude) + _this)) / (KELVIN(GVAR(currentTemperature)) + 0.0065 * EGVAR(common,mapAltitude))) ^ 5.255754495); diff --git a/addons/weather/functions/fnc_calculateRoughnessLength.sqf b/addons/weather/functions/fnc_calculateRoughnessLength.sqf index 423f3fc3d6..5112cf4ef5 100644 --- a/addons/weather/functions/fnc_calculateRoughnessLength.sqf +++ b/addons/weather/functions/fnc_calculateRoughnessLength.sqf @@ -18,7 +18,7 @@ // Source: http://es.ucsc.edu/~jnoble/wind/extrap/index.html #define ROUGHNESS_LENGTHS [0.0002, 0.0005, 0.0024, 0.03, 0.055, 0.1, 0.2, 0.4, 0.8, 1.6] -private _windSource = _this vectorDiff ((vectorNormalized ACE_wind) vectorMultiply 25); +private _windSource = _this vectorDiff ((vectorNormalized wind) vectorMultiply 25); private _nearBuildings = count (_windSource nearObjects ["Building", 50]); private _isWater = surfaceIsWater _windSource; diff --git a/addons/weather/functions/fnc_calculateWindSpeed.sqf b/addons/weather/functions/fnc_calculateWindSpeed.sqf index 206bc1d298..2f02c12852 100644 --- a/addons/weather/functions/fnc_calculateWindSpeed.sqf +++ b/addons/weather/functions/fnc_calculateWindSpeed.sqf @@ -26,18 +26,17 @@ private _fnc_polar2vect = { [_mag2D * sin(_dir), _mag2D * cos(_dir), _mag * sin(_elev)]; }; -private _windSpeed = vectorMagnitude ACE_wind; -private _windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); +private _windSpeed = vectorMagnitude wind; +private _windDir = (wind select 0) atan2 (wind select 1); private _windDirAdjusted = _windDir + 180; // Wind gradient if (_windGradientEnabled) then { if (_windSpeed > 0.05) then { private _height = (ASLToATL _position) select 2; - _height = 0 max _height min 20; - if (_height < 20) then { + if (_height > 0 && _height < 20) then { private _roughnessLength = _position call FUNC(calculateRoughnessLength); - _windSpeed = _windSpeed * abs(ln(_height / _roughnessLength) / ln(20 / _roughnessLength)); + _windSpeed = _windSpeed * (0 max (ln(_height / _roughnessLength) / ln(20 / _roughnessLength))); }; }; }; diff --git a/addons/weather/functions/fnc_displayWindInfo.sqf b/addons/weather/functions/fnc_displayWindInfo.sqf index 10a1e45861..a8409cb68a 100644 --- a/addons/weather/functions/fnc_displayWindInfo.sqf +++ b/addons/weather/functions/fnc_displayWindInfo.sqf @@ -55,7 +55,7 @@ TRACE_1("Starting Wind Info PFEH", GVAR(WindInfo)); private _playerDir = (ACE_player call CBA_fnc_headDir) select 0; - private _windDir = (ACE_wind select 0) atan2 (ACE_wind select 1); + private _windDir = (wind select 0) atan2 (wind select 1); _windDir = 30 * (round(((_windDir - _playerDir + 360) % 360) / 30)); // Color Codes from https://en.wikipedia.org/wiki/Beaufort_scale#Modern_scale diff --git a/addons/weather/functions/fnc_getMapData.sqf b/addons/weather/functions/fnc_getMapData.sqf index 2b222c2d8b..dd086b8414 100644 --- a/addons/weather/functions/fnc_getMapData.sqf +++ b/addons/weather/functions/fnc_getMapData.sqf @@ -43,8 +43,9 @@ GVAR(TempDay) = [1, 3, 9, 14, 19, 23, 25, 24, 21, 13, 7, 2]; GVAR(TempNight) = [-4, -3, 0, 4, 9, 12, 14, 14, 10, 6, 2, -2]; GVAR(Humidity) = [82, 80, 78, 70, 71, 72, 70, 73, 78, 80, 83, 82]; -GVAR(currentTemperature) = 20; -GVAR(currentHumidity) = 0.5; +GVAR(currentTemperature) = 15; +GVAR(currentHumidity) = 0; +GVAR(currentOvercast) = 0; // Get all non inherited arrays to filter maps that inherit from Stratis/Altis/Tanoa private _nonInheritedArrays = configProperties [configFile >> "CfgWorlds" >> _worldName, "isArray _x", false]; diff --git a/addons/weather/functions/fnc_getWind.sqf b/addons/weather/functions/fnc_getWind.sqf deleted file mode 100644 index 2d29335026..0000000000 --- a/addons/weather/functions/fnc_getWind.sqf +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Author: ACE2 Team, Ruthberg - * Calculate current wind locally from the data broadcasted by the server - * - * Arguments: - * None - * - * Return Value: - * Wind - * - * Example: - * [] call ace_weather_fnc_getWind - * - * Public: No - */ -#include "script_component.hpp" - -if (isNil "ACE_WIND_PARAMS") exitWith { [0, 0, 0] }; - -ACE_WIND_PARAMS params ["_dir", "_dirChange", "_spd", "_spdChange", "_period"]; -//Wind _dir is the "source" of the wind [eg: "northerly wind": _dir = 0 -> wind = [0,-1,0];] - -private _periodPosition = (CBA_missionTime - GVAR(wind_period_start_time)) min _period; -private _periodPercent = _periodPosition / _period; - -_spd = _spd + _spdChange * _periodPercent; -_dir = _dir + _dirChange * _periodPercent; - -_dir = (360 + _dir) % 360; - -TRACE_1("PeriodStartTime",Round(GVAR(wind_period_start_time))); -TRACE_2("Dir: Current/Change",Round(_dir),Round(_dirChange)); -TRACE_2("Spd: Current/Change",Round(_spd * 10) / 10,Round(_spdChange * 10) / 10); -TRACE_3("Period/Position/Percent",Round(_period),Round(_periodPosition),Round(_periodPercent * 100) / 100); - -// TODO: Add some deterministic noise - -[-_spd * sin(_dir), -_spd * cos(_dir), 0] diff --git a/addons/weather/functions/fnc_initModuleSettings.sqf b/addons/weather/functions/fnc_initModuleSettings.sqf index 9cafed8e71..3334392156 100644 --- a/addons/weather/functions/fnc_initModuleSettings.sqf +++ b/addons/weather/functions/fnc_initModuleSettings.sqf @@ -22,17 +22,13 @@ params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; -// Control server side weather propagation -[_logic, QGVAR(enableServerController), "enableServerController"] call EFUNC(common,readSettingFromModule); - -// Overrides the default weather (editor, mission settings) with ACE weather (map based) -[_logic, QGVAR(useACEWeather), "useACEWeather"] call EFUNC(common,readSettingFromModule); - -// Control client side weather effects -[_logic, QGVAR(syncWind), "syncWind"] call EFUNC(common,readSettingFromModule); // Wind, Gusts, Waves -[_logic, QGVAR(syncMisc), "syncMisc"] call EFUNC(common,readSettingFromModule); // Rainbow, Fog +// Turns the weather module on / off +[_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); // Server weather update interval -[_logic, QGVAR(serverUpdateInterval), "serverUpdateInterval"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(updateInterval), "updateInterval"] call EFUNC(common,readSettingFromModule); -GVAR(serverUpdateInterval) = 1 max GVAR(serverUpdateInterval) min 600; +// Turns the (map based) wind simulation on / off +[_logic, QGVAR(windSimulation), "windSimulation"] call EFUNC(common,readSettingFromModule); + +GVAR(updateInterval) = 1 max GVAR(updateInterval) min 600; diff --git a/addons/weather/functions/fnc_initWind.sqf b/addons/weather/functions/fnc_initWind.sqf index 634542c1e4..c40a6b4113 100644 --- a/addons/weather/functions/fnc_initWind.sqf +++ b/addons/weather/functions/fnc_initWind.sqf @@ -1,6 +1,6 @@ /* * Author: Ruthberg - * Inits the wind variables on mission start + * Inits the wind variables on the server (on mission start) * * Arguments: * None @@ -18,8 +18,6 @@ private _month = date select 1; private _windDirectionProbabilities = GVAR(WindDirectionProbabilities) select (_month - 1); -ACE_wind = [0, 0, 0]; - GVAR(wind_direction_reference) = random 360; private _sum = 0; for "_i" from 0 to 7 do { @@ -52,10 +50,14 @@ GVAR(max_wind_speed) = GVAR(WindSpeedMax) select (_month - 1); GVAR(max_wind_speed) = (GVAR(max_wind_speed) select 0) + (random (GVAR(max_wind_speed) select 1)) - (random (GVAR(max_wind_speed) select 1)); GVAR(max_wind_speed) = 0 max GVAR(max_wind_speed); +GVAR(wind_upper_span) = GVAR(max_wind_speed) - GVAR(mean_wind_speed); +GVAR(wind_lower_span) = GVAR(min_wind_speed) - GVAR(mean_wind_speed); + GVAR(current_wind_direction) = GVAR(wind_direction_reference); +GVAR(next_wind_direction) = GVAR(current_wind_direction); + GVAR(current_wind_speed) = GVAR(min_wind_speed) + (GVAR(max_wind_speed) - GVAR(min_wind_speed)) * (random 1); +GVAR(next_wind_speed) = GVAR(current_wind_speed); -GVAR(wind_period_count) = 0; -GVAR(wind_next_period) = -1; - -GVAR(wind_speed_debug_output) = []; +GVAR(last_wind_update) = 0; +GVAR(next_wind_udpate) = 0; diff --git a/addons/weather/functions/fnc_serverController.sqf b/addons/weather/functions/fnc_serverController.sqf deleted file mode 100644 index 96470aa3bb..0000000000 --- a/addons/weather/functions/fnc_serverController.sqf +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Author: Ruthberg - * Gather weather parameters and broadcast them to the clients - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ace_weather_fnc_serverController - * - * Public: No - */ -#include "script_component.hpp" - -if (GVAR(useACEWeather)) then { - // Use location based real world weather data - [] call FUNC(updateAceWeather); -} else { - // Simply replicate the server weather on the clients - if (GVAR(syncWind)) then { - //Wind _dir is the "source" of the wind [eg: "northerly wind": _dir = 0 -> wind = [0,-1,0];] - private _windDir = ((((wind select 0) atan2 (wind select 1)) + 180) % 360); - ACE_WIND_PARAMS = [_windDir, 0, vectorMagnitude wind, 0, GVAR(serverUpdateInterval)]; - publicVariable "ACE_WIND_PARAMS"; - }; - if (GVAR(syncMisc)) then { - ACE_MISC_PARAMS = [rainbow, fogParams, GVAR(temperatureShift), GVAR(badWeatherShift), GVAR(humidityShift)]; - publicVariable "ACE_MISC_PARAMS"; - }; -}; diff --git a/addons/weather/functions/fnc_updateAceWeather.sqf b/addons/weather/functions/fnc_updateAceWeather.sqf deleted file mode 100644 index 337ee8db00..0000000000 --- a/addons/weather/functions/fnc_updateAceWeather.sqf +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Author: ACE2 Team, esteldunedain, ruthberg - * Updates the wind and rain evolution on the server. Broadcasts the current and next values to the clients where needed. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ace_weather_fnc_updateAceWeather - * - * Public: No - */ -#include "script_component.hpp" - -private _overcastMultiplier = 1 max (2* overcast) min 2; // 0 (@ overcast 0), 2 (@ overcast 1) - -// Rain simulation -if (GVAR(rain_period_count) > GVAR(rain_next_period)) then { - - GVAR(rain_next_period) = ceil((1 + (random 10)) / _overcastMultiplier); - GVAR(rain_period_count) = 0; - - private _lastRain = GVAR(current_rain); - private _rainOverCast = 0; - - if (overcast >= 0.7) then { - _rainOverCast = (overcast - 0.7) / 0.3; - if (GVAR(current_rain) == 0) then { - // Initialize rain with a random strength depending on the current overcast value - GVAR(current_rain) = -0.25 + (random 0.75) + (random 0.5) * _rainOverCast; - }; - - GVAR(current_rain) = GVAR(current_rain) + GVAR(current_rain) * ((_rainOverCast * _overcastMultiplier) / 8) * GVAR(rain_current_range); - GVAR(current_rain) = 0 max GVAR(current_rain) min 1; - - GVAR(rain_current_range) = -1 + (random 2); - } else { - _rainOverCast = 1; - - GVAR(current_rain) = 0; - }; - - private _transitionTime = 1 + (_rainOverCast * 5) + (random (_rainOverCast * 20)); - - ACE_RAIN_PARAMS = [_lastRain, GVAR(current_rain), _transitionTime]; - TRACE_4("",_lastRain,_rainOverCast,_transitionTime,overcast); - - GVAR(rain_period_start_time) = CBA_missionTime; -}; - -// Wind simulation -if (GVAR(syncWind) && {GVAR(wind_period_count) > GVAR(wind_next_period)}) then { - - GVAR(wind_next_period) = ceil((2 + (random 5)) / _overcastMultiplier); - GVAR(wind_period_count) = 0; - - private _windDirectionVariance = (90 - (random 180)) * (overcast ^ 2); - private _windDirection = (360 + GVAR(wind_direction_reference) + _windDirectionVariance) % 360; - private _windDirectionChange = _windDirection - GVAR(current_wind_direction); - if (_windDirectionChange > 180) then { - _windDirectionChange = _windDirectionChange - 360; - }; - if (_windDirectionChange < -180) then { - _windDirectionChange = 360 + _windDirectionChange; - }; - - private _windMaxDiff = GVAR(mean_wind_speed) - GVAR(max_wind_speed); - private _windMinDiff = GVAR(min_wind_speed) - GVAR(mean_wind_speed); - - private _ratioMax = (random 1) ^ 2; - private _ratioMin = (random 1) ^ 2; - - private _windSpeed = GVAR(current_wind_speed); - private _windSpeedChange = 0; - if ((random 1) < (0.3 max overcast)) then { - _windSpeed = GVAR(mean_wind_speed) + _windMaxDiff * _ratioMax + _windMinDiff * _ratioMin; - _windSpeedChange = _windSpeed - GVAR(current_wind_speed); - }; - - private _transitionTime = GVAR(wind_next_period) * GVAR(serverUpdateInterval); - - TRACE_5("dirCur/dirNew/spdCur/spdNew/period",GVAR(current_wind_direction),_windDirection,GVAR(current_wind_speed),_windSpeed,_transitionTime); - - ACE_WIND_PARAMS = [GVAR(current_wind_direction), - _windDirectionChange, - GVAR(current_wind_speed), - _windSpeedChange, - _transitionTime]; - - GVAR(current_wind_direction) = _windDirection; - GVAR(current_wind_speed) = _windSpeed; - - GVAR(wind_period_start_time) = CBA_missionTime; - publicVariable "ACE_WIND_PARAMS"; -}; - - -if (GVAR(syncMisc)) then { - ACE_MISC_PARAMS = [rainbow, fogParams, GVAR(temperatureShift), GVAR(badWeatherShift), GVAR(humidityShift)]; - publicVariable "ACE_MISC_PARAMS"; -}; - -GVAR(rain_period_count) = GVAR(rain_period_count) + 1; -GVAR(wind_period_count) = GVAR(wind_period_count) + 1; diff --git a/addons/weather/functions/fnc_updateHumidity.sqf b/addons/weather/functions/fnc_updateHumidity.sqf index 79569e7367..24e0211ec8 100644 --- a/addons/weather/functions/fnc_updateHumidity.sqf +++ b/addons/weather/functions/fnc_updateHumidity.sqf @@ -1,6 +1,6 @@ /* * Author: ACE2 Team - * Updates GVAR(currentHumidity) + * Smoothly updates GVAR(currentHumidity) on the server (based on time of day and map data) * * Arguments: * None @@ -15,20 +15,18 @@ */ #include "script_component.hpp" -private _month = date select 1; - -GVAR(currentHumidity) = (GVAR(Humidity) select (_month - 1)) / 100; - -if ((rain > 0) && {overcast > 0.7}) then { +if (rain > 0 && overcast > 0.7) then { GVAR(currentHumidity) = 1; } else { + private _month = date select 1; + GVAR(currentHumidity) = (GVAR(Humidity) select (_month - 1)) / 100; + GVAR(currentHumidity) = GVAR(currentHumidity) + GVAR(humidityShift); private _avgTemperature = ((GVAR(TempDay) select (_month - 1)) + (GVAR(TempNight) select (_month - 1))) / 2; private _pS1 = 6.112 * exp((17.62 * _avgTemperature) / (243.12 + _avgTemperature)); private _PS2 = 6.112 * exp((17.62 * GVAR(currentTemperature)) / (243.12 + GVAR(currentTemperature))); GVAR(currentHumidity) = GVAR(currentHumidity) * _PS1 / _PS2; - GVAR(currentHumidity) = GVAR(currentHumidity) + GVAR(humidityShift); - - TRACE_1("humidityShift",GVAR(humidityShift)); }; GVAR(currentHumidity) = 0 max GVAR(currentHumidity) min 1; + +publicVariable QGVAR(currentHumidity); diff --git a/addons/weather/functions/fnc_updateRain.sqf b/addons/weather/functions/fnc_updateRain.sqf deleted file mode 100644 index 8b8e79abf1..0000000000 --- a/addons/weather/functions/fnc_updateRain.sqf +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Author: ACE2 Team, Ruthberg - * Updates rain based on ACE_RAIN_PARAMS - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ace_weather_fnc_updateRain - * - * Public: No - */ -#include "script_component.hpp" - -if (!isNil "ACE_RAIN_PARAMS") then { - ACE_RAIN_PARAMS params ["_oldRain", "_newRain", "_period"]; - - GVAR(ACE_Rain) = linearConversion [GVAR(rain_period_start_time), (GVAR(rain_period_start_time) + _period), CBA_missionTime, _oldRain, _newRain]; - - TRACE_3("Update Rain",rain,ACE_RAIN_PARAMS,GVAR(ACE_Rain)); -}; diff --git a/addons/weather/functions/fnc_updateTemperature.sqf b/addons/weather/functions/fnc_updateTemperature.sqf index 879e061574..7e597b1733 100644 --- a/addons/weather/functions/fnc_updateTemperature.sqf +++ b/addons/weather/functions/fnc_updateTemperature.sqf @@ -1,6 +1,6 @@ /* * Author: ACE2 Team - * Updates GVAR(currentTemperature) based on the map data + * Smoothly updates GVAR(currentTemperature) on the server (based on time of day and map data) * * Arguments: * None @@ -15,13 +15,11 @@ */ #include "script_component.hpp" -private _time = daytime; private _month = date select 1; - -private _timeRatio = abs(_time - 12) / 12; +private _timeRatio = abs(daytime - 12) / 12; GVAR(currentTemperature) = (GVAR(TempDay) select (_month - 1)) * (1 - _timeRatio) + (GVAR(TempNight) select (_month - 1)) * _timeRatio; -GVAR(currentTemperature) = GVAR(currentTemperature) + GVAR(temperatureShift) - GVAR(badWeatherShift) * overcast; +GVAR(currentTemperature) = GVAR(currentTemperature) + GVAR(temperatureShift) - GVAR(badWeatherShift) * GVAR(currentOvercast); GVAR(currentTemperature) = round(GVAR(currentTemperature) * 10) / 10; -TRACE_2("temperatureShift/badWeatherShift",GVAR(temperatureShift),GVAR(badWeatherShift)); +publicVariable QGVAR(currentTemperature); diff --git a/addons/weather/functions/fnc_updateWeather.sqf b/addons/weather/functions/fnc_updateWeather.sqf new file mode 100644 index 0000000000..8cb4633ef1 --- /dev/null +++ b/addons/weather/functions/fnc_updateWeather.sqf @@ -0,0 +1,43 @@ +/* + * Author: ACE2 Team, esteldunedain, Ruthberg + * Updates the weather evolution on the server. Broadcasts relevant weather information to the clients. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_weather_fnc_updateWeather + * + * Public: No + */ +#include "script_component.hpp" + +missionNamespace setVariable [QGVAR(currentOvercast), overcast, true]; + +[] call FUNC(updateTemperature); +[] call FUNC(updateHumidity); + +// Wind simulation +if (GVAR(windSimulation) && CBA_missionTime > GVAR(next_wind_udpate)) then { + + GVAR(current_wind_direction) = GVAR(next_wind_direction); + GVAR(current_wind_speed) = GVAR(next_wind_speed); + + private _transitionPeriod = GVAR(updateInterval) * (2 + (random 4)) / (1 + overcast); + GVAR(next_wind_udpate) = CBA_missionTime + _transitionPeriod; + + private _windDirectionVariance = (90 - (random 180)) * (overcast ^ 2); + GVAR(next_wind_direction) = (360 + GVAR(wind_direction_reference) + _windDirectionVariance) % 360; + + if ((random 1) < (0.3 max overcast)) then { + private _speedVariance = GVAR(wind_upper_span) * (random 1) ^ 2 + GVAR(wind_lower_span) * (random 1) ^ 2; + GVAR(next_wind_speed) = GVAR(mean_wind_speed) + _speedVariance; + }; + + GVAR(last_wind_update) = CBA_missionTime; + + TRACE_5("dirCur/dirNew/spdCur/spdNew/period",GVAR(current_wind_direction),GVAR(next_wind_direction),GVAR(current_wind_speed),GVAR(next_wind_speed),_transitionPeriod); +}; diff --git a/addons/weather/functions/fnc_updateWind.sqf b/addons/weather/functions/fnc_updateWind.sqf index 0dfc87a526..e4c3bbb033 100644 --- a/addons/weather/functions/fnc_updateWind.sqf +++ b/addons/weather/functions/fnc_updateWind.sqf @@ -1,6 +1,6 @@ /* * Author: ACE2 Team, Ruthberg - * Updates wind, gusts and waves based on ACE_wind + * Smoothly updates wind on the server (based on time of year and map data) * * Arguments: * None @@ -15,21 +15,7 @@ */ #include "script_component.hpp" -if (!GVAR(syncWind)) exitWith { ACE_wind = wind }; +private _speed = linearConversion [GVAR(last_wind_update), GVAR(next_wind_udpate), CBA_missionTime, GVAR(current_wind_speed), GVAR(next_wind_speed), true]; +private _direction = linearConversion [GVAR(last_wind_update), GVAR(next_wind_udpate), CBA_missionTime, GVAR(current_wind_direction), GVAR(next_wind_direction), true]; -ACE_wind = [] call FUNC(getWind); - -// setWind correctly replicates to clients -if (isServer) then { - setWind [ACE_wind select 0, ACE_wind select 1, true]; -}; - -2 setGusts 0; - -// Set waves: 0 when no wind, 1 when wind >= 16 m/s -private _newWaves = ((vectorMagnitude ACE_wind) / 16.0) min 1.0; -if (abs(_newWaves - waves) > 0.1) then { - 1 setWaves _newWaves; -}; - -TRACE_3("Wind/ACE_wind/Deviation(m/s)",wind,ACE_wind,Round((vectorMagnitude (ACE_wind vectorDiff wind)) * 1000) / 1000); +setWind [-_speed * sin(_direction), -_speed * cos(_direction), true]; diff --git a/addons/weather/stringtable.xml b/addons/weather/stringtable.xml index 7da25430b8..58ef756d64 100644 --- a/addons/weather/stringtable.xml +++ b/addons/weather/stringtable.xml @@ -65,39 +65,7 @@ 使用ACE天气模块来同步所有客户端的天气状态(多人游戏) 使用ACE天氣模塊來同步所有客戶端的天氣狀態(多人遊戲) - - Weather propagation - Zmiany pogody - Propagación del clima - Wetterübertragung - Změny počasí - Propagação do clima - Propagation de la météo - Időjárás-változás - Единая погода для всех - Propagazione Meteo - 天候の統一 - 기후 전파 - 天气状态广播 - 天氣狀態廣播 - - - Enables server side weather propagation - Aktywuje zmiany pogody po stronie serwera - Permite al servidor controlar la propagación del clima - Aktiviere serverseitige Wetterübertragung - Aktivuje změny počasí na straně serveru - Ativa propagação de clima via server - Active la propagation météo par le serveur - Engedélyezi a szerveroldali időjárás-változást - Включает управление погодой на серверной стороне - Abilita propagazione meteo lato server - サーバ側による天候の統一を有効化 - 서버의 기후를 전파합니다 - 启用伺服器的天气状态广播 - 啟用伺服器的天氣狀態廣播 - - + ACE Weather Pogoda ACE Clima ACE @@ -113,77 +81,15 @@ ACE 天气 ACE 天氣 - - Overrides the default weather (editor, mission settings) with ACE weather (map based) - Nadpisuje domyślne ustawienia pogody (edytor, wywiad) przy użyciu pogody ACE (zależna od mapy) - Sobreescribe el sistema climático por defecto (editor, ajustes de mision) con clima del ACE (basado en el mapa) - Überschreibt das Standardwetter (Editor, Missionseinstellungen) mit dem ACE-Wetter (kartenbasiert) - Přepíše výchozí počasí (editor, nastavení mise) s ACE počasím (podle mapy) - Sobreescreve o clima padrão (editor, ajustes de missão) pelo sistema de clima ACE (baseado por mapa) - Force la métao par défaut (éditeur, paramètres de mission) avec la météo ACE (basé sur la carte) - Felülbírálja az alapértelmezett időjárást (editor, küldetésbeállítások) az ACE időjárással (térkép-alapú) - Заменяет погоду по-умолчанию (из редактора, настроек миссии) погодой ACE (на основе карты) - Scavalca il meteo default (editor, parametri missione) con il meteo ACE (basato su mappa) - ACE 天候 (マップを元) による標準の天候 (エディタやミッション設定) を上書きします。 - 기존의 기후(에디터, 임무 설정)를 ACE 기후로 치환합니다. (지도에 따라) - 使ACE天气覆盖预设的天气 (编辑任务设置) - 使ACE天氣覆蓋預設的天氣 (編輯任務設置) + + Expands the existing weather by temperature, humidity and air pressure. + Erweitert das vorhandene Wetter um Temperatur, Luftfeuchtigkeit und Luftdruck. + Espande il tempo esistente per temperatura, umidità e pressione dell'aria. + 透過增加濕度、溫度與氣壓來增強天氣模擬的表現。 + 透过增加湿度、温度与气压来增强天气模拟的表现。 + 気温や湿度、大気圧によって既存の天候を拡張します。 - - Sync Wind - Synchronizuj wiatr - Sincronizar viento - Wind synchronisieren - Synchronizuj vítr - Sincronizar vento - Synchronisation du vent - Szél szinkronizálása - Синхрониз. ветер - Sincronizza Vento - 風を同期 - 바람 동기화 - 同步风 - 同步風 - - - Synchronizes wind - Synchronizuje wiatr - Sincroniza el viento - Synchronisiert den Wind - Synchronizace větru - Sincroniza o vento - Synchronise le vent - Szinkronizálja a szelet - Синхронизирует ветер - Sincronizza Vento - 風を同期 - 바람을 동기화 합니다 - 同步风 - 同步風 - - - Sync Misc - Synchronizuj różne - Sincronizar otros - Sonstiges synchronisieren - Synchronizuj různé - Sincronizar outros - Synchronisation autres - Egyéb szinkronizálása - Синхрониз. прочее - Sincronizza Misto - その他を同期 - 기타 동기화 - 同步杂项 - 同步雜項 - - - Synchronizes rainbow, fog, temperature and humidity - Sincronizza arcobaleno, nebbia, temperatura e umidità - 同步彩虹、霧、溫度與濕度 - 同步彩虹、雾、温度与湿度 - - + Update Interval Interwał aktualizacji Intervalo de actualización @@ -193,13 +99,13 @@ Intervalle de synchronisation Frissítési intervallum Интервал обновления - Intervallo Aggiornamenti + Intervallo Aggiornamento 更新間隔 갱신 간격 更新间隔 更新間隔 - + Defines the interval (seconds) between weather updates Określa interwał (sekundy) pomiędzy aktualizacjami pogody Defina el intervalo (en segundos) entre actualizacions de clima @@ -209,11 +115,27 @@ Défini un intervalle (secondes) entre deux synchronisations Megadja az intervallumot (másodpercben) az időjárás-frissítések között Определяет интервал (в секундах) между обновлениями погоды - Definisce l'intervallo (in secondi) tra aggiornamenti del meteo + Definisce l'intervallo(in secondi) tra aggiornamenti del meteo 天候を更新する間隔を定義します。(秒) 기후를 갱신 하는 간격을 초 단위로 정합니다. 设定天气更新的时间间隔(秒) 設定天氣更新的時間間隔(秒) + + Wind Simulation (map based) + Wind Simulation (kartenbasiert) + Simulazione del Vento (basato sulla mappa) + 風力模擬(基於地圖) + 风力模拟(基于地图) + 風シミュレーション (マップを基に) + + + Enables the map based wind simulation (overwrites vanilla wind) + Aktiviert die kartenbasierte Windsimulation (überschreibt Vanilla Wind) + Abilita la simulazione del vento basato sulla mappa (sovrascrive il vento vanilla) + 啟用後將遵照地圖特色進行風力模擬(覆蓋掉官方原版的風力模擬) + 启用后将遵照地图特色进行风力模拟(覆盖掉官方原版的风力模拟) + マップを基にした風シミュレーションを有効化 (標準の風を上書き) + diff --git a/addons/winddeflection/ACE_Settings.hpp b/addons/winddeflection/ACE_Settings.hpp index 2d6d7dfb3f..73c333479f 100644 --- a/addons/winddeflection/ACE_Settings.hpp +++ b/addons/winddeflection/ACE_Settings.hpp @@ -1,26 +1,24 @@ class ACE_Settings { class GVAR(enabled) { + category = CSTRING(windDeflection_DisplayName); displayName = CSTRING(deflectionModule_DisplayName); description = CSTRING(deflectionModule_Description); typeName = "BOOL"; value = 1; }; class GVAR(vehicleEnabled) { + category = CSTRING(windDeflection_DisplayName); displayName = CSTRING(vehicleEnabled_DisplayName); description = CSTRING(vehicleEnabled_Description); typeName = "BOOL"; value = 1; }; class GVAR(simulationInterval) { + category = CSTRING(windDeflection_DisplayName); displayName = CSTRING(simulationInterval_DisplayName); description = CSTRING(simulationInterval_Description); typeName = "SCALAR"; value = 0.05; - }; - class GVAR(simulationRadius) { - displayName = CSTRING(simulationRadius_DisplayName); - description = CSTRING(simulationRadius_Description); - typeName = "SCALAR"; - value = 3000; + sliderSettings[] = {0, 0.2, 0.05, 2}; }; }; diff --git a/addons/winddeflection/CfgVehicles.hpp b/addons/winddeflection/CfgVehicles.hpp index 866a00d9c1..e40d3eccbd 100644 --- a/addons/winddeflection/CfgVehicles.hpp +++ b/addons/winddeflection/CfgVehicles.hpp @@ -1,7 +1,7 @@ class CfgVehicles { class ACE_Module; class GVAR(ModuleSettings): ACE_Module { - scope = 2; + scope = 1; displayName = CSTRING(windDeflection_DisplayName); icon = QPATHTOF(UI\Icon_Module_Wind_ca.paa); category = "ACE"; @@ -30,15 +30,9 @@ class CfgVehicles { typeName = "NUMBER"; defaultValue = 0.05; }; - class simulationRadius { - displayName = CSTRING(simulationRadius_DisplayName); - description = CSTRING(simulationRadius_Description); - typeName = "NUMBER"; - defaultValue = 3000; - }; }; class ModuleDescription { description = CSTRING(windDeflection_Description); }; }; -}; \ No newline at end of file +}; diff --git a/addons/winddeflection/functions/fnc_handleFired.sqf b/addons/winddeflection/functions/fnc_handleFired.sqf index 2411c608d4..2ee6735053 100644 --- a/addons/winddeflection/functions/fnc_handleFired.sqf +++ b/addons/winddeflection/functions/fnc_handleFired.sqf @@ -18,9 +18,18 @@ //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); -if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false] && {_projectile isKindOf "BulletBase"} && {_unit isKindOf "Man"}) exitWith {false}; +if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false] && {_projectile isKindOf "BulletBase" && {_unit isKindOf "Man"}}) exitWith {false}; if (!((_projectile isKindOf "BulletBase") || {_projectile isKindOf "GrenadeBase"})) exitWith {false}; -if (_unit distance ACE_player > GVAR(simulationRadius)) exitWith {false}; +if (_unit distance ACE_player > 2000) exitWith {false}; + +private _abort = false; +if (!local _unit && {_projectile isKindOf "BulletBase"}) then { + private _ammoCount = (_unit ammo _muzzle) + 1; + private _tracersEvery = getNumber(configFile >> "CfgMagazines" >> _magazine >> "tracersEvery"); + private _lastRoundsTracer = getNumber(configFile >> "CfgMagazines" >> _magazine >> "lastRoundsTracer"); + _abort = _ammoCount > _lastRoundsTracer && {_tracersEvery == 0 || {(_ammoCount - _lastRoundsTracer) % _tracersEvery != 0}}; +}; +if (_abort) exitWith {false}; GVAR(trackedBullets) pushBack [_projectile, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")]; diff --git a/addons/winddeflection/functions/fnc_initModuleSettings.sqf b/addons/winddeflection/functions/fnc_initModuleSettings.sqf index 52847d15ee..f74ed869c6 100644 --- a/addons/winddeflection/functions/fnc_initModuleSettings.sqf +++ b/addons/winddeflection/functions/fnc_initModuleSettings.sqf @@ -25,6 +25,5 @@ if !(_activated) exitWith {}; [_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(vehicleEnabled), "vehicleEnabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(simulationInterval), "simulationInterval"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(simulationRadius), "simulationRadius"] call EFUNC(common,readSettingFromModule); GVAR(simulationInterval) = 0 max GVAR(simulationInterval) min 0.2; diff --git a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf index 5920bbb3e4..8c55f6785f 100644 --- a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf +++ b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf @@ -24,7 +24,7 @@ _args params ["_lastTime"]; private _deltaT = CBA_missionTime - _lastTime; _args set [0, CBA_missionTime]; - private _isWind = (vectorMagnitude ACE_wind > 0); + private _isWind = (vectorMagnitude wind > 0); { _x params ["_bullet", "_airFriction"]; @@ -36,7 +36,7 @@ GVAR(trackedBullets) deleteAt (GVAR(trackedBullets) find _x); } else { if (_isWind) then { - private _trueVelocity = _bulletVelocity vectorDiff ACE_wind; + private _trueVelocity = _bulletVelocity vectorDiff wind; private _trueSpeed = vectorMagnitude _trueVelocity; private _dragRef = _deltaT * _airFriction * _bulletSpeedSqr; diff --git a/addons/winddeflection/stringtable.xml b/addons/winddeflection/stringtable.xml index 572717afd4..932a4c76a1 100644 --- a/addons/winddeflection/stringtable.xml +++ b/addons/winddeflection/stringtable.xml @@ -193,38 +193,6 @@ 定义每个计算之间的时间间隔 定義每個計算之間的時間間隔 - - Simulation Radius - Zasięg symulacji - Radio de simulación - Simulationsradius - Oblast simulace - Radio da Simulação - Rayon de simulation - Szimulációs hatókör - Радиус симуляции - Raggio Simulazione - シミュレーション半径 - 模拟半径 - 模擬半徑 - 시뮬레이션 범위 - - - Defines the radius around the player (in meters) at which projectiles are wind deflected - Określa obszar naokoło gracza (w metrach), na którym pociski są znoszone przez wiatr - Define el radio alrededor del jugador (en metros) en el cual los proyectiles son desviados por el viento - Gibt den Radius (in Metern) um den Spieler an, in dem Projektile vom Wind beeinflusst werden - Definuje oblast kolem hráče (v metrech) v které je projektil ovlivněn větrem - Define o raio ao redor do jogador (em metros) em qual os projéteis são desviados pelo vento - Défini un rayon autour du joueur (en mètres) autour duquel les projectiles sont influencés par le vent - Meghatározza a játékos körüli hatókört (méterben), ahol a lövedékeket háríthatja a szél - Определяет радиус вокруг игрока (а метрах), в котором снаряды отклоняются ветром - Definisce il raggio attorno al giocatore (in metri) dove viene applicata la deviazione del vento ai proiettili - 弾道が風によって影響される範囲をプレイヤーを中心とした半径で定義します (メートル) - 플레이어 주위로 발사체가 풍향 변화의 영향을 받는 범위를 정합니다 (미터) - 定义玩家多少半径范围内(单位公尺)子弹会受到风偏的引响 - 定義玩家多少半徑範圍內(單位公尺)子彈會受到風偏的引響 - Wind influence on projectiles trajectory Wpływ wiatru na trajektorię lotu pocisków diff --git a/addons/yardage450/functions/fnc_acquireTarget.sqf b/addons/yardage450/functions/fnc_acquireTarget.sqf index abe5d8d729..7aa5994f78 100644 --- a/addons/yardage450/functions/fnc_acquireTarget.sqf +++ b/addons/yardage450/functions/fnc_acquireTarget.sqf @@ -32,23 +32,16 @@ GVAR(distanceIndex) = -1; [_this select 1] call CBA_fnc_removePerFrameHandler; }; - private _result = [eyePos ACE_player, ACE_player weaponDirection (currentWeapon ACE_player), ACE_player] call EFUNC(laser,shootRay); - private _distance = _result select 1; - - _distance = _distance - 1 + (random 2); + ([eyePos ACE_player, ACE_player weaponDirection (currentWeapon ACE_player), ACE_player] call EFUNC(laser,shootRay)) params ["", "_distance"]; GVAR(distanceIndex) = (GVAR(distanceIndex) + 1) % METERING_POINT_NUMBER; - GVAR(distances) set [GVAR(distanceIndex), _distance]; + GVAR(distances) set [GVAR(distanceIndex), _distance - 1 + (random 2)]; if (count GVAR(distances) == METERING_POINT_NUMBER) then { - private _min = MAX_DISTANCE; - private _max = MIN_DISTANCE; - { - _min = _x min _min; - _max = _max max _x; - } forEach GVAR(distances); + private _min = selectMin GVAR(distances); + private _max = selectMax GVAR(distances); - if (abs(_max - _min) < 5) then { + if (_max - _min < 5) then { private _range = (_min + _max) / 2; if (_range >= MIN_DISTANCE && _range <= MAX_DISTANCE) then { GVAR(targetAcquired) = true; diff --git a/addons/yardage450/functions/fnc_turnOn.sqf b/addons/yardage450/functions/fnc_turnOn.sqf index 28e9c1da2d..59ed5c2ec8 100644 --- a/addons/yardage450/functions/fnc_turnOn.sqf +++ b/addons/yardage450/functions/fnc_turnOn.sqf @@ -9,7 +9,7 @@ * None * * Example: - * call ace_yardage450_fnc_acquireTarget + * call ace_yardage450_fnc_turnOn * * Public: No */ diff --git a/addons/zeus/ACE_Settings.hpp b/addons/zeus/ACE_Settings.hpp index b520b7a31a..0955fb135a 100644 --- a/addons/zeus/ACE_Settings.hpp +++ b/addons/zeus/ACE_Settings.hpp @@ -1,29 +1,34 @@ class ACE_Settings { class GVAR(zeusAscension) { + category = CSTRING(DisplayName); displayName = CSTRING(ascension_DisplayName); description = CSTRING(ascension_Description); typeName = "BOOL"; value = 0; }; class GVAR(zeusBird) { + category = CSTRING(DisplayName); displayName = CSTRING(bird_DisplayName); description = CSTRING(bird_Description); typeName = "BOOL"; value = 0; }; class GVAR(remoteWind) { + category = CSTRING(DisplayName); displayName = CSTRING(remoteWind_DisplayName); description = CSTRING(remoteWind_Description); typeName = "BOOL"; value = 0; }; class GVAR(radioOrdnance) { + category = CSTRING(DisplayName); displayName = CSTRING(radioOrdnance_DisplayName); description = CSTRING(radioOrdnance_Description); typeName = "BOOL"; value = 0; }; class GVAR(revealMines) { + category = CSTRING(DisplayName); displayName = CSTRING(revealMines_DisplayName); description = CSTRING(revealMines_Description); typeName = "SCALAR"; @@ -31,6 +36,7 @@ class ACE_Settings { values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(revealMines_partial), CSTRING(revealMines_full)}; }; class GVAR(autoAddObjects) { + category = CSTRING(DisplayName); typeName = "BOOL"; value = 0; displayName = CSTRING(AddObjectsToCurator); diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index 453e69616b..49fcb9532a 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -16,7 +16,7 @@ class CfgVehicles { function = QFUNC(bi_moduleRemoteControl); }; class GVAR(moduleSettings): ACE_Module { - scope = 2; + scope = 1; displayName = CSTRING(Settings_DisplayName); icon = QPATHTOF(UI\Icon_Module_Zeus_Settings_ca.paa); category = "ACE"; @@ -266,4 +266,7 @@ class CfgVehicles { displayName = CSTRING(ModuleRemoveArsenal_DisplayName); function = QFUNC(moduleRemoveArsenal); }; + class ModuleArsenal_F: Module_F { + function=QFUNC(bi_moduleArsenal); + }; }; diff --git a/addons/zeus/XEH_PREP.hpp b/addons/zeus/XEH_PREP.hpp index bb842edaf3..aba07e7114 100644 --- a/addons/zeus/XEH_PREP.hpp +++ b/addons/zeus/XEH_PREP.hpp @@ -1,5 +1,6 @@ PREP(addObjectToCurator); +PREP(bi_moduleArsenal); PREP(bi_moduleCurator); PREP(bi_moduleMine); PREP(bi_moduleProjectile); diff --git a/addons/zeus/functions/fnc_bi_moduleArsenal.sqf b/addons/zeus/functions/fnc_bi_moduleArsenal.sqf new file mode 100644 index 0000000000..2990d42633 --- /dev/null +++ b/addons/zeus/functions/fnc_bi_moduleArsenal.sqf @@ -0,0 +1,66 @@ +/* + * Author: Bohemia Interactive + * Module function to open a full arsenal on a unit + * Edited to use ACE arsenal when present, moved isPlayer check + * + * Arguments: + * 0: The module logic + * 1: Not used + * 2: activated + * + * Return Value: + * None + * + * Example: + * [LOGIC, nil, true] call ace_zeus_fnc_bi_moduleArsenal + * + * Public: No +*/ + +#include "script_component.hpp" + +params ["_logic", "", "_activated"]; + +if (_activated && local _logic) then { + _unit = _logic getvariable ["bis_fnc_curatorAttachObject_object",objnull]; + + //--- Check if the unit is suitable + _error = ""; + switch true do { + case (isnull _unit): {_error = localize "str_a3_BIS_fnc_showCuratorFeedbackMessage_506";}; + case !(alive _unit): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorDead";}; + case (isnull group _unit || !(side group _unit in [east,west,resistance,civilian])): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorBrain";}; + case (vehicle _unit != _unit || effectivecommander _unit != _unit): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorVehicle";}; + }; + + if (_error == "") then { + if (["ACE_Arsenal"] call EFUNC(common,isModLoaded)) then { + if (!isPlayer _unit || {player == _unit}) then { + + [{ + params ["_unit"]; + + [_unit, _unit, true] call EFUNC(arsenal,openBox); + }, [_unit]] call CBA_fnc_directCall; + } else { + + [objNull, localize "str_a3_BIS_fnc_moduleArsenal_errorDead"] call bis_fnc_showCuratorFeedbackMessage; + }; + } else { + if !(isPlayer _unit) then { + + ([] call bis_fnc_rscLayer) cuttext ["","black out",0.5]; + ["#(argb,8,8,3)color(0,0,0,1)",false,nil,0,[0.5,0]] call bis_fnc_textTiles; + ["Open",[true,nil,_unit]] call bis_fnc_arsenal; + ([] call bis_fnc_rscLayer) cuttext ["","plain"]; + } else { + + [objNull, localize "str_a3_BIS_fnc_moduleArsenal_errorDead"] call bis_fnc_showCuratorFeedbackMessage; + }; + }; + } else { + + [objNull,_error] call bis_fnc_showCuratorFeedbackMessage; + }; + deleteVehicle _logic; +}; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 434130ffe6..1c85706d09 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -22,7 +22,7 @@ params ["_logic", "_units", "_activated"]; if (_activated) then { - _explosive = gettext (configFile >> "CfgVehicles" >> typeOf _logic >> "explosive"); + _explosive = gettext (configfile >> "cfgvehicles" >> typeof _logic >> "explosive"); if (_explosive != "") then { _explosive = createvehicle [_explosive,position _logic,[],0,"none"]; _explosive attachto [_logic]; @@ -44,7 +44,7 @@ if (_activated) then { //--- Show hint to curator who placed the object [[["Curator","PlaceMines"],nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",_logic] call bis_fnc_mp; - waitUntil {sleep 0.1; isnull _explosive || isnull _logic || !alive _logic}; + waituntil {sleep 0.1; isnull _explosive || isnull _logic || !alive _logic}; if (isnull _logic) then {deletevehicle _explosive;} else {_explosive setdamage 1;}; deletevehicle _logic; }; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index eaad90c6d6..3d974c126c 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -20,33 +20,30 @@ #include "script_component.hpp" -_fnc_scriptNameParentTemp = if !(isNil '_fnc_scriptName') then {_fnc_scriptName} else {'BIS_fnc_moduleProjectile'}; -private _fnc_scriptNameParent = _fnc_scriptNameParentTemp; -_fnc_scriptNameParentTemp = nil; - -private _fnc_scriptName = 'BIS_fnc_moduleProjectile'; -scriptname _fnc_scriptName; - -params ["_logic", "_units", "_activated"]; +_logic = _this select 0; +_units = _this select 1; +_activated = _this select 2; if ({local _x} count (objectcurators _logic) > 0) then { //--- Reveal the circle to curators _logic hideobject false; _logic setpos position _logic; }; -if !(isserver) exitWith {}; +if !(isserver) exitwith {}; 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 { - _CfgAmmo = configFile >> "CfgAmmo" >> _ammo; - _dirVar = _fnc_scriptname + typeOf _logic; - _logic setdir (missionnamespace getVariable [_dirVar,direction _logic]); //--- Restore custom direction + _cfgAmmo = configfile >> "cfgammo" >> _ammo; + //if !(isclass _cfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; + // It seems BI broke this part... + // _dirVar = _fnc_scriptname + typeof _logic; + // _logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction _pos = getposatl _logic; _posAmmo = +_pos; _posAmmo set [2,0]; _dir = direction _logic; - _simulation = tolower gettext (configFile >> "CfgAmmo" >> _ammo >> "simulation"); + _simulation = tolower gettext (configfile >> "cfgammo" >> _ammo >> "simulation"); _altitude = 0; _velocity = []; _attach = false; @@ -107,15 +104,15 @@ if (_activated) then { }; }; }; - } forEach _entities; + } foreach _entities; }; }; - if (count _hint > 0 && {count objectCurators _logic > 0}) then { + if (count _hint > 0 && {count objectcurators _logic > 0}) then { [[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectcurators _logic] call bis_fnc_mp; }; if (count _velocity == 3) then { - _altitude = (_logic getVariable ["altitude",_altitude]) call bis_fnc_parsenumber; - _radio = _logic getVariable ["radio",_radio]; + _altitude = (_logic getvariable ["altitude",_altitude]) call bis_fnc_parsenumber; + _radio = _logic getvariable ["radio",_radio]; //--- Create projectile _posAmmo set [2,_altitude]; @@ -124,7 +121,7 @@ if (_activated) then { _projectile setvelocity _velocity; if (_attach) then {_projectile attachto [_logic,[0,0,_altitude]];}; - // Added by ace_zeus for ace_frag compatibility + // Added by ace_zeus for ace_frag compatibility if (!isNil QEFUNC(frag,addPfhRound)) then { [objNull, _ammo, _projectile, true] call EFUNC(frag,addPfhRound); }; @@ -143,13 +140,13 @@ if (_activated) then { //--- Update if (_attach) then { - waitUntil { + waituntil { _soundSource setposatl getposatl _projectile; sleep 1; isnull _projectile || isnull _logic }; } else { - waitUntil { + waituntil { _soundSource setposatl getposatl _projectile; if (getposatl _logic distance _pos > 0 || direction _logic != _dir) then { @@ -161,7 +158,7 @@ if (_activated) then { _projectile setposasl _posNew; _pos = getposatl _logic; _dir = direction _logic; - missionnamespace setVariable [_dirVar,_dir]; + missionnamespace setvariable [_dirVar,_dir]; }; sleep 0.1; isnull _projectile || isnull _logic @@ -180,7 +177,7 @@ if (_activated) then { } else { //--- Repeat to achieve permanent effect - _repeat = _logic getVariable ["repeat",0] > 0; + _repeat = _logic getvariable ["repeat",0] > 0; if (_repeat) then { [_logic,_units,_activated] call bis_fnc_moduleprojectile; } else { @@ -191,6 +188,6 @@ if (_activated) then { deletevehicle _logic; }; } else { - ["Cannot create projectile, 'ammo' config attribute is missing in %1",typeOf _logic] call bis_fnc_error; + ["Cannot create projectile, 'ammo' config attribute is missing in %1",typeof _logic] call bis_fnc_error; }; }; diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index 6d2d3fd950..994b445d8d 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -34,13 +34,16 @@ if (_activated && local _logic && !isnull curatorcamera) then { if ((_mouseOver select 0) == typename objnull) then {_unit = _mouseOver select 1;}; _unit = effectivecommander _unit; + //--- Temp owner + private _tempOwner = _unit getvariable ["bis_fnc_moduleRemoteControl_owner", objnull]; + //--- Check if the unit is suitable _error = ""; if !(side group _unit in [east,west,resistance,civilian]) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorEmpty";}; if (isplayer _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorPlayer";}; if !(alive _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorDestroyed";}; if (isnull _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorNull";}; - if !(isnull (_unit getvariable ["bis_fnc_moduleRemoteControl_owner",objnull])) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; + if (!isnull _tempOwner && {_tempOwner in allPlayers}) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; if (isuavconnected vehicle _unit) then {_error = localize "str_a3_cfgvehicles_moduleremotecontrol_f_errorControl";}; if (_error == "") then { diff --git a/addons/zeus/functions/fnc_getModuleDestination.sqf b/addons/zeus/functions/fnc_getModuleDestination.sqf index 138d8342a5..f29b42550c 100644 --- a/addons/zeus/functions/fnc_getModuleDestination.sqf +++ b/addons/zeus/functions/fnc_getModuleDestination.sqf @@ -40,8 +40,8 @@ GVAR(moduleDestination_displayEHMouse) = [findDisplay 312, "mouseButtonDown", { params ["", "_mouseButton", "", "", "_shift", "_ctrl", "_alt"]; if (_mouseButton != 0) exitWith {}; // Only watch for LMB - TRACE_2("placed",_object,_mousePosASL); + //IGNORE_PRIVATE_WARNING ["_thisArgs"] _thisArgs params ["_object", "_code"]; // Get mouse position on 2D map or 3D world @@ -52,6 +52,7 @@ GVAR(moduleDestination_displayEHMouse) = [findDisplay 312, "mouseButtonDown", { } else { AGLToASL (screenToWorld getMousePosition); }; + TRACE_2("placed",_object,_mousePosASL); [true, _object, _mousePosASL, _shift, _ctrl, _alt] call _code; GVAR(moduleDestination_running) = false; @@ -62,8 +63,8 @@ GVAR(moduleDestination_displayEHKeyboard) = [findDisplay 312, "KeyDown", { params ["", "_keyCode", "_shift", "_ctrl", "_alt"]; if (_keyCode != 1) exitWith {}; // Only watch for ESC - TRACE_2("aborted",_object,_mousePosASL); + //IGNORE_PRIVATE_WARNING ["_thisArgs"] _thisArgs params ["_object", "_code"]; // Get mouse position on 2D map or 3D world @@ -74,6 +75,7 @@ GVAR(moduleDestination_displayEHKeyboard) = [findDisplay 312, "KeyDown", { } else { AGLToASL (screenToWorld getMousePosition); }; + TRACE_2("aborted",_object,_mousePosASL); [false, _object, _mousePosASL, _shift, _ctrl, _alt] call _code; GVAR(moduleDestination_running) = false; @@ -83,6 +85,7 @@ GVAR(moduleDestination_displayEHKeyboard) = [findDisplay 312, "KeyDown", { // Add draw EH for the zeus map - draws the 2D icon and line GVAR(moduleDestination_mapDrawEH) = [((findDisplay 312) displayCtrl 50), "draw", { params ["_mapCtrl"]; + //IGNORE_PRIVATE_WARNING ["_thisArgs"] _thisArgs params ["_object", "_text", "_icon", "_color"]; private _pos2d = (((findDisplay 312) displayCtrl 50) ctrlMapScreenToWorld getMousePosition); diff --git a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf index 2899d8d952..05c5de668e 100644 --- a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf +++ b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf @@ -25,27 +25,23 @@ if !(isClass (configFile >> "ACE_Curator")) exitWith { ERROR("The ACE_Curator class does not exist") }; params ["_logic"]; + private _removeAddons = []; - -private _numCfgs = count (configFile >> "ACE_Curator"); -for "_n" from 0 to (_numCfgs - 1) do { - private _cfg = (configFile >> "ACE_Curator") select _n; - - if (isArray _cfg) then { - _requiredAddon = getArray _cfg; +{ + private _addon = _x; + if (isArray _addon) then { { if !(isClass (configFile >> "CfgPatches" >> _x)) exitWith { - _removeAddons pushBack (configName _cfg); + _removeAddons pushBack (configName _addon); }; - } forEach _requiredAddon; + } forEach (getArray _addon); }; - if (isText _cfg) then { - _requiredAddon = getText _cfg; - if !(isClass (configFile >> "CfgPatches" >> _requiredAddon)) then { - _removeAddons pushBack (configName _cfg); + if (isText _addon) then { + if !(isClass (configFile >> "CfgPatches" >> getText _addon)) then { + _removeAddons pushBack (configName _addon); }; }; -}; +} forEach configProperties [configFile >> "ACE_Curator"]; _logic removeCuratorAddons _removeAddons; diff --git a/addons/zeus/functions/fnc_moduleAddArsenal.sqf b/addons/zeus/functions/fnc_moduleAddArsenal.sqf index b8eed64d76..68b5148521 100644 --- a/addons/zeus/functions/fnc_moduleAddArsenal.sqf +++ b/addons/zeus/functions/fnc_moduleAddArsenal.sqf @@ -29,9 +29,15 @@ switch (true) do { [LSTRING(OnlyAlive)] call FUNC(showMessage); }; default { - TRACE_1("BIS_fnc_arsenal: AmmoboxInit",_object); - // Global Effects: "Action to access the Arsenal will be added automatically on all clients." - ["AmmoboxInit", [_object, true]] call BIS_fnc_arsenal; + if (["ACE_Arsenal"] call EFUNC(common,isModLoaded)) then { + + [_object, true, true] call EFUNC(arsenal,initBox); + } else { + + TRACE_1("BIS_fnc_arsenal: AmmoboxInit",_object); + // Global Effects: "Action to access the Arsenal will be added automatically on all clients." + ["AmmoboxInit", [_object, true]] call BIS_fnc_arsenal; + }; }; }; diff --git a/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf b/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf index 5b05d256f4..6f60f80947 100644 --- a/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf +++ b/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf @@ -17,9 +17,9 @@ */ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && {local _logic}) exitWith {}; +if !(local _logic) exitWith {}; if !(["ace_fastroping"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf b/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf index 56d3dca9d9..ed633c2033 100644 --- a/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf +++ b/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf @@ -17,9 +17,9 @@ */ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if !(["ace_cargo"] call EFUNC(common,isModLoaded) && ["ace_repair"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf b/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf index da9327af7a..58cd6c1063 100644 --- a/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf +++ b/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf @@ -17,9 +17,9 @@ */ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if !(["ace_cargo"] call EFUNC(common,isModLoaded) && ["ace_repair"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleCaptive.sqf b/addons/zeus/functions/fnc_moduleCaptive.sqf index c2345616f0..317c785f20 100644 --- a/addons/zeus/functions/fnc_moduleCaptive.sqf +++ b/addons/zeus/functions/fnc_moduleCaptive.sqf @@ -18,9 +18,9 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if (isNil QEFUNC(captives,setHandcuffed)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleConfigurePylons.sqf b/addons/zeus/functions/fnc_moduleConfigurePylons.sqf index 4998ae8bac..404605451e 100644 --- a/addons/zeus/functions/fnc_moduleConfigurePylons.sqf +++ b/addons/zeus/functions/fnc_moduleConfigurePylons.sqf @@ -19,9 +19,9 @@ if (canSuspend) exitWith {[FUNC(moduleConfigurePylons), _this] call CBA_fnc_directCall;}; -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && {local _logic}) exitWith {}; +if !(local _logic) exitWith {}; private _aircraft = attachedTo _logic; diff --git a/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf b/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf index ce864e85b0..1d4e2769b8 100644 --- a/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf +++ b/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf @@ -17,8 +17,8 @@ #include "script_component.hpp" -_this params ["_varName","_varValue"]; -_varValue params ["_general","_accuracy","_handling","_spotting","_cover","_combat"]; +params ["_varName", "_varValue"]; +_varValue params ["_general", "_accuracy", "_handling", "_spotting", "_cover", "_combat"]; TRACE_1("Params",_this); TRACE_6("AI settings updated",GVAR(GlobalSkillAI)); diff --git a/addons/zeus/functions/fnc_moduleGroupSide.sqf b/addons/zeus/functions/fnc_moduleGroupSide.sqf index 050b92a9fc..2a52df09da 100644 --- a/addons/zeus/functions/fnc_moduleGroupSide.sqf +++ b/addons/zeus/functions/fnc_moduleGroupSide.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" -params ["_unit","_newSide"]; +params ["_unit", "_newSide"]; private _side = side _unit; // Nothing to do here diff --git a/addons/zeus/functions/fnc_moduleLoadIntoCargo.sqf b/addons/zeus/functions/fnc_moduleLoadIntoCargo.sqf index 630fd537ef..33ceb703a1 100644 --- a/addons/zeus/functions/fnc_moduleLoadIntoCargo.sqf +++ b/addons/zeus/functions/fnc_moduleLoadIntoCargo.sqf @@ -19,9 +19,9 @@ if (canSuspend) exitWith {[FUNC(moduleLoadIntoCargo), _this] call CBA_fnc_directCall;}; -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && {local _logic}) exitWith {}; +if !(local _logic) exitWith {}; private _cargo = attachedTo _logic; diff --git a/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf b/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf index 9e267e4cf5..b14509c272 100644 --- a/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf +++ b/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf @@ -30,11 +30,18 @@ switch (true) do { [LSTRING(OnlyAlive)] call FUNC(showMessage); }; default { - TRACE_1("Calling removeVirtualXXXCargo functions",_object); - [_object, (_object call BIS_fnc_getVirtualItemCargo), true] call BIS_fnc_removeVirtualItemCargo; - [_object, (_object call BIS_fnc_getVirtualWeaponCargo), true] call BIS_fnc_removeVirtualWeaponCargo; - [_object, (_object call BIS_fnc_getVirtualMagazineCargo), true] call BIS_fnc_removeVirtualMagazineCargo; - [_object, (_object call BIS_fnc_getVirtualBackpackCargo), true] call BIS_fnc_removeVirtualBackpackCargo; + + if (["ACE_Arsenal"] call EFUNC(common,isModLoaded)) then { + + [_object, true, true] call EFUNC(arsenal,removeBox); + } else { + + TRACE_1("Calling removeVirtualXXXCargo functions",_object); + [_object, (_object call BIS_fnc_getVirtualItemCargo), true] call BIS_fnc_removeVirtualItemCargo; + [_object, (_object call BIS_fnc_getVirtualWeaponCargo), true] call BIS_fnc_removeVirtualWeaponCargo; + [_object, (_object call BIS_fnc_getVirtualMagazineCargo), true] call BIS_fnc_removeVirtualMagazineCargo; + [_object, (_object call BIS_fnc_getVirtualBackpackCargo), true] call BIS_fnc_removeVirtualBackpackCargo; + }; }; }; diff --git a/addons/zeus/functions/fnc_moduleSearchNearby.sqf b/addons/zeus/functions/fnc_moduleSearchNearby.sqf index 30d545e6d9..a73dbd7fe8 100644 --- a/addons/zeus/functions/fnc_moduleSearchNearby.sqf +++ b/addons/zeus/functions/fnc_moduleSearchNearby.sqf @@ -18,9 +18,9 @@ #include "script_component.hpp" -params ["_logic","_units","_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; //Validate the module target: private _unit = effectiveCommander (attachedTo _logic); diff --git a/addons/zeus/functions/fnc_moduleSetMedic.sqf b/addons/zeus/functions/fnc_moduleSetMedic.sqf index 578aeb27f9..b2cd233bc7 100644 --- a/addons/zeus/functions/fnc_moduleSetMedic.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedic.sqf @@ -18,9 +18,9 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf index 09636bc006..4977b21986 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf @@ -18,9 +18,9 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf index 6e240416ff..a819a15d9e 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf @@ -18,9 +18,9 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if !(["ACE_Medical"] call EFUNC(common,isModLoaded)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleSurrender.sqf b/addons/zeus/functions/fnc_moduleSurrender.sqf index 2d24242fbd..fceb72b57f 100644 --- a/addons/zeus/functions/fnc_moduleSurrender.sqf +++ b/addons/zeus/functions/fnc_moduleSurrender.sqf @@ -18,9 +18,9 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if (isNil QEFUNC(captives,setSurrendered)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf index b6b4361757..63e2a8c6ae 100644 --- a/addons/zeus/functions/fnc_moduleUnconscious.sqf +++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf @@ -18,9 +18,9 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; +params ["_logic"]; -if !(_activated && local _logic) exitWith {}; +if !(local _logic) exitWith {}; if (isNil QEFUNC(medical,setUnconscious)) then { [LSTRING(RequiresAddon)] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleZeusSettings.sqf b/addons/zeus/functions/fnc_moduleZeusSettings.sqf index b52c597c2c..8abd714824 100644 --- a/addons/zeus/functions/fnc_moduleZeusSettings.sqf +++ b/addons/zeus/functions/fnc_moduleZeusSettings.sqf @@ -18,9 +18,7 @@ #include "script_component.hpp" -params ["_logic", "_units", "_activated"]; - -if !(_activated) exitWith {}; +params ["_logic"]; [_logic, QGVAR(zeusAscension), "zeusAscension"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(zeusBird), "zeusBird"] call EFUNC(common,readSettingFromModule); diff --git a/addons/zeus/functions/fnc_ui_attributePosition.sqf b/addons/zeus/functions/fnc_ui_attributePosition.sqf index e0396e2c03..ecd3458ac2 100644 --- a/addons/zeus/functions/fnc_ui_attributePosition.sqf +++ b/addons/zeus/functions/fnc_ui_attributePosition.sqf @@ -48,7 +48,7 @@ private _fnc_onDraw = { }; private _fnc_onMapClick = { - params ["_map","_button","_x","_y","_shift","_ctrl","_alt"]; + params ["_map","_button"]; if (_button == 0) then { private _display = ctrlParent _map; diff --git a/addons/zeus/functions/fnc_ui_groupSide.sqf b/addons/zeus/functions/fnc_ui_groupSide.sqf index 90de9d06ca..e5720e0720 100644 --- a/addons/zeus/functions/fnc_ui_groupSide.sqf +++ b/addons/zeus/functions/fnc_ui_groupSide.sqf @@ -115,7 +115,7 @@ private _fnc_onUnload = { }; private _fnc_onConfirm = { - params [["_ctrlButtonOK", controlNull, [controlNull]]]; + params ["_ctrlButtonOK"]; private _display = ctrlparent _ctrlButtonOK; if (isNull _display) exitWith {}; diff --git a/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf b/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf index 3085271dfa..9dff6808e4 100644 --- a/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf +++ b/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf @@ -126,18 +126,7 @@ private _fnc_onConfirm = { private _target = _combo2 lbValue (lbCurSel _combo2); private _gear = _combo3 lbValue (lbCurSel _combo3); - - _toggle = [ - false, - true - ] select (_toggle == 1); - - _gear = [ - false, - true - ] select (_gear == 1); - - [_logic, _toggle, _gear, _target] call FUNC(moduleToggleFlashlight); + [_logic, _toggle == 1, _gear == 1, _target] call FUNC(moduleToggleFlashlight); }; _display displayAddEventHandler ["unload", _fnc_onUnload]; diff --git a/addons/zeus/functions/fnc_ui_toggleNvg.sqf b/addons/zeus/functions/fnc_ui_toggleNvg.sqf index 10ed14aa0e..822e552dac 100644 --- a/addons/zeus/functions/fnc_ui_toggleNvg.sqf +++ b/addons/zeus/functions/fnc_ui_toggleNvg.sqf @@ -115,12 +115,7 @@ private _fnc_onConfirm = { private _toggle = _combo1 lbValue (lbCurSel _combo1); private _target = _combo2 lbValue (lbCurSel _combo2); - private _toggle = [ - false, - true - ] select (_toggle == 1); - - [_logic, _toggle, _target] call FUNC(moduleToggleNvg); + [_logic, _toggle == 1, _target] call FUNC(moduleToggleNvg); }; _display displayAddEventHandler ["unload", _fnc_onUnload]; diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index ddae08d623..c14d2fab71 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -1,6 +1,13 @@  + + Zeus + Zeus + 宙斯 + 宙斯 + Zeus + Zeus Settings Ustawienia Zeusa @@ -1026,6 +1033,7 @@ 火力压制 火力壓制 Ogień zaporowy + 엄호사격 Add Full Arsenal @@ -1036,6 +1044,7 @@ 增加完整的虚拟军火库到物件上 增加完整的虛擬軍火庫到物件上 Dodaj Wirtualny Arsenał + 아스날 놓기 Remove Arsenal @@ -1046,6 +1055,7 @@ 移除物件上的虚拟军火库 移除物件上的虛擬軍火庫 Usuń Wirtualny Arsenał + 아스날 제거 Load into Cargo @@ -1054,6 +1064,7 @@ カーゴに積み込み 裝載到貨物中 装载到货物中 + 화물 싣기 Toggle NVGs @@ -1063,6 +1074,7 @@ 暗視装置の切り替え 切換夜視鏡 切换夜视镜 + 야시경 토글 NVG equipment @@ -1072,6 +1084,7 @@ 暗視装置 夜視鏡裝備 夜视镜装备 + 야시경 장비 Add or remove NVGs from units @@ -1081,6 +1094,7 @@ ユニットから暗視装置の追加と削除 增加或移除單位的夜視鏡 增加或移除单位的夜视镜 + 야시경 추가/제거 Toggle NVG target @@ -1090,6 +1104,7 @@ 選択先の暗視装置の切り替え 切換目標的夜視鏡狀態 切换目标的夜视镜状态 + 목표의 야시경 토글 Selected group @@ -1099,6 +1114,7 @@ 選択されたグループ 選擇小隊 选择小队 + 그룹 선택 Toggle flashlights @@ -1108,6 +1124,7 @@ フラッシュライトの切り替え 切換手電筒 切换手电筒 + 손전등 토글 Toggle flashlight target @@ -1117,6 +1134,7 @@ 選択先のフラッシュライトの切り替え 切換目標的手電筒狀態 切换目标的手电筒状态 + 목표의 손전등 토글 Flashlight @@ -1126,6 +1144,7 @@ フラッシュライト 手電筒 手电筒 + 손전등 Add gear @@ -1135,6 +1154,7 @@ 装備を追加 增加裝備 增加装备 + 장비 추가 Garrison group @@ -1143,6 +1163,7 @@ Proteggi gruppo 佈置駐軍 布置驻军 + 그룹 주둔 Fill from top to bottom @@ -1151,6 +1172,7 @@ Riempi dall'alto al basso 由上而下進行填滿 由上而下进行填满 + 위에서부터 채우기 Fill buildings from the highest position first @@ -1159,6 +1181,7 @@ Riempi gli edifici dalla posizione più alta prima 從建築物的最高點開始布置衛哨 从建筑物的最高点开始布置卫哨 + 건물의 높은 위치부터 먼저 채움 Building filling mode @@ -1167,6 +1190,7 @@ Modalità riempimento edifici 駐軍填充建築物模式 驻军填充建筑物模式 + 건물 채우기 모드 Even filling @@ -1175,6 +1199,7 @@ Riempimento uguale 平均分配 平均分配 + 평균 채우기 Building by building @@ -1183,6 +1208,7 @@ Edificio per edificio 一棟填滿後再換下一棟 一栋填满后再换下一栋 + 건물에서 건물로 Random filling @@ -1191,6 +1217,7 @@ Riempimento casuale 隨機分配 随机分配 + 무작위 채우기 Teleport @@ -1199,6 +1226,7 @@ Teletrasporto 傳送 传送 + 순간이동 Un-garrison group @@ -1207,6 +1235,7 @@ Non proteggere gruppo 解除駐軍駐守狀態 解除驻军驻守状态 + 주둔해제 diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000000..7616e4912c --- /dev/null +++ b/circle.yml @@ -0,0 +1,23 @@ +version: 2 +jobs: + build: + docker: + - image: python:3-alpine + steps: + - checkout + - run: + name: Validate SQF And Config style + command: python tools/sqf_validator.py && python tools/config_style_checker.py + deployment: + docker: + - image: python:3-alpine + branch: master + requires: + - build + steps: + - checkout + - deploy: + name: Deploy + command: | + pip install pygithub pygithub3 + python3 tools/deploy.py diff --git a/docs/README_DE.md b/docs/README_DE.md index f0b92aeffe..5bc01c4359 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -4,7 +4,7 @@

- ACE3 Version + ACE3 Version ACE3 Fehlermeldungen diff --git a/docs/README_PL.md b/docs/README_PL.md index 9e39d80d34..cdb9727492 100644 --- a/docs/README_PL.md +++ b/docs/README_PL.md @@ -3,7 +3,7 @@

- ACE3 Wersja + ACE3 Wersja ACE3 Zagadnienia diff --git a/docs/_config.yml b/docs/_config.yml index 527a849881..0fda565889 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -8,17 +8,17 @@ ace: githubUrl: https://github.com/acemod/ACE3 version: major: 3 - minor: 11 + minor: 12 patch: 0 - build: 26 + build: 29 acex: githubUrl: https://github.com/acemod/ACEX version: major: 3 - minor: 2 + minor: 3 patch: 0 - build: 4 + build: 6 markdown: kramdown diff --git a/docs/_config_dev.yml b/docs/_config_dev.yml index b5cda7124a..29e559c5fb 100644 --- a/docs/_config_dev.yml +++ b/docs/_config_dev.yml @@ -10,17 +10,17 @@ ace: githubUrl: https://github.com/acemod/ACE3 version: major: 3 - minor: 11 + minor: 12 patch: 0 - build: 26 + build: 29 acex: githubUrl: https://github.com/acemod/ACEX version: major: 3 - minor: 2 + minor: 3 patch: 0 - build: 4 + build: 6 markdown: kramdown diff --git a/docs/_includes/dependencies_list.md b/docs/_includes/dependencies_list.md index c6883682c4..6faf417657 100644 --- a/docs/_includes/dependencies_list.md +++ b/docs/_includes/dependencies_list.md @@ -22,6 +22,10 @@ `ace_main` {% endif %} +{% if include.component == "arsenal" %} +`ace_common` +{% endif %} + {% if include.component == "atragmx" %} `ACE_Advanced_Ballistics`, `ACE_common`, `ACE_weather` {% endif %} @@ -502,10 +506,6 @@ `ace_common` {% endif %} -{% if include.component == "server" %} -`ace_common` -{% endif %} - {% if include.component == "tracers" %} `ace_ballistics` {% endif %} diff --git a/docs/_includes/dependenciesx_list.md b/docs/_includes/dependenciesx_list.md index 8f387be41d..1526c3e12c 100644 --- a/docs/_includes/dependenciesx_list.md +++ b/docs/_includes/dependenciesx_list.md @@ -1,3 +1,7 @@ +{% if include.component == "fortify" %} +`acex_main`, `ace_interaction` +{% endif %} + {% if include.component == "headless" %} `acex_main` {% endif %} @@ -9,4 +13,3 @@ {% if include.component == "viewrestriction" %} `acex_main` {% endif %} - diff --git a/docs/_posts/2017-12-20-cba-settings.md b/docs/_posts/2017-12-20-cba-settings.md new file mode 100644 index 0000000000..2cec527aae --- /dev/null +++ b/docs/_posts/2017-12-20-cba-settings.md @@ -0,0 +1,54 @@ +--- +title: Using CBA Settings in ACE3 +description: With v3.12.0 we are dropping the ACE3 Settings System and now are using CBA Settings +parent: posts +image: /img/news/171220_cbaPost2.jpg +author: Pabstmirror, bux +layout: post +--- + +As announced mid november the upcoming ACE3 release (v3.12.0) will make the transition to using [CBA Settings](https://github.com/CBATeam/CBA_A3/wiki/CBA-Settings-System){:target="_blank"} to control the many settings ACE3 has. + +We have tried to make the change as smooth as possible. + + + +

+ + +## Players + +All of your old (client settable) settings should transfer automatically. + +The biggest change is how to access the settings now; from the escape menu hit `OPTIONS` and then `ADDON OPTIONS`. + +## Mission Makers + +Old mission should still be fully compatible with ACE3 v3.12.0. + +However the old methods of changing settings (Setting Modules and `class ace_settings` in `description.ext`) are considered deprecated (old modules will still function, but new ones are no longer placeable). + +All settings are also subject to backwards incompatible changes with future ACE3 versions. We recommend switching to changing settings via the CBA Eden Editor interface and deleting any old ACE Setting modules. From Eden Editor click on the `SETTINGS` -> `ADDON OPTIONS`. + +## Server Admins + +`ace_server.pbo` / `ACE_ServerSettings` has been removed in ACE3 v3.12.0. + +Refer to CBA's [Server Settings](https://github.com/CBATeam/CBA_A3/wiki/CBA-Settings-System#server-settings){:target="_blank"} and [Userconfig](https://github.com/CBATeam/CBA_A3/wiki/CBA-Settings-System#userconfig){:target="_blank"} to change settings for your server. + +### Convert your current server settings + + + + + +## Addon / Script Makers + +- ACE3 will convert all config based settings to CBA Settings automatically (except `typeName = "ARRAY"`). +- Non-public function `ace_common_fnc_addSettings` has been removed. +- Non-public function `ace_common_fnc_setSetting` has changed and may not function as before. +- It is critical that calls to `ace_common_fnc_readSettingFromModule` are now done **globaly** instead of just on the server. + +It is also recommended to deprecate `(scope = 1;)` your custom setting modules. + +- ACE Events `ace_settingsInitialized` and `ace_settingChanged` will continue to work normally. diff --git a/docs/css/app.css b/docs/css/app.css index 6621799c85..8130470b22 100644 --- a/docs/css/app.css +++ b/docs/css/app.css @@ -1,4 +1,4 @@ /*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}meta.foundation-version{font-family:"/5.5.1/"}meta.foundation-mq-small{font-family:"/only screen/";width:0em}meta.foundation-mq-small-only{font-family:"/only screen and (max-width: 40em)/";width:0em}meta.foundation-mq-medium{font-family:"/only screen and (min-width:40.0625em)/";width:40.0625em}meta.foundation-mq-medium-only{font-family:"/only screen and (min-width:40.0625em) and (max-width:64em)/";width:40.0625em}meta.foundation-mq-large{font-family:"/only screen and (min-width:64.0625em)/";width:64.0625em}meta.foundation-mq-large-only{font-family:"/only screen and (min-width:64.0625em) and (max-width:90em)/";width:64.0625em}meta.foundation-mq-xlarge{font-family:"/only screen and (min-width:90.0625em)/";width:90.0625em}meta.foundation-mq-xlarge-only{font-family:"/only screen and (min-width:90.0625em) and (max-width:120em)/";width:90.0625em}meta.foundation-mq-xxlarge{font-family:"/only screen and (min-width:120.0625em)/";width:120.0625em}meta.foundation-data-attribute-namespace{font-family:false}html,body{height:100%}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html,body{font-size:100%}body{background:#fff;color:#222;padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-weight:400;font-style:normal;line-height:1.5;position:relative;cursor:auto}a:hover{cursor:pointer}img{max-width:100%;height:auto}img{-ms-interpolation-mode:bicubic}#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none !important}.left{float:left !important}.right{float:right !important}.clearfix:before,.clearfix:after{content:" ";display:table}.clearfix:after{clear:both}.hide{display:none}.invisible{visibility:hidden}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img{display:inline-block;vertical-align:middle}textarea{height:auto;min-height:50px}select{width:100%}[class*="block-grid-"]{display:block;padding:0;margin:0 -.625rem}[class*="block-grid-"]:before,[class*="block-grid-"]:after{content:" ";display:table}[class*="block-grid-"]:after{clear:both}[class*="block-grid-"]>li{display:block;height:auto;float:left;padding:0 .625rem 1.25rem}@media only screen{.small-block-grid-1>li{width:100%;list-style:none}.small-block-grid-1>li:nth-of-type(1n){clear:none}.small-block-grid-1>li:nth-of-type(1n+1){clear:both}.small-block-grid-2>li{width:50%;list-style:none}.small-block-grid-2>li:nth-of-type(1n){clear:none}.small-block-grid-2>li:nth-of-type(2n+1){clear:both}.small-block-grid-3>li{width:33.3333333333%;list-style:none}.small-block-grid-3>li:nth-of-type(1n){clear:none}.small-block-grid-3>li:nth-of-type(3n+1){clear:both}.small-block-grid-4>li{width:25%;list-style:none}.small-block-grid-4>li:nth-of-type(1n){clear:none}.small-block-grid-4>li:nth-of-type(4n+1){clear:both}.small-block-grid-5>li{width:20%;list-style:none}.small-block-grid-5>li:nth-of-type(1n){clear:none}.small-block-grid-5>li:nth-of-type(5n+1){clear:both}.small-block-grid-6>li{width:16.6666666667%;list-style:none}.small-block-grid-6>li:nth-of-type(1n){clear:none}.small-block-grid-6>li:nth-of-type(6n+1){clear:both}.small-block-grid-7>li{width:14.2857142857%;list-style:none}.small-block-grid-7>li:nth-of-type(1n){clear:none}.small-block-grid-7>li:nth-of-type(7n+1){clear:both}.small-block-grid-8>li{width:12.5%;list-style:none}.small-block-grid-8>li:nth-of-type(1n){clear:none}.small-block-grid-8>li:nth-of-type(8n+1){clear:both}.small-block-grid-9>li{width:11.1111111111%;list-style:none}.small-block-grid-9>li:nth-of-type(1n){clear:none}.small-block-grid-9>li:nth-of-type(9n+1){clear:both}.small-block-grid-10>li{width:10%;list-style:none}.small-block-grid-10>li:nth-of-type(1n){clear:none}.small-block-grid-10>li:nth-of-type(10n+1){clear:both}.small-block-grid-11>li{width:9.0909090909%;list-style:none}.small-block-grid-11>li:nth-of-type(1n){clear:none}.small-block-grid-11>li:nth-of-type(11n+1){clear:both}.small-block-grid-12>li{width:8.3333333333%;list-style:none}.small-block-grid-12>li:nth-of-type(1n){clear:none}.small-block-grid-12>li:nth-of-type(12n+1){clear:both}}@media only screen and (min-width: 40.0625em){.medium-block-grid-1>li{width:100%;list-style:none}.medium-block-grid-1>li:nth-of-type(1n){clear:none}.medium-block-grid-1>li:nth-of-type(1n+1){clear:both}.medium-block-grid-2>li{width:50%;list-style:none}.medium-block-grid-2>li:nth-of-type(1n){clear:none}.medium-block-grid-2>li:nth-of-type(2n+1){clear:both}.medium-block-grid-3>li{width:33.3333333333%;list-style:none}.medium-block-grid-3>li:nth-of-type(1n){clear:none}.medium-block-grid-3>li:nth-of-type(3n+1){clear:both}.medium-block-grid-4>li{width:25%;list-style:none}.medium-block-grid-4>li:nth-of-type(1n){clear:none}.medium-block-grid-4>li:nth-of-type(4n+1){clear:both}.medium-block-grid-5>li{width:20%;list-style:none}.medium-block-grid-5>li:nth-of-type(1n){clear:none}.medium-block-grid-5>li:nth-of-type(5n+1){clear:both}.medium-block-grid-6>li{width:16.6666666667%;list-style:none}.medium-block-grid-6>li:nth-of-type(1n){clear:none}.medium-block-grid-6>li:nth-of-type(6n+1){clear:both}.medium-block-grid-7>li{width:14.2857142857%;list-style:none}.medium-block-grid-7>li:nth-of-type(1n){clear:none}.medium-block-grid-7>li:nth-of-type(7n+1){clear:both}.medium-block-grid-8>li{width:12.5%;list-style:none}.medium-block-grid-8>li:nth-of-type(1n){clear:none}.medium-block-grid-8>li:nth-of-type(8n+1){clear:both}.medium-block-grid-9>li{width:11.1111111111%;list-style:none}.medium-block-grid-9>li:nth-of-type(1n){clear:none}.medium-block-grid-9>li:nth-of-type(9n+1){clear:both}.medium-block-grid-10>li{width:10%;list-style:none}.medium-block-grid-10>li:nth-of-type(1n){clear:none}.medium-block-grid-10>li:nth-of-type(10n+1){clear:both}.medium-block-grid-11>li{width:9.0909090909%;list-style:none}.medium-block-grid-11>li:nth-of-type(1n){clear:none}.medium-block-grid-11>li:nth-of-type(11n+1){clear:both}.medium-block-grid-12>li{width:8.3333333333%;list-style:none}.medium-block-grid-12>li:nth-of-type(1n){clear:none}.medium-block-grid-12>li:nth-of-type(12n+1){clear:both}}@media only screen and (min-width: 64.0625em){.large-block-grid-1>li{width:100%;list-style:none}.large-block-grid-1>li:nth-of-type(1n){clear:none}.large-block-grid-1>li:nth-of-type(1n+1){clear:both}.large-block-grid-2>li{width:50%;list-style:none}.large-block-grid-2>li:nth-of-type(1n){clear:none}.large-block-grid-2>li:nth-of-type(2n+1){clear:both}.large-block-grid-3>li{width:33.3333333333%;list-style:none}.large-block-grid-3>li:nth-of-type(1n){clear:none}.large-block-grid-3>li:nth-of-type(3n+1){clear:both}.large-block-grid-4>li{width:25%;list-style:none}.large-block-grid-4>li:nth-of-type(1n){clear:none}.large-block-grid-4>li:nth-of-type(4n+1){clear:both}.large-block-grid-5>li{width:20%;list-style:none}.large-block-grid-5>li:nth-of-type(1n){clear:none}.large-block-grid-5>li:nth-of-type(5n+1){clear:both}.large-block-grid-6>li{width:16.6666666667%;list-style:none}.large-block-grid-6>li:nth-of-type(1n){clear:none}.large-block-grid-6>li:nth-of-type(6n+1){clear:both}.large-block-grid-7>li{width:14.2857142857%;list-style:none}.large-block-grid-7>li:nth-of-type(1n){clear:none}.large-block-grid-7>li:nth-of-type(7n+1){clear:both}.large-block-grid-8>li{width:12.5%;list-style:none}.large-block-grid-8>li:nth-of-type(1n){clear:none}.large-block-grid-8>li:nth-of-type(8n+1){clear:both}.large-block-grid-9>li{width:11.1111111111%;list-style:none}.large-block-grid-9>li:nth-of-type(1n){clear:none}.large-block-grid-9>li:nth-of-type(9n+1){clear:both}.large-block-grid-10>li{width:10%;list-style:none}.large-block-grid-10>li:nth-of-type(1n){clear:none}.large-block-grid-10>li:nth-of-type(10n+1){clear:both}.large-block-grid-11>li{width:9.0909090909%;list-style:none}.large-block-grid-11>li:nth-of-type(1n){clear:none}.large-block-grid-11>li:nth-of-type(11n+1){clear:both}.large-block-grid-12>li{width:8.3333333333%;list-style:none}.large-block-grid-12>li:nth-of-type(1n){clear:none}.large-block-grid-12>li:nth-of-type(12n+1){clear:both}}button,.button{border-style:solid;border-width:0;cursor:pointer;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-weight:400;line-height:normal;margin:0 0 1.25rem;position:relative;text-decoration:none;text-align:center;-webkit-appearance:none;-moz-appearance:none;border-radius:0;display:inline-block;padding-top:1rem;padding-right:2rem;padding-bottom:1.0625rem;padding-left:2rem;font-size:1rem;background-color:#ba2619;border-color:#951e14;color:#fff;transition:background-color 300ms ease-out}button:hover,button:focus,.button:hover,.button:focus{background-color:#951e14}button:hover,button:focus,.button:hover,.button:focus{color:#fff}button.secondary,.button.secondary{background-color:#e7e7e7;border-color:#b9b9b9;color:#333}button.secondary:hover,button.secondary:focus,.button.secondary:hover,.button.secondary:focus{background-color:#b9b9b9}button.secondary:hover,button.secondary:focus,.button.secondary:hover,.button.secondary:focus{color:#333}button.success,.button.success{background-color:#43AC6A;border-color:#368a55;color:#fff}button.success:hover,button.success:focus,.button.success:hover,.button.success:focus{background-color:#368a55}button.success:hover,button.success:focus,.button.success:hover,.button.success:focus{color:#fff}button.alert,.button.alert{background-color:#f04124;border-color:#cf2a0e;color:#fff}button.alert:hover,button.alert:focus,.button.alert:hover,.button.alert:focus{background-color:#cf2a0e}button.alert:hover,button.alert:focus,.button.alert:hover,.button.alert:focus{color:#fff}button.warning,.button.warning{background-color:#f08a24;border-color:#cf6e0e;color:#fff}button.warning:hover,button.warning:focus,.button.warning:hover,.button.warning:focus{background-color:#cf6e0e}button.warning:hover,button.warning:focus,.button.warning:hover,.button.warning:focus{color:#fff}button.info,.button.info{background-color:#a0d3e8;border-color:#61b6d9;color:#333}button.info:hover,button.info:focus,.button.info:hover,.button.info:focus{background-color:#61b6d9}button.info:hover,button.info:focus,.button.info:hover,.button.info:focus{color:#fff}button.large,.button.large{padding-top:1.125rem;padding-right:2.25rem;padding-bottom:1.1875rem;padding-left:2.25rem;font-size:1.25rem}button.small,.button.small{padding-top:.875rem;padding-right:1.75rem;padding-bottom:.9375rem;padding-left:1.75rem;font-size:.8125rem}button.tiny,.button.tiny{padding-top:.625rem;padding-right:1.25rem;padding-bottom:.6875rem;padding-left:1.25rem;font-size:.6875rem}button.expand,.button.expand{padding-right:0;padding-left:0;width:100%}button.left-align,.button.left-align{text-align:left;text-indent:.75rem}button.right-align,.button.right-align{text-align:right;padding-right:.75rem}button.radius,.button.radius{border-radius:3px}button.round,.button.round{border-radius:1000px}button.disabled,button[disabled],.button.disabled,.button[disabled]{background-color:#ba2619;border-color:#951e14;color:#fff;cursor:default;opacity:.7;box-shadow:none}button.disabled:hover,button.disabled:focus,button[disabled]:hover,button[disabled]:focus,.button.disabled:hover,.button.disabled:focus,.button[disabled]:hover,.button[disabled]:focus{background-color:#951e14}button.disabled:hover,button.disabled:focus,button[disabled]:hover,button[disabled]:focus,.button.disabled:hover,.button.disabled:focus,.button[disabled]:hover,.button[disabled]:focus{color:#fff}button.disabled:hover,button.disabled:focus,button[disabled]:hover,button[disabled]:focus,.button.disabled:hover,.button.disabled:focus,.button[disabled]:hover,.button[disabled]:focus{background-color:#ba2619}button.disabled.secondary,button[disabled].secondary,.button.disabled.secondary,.button[disabled].secondary{background-color:#e7e7e7;border-color:#b9b9b9;color:#333;cursor:default;opacity:.7;box-shadow:none}button.disabled.secondary:hover,button.disabled.secondary:focus,button[disabled].secondary:hover,button[disabled].secondary:focus,.button.disabled.secondary:hover,.button.disabled.secondary:focus,.button[disabled].secondary:hover,.button[disabled].secondary:focus{background-color:#b9b9b9}button.disabled.secondary:hover,button.disabled.secondary:focus,button[disabled].secondary:hover,button[disabled].secondary:focus,.button.disabled.secondary:hover,.button.disabled.secondary:focus,.button[disabled].secondary:hover,.button[disabled].secondary:focus{color:#333}button.disabled.secondary:hover,button.disabled.secondary:focus,button[disabled].secondary:hover,button[disabled].secondary:focus,.button.disabled.secondary:hover,.button.disabled.secondary:focus,.button[disabled].secondary:hover,.button[disabled].secondary:focus{background-color:#e7e7e7}button.disabled.success,button[disabled].success,.button.disabled.success,.button[disabled].success{background-color:#43AC6A;border-color:#368a55;color:#fff;cursor:default;opacity:.7;box-shadow:none}button.disabled.success:hover,button.disabled.success:focus,button[disabled].success:hover,button[disabled].success:focus,.button.disabled.success:hover,.button.disabled.success:focus,.button[disabled].success:hover,.button[disabled].success:focus{background-color:#368a55}button.disabled.success:hover,button.disabled.success:focus,button[disabled].success:hover,button[disabled].success:focus,.button.disabled.success:hover,.button.disabled.success:focus,.button[disabled].success:hover,.button[disabled].success:focus{color:#fff}button.disabled.success:hover,button.disabled.success:focus,button[disabled].success:hover,button[disabled].success:focus,.button.disabled.success:hover,.button.disabled.success:focus,.button[disabled].success:hover,.button[disabled].success:focus{background-color:#43AC6A}button.disabled.alert,button[disabled].alert,.button.disabled.alert,.button[disabled].alert{background-color:#f04124;border-color:#cf2a0e;color:#fff;cursor:default;opacity:.7;box-shadow:none}button.disabled.alert:hover,button.disabled.alert:focus,button[disabled].alert:hover,button[disabled].alert:focus,.button.disabled.alert:hover,.button.disabled.alert:focus,.button[disabled].alert:hover,.button[disabled].alert:focus{background-color:#cf2a0e}button.disabled.alert:hover,button.disabled.alert:focus,button[disabled].alert:hover,button[disabled].alert:focus,.button.disabled.alert:hover,.button.disabled.alert:focus,.button[disabled].alert:hover,.button[disabled].alert:focus{color:#fff}button.disabled.alert:hover,button.disabled.alert:focus,button[disabled].alert:hover,button[disabled].alert:focus,.button.disabled.alert:hover,.button.disabled.alert:focus,.button[disabled].alert:hover,.button[disabled].alert:focus{background-color:#f04124}button.disabled.warning,button[disabled].warning,.button.disabled.warning,.button[disabled].warning{background-color:#f08a24;border-color:#cf6e0e;color:#fff;cursor:default;opacity:.7;box-shadow:none}button.disabled.warning:hover,button.disabled.warning:focus,button[disabled].warning:hover,button[disabled].warning:focus,.button.disabled.warning:hover,.button.disabled.warning:focus,.button[disabled].warning:hover,.button[disabled].warning:focus{background-color:#cf6e0e}button.disabled.warning:hover,button.disabled.warning:focus,button[disabled].warning:hover,button[disabled].warning:focus,.button.disabled.warning:hover,.button.disabled.warning:focus,.button[disabled].warning:hover,.button[disabled].warning:focus{color:#fff}button.disabled.warning:hover,button.disabled.warning:focus,button[disabled].warning:hover,button[disabled].warning:focus,.button.disabled.warning:hover,.button.disabled.warning:focus,.button[disabled].warning:hover,.button[disabled].warning:focus{background-color:#f08a24}button.disabled.info,button[disabled].info,.button.disabled.info,.button[disabled].info{background-color:#a0d3e8;border-color:#61b6d9;color:#333;cursor:default;opacity:.7;box-shadow:none}button.disabled.info:hover,button.disabled.info:focus,button[disabled].info:hover,button[disabled].info:focus,.button.disabled.info:hover,.button.disabled.info:focus,.button[disabled].info:hover,.button[disabled].info:focus{background-color:#61b6d9}button.disabled.info:hover,button.disabled.info:focus,button[disabled].info:hover,button[disabled].info:focus,.button.disabled.info:hover,.button.disabled.info:focus,.button[disabled].info:hover,.button[disabled].info:focus{color:#fff}button.disabled.info:hover,button.disabled.info:focus,button[disabled].info:hover,button[disabled].info:focus,.button.disabled.info:hover,.button.disabled.info:focus,.button[disabled].info:hover,.button[disabled].info:focus{background-color:#a0d3e8}button::-moz-focus-inner{border:0;padding:0}@media only screen and (min-width: 40.0625em){button,.button{display:inline-block}}.clearing-thumbs,[data-clearing]{margin-bottom:0;margin-left:0;list-style:none}.clearing-thumbs:before,.clearing-thumbs:after,[data-clearing]:before,[data-clearing]:after{content:" ";display:table}.clearing-thumbs:after,[data-clearing]:after{clear:both}.clearing-thumbs li,[data-clearing] li{float:left;margin-right:10px}.clearing-thumbs[class*="block-grid-"] li,[data-clearing][class*="block-grid-"] li{margin-right:0}.clearing-blackout{background:#333;position:fixed;width:100%;height:100%;top:0;left:0;z-index:998}.clearing-blackout .clearing-close{display:block}.clearing-container{position:relative;z-index:998;height:100%;overflow:hidden;margin:0}.clearing-touch-label{position:absolute;top:50%;left:50%;color:#aaa;font-size:0.6em}.visible-img{height:95%;position:relative}.visible-img img{position:absolute;left:50%;top:50%;transform:translateY(-50%) translateX(-50%);-webkit-transform:translateY(-50%) translateX(-50%);-ms-transform:translateY(-50%) translateX(-50%);max-height:100%;max-width:100%}.clearing-caption{color:#ccc;font-size:.875em;line-height:1.3;margin-bottom:0;text-align:center;bottom:0;background:#333;width:100%;padding:10px 30px 20px;position:absolute;left:0}.clearing-close{z-index:999;padding-left:20px;padding-top:10px;font-size:30px;line-height:1;color:#ccc;display:none}.clearing-close:hover,.clearing-close:focus{color:#ccc}.clearing-assembled .clearing-container{height:100%}.clearing-assembled .clearing-container .carousel>ul{display:none}.clearing-feature li{display:none}.clearing-feature li.clearing-featured-img{display:block}@media only screen and (min-width: 40.0625em){.clearing-main-prev,.clearing-main-next{position:absolute;height:100%;width:40px;top:0}.clearing-main-prev>span,.clearing-main-next>span{position:absolute;top:50%;display:block;width:0;height:0;border:solid 12px}.clearing-main-prev>span:hover,.clearing-main-next>span:hover{opacity:0.8}.clearing-main-prev{left:0}.clearing-main-prev>span{left:5px;border-color:transparent;border-right-color:#ccc}.clearing-main-next{right:0}.clearing-main-next>span{border-color:transparent;border-left-color:#ccc}.clearing-main-prev.disabled,.clearing-main-next.disabled{opacity:0.3}.clearing-assembled .clearing-container .carousel{background:rgba(51,51,51,0.8);height:120px;margin-top:10px;text-align:center}.clearing-assembled .clearing-container .carousel>ul{display:inline-block;z-index:999;height:100%;position:relative;float:none}.clearing-assembled .clearing-container .carousel>ul li{display:block;width:120px;min-height:inherit;float:left;overflow:hidden;margin-right:0;padding:0;position:relative;cursor:pointer;opacity:0.4;clear:none}.clearing-assembled .clearing-container .carousel>ul li.fix-height img{height:100%;max-width:none}.clearing-assembled .clearing-container .carousel>ul li a.th{border:none;box-shadow:none;display:block}.clearing-assembled .clearing-container .carousel>ul li img{cursor:pointer !important;width:100% !important}.clearing-assembled .clearing-container .carousel>ul li.visible{opacity:1}.clearing-assembled .clearing-container .carousel>ul li:hover{opacity:0.8}.clearing-assembled .clearing-container .visible-img{background:#333;overflow:hidden;height:85%}.clearing-close{position:absolute;top:10px;right:20px;padding-left:0;padding-top:0}}form{margin:0 0 1rem}form .row .row{margin:0 -.5rem}form .row .row .column,form .row .row .columns{padding:0 .5rem}form .row .row.collapse{margin:0}form .row .row.collapse .column,form .row .row.collapse .columns{padding:0}form .row .row.collapse input{-webkit-border-bottom-right-radius:0;-webkit-border-top-right-radius:0;border-bottom-right-radius:0;border-top-right-radius:0}form .row input.column,form .row input.columns,form .row textarea.column,form .row textarea.columns{padding-left:.5rem}label{font-size:.875rem;color:#4d4c4c;cursor:pointer;display:block;font-weight:400;line-height:1.5;margin-bottom:0}label.right{float:none !important;text-align:right}label.inline{margin:0 0 1rem 0;padding:.5625rem 0}label small{text-transform:capitalize;color:#676767}.prefix,.postfix{display:block;position:relative;z-index:2;text-align:center;width:100%;padding-top:0;padding-bottom:0;border-style:solid;border-width:1px;overflow:visible;font-size:.875rem;height:2.3125rem;line-height:2.3125rem}.postfix.button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;text-align:center;border:none}.prefix.button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;text-align:center;border:none}.prefix.button.radius{border-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}.postfix.button.radius{border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-right-radius:3px}.prefix.button.round{border-radius:0;-webkit-border-bottom-left-radius:1000px;-webkit-border-top-left-radius:1000px;border-bottom-left-radius:1000px;border-top-left-radius:1000px}.postfix.button.round{border-radius:0;-webkit-border-bottom-right-radius:1000px;-webkit-border-top-right-radius:1000px;border-bottom-right-radius:1000px;border-top-right-radius:1000px}span.prefix,label.prefix{background:#f2f2f2;border-right:none;color:#333;border-color:#ccc}span.postfix,label.postfix{background:#f2f2f2;border-left:none;color:#333;border-color:#ccc}input[type="text"],input[type="password"],input[type="date"],input[type="datetime"],input[type="datetime-local"],input[type="month"],input[type="week"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="time"],input[type="url"],input[type="color"],textarea{-webkit-appearance:none;border-radius:0;background-color:#fff;font-family:inherit;border-style:solid;border-width:1px;border-color:#ccc;box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);color:rgba(0,0,0,0.75);display:block;font-size:.875rem;margin:0 0 1rem 0;padding:.5rem;height:2.3125rem;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;transition:all .15s linear}input[type="text"]:focus,input[type="password"]:focus,input[type="date"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="month"]:focus,input[type="week"]:focus,input[type="email"]:focus,input[type="number"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="time"]:focus,input[type="url"]:focus,input[type="color"]:focus,textarea:focus{background:#fafafa;border-color:#999;outline:none}input[type="text"]:disabled,input[type="password"]:disabled,input[type="date"]:disabled,input[type="datetime"]:disabled,input[type="datetime-local"]:disabled,input[type="month"]:disabled,input[type="week"]:disabled,input[type="email"]:disabled,input[type="number"]:disabled,input[type="search"]:disabled,input[type="tel"]:disabled,input[type="time"]:disabled,input[type="url"]:disabled,input[type="color"]:disabled,textarea:disabled{background-color:#ddd;cursor:default}input[type="text"][disabled],input[type="text"][readonly],fieldset[disabled] input[type="text"],input[type="password"][disabled],input[type="password"][readonly],fieldset[disabled] input[type="password"],input[type="date"][disabled],input[type="date"][readonly],fieldset[disabled] input[type="date"],input[type="datetime"][disabled],input[type="datetime"][readonly],fieldset[disabled] input[type="datetime"],input[type="datetime-local"][disabled],input[type="datetime-local"][readonly],fieldset[disabled] input[type="datetime-local"],input[type="month"][disabled],input[type="month"][readonly],fieldset[disabled] input[type="month"],input[type="week"][disabled],input[type="week"][readonly],fieldset[disabled] input[type="week"],input[type="email"][disabled],input[type="email"][readonly],fieldset[disabled] input[type="email"],input[type="number"][disabled],input[type="number"][readonly],fieldset[disabled] input[type="number"],input[type="search"][disabled],input[type="search"][readonly],fieldset[disabled] input[type="search"],input[type="tel"][disabled],input[type="tel"][readonly],fieldset[disabled] input[type="tel"],input[type="time"][disabled],input[type="time"][readonly],fieldset[disabled] input[type="time"],input[type="url"][disabled],input[type="url"][readonly],fieldset[disabled] input[type="url"],input[type="color"][disabled],input[type="color"][readonly],fieldset[disabled] input[type="color"],textarea[disabled],textarea[readonly],fieldset[disabled] textarea{background-color:#ddd;cursor:default}input[type="text"].radius,input[type="password"].radius,input[type="date"].radius,input[type="datetime"].radius,input[type="datetime-local"].radius,input[type="month"].radius,input[type="week"].radius,input[type="email"].radius,input[type="number"].radius,input[type="search"].radius,input[type="tel"].radius,input[type="time"].radius,input[type="url"].radius,input[type="color"].radius,textarea.radius{border-radius:3px}form .row .prefix-radius.row.collapse input,form .row .prefix-radius.row.collapse textarea,form .row .prefix-radius.row.collapse select,form .row .prefix-radius.row.collapse button{border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-right-radius:3px}form .row .prefix-radius.row.collapse .prefix{border-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}form .row .postfix-radius.row.collapse input,form .row .postfix-radius.row.collapse textarea,form .row .postfix-radius.row.collapse select,form .row .postfix-radius.row.collapse button{border-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-left-radius:3px}form .row .postfix-radius.row.collapse .postfix{border-radius:0;-webkit-border-bottom-right-radius:3px;-webkit-border-top-right-radius:3px;border-bottom-right-radius:3px;border-top-right-radius:3px}form .row .prefix-round.row.collapse input,form .row .prefix-round.row.collapse textarea,form .row .prefix-round.row.collapse select,form .row .prefix-round.row.collapse button{border-radius:0;-webkit-border-bottom-right-radius:1000px;-webkit-border-top-right-radius:1000px;border-bottom-right-radius:1000px;border-top-right-radius:1000px}form .row .prefix-round.row.collapse .prefix{border-radius:0;-webkit-border-bottom-left-radius:1000px;-webkit-border-top-left-radius:1000px;border-bottom-left-radius:1000px;border-top-left-radius:1000px}form .row .postfix-round.row.collapse input,form .row .postfix-round.row.collapse textarea,form .row .postfix-round.row.collapse select,form .row .postfix-round.row.collapse button{border-radius:0;-webkit-border-bottom-left-radius:1000px;-webkit-border-top-left-radius:1000px;border-bottom-left-radius:1000px;border-top-left-radius:1000px}form .row .postfix-round.row.collapse .postfix{border-radius:0;-webkit-border-bottom-right-radius:1000px;-webkit-border-top-right-radius:1000px;border-bottom-right-radius:1000px;border-top-right-radius:1000px}input[type="submit"]{-webkit-appearance:none;border-radius:0}textarea[rows]{height:auto}textarea{max-width:100%}select{-webkit-appearance:none !important;border-radius:0;background-color:#FAFAFA;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMTJweCIgeT0iMHB4IiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzcHgiIHZpZXdCb3g9IjAgMCA2IDMiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDYgMyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBvbHlnb24gcG9pbnRzPSI1Ljk5MiwwIDIuOTkyLDMgLTAuMDA4LDAgIi8+PC9zdmc+);background-position:100% center;background-repeat:no-repeat;border-style:solid;border-width:1px;border-color:#ccc;padding:.5rem;font-size:.875rem;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;color:rgba(0,0,0,0.75);line-height:normal;border-radius:0;height:2.3125rem}select::-ms-expand{display:none}select.radius{border-radius:3px}select:hover{background-color:#f3f2f2;border-color:#999}select:disabled{background-color:#ddd;cursor:default}select[multiple]{height:auto}input[type="file"],input[type="checkbox"],input[type="radio"],select{margin:0 0 1rem 0}input[type="checkbox"]+label,input[type="radio"]+label{display:inline-block;margin-left:.5rem;margin-right:1rem;margin-bottom:0;vertical-align:baseline}input[type="file"]{width:100%}fieldset{border:1px solid #ddd;padding:1.25rem;margin:1.125rem 0}fieldset legend{font-weight:700;background:#fff;padding:0 .1875rem;margin:0;margin-left:-.1875rem}[data-abide] .error small.error,[data-abide] .error span.error,[data-abide] span.error,[data-abide] small.error{display:block;padding:.375rem .5625rem .5625rem;margin-top:-1px;margin-bottom:1rem;font-size:.75rem;font-weight:400;font-style:italic;background:#f04124;color:#fff}[data-abide] span.error,[data-abide] small.error{display:none}span.error,small.error{display:block;padding:.375rem .5625rem .5625rem;margin-top:-1px;margin-bottom:1rem;font-size:.75rem;font-weight:400;font-style:italic;background:#f04124;color:#fff}.error input,.error textarea,.error select{margin-bottom:0}.error input[type="checkbox"],.error input[type="radio"]{margin-bottom:1rem}.error label,.error label.error{color:#f04124}.error small.error{display:block;padding:.375rem .5625rem .5625rem;margin-top:-1px;margin-bottom:1rem;font-size:.75rem;font-weight:400;font-style:italic;background:#f04124;color:#fff}.error>label>small{color:#676767;background:transparent;padding:0;text-transform:capitalize;font-style:normal;font-size:60%;margin:0;display:inline}.error span.error-message{display:block}input.error,textarea.error,select.error{margin-bottom:0}label.error{color:#f04124}.row{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5rem}.row:before,.row:after{content:" ";display:table}.row:after{clear:both}.row.collapse>.column,.row.collapse>.columns{padding-left:0;padding-right:0}.row.collapse .row{margin-left:0;margin-right:0}.row .row{width:auto;margin-left:-.9375rem;margin-right:-.9375rem;margin-top:0;margin-bottom:0;max-width:none}.row .row:before,.row .row:after{content:" ";display:table}.row .row:after{clear:both}.row .row.collapse{width:auto;margin:0;max-width:none}.row .row.collapse:before,.row .row.collapse:after{content:" ";display:table}.row .row.collapse:after{clear:both}.column,.columns{padding-left:.9375rem;padding-right:.9375rem;width:100%;float:left}[class*="column"]+[class*="column"]:last-child{float:right}[class*="column"]+[class*="column"].end{float:left}@media only screen{.small-push-0{position:relative;left:0%;right:auto}.small-pull-0{position:relative;right:0%;left:auto}.small-push-1{position:relative;left:8.3333333333%;right:auto}.small-pull-1{position:relative;right:8.3333333333%;left:auto}.small-push-2{position:relative;left:16.6666666667%;right:auto}.small-pull-2{position:relative;right:16.6666666667%;left:auto}.small-push-3{position:relative;left:25%;right:auto}.small-pull-3{position:relative;right:25%;left:auto}.small-push-4{position:relative;left:33.3333333333%;right:auto}.small-pull-4{position:relative;right:33.3333333333%;left:auto}.small-push-5{position:relative;left:41.6666666667%;right:auto}.small-pull-5{position:relative;right:41.6666666667%;left:auto}.small-push-6{position:relative;left:50%;right:auto}.small-pull-6{position:relative;right:50%;left:auto}.small-push-7{position:relative;left:58.3333333333%;right:auto}.small-pull-7{position:relative;right:58.3333333333%;left:auto}.small-push-8{position:relative;left:66.6666666667%;right:auto}.small-pull-8{position:relative;right:66.6666666667%;left:auto}.small-push-9{position:relative;left:75%;right:auto}.small-pull-9{position:relative;right:75%;left:auto}.small-push-10{position:relative;left:83.3333333333%;right:auto}.small-pull-10{position:relative;right:83.3333333333%;left:auto}.small-push-11{position:relative;left:91.6666666667%;right:auto}.small-pull-11{position:relative;right:91.6666666667%;left:auto}.column,.columns{position:relative;padding-left:.9375rem;padding-right:.9375rem;float:left}.small-1{width:8.3333333333%}.small-2{width:16.6666666667%}.small-3{width:25%}.small-4{width:33.3333333333%}.small-5{width:41.6666666667%}.small-6{width:50%}.small-7{width:58.3333333333%}.small-8{width:66.6666666667%}.small-9{width:75%}.small-10{width:83.3333333333%}.small-11{width:91.6666666667%}.small-12{width:100%}.small-offset-0{margin-left:0% !important}.small-offset-1{margin-left:8.3333333333% !important}.small-offset-2{margin-left:16.6666666667% !important}.small-offset-3{margin-left:25% !important}.small-offset-4{margin-left:33.3333333333% !important}.small-offset-5{margin-left:41.6666666667% !important}.small-offset-6{margin-left:50% !important}.small-offset-7{margin-left:58.3333333333% !important}.small-offset-8{margin-left:66.6666666667% !important}.small-offset-9{margin-left:75% !important}.small-offset-10{margin-left:83.3333333333% !important}.small-offset-11{margin-left:91.6666666667% !important}.small-reset-order{margin-left:0;margin-right:0;left:auto;right:auto;float:left}.column.small-centered,.columns.small-centered{margin-left:auto;margin-right:auto;float:none}.column.small-uncentered,.columns.small-uncentered{margin-left:0;margin-right:0;float:left}.column.small-centered:last-child,.columns.small-centered:last-child{float:none}.column.small-uncentered:last-child,.columns.small-uncentered:last-child{float:left}.column.small-uncentered.opposite,.columns.small-uncentered.opposite{float:right}.row.small-collapse>.column,.row.small-collapse>.columns{padding-left:0;padding-right:0}.row.small-collapse .row{margin-left:0;margin-right:0}.row.small-uncollapse>.column,.row.small-uncollapse>.columns{padding-left:.9375rem;padding-right:.9375rem;float:left}}@media only screen and (min-width: 40.0625em){.medium-push-0{position:relative;left:0%;right:auto}.medium-pull-0{position:relative;right:0%;left:auto}.medium-push-1{position:relative;left:8.3333333333%;right:auto}.medium-pull-1{position:relative;right:8.3333333333%;left:auto}.medium-push-2{position:relative;left:16.6666666667%;right:auto}.medium-pull-2{position:relative;right:16.6666666667%;left:auto}.medium-push-3{position:relative;left:25%;right:auto}.medium-pull-3{position:relative;right:25%;left:auto}.medium-push-4{position:relative;left:33.3333333333%;right:auto}.medium-pull-4{position:relative;right:33.3333333333%;left:auto}.medium-push-5{position:relative;left:41.6666666667%;right:auto}.medium-pull-5{position:relative;right:41.6666666667%;left:auto}.medium-push-6{position:relative;left:50%;right:auto}.medium-pull-6{position:relative;right:50%;left:auto}.medium-push-7{position:relative;left:58.3333333333%;right:auto}.medium-pull-7{position:relative;right:58.3333333333%;left:auto}.medium-push-8{position:relative;left:66.6666666667%;right:auto}.medium-pull-8{position:relative;right:66.6666666667%;left:auto}.medium-push-9{position:relative;left:75%;right:auto}.medium-pull-9{position:relative;right:75%;left:auto}.medium-push-10{position:relative;left:83.3333333333%;right:auto}.medium-pull-10{position:relative;right:83.3333333333%;left:auto}.medium-push-11{position:relative;left:91.6666666667%;right:auto}.medium-pull-11{position:relative;right:91.6666666667%;left:auto}.column,.columns{position:relative;padding-left:.9375rem;padding-right:.9375rem;float:left}.medium-1{width:8.3333333333%}.medium-2{width:16.6666666667%}.medium-3{width:25%}.medium-4{width:33.3333333333%}.medium-5{width:41.6666666667%}.medium-6{width:50%}.medium-7{width:58.3333333333%}.medium-8{width:66.6666666667%}.medium-9{width:75%}.medium-10{width:83.3333333333%}.medium-11{width:91.6666666667%}.medium-12{width:100%}.medium-offset-0{margin-left:0% !important}.medium-offset-1{margin-left:8.3333333333% !important}.medium-offset-2{margin-left:16.6666666667% !important}.medium-offset-3{margin-left:25% !important}.medium-offset-4{margin-left:33.3333333333% !important}.medium-offset-5{margin-left:41.6666666667% !important}.medium-offset-6{margin-left:50% !important}.medium-offset-7{margin-left:58.3333333333% !important}.medium-offset-8{margin-left:66.6666666667% !important}.medium-offset-9{margin-left:75% !important}.medium-offset-10{margin-left:83.3333333333% !important}.medium-offset-11{margin-left:91.6666666667% !important}.medium-reset-order{margin-left:0;margin-right:0;left:auto;right:auto;float:left}.column.medium-centered,.columns.medium-centered{margin-left:auto;margin-right:auto;float:none}.column.medium-uncentered,.columns.medium-uncentered{margin-left:0;margin-right:0;float:left}.column.medium-centered:last-child,.columns.medium-centered:last-child{float:none}.column.medium-uncentered:last-child,.columns.medium-uncentered:last-child{float:left}.column.medium-uncentered.opposite,.columns.medium-uncentered.opposite{float:right}.row.medium-collapse>.column,.row.medium-collapse>.columns{padding-left:0;padding-right:0}.row.medium-collapse .row{margin-left:0;margin-right:0}.row.medium-uncollapse>.column,.row.medium-uncollapse>.columns{padding-left:.9375rem;padding-right:.9375rem;float:left}.push-0{position:relative;left:0%;right:auto}.pull-0{position:relative;right:0%;left:auto}.push-1{position:relative;left:8.3333333333%;right:auto}.pull-1{position:relative;right:8.3333333333%;left:auto}.push-2{position:relative;left:16.6666666667%;right:auto}.pull-2{position:relative;right:16.6666666667%;left:auto}.push-3{position:relative;left:25%;right:auto}.pull-3{position:relative;right:25%;left:auto}.push-4{position:relative;left:33.3333333333%;right:auto}.pull-4{position:relative;right:33.3333333333%;left:auto}.push-5{position:relative;left:41.6666666667%;right:auto}.pull-5{position:relative;right:41.6666666667%;left:auto}.push-6{position:relative;left:50%;right:auto}.pull-6{position:relative;right:50%;left:auto}.push-7{position:relative;left:58.3333333333%;right:auto}.pull-7{position:relative;right:58.3333333333%;left:auto}.push-8{position:relative;left:66.6666666667%;right:auto}.pull-8{position:relative;right:66.6666666667%;left:auto}.push-9{position:relative;left:75%;right:auto}.pull-9{position:relative;right:75%;left:auto}.push-10{position:relative;left:83.3333333333%;right:auto}.pull-10{position:relative;right:83.3333333333%;left:auto}.push-11{position:relative;left:91.6666666667%;right:auto}.pull-11{position:relative;right:91.6666666667%;left:auto}}@media only screen and (min-width: 64.0625em){.large-push-0{position:relative;left:0%;right:auto}.large-pull-0{position:relative;right:0%;left:auto}.large-push-1{position:relative;left:8.3333333333%;right:auto}.large-pull-1{position:relative;right:8.3333333333%;left:auto}.large-push-2{position:relative;left:16.6666666667%;right:auto}.large-pull-2{position:relative;right:16.6666666667%;left:auto}.large-push-3{position:relative;left:25%;right:auto}.large-pull-3{position:relative;right:25%;left:auto}.large-push-4{position:relative;left:33.3333333333%;right:auto}.large-pull-4{position:relative;right:33.3333333333%;left:auto}.large-push-5{position:relative;left:41.6666666667%;right:auto}.large-pull-5{position:relative;right:41.6666666667%;left:auto}.large-push-6{position:relative;left:50%;right:auto}.large-pull-6{position:relative;right:50%;left:auto}.large-push-7{position:relative;left:58.3333333333%;right:auto}.large-pull-7{position:relative;right:58.3333333333%;left:auto}.large-push-8{position:relative;left:66.6666666667%;right:auto}.large-pull-8{position:relative;right:66.6666666667%;left:auto}.large-push-9{position:relative;left:75%;right:auto}.large-pull-9{position:relative;right:75%;left:auto}.large-push-10{position:relative;left:83.3333333333%;right:auto}.large-pull-10{position:relative;right:83.3333333333%;left:auto}.large-push-11{position:relative;left:91.6666666667%;right:auto}.large-pull-11{position:relative;right:91.6666666667%;left:auto}.column,.columns{position:relative;padding-left:.9375rem;padding-right:.9375rem;float:left}.large-1{width:8.3333333333%}.large-2{width:16.6666666667%}.large-3{width:25%}.large-4{width:33.3333333333%}.large-5{width:41.6666666667%}.large-6{width:50%}.large-7{width:58.3333333333%}.large-8{width:66.6666666667%}.large-9{width:75%}.large-10{width:83.3333333333%}.large-11{width:91.6666666667%}.large-12{width:100%}.large-offset-0{margin-left:0% !important}.large-offset-1{margin-left:8.3333333333% !important}.large-offset-2{margin-left:16.6666666667% !important}.large-offset-3{margin-left:25% !important}.large-offset-4{margin-left:33.3333333333% !important}.large-offset-5{margin-left:41.6666666667% !important}.large-offset-6{margin-left:50% !important}.large-offset-7{margin-left:58.3333333333% !important}.large-offset-8{margin-left:66.6666666667% !important}.large-offset-9{margin-left:75% !important}.large-offset-10{margin-left:83.3333333333% !important}.large-offset-11{margin-left:91.6666666667% !important}.large-reset-order{margin-left:0;margin-right:0;left:auto;right:auto;float:left}.column.large-centered,.columns.large-centered{margin-left:auto;margin-right:auto;float:none}.column.large-uncentered,.columns.large-uncentered{margin-left:0;margin-right:0;float:left}.column.large-centered:last-child,.columns.large-centered:last-child{float:none}.column.large-uncentered:last-child,.columns.large-uncentered:last-child{float:left}.column.large-uncentered.opposite,.columns.large-uncentered.opposite{float:right}.row.large-collapse>.column,.row.large-collapse>.columns{padding-left:0;padding-right:0}.row.large-collapse .row{margin-left:0;margin-right:0}.row.large-uncollapse>.column,.row.large-uncollapse>.columns{padding-left:.9375rem;padding-right:.9375rem;float:left}.push-0{position:relative;left:0%;right:auto}.pull-0{position:relative;right:0%;left:auto}.push-1{position:relative;left:8.3333333333%;right:auto}.pull-1{position:relative;right:8.3333333333%;left:auto}.push-2{position:relative;left:16.6666666667%;right:auto}.pull-2{position:relative;right:16.6666666667%;left:auto}.push-3{position:relative;left:25%;right:auto}.pull-3{position:relative;right:25%;left:auto}.push-4{position:relative;left:33.3333333333%;right:auto}.pull-4{position:relative;right:33.3333333333%;left:auto}.push-5{position:relative;left:41.6666666667%;right:auto}.pull-5{position:relative;right:41.6666666667%;left:auto}.push-6{position:relative;left:50%;right:auto}.pull-6{position:relative;right:50%;left:auto}.push-7{position:relative;left:58.3333333333%;right:auto}.pull-7{position:relative;right:58.3333333333%;left:auto}.push-8{position:relative;left:66.6666666667%;right:auto}.pull-8{position:relative;right:66.6666666667%;left:auto}.push-9{position:relative;left:75%;right:auto}.pull-9{position:relative;right:75%;left:auto}.push-10{position:relative;left:83.3333333333%;right:auto}.pull-10{position:relative;right:83.3333333333%;left:auto}.push-11{position:relative;left:91.6666666667%;right:auto}.pull-11{position:relative;right:91.6666666667%;left:auto}}.inline-list{margin:0 auto 1.0625rem auto;margin-left:-1.375rem;margin-right:0;padding:0;list-style:none;overflow:hidden}.inline-list>li{list-style:none;float:left;margin-left:1.375rem;display:block}.inline-list>li>*{display:block}.panel{border-style:solid;border-width:1px;border-color:#d8d8d8;margin-bottom:1.25rem;padding:1.25rem;background:#f2f2f2;color:#333}.panel>:first-child{margin-top:0}.panel>:last-child{margin-bottom:0}.panel h1,.panel h2,.panel h3,.panel h4,.panel h5,.panel h6,.panel p,.panel li,.panel dl{color:#333}.panel h1,.panel h2,.panel h3,.panel h4,.panel h5,.panel h6{line-height:1;margin-bottom:.625rem}.panel h1.subheader,.panel h2.subheader,.panel h3.subheader,.panel h4.subheader,.panel h5.subheader,.panel h6.subheader{line-height:1.4}.panel.callout{border-style:solid;border-width:1px;border-color:#f6c4bf;margin-bottom:1.25rem;padding:1.25rem;background:#fdf0ef;color:#333}.panel.callout>:first-child{margin-top:0}.panel.callout>:last-child{margin-bottom:0}.panel.callout h1,.panel.callout h2,.panel.callout h3,.panel.callout h4,.panel.callout h5,.panel.callout h6,.panel.callout p,.panel.callout li,.panel.callout dl{color:#333}.panel.callout h1,.panel.callout h2,.panel.callout h3,.panel.callout h4,.panel.callout h5,.panel.callout h6{line-height:1;margin-bottom:.625rem}.panel.callout h1.subheader,.panel.callout h2.subheader,.panel.callout h3.subheader,.panel.callout h4.subheader,.panel.callout h5.subheader,.panel.callout h6.subheader{line-height:1.4}.panel.callout a:not(.button){color:#ba2619}.panel.callout a:not(.button):hover,.panel.callout a:not(.button):focus{color:#a02116}.panel.radius{border-radius:3px}.side-nav{display:block;margin:0;padding:.875rem 0;list-style-type:none;list-style-position:outside;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif}.side-nav li{margin:0 0 .4375rem 0;font-size:.875rem;font-weight:400}.side-nav li a:not(.button){display:block;color:#ba2619;margin:0;padding:.4375rem .875rem}.side-nav li a:not(.button):hover,.side-nav li a:not(.button):focus{background:rgba(0,0,0,0.025);color:#e65346}.side-nav li.active>a:first-child:not(.button){color:#e65346;font-weight:400;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif}.side-nav li.divider{border-top:1px solid;height:0;padding:0;list-style:none;border-top-color:#fff}.side-nav li.heading{color:#ba2619;font-size:.875rem;font-weight:bold;text-transform:uppercase}table{background:#fff;margin-bottom:1.25rem;border:solid 1px #ddd;table-layout:auto}table caption{background:transparent;color:#222;font-size:1rem;font-weight:bold}table thead{background:#f5f5f5}table thead tr th,table thead tr td{padding:.5rem .625rem .625rem;font-size:.875rem;font-weight:700;color:#222}table tfoot{background:#f5f5f5}table tfoot tr th,table tfoot tr td{padding:.5rem .625rem .625rem;font-size:.875rem;font-weight:700;color:#222}table tr th,table tr td{padding:.5625rem .625rem;font-size:.875rem;color:#222;text-align:left}table tr.even,table tr.alt,table tr:nth-of-type(even){background:#F9F9F9}table thead tr th,table tfoot tr th,table tfoot tr td,table tbody tr th,table tbody tr td,table tr td{display:table-cell;line-height:1.125rem}.th{line-height:0;display:inline-block;border:solid 4px #fff;max-width:100%;box-shadow:0 0 0 1px rgba(0,0,0,0.2);transition:all 200ms ease-out}.th:hover,.th:focus{box-shadow:0 0 6px 1px rgba(186,38,25,0.5)}.th.radius{border-radius:3px}meta.foundation-mq-topbar{font-family:"/only screen and (min-width:40.0625em)/";width:40.0625em}.contain-to-grid{width:100%;background:#333}.contain-to-grid .top-bar{margin-bottom:0}.fixed{width:100%;left:0;position:fixed;top:0;z-index:99}.fixed.expanded:not(.top-bar){overflow-y:auto;height:auto;width:100%;max-height:100%}.fixed.expanded:not(.top-bar) .title-area{position:fixed;width:100%;z-index:99}.fixed.expanded:not(.top-bar) .top-bar-section{z-index:98;margin-top:2.8125rem}.top-bar{overflow:hidden;height:2.8125rem;line-height:2.8125rem;position:relative;background:#333;margin-bottom:0}.top-bar ul{margin-bottom:0;list-style:none}.top-bar .row{max-width:none}.top-bar form,.top-bar input{margin-bottom:0}.top-bar input{height:1.75rem;padding-top:.35rem;padding-bottom:.35rem;font-size:.75rem}.top-bar .button,.top-bar button{padding-top:0.4125rem;padding-bottom:0.4125rem;margin-bottom:0;font-size:.75rem}@media only screen and (max-width: 40em){.top-bar .button,.top-bar button{position:relative;top:-1px}}.top-bar .title-area{position:relative;margin:0}.top-bar .name{height:2.8125rem;margin:0;font-size:16px}.top-bar .name h1,.top-bar .name h2,.top-bar .name h3,.top-bar .name h4,.top-bar .name p,.top-bar .name span{line-height:2.8125rem;font-size:1.0625rem;margin:0}.top-bar .name h1 a,.top-bar .name h2 a,.top-bar .name h3 a,.top-bar .name h4 a,.top-bar .name p a,.top-bar .name span a{font-weight:400;color:#fff;width:75%;display:block;padding:0 .9375rem}.top-bar .toggle-topbar{position:absolute;right:0;top:0}.top-bar .toggle-topbar a{color:#fff;text-transform:uppercase;font-size:.8125rem;font-weight:700;position:relative;display:block;padding:0 .9375rem;height:2.8125rem;line-height:2.8125rem}.top-bar .toggle-topbar.menu-icon{top:50%;margin-top:-16px}.top-bar .toggle-topbar.menu-icon a{height:34px;line-height:33px;padding:0 2.5rem 0 .9375rem;color:#fff;position:relative}.top-bar .toggle-topbar.menu-icon a span::after{content:"";position:absolute;display:block;height:0;top:50%;margin-top:-8px;right:.9375rem;box-shadow:0 0 0 1px #fff,0 7px 0 1px #fff,0 14px 0 1px #fff;width:16px}.top-bar .toggle-topbar.menu-icon a span:hover:after{box-shadow:0 0 0 1px "",0 7px 0 1px "",0 14px 0 1px ""}.top-bar.expanded{height:auto;background:transparent}.top-bar.expanded .title-area{background:#333}.top-bar.expanded .toggle-topbar a{color:#888}.top-bar.expanded .toggle-topbar a span::after{box-shadow:0 0 0 1px #888,0 7px 0 1px #888,0 14px 0 1px #888}.top-bar-section{left:0;position:relative;width:auto;transition:left 300ms ease-out}.top-bar-section ul{padding:0;width:100%;height:auto;display:block;font-size:16px;margin:0}.top-bar-section .divider,.top-bar-section [role="separator"]{border-top:solid 1px #1a1919;clear:both;height:1px;width:100%}.top-bar-section ul li{background:#333}.top-bar-section ul li>a{display:block;width:100%;color:#fff;padding:12px 0 12px 0;padding-left:.9375rem;font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-size:.8125rem;font-weight:400;text-transform:none}.top-bar-section ul li>a.button{font-size:.8125rem;padding-right:.9375rem;padding-left:.9375rem;background-color:#ba2619;border-color:#951e14;color:#fff}.top-bar-section ul li>a.button:hover,.top-bar-section ul li>a.button:focus{background-color:#951e14}.top-bar-section ul li>a.button:hover,.top-bar-section ul li>a.button:focus{color:#fff}.top-bar-section ul li>a.button.secondary{background-color:#e7e7e7;border-color:#b9b9b9;color:#333}.top-bar-section ul li>a.button.secondary:hover,.top-bar-section ul li>a.button.secondary:focus{background-color:#b9b9b9}.top-bar-section ul li>a.button.secondary:hover,.top-bar-section ul li>a.button.secondary:focus{color:#333}.top-bar-section ul li>a.button.success{background-color:#43AC6A;border-color:#368a55;color:#fff}.top-bar-section ul li>a.button.success:hover,.top-bar-section ul li>a.button.success:focus{background-color:#368a55}.top-bar-section ul li>a.button.success:hover,.top-bar-section ul li>a.button.success:focus{color:#fff}.top-bar-section ul li>a.button.alert{background-color:#f04124;border-color:#cf2a0e;color:#fff}.top-bar-section ul li>a.button.alert:hover,.top-bar-section ul li>a.button.alert:focus{background-color:#cf2a0e}.top-bar-section ul li>a.button.alert:hover,.top-bar-section ul li>a.button.alert:focus{color:#fff}.top-bar-section ul li>a.button.warning{background-color:#f08a24;border-color:#cf6e0e;color:#fff}.top-bar-section ul li>a.button.warning:hover,.top-bar-section ul li>a.button.warning:focus{background-color:#cf6e0e}.top-bar-section ul li>a.button.warning:hover,.top-bar-section ul li>a.button.warning:focus{color:#fff}.top-bar-section ul li>button{font-size:.8125rem;padding-right:.9375rem;padding-left:.9375rem;background-color:#ba2619;border-color:#951e14;color:#fff}.top-bar-section ul li>button:hover,.top-bar-section ul li>button:focus{background-color:#951e14}.top-bar-section ul li>button:hover,.top-bar-section ul li>button:focus{color:#fff}.top-bar-section ul li>button.secondary{background-color:#e7e7e7;border-color:#b9b9b9;color:#333}.top-bar-section ul li>button.secondary:hover,.top-bar-section ul li>button.secondary:focus{background-color:#b9b9b9}.top-bar-section ul li>button.secondary:hover,.top-bar-section ul li>button.secondary:focus{color:#333}.top-bar-section ul li>button.success{background-color:#43AC6A;border-color:#368a55;color:#fff}.top-bar-section ul li>button.success:hover,.top-bar-section ul li>button.success:focus{background-color:#368a55}.top-bar-section ul li>button.success:hover,.top-bar-section ul li>button.success:focus{color:#fff}.top-bar-section ul li>button.alert{background-color:#f04124;border-color:#cf2a0e;color:#fff}.top-bar-section ul li>button.alert:hover,.top-bar-section ul li>button.alert:focus{background-color:#cf2a0e}.top-bar-section ul li>button.alert:hover,.top-bar-section ul li>button.alert:focus{color:#fff}.top-bar-section ul li>button.warning{background-color:#f08a24;border-color:#cf6e0e;color:#fff}.top-bar-section ul li>button.warning:hover,.top-bar-section ul li>button.warning:focus{background-color:#cf6e0e}.top-bar-section ul li>button.warning:hover,.top-bar-section ul li>button.warning:focus{color:#fff}.top-bar-section ul li:hover:not(.has-form)>a{background-color:#555;background:#333;color:#fff}.top-bar-section ul li.active>a{background:#ba2619;color:#fff}.top-bar-section ul li.active>a:hover{background:#a02116;color:#fff}.top-bar-section .has-form{padding:.9375rem}.top-bar-section .has-dropdown{position:relative}.top-bar-section .has-dropdown>a:after{content:"";display:block;width:0;height:0;border:inset 5px;border-color:transparent transparent transparent rgba(255,255,255,0.4);border-left-style:solid;margin-right:.9375rem;margin-top:-4.5px;position:absolute;top:50%;right:0}.top-bar-section .has-dropdown.moved{position:static}.top-bar-section .has-dropdown.moved>.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important;width:100%}.top-bar-section .has-dropdown.moved>a:after{display:none}.top-bar-section .dropdown{padding:0;position:absolute;left:100%;top:0;z-index:99;display:block;position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}.top-bar-section .dropdown li{width:100%;height:auto}.top-bar-section .dropdown li a{font-weight:400;padding:8px .9375rem}.top-bar-section .dropdown li a.parent-link{font-weight:400}.top-bar-section .dropdown li.title h5,.top-bar-section .dropdown li.parent-link{margin-bottom:0;margin-top:0;font-size:1.125rem}.top-bar-section .dropdown li.title h5 a,.top-bar-section .dropdown li.parent-link a{color:#fff;display:block}.top-bar-section .dropdown li.title h5 a:hover,.top-bar-section .dropdown li.parent-link a:hover{background:none}.top-bar-section .dropdown li.has-form{padding:8px .9375rem}.top-bar-section .dropdown li .button,.top-bar-section .dropdown li button{top:auto}.top-bar-section .dropdown label{padding:8px .9375rem 2px;margin-bottom:0;text-transform:uppercase;color:#777;font-weight:700;font-size:.625rem}.js-generated{display:block}@media only screen and (min-width: 40.0625em){.top-bar{background:#333;overflow:visible}.top-bar:before,.top-bar:after{content:" ";display:table}.top-bar:after{clear:both}.top-bar .toggle-topbar{display:none}.top-bar .title-area{float:left}.top-bar .name h1 a,.top-bar .name h2 a,.top-bar .name h3 a,.top-bar .name h4 a,.top-bar .name h5 a,.top-bar .name h6 a{width:auto}.top-bar input,.top-bar .button,.top-bar button{font-size:.875rem;position:relative;height:1.75rem;top:.53125rem}.top-bar.expanded{background:#333}.contain-to-grid .top-bar{max-width:62.5rem;margin:0 auto;margin-bottom:0}.top-bar-section{transition:none 0 0;left:0 !important}.top-bar-section ul{width:auto;height:auto !important;display:inline}.top-bar-section ul li{float:left}.top-bar-section ul li .js-generated{display:none}.top-bar-section li.hover>a:not(.button){background-color:#555;background:#333;color:#fff}.top-bar-section li:not(.has-form) a:not(.button){padding:0 .9375rem;line-height:2.8125rem;background:#333}.top-bar-section li:not(.has-form) a:not(.button):hover{background-color:#555;background:#333}.top-bar-section li.active:not(.has-form) a:not(.button){padding:0 .9375rem;line-height:2.8125rem;color:#fff;background:#ba2619}.top-bar-section li.active:not(.has-form) a:not(.button):hover{background:#a02116;color:#fff}.top-bar-section .has-dropdown>a{padding-right:2.1875rem !important}.top-bar-section .has-dropdown>a:after{content:"";display:block;width:0;height:0;border:inset 5px;border-color:rgba(255,255,255,0.4) transparent transparent transparent;border-top-style:solid;margin-top:-2.5px;top:1.40625rem}.top-bar-section .has-dropdown.moved{position:relative}.top-bar-section .has-dropdown.moved>.dropdown{display:block;position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}.top-bar-section .has-dropdown.hover>.dropdown,.top-bar-section .has-dropdown.not-click:hover>.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important}.top-bar-section .has-dropdown>a:focus+.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important}.top-bar-section .has-dropdown .dropdown li.has-dropdown>a:after{border:none;content:"\00bb";top:1rem;margin-top:-1px;right:5px;line-height:1.2}.top-bar-section .dropdown{left:0;top:auto;background:transparent;min-width:100%}.top-bar-section .dropdown li a{color:#fff;line-height:2.8125rem;white-space:nowrap;padding:12px .9375rem;background:#333}.top-bar-section .dropdown li:not(.has-form):not(.active)>a:not(.button){color:#fff;background:#333}.top-bar-section .dropdown li:not(.has-form):not(.active):hover>a:not(.button){color:#fff;background-color:#555;background:#333}.top-bar-section .dropdown li label{white-space:nowrap;background:#333}.top-bar-section .dropdown li .dropdown{left:100%;top:0}.top-bar-section>ul>.divider,.top-bar-section>ul>[role="separator"]{border-bottom:none;border-top:none;border-right:solid 1px #4e4e4e;clear:none;height:2.8125rem;width:0}.top-bar-section .has-form{background:#333;padding:0 .9375rem;height:2.8125rem}.top-bar-section .right li .dropdown{left:auto;right:0}.top-bar-section .right li .dropdown li .dropdown{right:100%}.top-bar-section .left li .dropdown{right:auto;left:0}.top-bar-section .left li .dropdown li .dropdown{left:100%}.no-js .top-bar-section ul li:hover>a{background-color:#555;background:#333;color:#fff}.no-js .top-bar-section ul li:active>a{background:#ba2619;color:#fff}.no-js .top-bar-section .has-dropdown:hover>.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important}.no-js .top-bar-section .has-dropdown>a:focus+.dropdown{display:block;position:static !important;height:auto;width:auto;overflow:visible;clip:auto;position:absolute !important}}.text-left{text-align:left !important}.text-right{text-align:right !important}.text-center{text-align:center !important}.text-justify{text-align:justify !important}@media only screen and (max-width: 40em){.small-only-text-left{text-align:left !important}.small-only-text-right{text-align:right !important}.small-only-text-center{text-align:center !important}.small-only-text-justify{text-align:justify !important}}@media only screen{.small-text-left{text-align:left !important}.small-text-right{text-align:right !important}.small-text-center{text-align:center !important}.small-text-justify{text-align:justify !important}}@media only screen and (min-width: 40.0625em) and (max-width: 64em){.medium-only-text-left{text-align:left !important}.medium-only-text-right{text-align:right !important}.medium-only-text-center{text-align:center !important}.medium-only-text-justify{text-align:justify !important}}@media only screen and (min-width: 40.0625em){.medium-text-left{text-align:left !important}.medium-text-right{text-align:right !important}.medium-text-center{text-align:center !important}.medium-text-justify{text-align:justify !important}}@media only screen and (min-width: 64.0625em) and (max-width: 90em){.large-only-text-left{text-align:left !important}.large-only-text-right{text-align:right !important}.large-only-text-center{text-align:center !important}.large-only-text-justify{text-align:justify !important}}@media only screen and (min-width: 64.0625em){.large-text-left{text-align:left !important}.large-text-right{text-align:right !important}.large-text-center{text-align:center !important}.large-text-justify{text-align:justify !important}}@media only screen and (min-width: 90.0625em) and (max-width: 120em){.xlarge-only-text-left{text-align:left !important}.xlarge-only-text-right{text-align:right !important}.xlarge-only-text-center{text-align:center !important}.xlarge-only-text-justify{text-align:justify !important}}@media only screen and (min-width: 90.0625em){.xlarge-text-left{text-align:left !important}.xlarge-text-right{text-align:right !important}.xlarge-text-center{text-align:center !important}.xlarge-text-justify{text-align:justify !important}}@media only screen and (min-width: 120.0625em) and (max-width: 99999999em){.xxlarge-only-text-left{text-align:left !important}.xxlarge-only-text-right{text-align:right !important}.xxlarge-only-text-center{text-align:center !important}.xxlarge-only-text-justify{text-align:justify !important}}@media only screen and (min-width: 120.0625em){.xxlarge-text-left{text-align:left !important}.xxlarge-text-right{text-align:right !important}.xxlarge-text-center{text-align:center !important}.xxlarge-text-justify{text-align:justify !important}}div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}a{color:#ba2619;text-decoration:none;line-height:inherit}a:hover,a:focus{color:#a02116}a img{border:none}p{font-family:inherit;font-weight:400;font-size:1rem;line-height:1.6;margin-bottom:1.25rem;text-rendering:optimizeLegibility}p.lead{font-size:1.21875rem;line-height:1.6}p aside{font-size:.875rem;line-height:1.35;font-style:italic}h1,h2,h3,h4,h5,h6{font-family:"Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;font-weight:700;font-style:normal;color:#222;text-rendering:optimizeLegibility;margin-top:.2rem;margin-bottom:.5rem;line-height:1.4}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-size:80%;color:#6f6f6f;line-height:0}h1{font-size:1.5625rem}h2{font-size:1.25rem}h3{font-size:1.0625rem}h4{font-size:.9375rem}h5{font-size:1rem}h6{font-size:1rem}.subheader{line-height:1.4;color:#6f6f6f;font-weight:400;margin-top:.2rem;margin-bottom:.5rem}hr{border:solid #ddd;border-width:1px 0 0;clear:both;margin:1.25rem 0 1.1875rem;height:0}em,i{font-style:italic;line-height:inherit}strong,b{font-weight:700;line-height:inherit}small{font-size:80%;line-height:inherit}code{font-family:Consolas,"Liberation Mono",Courier,monospace;font-weight:400;color:#333;background-color:rgba(0,0,0,0.04);border-width:1px;border-style:none;border-color:rgba(0,0,0,0.04);padding:.125rem .3125rem .0625rem}ul,ol,dl{font-size:1rem;line-height:1.6;margin-bottom:1.25rem;list-style-position:outside;font-family:inherit}ul{margin-left:1.1rem}ul.no-bullet{margin-left:0}ul.no-bullet li ul,ul.no-bullet li ol{margin-left:1.25rem;margin-bottom:0;list-style:none}ul li ul,ul li ol{margin-left:1.25rem;margin-bottom:0}ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}ul.square{list-style-type:square;margin-left:1.1rem}ul.circle{list-style-type:circle;margin-left:1.1rem}ul.disc{list-style-type:disc;margin-left:1.1rem}ul.no-bullet{list-style:none}ol{margin-left:1.4rem}ol li ul,ol li ol{margin-left:1.25rem;margin-bottom:0}dl dt{margin-bottom:.3rem;font-weight:700}dl dd{margin-bottom:.75rem}abbr,acronym{text-transform:uppercase;font-size:90%;color:#222;cursor:help}abbr{text-transform:none}abbr[title]{border-bottom:1px dotted #ddd}blockquote{margin:0 0 1.25rem;padding:.5625rem 1.25rem 0 1.1875rem;border-left:1px solid #ddd}blockquote cite{display:block;font-size:.8125rem;color:#555}blockquote cite:before{content:"\2014 \0020"}blockquote cite a,blockquote cite a:visited{color:#555}blockquote,blockquote p{line-height:1.6;color:#6f6f6f}.vcard{display:inline-block;margin:0 0 1.25rem 0;border:1px solid #ddd;padding:.625rem .75rem}.vcard li{margin:0;display:block}.vcard .fn{font-weight:700;font-size:.9375rem}.vevent .summary{font-weight:700}.vevent abbr{cursor:default;text-decoration:none;font-weight:700;border:none;padding:0 .0625rem}@media only screen and (min-width: 40.0625em){h1,h2,h3,h4,h5,h6{line-height:1.4}h1{font-size:1.875rem}h2{font-size:1.5625rem}h3{font-size:1.375rem}h4{font-size:1.25rem}h5{font-size:1rem}h6{font-size:1rem}}@media only screen{.show-for-small-only,.show-for-small-up,.show-for-small,.show-for-small-down,.hide-for-medium-only,.hide-for-medium-up,.hide-for-medium,.show-for-medium-down,.hide-for-large-only,.hide-for-large-up,.hide-for-large,.show-for-large-down,.hide-for-xlarge-only,.hide-for-xlarge-up,.hide-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.hide-for-small-only,.hide-for-small-up,.hide-for-small,.hide-for-small-down,.show-for-medium-only,.show-for-medium-up,.show-for-medium,.hide-for-medium-down,.show-for-large-only,.show-for-large-up,.show-for-large,.hide-for-large-down,.show-for-xlarge-only,.show-for-xlarge-up,.show-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.visible-for-small-only,.visible-for-small-up,.visible-for-small,.visible-for-small-down,.hidden-for-medium-only,.hidden-for-medium-up,.hidden-for-medium,.visible-for-medium-down,.hidden-for-large-only,.hidden-for-large-up,.hidden-for-large,.visible-for-large-down,.hidden-for-xlarge-only,.hidden-for-xlarge-up,.hidden-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.hidden-for-small-only,.hidden-for-small-up,.hidden-for-small,.hidden-for-small-down,.visible-for-medium-only,.visible-for-medium-up,.visible-for-medium,.hidden-for-medium-down,.visible-for-large-only,.visible-for-large-up,.visible-for-large,.hidden-for-large-down,.visible-for-xlarge-only,.visible-for-xlarge-up,.visible-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.show-for-small-only,table.show-for-small-up,table.show-for-small,table.show-for-small-down,table.hide-for-medium-only,table.hide-for-medium-up,table.hide-for-medium,table.show-for-medium-down,table.hide-for-large-only,table.hide-for-large-up,table.hide-for-large,table.show-for-large-down,table.hide-for-xlarge-only,table.hide-for-xlarge-up,table.hide-for-xlarge,table.show-for-xlarge-down,table.hide-for-xxlarge-only,table.hide-for-xxlarge-up,table.hide-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.show-for-small-only,thead.show-for-small-up,thead.show-for-small,thead.show-for-small-down,thead.hide-for-medium-only,thead.hide-for-medium-up,thead.hide-for-medium,thead.show-for-medium-down,thead.hide-for-large-only,thead.hide-for-large-up,thead.hide-for-large,thead.show-for-large-down,thead.hide-for-xlarge-only,thead.hide-for-xlarge-up,thead.hide-for-xlarge,thead.show-for-xlarge-down,thead.hide-for-xxlarge-only,thead.hide-for-xxlarge-up,thead.hide-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.show-for-small-only,tbody.show-for-small-up,tbody.show-for-small,tbody.show-for-small-down,tbody.hide-for-medium-only,tbody.hide-for-medium-up,tbody.hide-for-medium,tbody.show-for-medium-down,tbody.hide-for-large-only,tbody.hide-for-large-up,tbody.hide-for-large,tbody.show-for-large-down,tbody.hide-for-xlarge-only,tbody.hide-for-xlarge-up,tbody.hide-for-xlarge,tbody.show-for-xlarge-down,tbody.hide-for-xxlarge-only,tbody.hide-for-xxlarge-up,tbody.hide-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.show-for-small-only,tr.show-for-small-up,tr.show-for-small,tr.show-for-small-down,tr.hide-for-medium-only,tr.hide-for-medium-up,tr.hide-for-medium,tr.show-for-medium-down,tr.hide-for-large-only,tr.hide-for-large-up,tr.hide-for-large,tr.show-for-large-down,tr.hide-for-xlarge-only,tr.hide-for-xlarge-up,tr.hide-for-xlarge,tr.show-for-xlarge-down,tr.hide-for-xxlarge-only,tr.hide-for-xxlarge-up,tr.hide-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.show-for-small-only,td.show-for-small-only,th.show-for-small-up,td.show-for-small-up,th.show-for-small,td.show-for-small,th.show-for-small-down,td.show-for-small-down,th.hide-for-medium-only,td.hide-for-medium-only,th.hide-for-medium-up,td.hide-for-medium-up,th.hide-for-medium,td.hide-for-medium,th.show-for-medium-down,td.show-for-medium-down,th.hide-for-large-only,td.hide-for-large-only,th.hide-for-large-up,td.hide-for-large-up,th.hide-for-large,td.hide-for-large,th.show-for-large-down,td.show-for-large-down,th.hide-for-xlarge-only,td.hide-for-xlarge-only,th.hide-for-xlarge-up,td.hide-for-xlarge-up,th.hide-for-xlarge,td.hide-for-xlarge,th.show-for-xlarge-down,td.show-for-xlarge-down,th.hide-for-xxlarge-only,td.hide-for-xxlarge-only,th.hide-for-xxlarge-up,td.hide-for-xxlarge-up,th.hide-for-xxlarge,td.hide-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}@media only screen and (min-width: 40.0625em){.hide-for-small-only,.show-for-small-up,.hide-for-small,.hide-for-small-down,.show-for-medium-only,.show-for-medium-up,.show-for-medium,.show-for-medium-down,.hide-for-large-only,.hide-for-large-up,.hide-for-large,.show-for-large-down,.hide-for-xlarge-only,.hide-for-xlarge-up,.hide-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.show-for-small-only,.hide-for-small-up,.show-for-small,.show-for-small-down,.hide-for-medium-only,.hide-for-medium-up,.hide-for-medium,.hide-for-medium-down,.show-for-large-only,.show-for-large-up,.show-for-large,.hide-for-large-down,.show-for-xlarge-only,.show-for-xlarge-up,.show-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.hidden-for-small-only,.visible-for-small-up,.hidden-for-small,.hidden-for-small-down,.visible-for-medium-only,.visible-for-medium-up,.visible-for-medium,.visible-for-medium-down,.hidden-for-large-only,.hidden-for-large-up,.hidden-for-large,.visible-for-large-down,.hidden-for-xlarge-only,.hidden-for-xlarge-up,.hidden-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.visible-for-small-only,.hidden-for-small-up,.visible-for-small,.visible-for-small-down,.hidden-for-medium-only,.hidden-for-medium-up,.hidden-for-medium,.hidden-for-medium-down,.visible-for-large-only,.visible-for-large-up,.visible-for-large,.hidden-for-large-down,.visible-for-xlarge-only,.visible-for-xlarge-up,.visible-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.hide-for-small-only,table.show-for-small-up,table.hide-for-small,table.hide-for-small-down,table.show-for-medium-only,table.show-for-medium-up,table.show-for-medium,table.show-for-medium-down,table.hide-for-large-only,table.hide-for-large-up,table.hide-for-large,table.show-for-large-down,table.hide-for-xlarge-only,table.hide-for-xlarge-up,table.hide-for-xlarge,table.show-for-xlarge-down,table.hide-for-xxlarge-only,table.hide-for-xxlarge-up,table.hide-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.hide-for-small-only,thead.show-for-small-up,thead.hide-for-small,thead.hide-for-small-down,thead.show-for-medium-only,thead.show-for-medium-up,thead.show-for-medium,thead.show-for-medium-down,thead.hide-for-large-only,thead.hide-for-large-up,thead.hide-for-large,thead.show-for-large-down,thead.hide-for-xlarge-only,thead.hide-for-xlarge-up,thead.hide-for-xlarge,thead.show-for-xlarge-down,thead.hide-for-xxlarge-only,thead.hide-for-xxlarge-up,thead.hide-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.hide-for-small-only,tbody.show-for-small-up,tbody.hide-for-small,tbody.hide-for-small-down,tbody.show-for-medium-only,tbody.show-for-medium-up,tbody.show-for-medium,tbody.show-for-medium-down,tbody.hide-for-large-only,tbody.hide-for-large-up,tbody.hide-for-large,tbody.show-for-large-down,tbody.hide-for-xlarge-only,tbody.hide-for-xlarge-up,tbody.hide-for-xlarge,tbody.show-for-xlarge-down,tbody.hide-for-xxlarge-only,tbody.hide-for-xxlarge-up,tbody.hide-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.hide-for-small-only,tr.show-for-small-up,tr.hide-for-small,tr.hide-for-small-down,tr.show-for-medium-only,tr.show-for-medium-up,tr.show-for-medium,tr.show-for-medium-down,tr.hide-for-large-only,tr.hide-for-large-up,tr.hide-for-large,tr.show-for-large-down,tr.hide-for-xlarge-only,tr.hide-for-xlarge-up,tr.hide-for-xlarge,tr.show-for-xlarge-down,tr.hide-for-xxlarge-only,tr.hide-for-xxlarge-up,tr.hide-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.hide-for-small-only,td.hide-for-small-only,th.show-for-small-up,td.show-for-small-up,th.hide-for-small,td.hide-for-small,th.hide-for-small-down,td.hide-for-small-down,th.show-for-medium-only,td.show-for-medium-only,th.show-for-medium-up,td.show-for-medium-up,th.show-for-medium,td.show-for-medium,th.show-for-medium-down,td.show-for-medium-down,th.hide-for-large-only,td.hide-for-large-only,th.hide-for-large-up,td.hide-for-large-up,th.hide-for-large,td.hide-for-large,th.show-for-large-down,td.show-for-large-down,th.hide-for-xlarge-only,td.hide-for-xlarge-only,th.hide-for-xlarge-up,td.hide-for-xlarge-up,th.hide-for-xlarge,td.hide-for-xlarge,th.show-for-xlarge-down,td.show-for-xlarge-down,th.hide-for-xxlarge-only,td.hide-for-xxlarge-only,th.hide-for-xxlarge-up,td.hide-for-xxlarge-up,th.hide-for-xxlarge,td.hide-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}@media only screen and (min-width: 64.0625em){.hide-for-small-only,.show-for-small-up,.hide-for-small,.hide-for-small-down,.hide-for-medium-only,.show-for-medium-up,.hide-for-medium,.hide-for-medium-down,.show-for-large-only,.show-for-large-up,.show-for-large,.show-for-large-down,.hide-for-xlarge-only,.hide-for-xlarge-up,.hide-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.show-for-small-only,.hide-for-small-up,.show-for-small,.show-for-small-down,.show-for-medium-only,.hide-for-medium-up,.show-for-medium,.show-for-medium-down,.hide-for-large-only,.hide-for-large-up,.hide-for-large,.hide-for-large-down,.show-for-xlarge-only,.show-for-xlarge-up,.show-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.hidden-for-small-only,.visible-for-small-up,.hidden-for-small,.hidden-for-small-down,.hidden-for-medium-only,.visible-for-medium-up,.hidden-for-medium,.hidden-for-medium-down,.visible-for-large-only,.visible-for-large-up,.visible-for-large,.visible-for-large-down,.hidden-for-xlarge-only,.hidden-for-xlarge-up,.hidden-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.visible-for-small-only,.hidden-for-small-up,.visible-for-small,.visible-for-small-down,.visible-for-medium-only,.hidden-for-medium-up,.visible-for-medium,.visible-for-medium-down,.hidden-for-large-only,.hidden-for-large-up,.hidden-for-large,.hidden-for-large-down,.visible-for-xlarge-only,.visible-for-xlarge-up,.visible-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.hide-for-small-only,table.show-for-small-up,table.hide-for-small,table.hide-for-small-down,table.hide-for-medium-only,table.show-for-medium-up,table.hide-for-medium,table.hide-for-medium-down,table.show-for-large-only,table.show-for-large-up,table.show-for-large,table.show-for-large-down,table.hide-for-xlarge-only,table.hide-for-xlarge-up,table.hide-for-xlarge,table.show-for-xlarge-down,table.hide-for-xxlarge-only,table.hide-for-xxlarge-up,table.hide-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.hide-for-small-only,thead.show-for-small-up,thead.hide-for-small,thead.hide-for-small-down,thead.hide-for-medium-only,thead.show-for-medium-up,thead.hide-for-medium,thead.hide-for-medium-down,thead.show-for-large-only,thead.show-for-large-up,thead.show-for-large,thead.show-for-large-down,thead.hide-for-xlarge-only,thead.hide-for-xlarge-up,thead.hide-for-xlarge,thead.show-for-xlarge-down,thead.hide-for-xxlarge-only,thead.hide-for-xxlarge-up,thead.hide-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.hide-for-small-only,tbody.show-for-small-up,tbody.hide-for-small,tbody.hide-for-small-down,tbody.hide-for-medium-only,tbody.show-for-medium-up,tbody.hide-for-medium,tbody.hide-for-medium-down,tbody.show-for-large-only,tbody.show-for-large-up,tbody.show-for-large,tbody.show-for-large-down,tbody.hide-for-xlarge-only,tbody.hide-for-xlarge-up,tbody.hide-for-xlarge,tbody.show-for-xlarge-down,tbody.hide-for-xxlarge-only,tbody.hide-for-xxlarge-up,tbody.hide-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.hide-for-small-only,tr.show-for-small-up,tr.hide-for-small,tr.hide-for-small-down,tr.hide-for-medium-only,tr.show-for-medium-up,tr.hide-for-medium,tr.hide-for-medium-down,tr.show-for-large-only,tr.show-for-large-up,tr.show-for-large,tr.show-for-large-down,tr.hide-for-xlarge-only,tr.hide-for-xlarge-up,tr.hide-for-xlarge,tr.show-for-xlarge-down,tr.hide-for-xxlarge-only,tr.hide-for-xxlarge-up,tr.hide-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.hide-for-small-only,td.hide-for-small-only,th.show-for-small-up,td.show-for-small-up,th.hide-for-small,td.hide-for-small,th.hide-for-small-down,td.hide-for-small-down,th.hide-for-medium-only,td.hide-for-medium-only,th.show-for-medium-up,td.show-for-medium-up,th.hide-for-medium,td.hide-for-medium,th.hide-for-medium-down,td.hide-for-medium-down,th.show-for-large-only,td.show-for-large-only,th.show-for-large-up,td.show-for-large-up,th.show-for-large,td.show-for-large,th.show-for-large-down,td.show-for-large-down,th.hide-for-xlarge-only,td.hide-for-xlarge-only,th.hide-for-xlarge-up,td.hide-for-xlarge-up,th.hide-for-xlarge,td.hide-for-xlarge,th.show-for-xlarge-down,td.show-for-xlarge-down,th.hide-for-xxlarge-only,td.hide-for-xxlarge-only,th.hide-for-xxlarge-up,td.hide-for-xxlarge-up,th.hide-for-xxlarge,td.hide-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}@media only screen and (min-width: 90.0625em){.hide-for-small-only,.show-for-small-up,.hide-for-small,.hide-for-small-down,.hide-for-medium-only,.show-for-medium-up,.hide-for-medium,.hide-for-medium-down,.hide-for-large-only,.show-for-large-up,.hide-for-large,.hide-for-large-down,.show-for-xlarge-only,.show-for-xlarge-up,.show-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.show-for-small-only,.hide-for-small-up,.show-for-small,.show-for-small-down,.show-for-medium-only,.hide-for-medium-up,.show-for-medium,.show-for-medium-down,.show-for-large-only,.hide-for-large-up,.show-for-large,.show-for-large-down,.hide-for-xlarge-only,.hide-for-xlarge-up,.hide-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.hidden-for-small-only,.visible-for-small-up,.hidden-for-small,.hidden-for-small-down,.hidden-for-medium-only,.visible-for-medium-up,.hidden-for-medium,.hidden-for-medium-down,.hidden-for-large-only,.visible-for-large-up,.hidden-for-large,.hidden-for-large-down,.visible-for-xlarge-only,.visible-for-xlarge-up,.visible-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.visible-for-small-only,.hidden-for-small-up,.visible-for-small,.visible-for-small-down,.visible-for-medium-only,.hidden-for-medium-up,.visible-for-medium,.visible-for-medium-down,.visible-for-large-only,.hidden-for-large-up,.visible-for-large,.visible-for-large-down,.hidden-for-xlarge-only,.hidden-for-xlarge-up,.hidden-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.hide-for-small-only,table.show-for-small-up,table.hide-for-small,table.hide-for-small-down,table.hide-for-medium-only,table.show-for-medium-up,table.hide-for-medium,table.hide-for-medium-down,table.hide-for-large-only,table.show-for-large-up,table.hide-for-large,table.hide-for-large-down,table.show-for-xlarge-only,table.show-for-xlarge-up,table.show-for-xlarge,table.show-for-xlarge-down,table.hide-for-xxlarge-only,table.hide-for-xxlarge-up,table.hide-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.hide-for-small-only,thead.show-for-small-up,thead.hide-for-small,thead.hide-for-small-down,thead.hide-for-medium-only,thead.show-for-medium-up,thead.hide-for-medium,thead.hide-for-medium-down,thead.hide-for-large-only,thead.show-for-large-up,thead.hide-for-large,thead.hide-for-large-down,thead.show-for-xlarge-only,thead.show-for-xlarge-up,thead.show-for-xlarge,thead.show-for-xlarge-down,thead.hide-for-xxlarge-only,thead.hide-for-xxlarge-up,thead.hide-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.hide-for-small-only,tbody.show-for-small-up,tbody.hide-for-small,tbody.hide-for-small-down,tbody.hide-for-medium-only,tbody.show-for-medium-up,tbody.hide-for-medium,tbody.hide-for-medium-down,tbody.hide-for-large-only,tbody.show-for-large-up,tbody.hide-for-large,tbody.hide-for-large-down,tbody.show-for-xlarge-only,tbody.show-for-xlarge-up,tbody.show-for-xlarge,tbody.show-for-xlarge-down,tbody.hide-for-xxlarge-only,tbody.hide-for-xxlarge-up,tbody.hide-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.hide-for-small-only,tr.show-for-small-up,tr.hide-for-small,tr.hide-for-small-down,tr.hide-for-medium-only,tr.show-for-medium-up,tr.hide-for-medium,tr.hide-for-medium-down,tr.hide-for-large-only,tr.show-for-large-up,tr.hide-for-large,tr.hide-for-large-down,tr.show-for-xlarge-only,tr.show-for-xlarge-up,tr.show-for-xlarge,tr.show-for-xlarge-down,tr.hide-for-xxlarge-only,tr.hide-for-xxlarge-up,tr.hide-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.hide-for-small-only,td.hide-for-small-only,th.show-for-small-up,td.show-for-small-up,th.hide-for-small,td.hide-for-small,th.hide-for-small-down,td.hide-for-small-down,th.hide-for-medium-only,td.hide-for-medium-only,th.show-for-medium-up,td.show-for-medium-up,th.hide-for-medium,td.hide-for-medium,th.hide-for-medium-down,td.hide-for-medium-down,th.hide-for-large-only,td.hide-for-large-only,th.show-for-large-up,td.show-for-large-up,th.hide-for-large,td.hide-for-large,th.hide-for-large-down,td.hide-for-large-down,th.show-for-xlarge-only,td.show-for-xlarge-only,th.show-for-xlarge-up,td.show-for-xlarge-up,th.show-for-xlarge,td.show-for-xlarge,th.show-for-xlarge-down,td.show-for-xlarge-down,th.hide-for-xxlarge-only,td.hide-for-xxlarge-only,th.hide-for-xxlarge-up,td.hide-for-xxlarge-up,th.hide-for-xxlarge,td.hide-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}@media only screen and (min-width: 120.0625em){.hide-for-small-only,.show-for-small-up,.hide-for-small,.hide-for-small-down,.hide-for-medium-only,.show-for-medium-up,.hide-for-medium,.hide-for-medium-down,.hide-for-large-only,.show-for-large-up,.hide-for-large,.hide-for-large-down,.hide-for-xlarge-only,.show-for-xlarge-up,.hide-for-xlarge,.hide-for-xlarge-down,.show-for-xxlarge-only,.show-for-xxlarge-up,.show-for-xxlarge,.show-for-xxlarge-down{display:inherit !important}.show-for-small-only,.hide-for-small-up,.show-for-small,.show-for-small-down,.show-for-medium-only,.hide-for-medium-up,.show-for-medium,.show-for-medium-down,.show-for-large-only,.hide-for-large-up,.show-for-large,.show-for-large-down,.show-for-xlarge-only,.hide-for-xlarge-up,.show-for-xlarge,.show-for-xlarge-down,.hide-for-xxlarge-only,.hide-for-xxlarge-up,.hide-for-xxlarge,.hide-for-xxlarge-down{display:none !important}.hidden-for-small-only,.visible-for-small-up,.hidden-for-small,.hidden-for-small-down,.hidden-for-medium-only,.visible-for-medium-up,.hidden-for-medium,.hidden-for-medium-down,.hidden-for-large-only,.visible-for-large-up,.hidden-for-large,.hidden-for-large-down,.hidden-for-xlarge-only,.visible-for-xlarge-up,.hidden-for-xlarge,.hidden-for-xlarge-down,.visible-for-xxlarge-only,.visible-for-xxlarge-up,.visible-for-xxlarge,.visible-for-xxlarge-down{position:static !important;height:auto;width:auto;overflow:visible;clip:auto}.visible-for-small-only,.hidden-for-small-up,.visible-for-small,.visible-for-small-down,.visible-for-medium-only,.hidden-for-medium-up,.visible-for-medium,.visible-for-medium-down,.visible-for-large-only,.hidden-for-large-up,.visible-for-large,.visible-for-large-down,.visible-for-xlarge-only,.hidden-for-xlarge-up,.visible-for-xlarge,.visible-for-xlarge-down,.hidden-for-xxlarge-only,.hidden-for-xxlarge-up,.hidden-for-xxlarge,.hidden-for-xxlarge-down{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px)}table.hide-for-small-only,table.show-for-small-up,table.hide-for-small,table.hide-for-small-down,table.hide-for-medium-only,table.show-for-medium-up,table.hide-for-medium,table.hide-for-medium-down,table.hide-for-large-only,table.show-for-large-up,table.hide-for-large,table.hide-for-large-down,table.hide-for-xlarge-only,table.show-for-xlarge-up,table.hide-for-xlarge,table.hide-for-xlarge-down,table.show-for-xxlarge-only,table.show-for-xxlarge-up,table.show-for-xxlarge,table.show-for-xxlarge-down{display:table !important}thead.hide-for-small-only,thead.show-for-small-up,thead.hide-for-small,thead.hide-for-small-down,thead.hide-for-medium-only,thead.show-for-medium-up,thead.hide-for-medium,thead.hide-for-medium-down,thead.hide-for-large-only,thead.show-for-large-up,thead.hide-for-large,thead.hide-for-large-down,thead.hide-for-xlarge-only,thead.show-for-xlarge-up,thead.hide-for-xlarge,thead.hide-for-xlarge-down,thead.show-for-xxlarge-only,thead.show-for-xxlarge-up,thead.show-for-xxlarge,thead.show-for-xxlarge-down{display:table-header-group !important}tbody.hide-for-small-only,tbody.show-for-small-up,tbody.hide-for-small,tbody.hide-for-small-down,tbody.hide-for-medium-only,tbody.show-for-medium-up,tbody.hide-for-medium,tbody.hide-for-medium-down,tbody.hide-for-large-only,tbody.show-for-large-up,tbody.hide-for-large,tbody.hide-for-large-down,tbody.hide-for-xlarge-only,tbody.show-for-xlarge-up,tbody.hide-for-xlarge,tbody.hide-for-xlarge-down,tbody.show-for-xxlarge-only,tbody.show-for-xxlarge-up,tbody.show-for-xxlarge,tbody.show-for-xxlarge-down{display:table-row-group !important}tr.hide-for-small-only,tr.show-for-small-up,tr.hide-for-small,tr.hide-for-small-down,tr.hide-for-medium-only,tr.show-for-medium-up,tr.hide-for-medium,tr.hide-for-medium-down,tr.hide-for-large-only,tr.show-for-large-up,tr.hide-for-large,tr.hide-for-large-down,tr.hide-for-xlarge-only,tr.show-for-xlarge-up,tr.hide-for-xlarge,tr.hide-for-xlarge-down,tr.show-for-xxlarge-only,tr.show-for-xxlarge-up,tr.show-for-xxlarge,tr.show-for-xxlarge-down{display:table-row}th.hide-for-small-only,td.hide-for-small-only,th.show-for-small-up,td.show-for-small-up,th.hide-for-small,td.hide-for-small,th.hide-for-small-down,td.hide-for-small-down,th.hide-for-medium-only,td.hide-for-medium-only,th.show-for-medium-up,td.show-for-medium-up,th.hide-for-medium,td.hide-for-medium,th.hide-for-medium-down,td.hide-for-medium-down,th.hide-for-large-only,td.hide-for-large-only,th.show-for-large-up,td.show-for-large-up,th.hide-for-large,td.hide-for-large,th.hide-for-large-down,td.hide-for-large-down,th.hide-for-xlarge-only,td.hide-for-xlarge-only,th.show-for-xlarge-up,td.show-for-xlarge-up,th.hide-for-xlarge,td.hide-for-xlarge,th.hide-for-xlarge-down,td.hide-for-xlarge-down,th.show-for-xxlarge-only,td.show-for-xxlarge-only,th.show-for-xxlarge-up,td.show-for-xxlarge-up,th.show-for-xxlarge,td.show-for-xxlarge,th.show-for-xxlarge-down,td.show-for-xxlarge-down{display:table-cell !important}}.show-for-landscape,.hide-for-portrait{display:inherit !important}.hide-for-landscape,.show-for-portrait{display:none !important}table.hide-for-landscape,table.show-for-portrait{display:table !important}thead.hide-for-landscape,thead.show-for-portrait{display:table-header-group !important}tbody.hide-for-landscape,tbody.show-for-portrait{display:table-row-group !important}tr.hide-for-landscape,tr.show-for-portrait{display:table-row !important}td.hide-for-landscape,td.show-for-portrait,th.hide-for-landscape,th.show-for-portrait{display:table-cell !important}@media only screen and (orientation: landscape){.show-for-landscape,.hide-for-portrait{display:inherit !important}.hide-for-landscape,.show-for-portrait{display:none !important}table.show-for-landscape,table.hide-for-portrait{display:table !important}thead.show-for-landscape,thead.hide-for-portrait{display:table-header-group !important}tbody.show-for-landscape,tbody.hide-for-portrait{display:table-row-group !important}tr.show-for-landscape,tr.hide-for-portrait{display:table-row !important}td.show-for-landscape,td.hide-for-portrait,th.show-for-landscape,th.hide-for-portrait{display:table-cell !important}}@media only screen and (orientation: portrait){.show-for-portrait,.hide-for-landscape{display:inherit !important}.hide-for-portrait,.show-for-landscape{display:none !important}table.show-for-portrait,table.hide-for-landscape{display:table !important}thead.show-for-portrait,thead.hide-for-landscape{display:table-header-group !important}tbody.show-for-portrait,tbody.hide-for-landscape{display:table-row-group !important}tr.show-for-portrait,tr.hide-for-landscape{display:table-row !important}td.show-for-portrait,td.hide-for-landscape,th.show-for-portrait,th.hide-for-landscape{display:table-cell !important}}.show-for-touch{display:none !important}.hide-for-touch{display:inherit !important}.touch .show-for-touch{display:inherit !important}.touch .hide-for-touch{display:none !important}table.hide-for-touch{display:table !important}.touch table.show-for-touch{display:table !important}thead.hide-for-touch{display:table-header-group !important}.touch thead.show-for-touch{display:table-header-group !important}tbody.hide-for-touch{display:table-row-group !important}.touch tbody.show-for-touch{display:table-row-group !important}tr.hide-for-touch{display:table-row !important}.touch tr.show-for-touch{display:table-row !important}td.hide-for-touch{display:table-cell !important}.touch td.show-for-touch{display:table-cell !important}th.hide-for-touch{display:table-cell !important}.touch th.show-for-touch{display:table-cell !important}.print-only{display:none !important}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}.show-for-print{display:block}.hide-for-print{display:none}table.show-for-print{display:table !important}thead.show-for-print{display:table-header-group !important}tbody.show-for-print{display:table-row-group !important}tr.show-for-print{display:table-row !important}td.show-for-print{display:table-cell !important}th.show-for-print{display:table-cell !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.hide-on-print{display:none !important}.print-only{display:block !important}.hide-for-print{display:none !important}.show-for-print{display:inherit !important}}@media print{.show-for-print{display:block}.hide-for-print{display:none}table.show-for-print{display:table !important}thead.show-for-print{display:table-header-group !important}tbody.show-for-print{display:table-row-group !important}tr.show-for-print{display:table-row !important}td.show-for-print{display:table-cell !important}th.show-for-print{display:table-cell !important}}.slick-slider{position:relative;display:block;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-touch-action:pan-y;touch-action:pan-y;-webkit-tap-highlight-color:transparent}.slick-list{position:relative;overflow:hidden;display:block;margin:0;padding:0}.slick-list:focus{outline:none}.slick-list.dragging{cursor:pointer;cursor:hand}.slick-slider .slick-track,.slick-slider .slick-list{-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.slick-track{position:relative;left:0;top:0;display:block}.slick-track:before,.slick-track:after{content:"";display:table}.slick-track:after{clear:both}.slick-loading .slick-track{visibility:hidden}.slick-slide{float:left;height:100%;min-height:1px;display:none}[dir="rtl"] .slick-slide{float:right}.slick-slide img{display:block}.slick-slide.slick-loading img{display:none}.slick-slide.dragging img{pointer-events:none}.slick-initialized .slick-slide{display:block}.slick-loading .slick-slide{visibility:hidden}.slick-vertical .slick-slide{display:block;height:auto;border:1px solid transparent}.slick-loading .slick-list{background:#fff url("../img/ajax-loader.gif") center center no-repeat}.slick-prev,.slick-next{position:absolute;display:block;height:20px;width:20px;line-height:0;font-size:0;cursor:pointer;background:transparent;color:transparent;top:50%;margin-top:-10px;padding:0;border:none;outline:none}.slick-prev:hover,.slick-prev:focus,.slick-next:hover,.slick-next:focus{outline:none;background:transparent;color:transparent}.slick-prev:hover:before,.slick-prev:focus:before,.slick-next:hover:before,.slick-next:focus:before{opacity:1}.slick-prev.slick-disabled:before,.slick-next.slick-disabled:before{opacity:.25}.slick-prev:before,.slick-next:before{font-family:"FontAwesome";font-size:20px;line-height:1;color:#ba2619;opacity:.75;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.slick-prev{left:15px}[dir="rtl"] .slick-prev{left:auto;right:15px}.slick-prev:before{content:""}[dir="rtl"] .slick-prev:before{content:""}.slick-next{right:15px}[dir="rtl"] .slick-next{left:15px;right:auto}.slick-next:before{content:""}[dir="rtl"] .slick-next:before{content:""}.slick-slider{margin-bottom:30px}.slick-dots{margin:0;position:absolute;bottom:30px;list-style:none;display:block;text-align:center;padding:0;width:100%}.slick-dots li{position:relative;display:inline-block;height:20px;width:20px;margin:0 5px;padding:0;cursor:pointer}.slick-dots li button{border:0;background:transparent;display:block;height:20px;width:20px;outline:none;line-height:0;font-size:0;color:transparent;padding:5px;cursor:pointer}.slick-dots li button:hover,.slick-dots li button:focus{outline:none}.slick-dots li button:hover:before,.slick-dots li button:focus:before{opacity:1}.slick-dots li button:before{position:absolute;top:0;left:0;content:"";width:20px;height:20px;font-family:"FontAwesome";font-size:12px;line-height:20px;text-align:center;color:#000;opacity:.25;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.slick-dots li.slick-active button:before{color:#ba2619;opacity:.75}/*! * Font Awesome 4.4.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url("./fonts/fontawesome-webfont.eot?v=4.4.0");src:url("./fonts/fontawesome-webfont.eot?#iefix&v=4.4.0") format("embedded-opentype"),url("./fonts/fontawesome-webfont.woff2?v=4.4.0") format("woff2"),url("./fonts/fontawesome-webfont.woff?v=4.4.0") format("woff"),url("./fonts/fontawesome-webfont.ttf?v=4.4.0") format("truetype"),url("./fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857em;text-align:center}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em;text-align:center}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.maxWidth{width:100%}.hidden{display:none}*{transition:all 0.15s ease}body{background-color:#333}body>main{padding:2.5rem 0;background-color:#fff}@media only screen and (max-width: 40em){body>main{padding:1.25rem 0}}body>main img{margin-bottom:1.25rem}@media only screen and (max-width: 40em){aside{margin-bottom:1.5rem}}@media only screen and (max-width: 40em){.row{overflow:hidden}}body>footer{background-color:#333;padding:2.5rem 0;color:#999}body>footer p,body>footer h1,body>footer h2,body>footer h3,body>footer h4,body>footer h5,body>footer h6{color:inherit}body>footer a{color:#e23424}code{font-size:85%;color:inherit !important;overflow-x:scroll;-webkit-overflow-scrolling:touch}.highlight{border:solid 1px #ddd;background:#fff;padding:1em;line-height:23px;margin-bottom:30px;white-space:pre;overflow-x:auto;word-break:inherit;word-wrap:inherit;background:#ffffff}@media only screen and (max-width: 40em){.highlight{overflow-x:scroll;-webkit-overflow-scrolling:touch}}.highlight code{background-color:transparent;border:none;padding:0}.highlight td{padding:8px 15px}.highlight .gl{background:#fafafa;border-right:1px solid #ddd;color:#999;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.highlight .c{color:#999988;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .k{font-weight:bold}.highlight .o{font-weight:bold}.highlight .cm{color:#999988;font-style:italic}.highlight .cp{color:#999999;font-weight:bold}.highlight .c1{color:#999988;font-style:italic}.highlight .cs{color:#999999;font-weight:bold;font-style:italic}.highlight .gd{color:#000000;background-color:#ffdddd}.highlight .gd .x{color:#000000;background-color:#ffaaaa}.highlight .ge{font-style:italic}.highlight .gr{color:#aa0000}.highlight .gh{color:#999999}.highlight .gi{color:#000000;background-color:#ddffdd}.highlight .gi .x{color:#000000;background-color:#aaffaa}.highlight .go{color:#888888}.highlight .gp{color:#555555}.highlight .gs{font-weight:bold}.highlight .gu{color:#aaaaaa}.highlight .gt{color:#aa0000}.highlight .kc{font-weight:bold}.highlight .kd{font-weight:bold}.highlight .kp{font-weight:bold}.highlight .kr{font-weight:bold}.highlight .kt{color:#445588;font-weight:bold}.highlight .m{color:#009999}.highlight .s{color:#d14}.highlight .na{color:#008080}.highlight .nb{color:#0086B3}.highlight .nc{color:#445588;font-weight:bold}.highlight .no{color:#008080}.highlight .ni{color:#800080}.highlight .ne{color:#990000;font-weight:bold}.highlight .nf{color:#990000;font-weight:bold}.highlight .nn{color:#555555}.highlight .nt{color:#000080}.highlight .nv{color:#008080}.highlight .ow{font-weight:bold}.highlight .w{color:#bbbbbb}.highlight .mf{color:#009999}.highlight .mh{color:#009999}.highlight .mi{color:#009999}.highlight .mo{color:#009999}.highlight .sb{color:#d14}.highlight .sc{color:#d14}.highlight .sd{color:#d14}.highlight .s2{color:#d14}.highlight .se{color:#d14}.highlight .sh{color:#d14}.highlight .si{color:#d14}.highlight .sx{color:#d14}.highlight .sr{color:#009926}.highlight .s1{color:#d14}.highlight .ss{color:#990073}.highlight .bp{color:#999999}.highlight .vc{color:#008080}.highlight .vg{color:#008080}.highlight .vi{color:#008080}.highlight .il{color:#009999}kbd{display:inline-block;padding:3px 5px;font-size:11px;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.social__icons{margin-bottom:10px}.social__icon{display:inline-block;margin-right:10px}.slider picture img{width:100%}.videoWrapper{position:relative;padding-top:56.25%;margin-bottom:1.25rem}.videoWrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}.icon{position:relative;top:1px;display:inline-block;width:16px;height:16px}.icon-color{border:1px solid #aaa}.icon-color-white{background-color:#fff}.icon-color-black{background-color:#000}.icon-color-red{background-color:#ba2619}.toc-header{margin-bottom:0}#toc{display:block;margin:1rem 0 0 0}#toc>ol{margin-left:0}#toc>ol>li{margin-bottom:0.5rem}#toc ol{list-style-type:none}.clickable-header{cursor:pointer}.clickable-header:hover{text-decoration:underline}.top-level-header{display:inline-block}.back-to-top{position:relative;margin-left:8px;cursor:pointer;top:-3px}.contentSearch{margin-bottom:30px}@media only screen and (max-width: 40em){.contentSearch{margin-bottom:5px}}.contentSearch-wrapper{position:relative}.contentSearch-wrapper.small-collapse{margin:0 !important}.liveSearch-field{margin-bottom:0 !important}.liveSearch-button{margin-bottom:0}.liveSearch-result-list{position:absolute;width:100%;height:auto;background:white;border:1px #ccc;border-style:none solid solid solid;z-index:99;margin:0;list-style-type:none}@media only screen and (max-width: 40em){.liveSearch-result-list{position:relative}}.liveSearch-result-list li a{-webkit-transition:all 0.15s ease;transition:all 0.15s ease;padding:4px 10px;display:block;width:100%;height:100%;line-height:1.2}.liveSearch-result-list li a:hover{background-color:#eee}.liveSearch-result-list li a:first-child{padding-top:8px}.liveSearch-result-list li a:last-child{padding-bottom:8px}.searchPage-result-list{line-height:1.2;list-style-type:none}.searchPage-result-list li{margin-bottom:20px}@media only screen and (max-width: 40em){.searchPage-result-list li{margin-bottom:15px}}.searchPage-result-list li a{font-weight:bold;color:#1a0dab}.searchPage-result-list li a:hover{color:#1a0dab;text-decoration:underline}.searchPage-result-list li .url{color:#006621}@media only screen and (max-width: 40em){.searchPage-result-list li .additionalInfo{display:none}}.article-list{margin:0;padding:0;list-style-type:none}.article-list header h1{font-size:1.5rem}article header{margin-bottom:0.5rem}article header h1{margin-bottom:0}article .meta{font-size:0.9em}.table-wrapper{width:100%;overflow-y:auto;_overflow:auto;margin:0 0 1em} + */@font-face{font-family:'FontAwesome';src:url("./fonts/fontawesome-webfont.eot?v=4.4.0");src:url("./fonts/fontawesome-webfont.eot?#iefix&v=4.4.0") format("embedded-opentype"),url("./fonts/fontawesome-webfont.woff2?v=4.4.0") format("woff2"),url("./fonts/fontawesome-webfont.woff?v=4.4.0") format("woff"),url("./fonts/fontawesome-webfont.ttf?v=4.4.0") format("truetype"),url("./fonts/fontawesome-webfont.svg?v=4.4.0#fontawesomeregular") format("svg");font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.2857142857em;text-align:center}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em;text-align:center}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:solid 0.08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-remove:before,.fa-close:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-gear:before,.fa-cog:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-rotate-right:before,.fa-repeat:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-warning:before,.fa-exclamation-triangle:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-gears:before,.fa-cogs:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-save:before,.fa-floppy-o:before{content:""}.fa-square:before{content:""}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-unsorted:before,.fa-sort:before{content:""}.fa-sort-down:before,.fa-sort-desc:before{content:""}.fa-sort-up:before,.fa-sort-asc:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-legal:before,.fa-gavel:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-flash:before,.fa-bolt:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-paste:before,.fa-clipboard:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-unlink:before,.fa-chain-broken:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:""}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:""}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:""}.fa-euro:before,.fa-eur:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-rupee:before,.fa-inr:before{content:""}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:""}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:""}.fa-won:before,.fa-krw:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-turkish-lira:before,.fa-try:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-institution:before,.fa-bank:before,.fa-university:before{content:""}.fa-mortar-board:before,.fa-graduation-cap:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:""}.fa-file-zip-o:before,.fa-file-archive-o:before{content:""}.fa-file-sound-o:before,.fa-file-audio-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before{content:""}.fa-ge:before,.fa-empire:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-send:before,.fa-paper-plane:before{content:""}.fa-send-o:before,.fa-paper-plane-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-hotel:before,.fa-bed:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-yc:before,.fa-y-combinator:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-tv:before,.fa-television:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.maxWidth{width:100%}.hidden{display:none}*{transition:all 0.15s ease}body{background-color:#333}body>main{padding:2.5rem 0;background-color:#fff}@media only screen and (max-width: 40em){body>main{padding:1.25rem 0}}body>main img{margin-bottom:1.25rem}@media only screen and (max-width: 40em){aside{margin-bottom:1.5rem}}@media only screen and (max-width: 40em){.row{overflow:hidden}}body>footer{background-color:#333;padding:2.5rem 0;color:#999}body>footer p,body>footer h1,body>footer h2,body>footer h3,body>footer h4,body>footer h5,body>footer h6{color:inherit}body>footer a{color:#e23424}code{font-size:85%;color:inherit !important;overflow-x:scroll;-webkit-overflow-scrolling:touch}pre.highlight{border:solid 1px #ddd;background:#fff;padding:1em;line-height:23px;margin-bottom:30px;white-space:pre;overflow-x:auto;word-break:inherit;word-wrap:inherit;background:#ffffff}@media only screen and (max-width: 40em){pre.highlight{overflow-x:scroll;-webkit-overflow-scrolling:touch}}pre.highlight code{background-color:transparent;border:none;padding:0}pre.highlight td{padding:8px 15px}pre.highlight .gl{background:#fafafa;border-right:1px solid #ddd;color:#999;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}pre.highlight .c{color:#999988;font-style:italic}pre.highlight .err{color:#a61717;background-color:#e3d2d2}pre.highlight .k{font-weight:bold}pre.highlight .o{font-weight:bold}pre.highlight .cm{color:#999988;font-style:italic}pre.highlight .cp{color:#999999;font-weight:bold}pre.highlight .c1{color:#999988;font-style:italic}pre.highlight .cs{color:#999999;font-weight:bold;font-style:italic}pre.highlight .gd{color:#000000;background-color:#ffdddd}pre.highlight .gd .x{color:#000000;background-color:#ffaaaa}pre.highlight .ge{font-style:italic}pre.highlight .gr{color:#aa0000}pre.highlight .gh{color:#999999}pre.highlight .gi{color:#000000;background-color:#ddffdd}pre.highlight .gi .x{color:#000000;background-color:#aaffaa}pre.highlight .go{color:#888888}pre.highlight .gp{color:#555555}pre.highlight .gs{font-weight:bold}pre.highlight .gu{color:#aaaaaa}pre.highlight .gt{color:#aa0000}pre.highlight .kc{font-weight:bold}pre.highlight .kd{font-weight:bold}pre.highlight .kp{font-weight:bold}pre.highlight .kr{font-weight:bold}pre.highlight .kt{color:#445588;font-weight:bold}pre.highlight .m{color:#009999}pre.highlight .s{color:#d14}pre.highlight .na{color:#008080}pre.highlight .nb{color:#0086B3}pre.highlight .nc{color:#445588;font-weight:bold}pre.highlight .no{color:#008080}pre.highlight .ni{color:#800080}pre.highlight .ne{color:#990000;font-weight:bold}pre.highlight .nf{color:#990000;font-weight:bold}pre.highlight .nn{color:#555555}pre.highlight .nt{color:#000080}pre.highlight .nv{color:#008080}pre.highlight .ow{font-weight:bold}pre.highlight .w{color:#bbbbbb}pre.highlight .mf{color:#009999}pre.highlight .mh{color:#009999}pre.highlight .mi{color:#009999}pre.highlight .mo{color:#009999}pre.highlight .sb{color:#d14}pre.highlight .sc{color:#d14}pre.highlight .sd{color:#d14}pre.highlight .s2{color:#d14}pre.highlight .se{color:#d14}pre.highlight .sh{color:#d14}pre.highlight .si{color:#d14}pre.highlight .sx{color:#d14}pre.highlight .sr{color:#009926}pre.highlight .s1{color:#d14}pre.highlight .ss{color:#990073}pre.highlight .bp{color:#999999}pre.highlight .vc{color:#008080}pre.highlight .vg{color:#008080}pre.highlight .vi{color:#008080}pre.highlight .il{color:#009999}kbd{display:inline-block;padding:3px 5px;font-size:11px;line-height:10px;color:#555;vertical-align:middle;background-color:#fcfcfc;border:solid 1px #ccc;border-bottom-color:#bbb;border-radius:3px;box-shadow:inset 0 -1px 0 #bbb}.social__icons{margin-bottom:10px}.social__icon{display:inline-block;margin-right:10px}.slider picture img{width:100%}.videoWrapper{position:relative;padding-top:56.25%;margin-bottom:1.25rem}.videoWrapper iframe{position:absolute;top:0;left:0;width:100%;height:100%}.icon{position:relative;top:1px;display:inline-block;width:16px;height:16px}.icon-color{border:1px solid #aaa}.icon-color-white{background-color:#fff}.icon-color-black{background-color:#000}.icon-color-red{background-color:#ba2619}.toc-header{margin-bottom:0}#toc{display:block;margin:1rem 0 0 0}#toc>ol{margin-left:0}#toc>ol>li{margin-bottom:0.5rem}#toc ol{list-style-type:none}.clickable-header{cursor:pointer}.clickable-header:hover{text-decoration:underline}.top-level-header{display:inline-block}.back-to-top{position:relative;margin-left:8px;cursor:pointer;top:-3px}.contentSearch{margin-bottom:30px}@media only screen and (max-width: 40em){.contentSearch{margin-bottom:5px}}.contentSearch-wrapper{position:relative}.contentSearch-wrapper.small-collapse{margin:0 !important}.liveSearch-field{margin-bottom:0 !important}.liveSearch-button{margin-bottom:0}.liveSearch-result-list{position:absolute;width:100%;height:auto;background:white;border:1px #ccc;border-style:none solid solid solid;z-index:99;margin:0;list-style-type:none}@media only screen and (max-width: 40em){.liveSearch-result-list{position:relative}}.liveSearch-result-list li a{-webkit-transition:all 0.15s ease;transition:all 0.15s ease;padding:4px 10px;display:block;width:100%;height:100%;line-height:1.2}.liveSearch-result-list li a:hover{background-color:#eee}.liveSearch-result-list li a:first-child{padding-top:8px}.liveSearch-result-list li a:last-child{padding-bottom:8px}.searchPage-result-list{line-height:1.2;list-style-type:none}.searchPage-result-list li{margin-bottom:20px}@media only screen and (max-width: 40em){.searchPage-result-list li{margin-bottom:15px}}.searchPage-result-list li a{font-weight:bold;color:#1a0dab}.searchPage-result-list li a:hover{color:#1a0dab;text-decoration:underline}.searchPage-result-list li .url{color:#006621}@media only screen and (max-width: 40em){.searchPage-result-list li .additionalInfo{display:none}}.article-list{margin:0;padding:0;list-style-type:none}.article-list header h1{font-size:1.5rem}article header{margin-bottom:0.5rem}article header h1{margin-bottom:0}article .meta{font-size:0.9em}.table-wrapper{width:100%;overflow-y:auto;_overflow:auto;margin:0 0 1em} diff --git a/docs/img/news/171220_cbaPost2.jpg b/docs/img/news/171220_cbaPost2.jpg new file mode 100644 index 0000000000..c55c64c47e Binary files /dev/null and b/docs/img/news/171220_cbaPost2.jpg differ diff --git a/docs/js/footer.min.js b/docs/js/footer.min.js index c12f82fe62..7e9a86bd64 100644 --- a/docs/js/footer.min.js +++ b/docs/js/footer.min.js @@ -1,7 +1,7 @@ -window.Modernizr=function(a,b,c){function d(a){o.cssText=a}function e(a,b){return typeof a===b}var f,g,h,i="2.8.3",j={},k=!0,l=b.documentElement,m="modernizr",n=b.createElement(m),o=n.style,p=({}.toString,{}),q=[],r=q.slice,s={}.hasOwnProperty;h=e(s,"undefined")||e(s.call,"undefined")?function(a,b){return b in a&&e(a.constructor.prototype[b],"undefined")}:function(a,b){return s.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=r.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(r.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(r.call(arguments)))};return d});for(var t in p)h(p,t)&&(g=t.toLowerCase(),j[g]=p[t](),q.push((j[g]?"":"no-")+g));return j.addTest=function(a,b){if("object"==typeof a)for(var d in a)h(a,d)&&j.addTest(d,a[d]);else{if(a=a.toLowerCase(),j[a]!==c)return j;b="function"==typeof b?b():b,"undefined"!=typeof k&&k&&(l.className+=" "+(b?"":"no-")+a),j[a]=b}return j},d(""),n=f=null,function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=s.elements;return"string"==typeof a?a.split(" "):a}function e(a){var b=r[a[p]];return b||(b={},q++,a[p]=q,r[q]=b),b}function f(a,c,d){if(c||(c=b),k)return c.createElement(a);d||(d=e(c));var f;return f=d.cache[a]?d.cache[a].cloneNode():o.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!f.canHaveChildren||n.test(a)||f.tagUrn?f:d.frag.appendChild(f)}function g(a,c){if(a||(a=b),k)return a.createDocumentFragment();c=c||e(a);for(var f=c.frag.cloneNode(),g=0,h=d(),i=h.length;g",j="hidden"in a,k=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(a){j=!0,k=!0}}();var s={elements:m.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:l,shivCSS:m.shivCSS!==!1,supportsUnknownElements:k,shivMethods:m.shivMethods!==!1,type:"default",shivDocument:i,createElement:f,createDocumentFragment:g};a.html5=s,i(b)}(this,b),j._version=i,l.className=l.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(k?" js "+q.join(" "):""),j}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==q.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=r.shift();s=1,a?a.t?o(function(){("c"==a.t?m.injectCss:m.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):s=0}function i(a,c,d,e,f,i,j){function k(b){if(!n&&g(l.readyState)&&(t.r=n=1,!s&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&o(function(){v.removeChild(l)},50);for(var d in A[c])A[c].hasOwnProperty(d)&&A[c][d].onload()}}var j=j||m.errorTimeout,l=b.createElement(a),n=0,q=0,t={t:d,s:c,e:f,a:i,x:j};1===A[c]&&(q=1,A[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,q)},r.splice(e,0,t),"img"!=a&&(q||2===A[c]?(v.insertBefore(l,u?null:p),o(k,j)):A[c].push(l))}function j(a,b,c,d,f){return s=0,b=b||"j",e(a)?i("c"==b?x:w,a,b,this.i++,c,d,f):(r.splice(this.i++,0,a),1==r.length&&h()),this}function k(){var a=m;return a.loader={load:j,i:0},a}var l,m,n=b.documentElement,o=a.setTimeout,p=b.getElementsByTagName("script")[0],q={}.toString,r=[],s=0,t="MozAppearance"in n.style,u=t&&!!b.createRange().compareNode,v=u?n:p.parentNode,n=a.opera&&"[object Opera]"==q.call(a.opera),n=!!b.attachEvent&&!n,w=t?"object":n?"script":"img",x=n?"script":w,y=Array.isArray||function(a){return"[object Array]"==q.call(a)},z=[],A={},B={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}};m=function(a){function b(a){var b,c,d,a=a.split("!"),e=z.length,f=a.pop(),g=a.length,f={url:f,origUrl:f,prefixes:a};for(c=0;ca._pfLastSize)&&(a._pfLastSize=a.offsetWidth,d=a.sizes,a.sizes+=",100vw",setTimeout(function(){a.sizes=d}))},e=function(){var a,b=document.querySelectorAll("picture > img, img[srcset][sizes]");for(a=0;a2.7?h=c+1:(f=b-c,e=Math.pow(a-.6,1.5),g=f*e,d&&(g+=.1*e),h=a+g):h=c>1?Math.sqrt(a*b):a,h>c}function h(a){var b,c=s.getSet(a),d=!1;"pending"!==c&&(d=r,c&&(b=s.setRes(c),s.applySetCandidate(b,a))),a[s.ns].evaled=d}function i(a,b){return a.res-b.res}function j(a,b,c){var d;return!c&&b&&(c=a[s.ns].sets,c=c&&c[c.length-1]),d=k(b,c),d&&(b=s.makeUrl(b),a[s.ns].curSrc=b,a[s.ns].curCan=d,d.res||aa(d,d.set.sizes)),d}function k(a,b){var c,d,e;if(a&&b)for(e=s.parseSet(b),a=s.makeUrl(a),c=0;c=l)return n;g=c(V),h=[],","===g.slice(-1)?(g=g.replace(W,""),e()):f()}}function n(a){function b(a){function b(){f&&(g.push(f),f="")}function c(){g[0]&&(h.push(g),g=[])}for(var e,f="",g=[],h=[],i=0,j=0,k=!1;;){if(e=a.charAt(j),""===e)return b(),c(),h;if(k){if("*"===e&&"/"===a[j+1]){k=!1,j+=2,b();continue}j+=1}else{if(d(e)){if(a.charAt(j-1)&&d(a.charAt(j-1))||!f){j+=1;continue}if(0===i){b(),j+=1;continue}e=" "}else if("("===e)i+=1;else if(")"===e)i-=1;else{if(","===e){b(),c(),j+=1;continue}if("/"===e&&"*"===a.charAt(j+1)){k=!0,j+=2;continue}}f+=e,j+=1}}}function c(a){return!!(k.test(a)&&parseFloat(a)>=0)||(!!l.test(a)||("0"===a||"-0"===a||"+0"===a))}var e,f,g,h,i,j,k=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,l=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(f=b(a),g=f.length,e=0;e35,G="currentSrc",H=/\s+\+?\d+(e\d+)?w/,I=/(\([^)]+\))?\s*(.+)/,J=a.picturefillCFG,K="position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)",L="font-size:100%!important;",M=!0,N={},O={},P=a.devicePixelRatio,Q={px:1,in:96},R=b.createElement("a"),S=!1,T=/^[ \t\n\r\u000c]+/,U=/^[, \t\n\r\u000c]+/,V=/^[^ \t\n\r\u000c]+/,W=/[,]+$/,X=/^\d+$/,Y=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,Z=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)},$=function(a){var b={};return function(c){return c in b||(b[c]=a(c)),b[c]}},_=function(){var a=/^([\d\.]+)(em|vw|px)$/,b=function(){for(var a=arguments,b=0,c=a[0];++b in a;)c=c.replace(a[b],a[++b]);return c},c=$(function(a){return"return "+b((a||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(b,d){var e;if(!(b in N))if(N[b]=!1,d&&(e=b.match(a)))N[b]=e[1]*Q[e[2]];else try{N[b]=new Function("e",c(b))(Q)}catch(a){}return N[b]}}(),aa=function(a,b){return a.w?(a.cWidth=s.calcListLength(b||"100vw"),a.res=a.w/a.cWidth):a.res=a.d,a},ba=function(a){if(t){var c,d,e,f=a||{};if(f.elements&&1===f.elements.nodeType&&("IMG"===f.elements.nodeName.toUpperCase()?f.elements=[f.elements]:(f.context=f.elements,f.elements=null)),c=f.elements||s.qsa(f.context||b,f.reevaluate||f.reselect?s.sel:s.selShort),e=c.length){for(s.setupRun(f),S=!0,d=0;dimg,img[srcset]",s.sel=s.selShort,s.cfg=B,s.DPR=P||1,s.u=Q,s.types=A,s.setSize=u,s.makeUrl=$(function(a){return R.href=a,R.href}),s.qsa=function(a,b){return"querySelector"in a?a.querySelectorAll(b):[]},s.matchesMedia=function(){return a.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?s.matchesMedia=function(a){return!a||matchMedia(a).matches}:s.matchesMedia=s.mMQ,s.matchesMedia.apply(this,arguments)},s.mMQ=function(a){return!a||_(a)},s.calcLength=function(a){var b=_(a,!0)||!1;return b<0&&(b=!1),b},s.supportsType=function(a){return!a||A[a]},s.parseSize=$(function(a){var b=(a||"").match(I);return{media:b&&b[1],length:b&&b[2]}}),s.parseSet=function(a){return a.cands||(a.cands=m(a.srcset,a)),a.cands},s.getEmValue=function(){var a;if(!p&&(a=b.body)){var c=b.createElement("div"),d=z.style.cssText,e=a.style.cssText;c.style.cssText=K,z.style.cssText=L,a.style.cssText=L,a.appendChild(c),p=c.offsetWidth,a.removeChild(c),p=parseFloat(p,10),z.style.cssText=d,a.style.cssText=e}return p||16},s.calcListLength=function(a){if(!(a in O)||B.uT){var b=s.calcLength(n(a));O[a]=b?b:Q.width}return O[a]},s.setRes=function(a){var b;if(a){b=s.parseSet(a);for(var c=0,d=b.length;cp,n||(l.cached=!0,l.res>=p&&(h=l))),!h)for(a.sort(i),f=a.length,h=a[f-1],d=0;d=p){e=d-1,h=a[e]&&(n||k!==s.makeUrl(c.url))&&g(a[e].res,c.res,p,a[e].cached)?a[e]:c;break}h&&(m=s.makeUrl(h.url),o.curSrc=m,o.curCan=h,m!==k&&s.setSrc(b,h),s.setSize(b))}},s.setSrc=function(a,b){var c;a.src=b.url,"image/svg+xml"===b.set.type&&(c=a.style.width,a.style.width=a.offsetWidth+1+"px",a.offsetWidth+1&&(a.style.width=c))},s.getSet=function(a){var b,c,d,e=!1,f=a[s.ns].sets;for(b=0;b0&&b-1 in a)}function d(a,b,c){if(fa.isFunction(b))return fa.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return fa.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(pa.test(b))return fa.filter(b,a,c);b=fa.filter(b,a)}return fa.grep(a,function(a){return _.call(b,a)>-1!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b={};return fa.each(a.match(va)||[],function(a,c){b[c]=!0}),b}function g(){X.removeEventListener("DOMContentLoaded",g),a.removeEventListener("load",g),fa.ready()}function h(){this.expando=fa.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Ca,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:Ba.test(c)?fa.parseJSON(c):c)}catch(a){}Aa.set(a,b,c)}else c=void 0;return c}function j(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return fa.css(a,b,"")},i=h(),j=c&&c[3]||(fa.cssNumber[b]?"":"px"),k=(fa.cssNumber[b]||"px"!==j&&+i)&&Ea.exec(fa.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,fa.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}function k(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&fa.nodeName(a,b)?fa.merge([a],c):c}function l(a,b){for(var c=0,d=a.length;d>c;c++)za.set(a[c],"globalEval",!b||za.get(b[c],"globalEval"))}function m(a,b,c,d,e){for(var f,g,h,i,j,m,n=b.createDocumentFragment(),o=[],p=0,q=a.length;q>p;p++)if(f=a[p],f||0===f)if("object"===fa.type(f))fa.merge(o,f.nodeType?[f]:f);else if(La.test(f)){for(g=g||n.appendChild(b.createElement("div")),h=(Ia.exec(f)||["",""])[1].toLowerCase(),i=Ka[h]||Ka._default,g.innerHTML=i[1]+fa.htmlPrefilter(f)+i[2],m=i[0];m--;)g=g.lastChild;fa.merge(o,g.childNodes),g=n.firstChild,g.textContent=""}else o.push(b.createTextNode(f));for(n.textContent="",p=0;f=o[p++];)if(d&&fa.inArray(f,d)>-1)e&&e.push(f);else if(j=fa.contains(f.ownerDocument,f),g=k(n.appendChild(f),"script"),j&&l(g),c)for(m=0;f=g[m++];)Ja.test(f.type||"")&&c.push(f);return n}function n(){return!0}function o(){return!1}function p(){try{return X.activeElement}catch(a){}}function q(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)q(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=o;else if(!e)return this;return 1===f&&(g=e,e=function(a){return fa().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=fa.guid++)),a.each(function(){fa.event.add(this,b,e,d,c)})}function r(a,b){return fa.nodeName(a,"table")&&fa.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function s(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function t(a){var b=Sa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function u(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(za.hasData(a)&&(f=za.access(a),g=za.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)fa.event.add(b,e,j[e][c])}Aa.hasData(a)&&(h=Aa.access(a),i=fa.extend({},h),Aa.set(b,i))}}function v(a,b){var c=b.nodeName.toLowerCase();"input"===c&&Ha.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function w(a,b,c,d){b=Z.apply([],b);var e,f,g,h,i,j,l=0,n=a.length,o=n-1,p=b[0],q=fa.isFunction(p);if(q||n>1&&"string"==typeof p&&!da.checkClone&&Ra.test(p))return a.each(function(e){var f=a.eq(e);q&&(b[0]=p.call(this,e,f.html())),w(f,b,c,d)});if(n&&(e=m(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(g=fa.map(k(e,"script"),s),h=g.length;n>l;l++)i=e,l!==o&&(i=fa.clone(i,!0,!0),h&&fa.merge(g,k(i,"script"))),c.call(a[l],i,l);if(h)for(j=g[g.length-1].ownerDocument,fa.map(g,t),l=0;h>l;l++)i=g[l],Ja.test(i.type||"")&&!za.access(i,"globalEval")&&fa.contains(j,i)&&(i.src?fa._evalUrl&&fa._evalUrl(i.src):fa.globalEval(i.textContent.replace(Ta,"")))}return a}function x(a,b,c){for(var d,e=b?fa.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||fa.cleanData(k(d)),d.parentNode&&(c&&fa.contains(d.ownerDocument,d)&&l(k(d,"script")),d.parentNode.removeChild(d));return a}function y(a,b){var c=fa(b.createElement(a)).appendTo(b.body),d=fa.css(c[0],"display");return c.detach(),d}function z(a){var b=X,c=Va[a];return c||(c=y(a,b),"none"!==c&&c||(Ua=(Ua||fa("