mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
merge
This commit is contained in:
commit
4db844e596
@ -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:
|
||||
|
@ -112,6 +112,7 @@ PaxJaromeMalues <seemax1991@gmail.com>
|
||||
Phyma <sethramstrom@gmail.com>
|
||||
pokertour
|
||||
Professor <lukas.trneny@wo.cz>
|
||||
QuickDagger
|
||||
rakowozz
|
||||
ramius86 <pasini86@hotmail.com>
|
||||
Raspu86
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/acemod/ACE3/releases/latest">
|
||||
<img src="https://img.shields.io/badge/Version-3.11.0-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
<img src="https://img.shields.io/badge/Version-3.12.0-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/issues">
|
||||
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
|
||||
|
Binary file not shown.
Binary file not shown.
@ -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};
|
||||
};
|
||||
};
|
||||
|
@ -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);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -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
|
||||
#endif
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
|
@ -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)];
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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];
|
||||
|
||||
|
@ -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];
|
||||
|
||||
|
@ -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"
|
||||
|
@ -76,170 +76,22 @@
|
||||
<Hungarian>Engedélyezi a fejlett ballisztikát</Hungarian>
|
||||
<Russian>Включает продвинутую баллистику</Russian>
|
||||
<Italian>Abilita Balistica Avanzata</Italian>
|
||||
<Japanese>アドバンスド バリスティックスを有効化</Japanese>
|
||||
<Japanese>アドバンスド バリスティックス</Japanese>
|
||||
<Korean>고급 탄도학을 적용합니다</Korean>
|
||||
<Chinese>啟用先進彈道系統</Chinese>
|
||||
<Chinesesimp>启用先进弹道系统</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_DisplayName">
|
||||
<English>Enabled For Snipers</English>
|
||||
<Spanish>Activada para francotiradores</Spanish>
|
||||
<Polish>Akt. dla snajperów</Polish>
|
||||
<German>Für Scharfschützen aktiviert</German>
|
||||
<Czech>Povoleno pro odstřelovače</Czech>
|
||||
<Portuguese>Ativar para caçadores</Portuguese>
|
||||
<French>Activé pour les snipers</French>
|
||||
<Hungarian>Mesterlövészeknek engedélyezve</Hungarian>
|
||||
<Russian>Включена для снайперов</Russian>
|
||||
<Italian>Abilita per Tiratori Scelti</Italian>
|
||||
<Japanese>狙撃手へ有効化</Japanese>
|
||||
<Korean>저격수만 적용</Korean>
|
||||
<Chinese>啟用給狙擊手</Chinese>
|
||||
<Chinesesimp>启用给狙击手</Chinesesimp>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_muzzleVelocityVariationEnabled_DisplayName">
|
||||
<English>Enable Muzzle Velocity Variation</English>
|
||||
<German>Variation der Mündungsgeschwindigkeit aktivieren</German>
|
||||
<Japanese>銃口初速の変化</Japanese>
|
||||
<Italian>Abilita Variazione Velocità Volata</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForSnipers_Description">
|
||||
<English>Enables advanced ballistics for non local snipers (when using high power optics)</English>
|
||||
<Spanish>Activa la balística avanzada para francotiradores no locales (cuando se usa una mira telescópica)</Spanish>
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla nielokalnych snajperów (kiedy używają optyki)</Polish>
|
||||
<German>Aktiviert die erweiterte Ballistik für nicht lokale Scharfschützen (bei Benutzung von Optiken mit starker Vergrößerung)</German>
|
||||
<Czech>Aktivuje pokročilou balistiku pro nelokální odstřelovače (při použití optiky)</Czech>
|
||||
<Portuguese>Ativa balística avançada para caçadores não locais (quando usando miras telescópicas)</Portuguese>
|
||||
<French>Active la balistique avancée pour les snipers non locaux (en utilisant les optiques avancées)</French>
|
||||
<Hungarian>Engedélyezi a fejlett ballisztikát nem-helyi mesterlövészeknek (nagy-teljesítményű optika használatakor)</Hungarian>
|
||||
<Russian>Включает продвинутую баллистику для нелокальных снайперов (при использовании мощной оптики)</Russian>
|
||||
<Italian>Abilita Balistica Avanzata per Tiratori Scelti non locali (con ottiche ad alto potenziale)</Italian>
|
||||
<Japanese>非ローカルの狙撃手 (高倍率スコープを使っている場合)へアドバンスド バリスティックスを有効化します</Japanese>
|
||||
<Korean>고급 탄도학을 비-저격수 인원에게도 적용합니다(고성능 조준경을 사용시)</Korean>
|
||||
<Chinese>啟用先進彈道系統給非本地狙擊手(當使用高倍率光學瞄鏡時)</Chinese>
|
||||
<Chinesesimp>启用先进弹道系统给非本地狙击手(当使用高倍率光学瞄镜时)</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_DisplayName">
|
||||
<English>Enabled For Group Members</English>
|
||||
<Spanish>Activada para miembros de grupo</Spanish>
|
||||
<Polish>Akt. dla czł. grupy</Polish>
|
||||
<German>Für Gruppenmitglieder aktiviert</German>
|
||||
<Czech>Povoleno pro členy skupiny</Czech>
|
||||
<Portuguese>Ativada para membros do grupo</Portuguese>
|
||||
<French>Activé pour les membres groupés</French>
|
||||
<Hungarian>Csoporttagoknak engedélyezve</Hungarian>
|
||||
<Russian>Включена для группы</Russian>
|
||||
<Italian>Abilita per Membri del Gruppo</Italian>
|
||||
<Japanese>グループ メンバーへ有効化</Japanese>
|
||||
<Korean>그룹 멤버도 적용</Korean>
|
||||
<Chinese>啟用給小隊成員</Chinese>
|
||||
<Chinesesimp>启用给小队成员</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForGroupMembers_Description">
|
||||
<English>Enables advanced ballistics for non local group members</English>
|
||||
<Spanish>Activada la balística avanzada para miembros de grupo no locales</Spanish>
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla nielokalnych członków grupy</Polish>
|
||||
<German>Aktiviert die erweiterte Ballistik für nicht lokale Gruppenmitglieder</German>
|
||||
<Czech>Aktivuje pokročilou balistiku pro nelokální členy skupiny</Czech>
|
||||
<Portuguese>Ativa balística avançada para membros de grupo não locais</Portuguese>
|
||||
<French>Active la balistique avancée pour les membres du groupe non locaux</French>
|
||||
<Hungarian>Engedélyezi a fejlett ballisztikát nem-helyi csoporttagoknak</Hungarian>
|
||||
<Russian>Включает продвинутую баллистику для нелокальных членов группы</Russian>
|
||||
<Italian>Abilita Balistica Avanzata per Membri non locali del Gruppo</Italian>
|
||||
<Japanese>非ローカルのグループ メンバーへアドバンスド バリスティックスを有効化します</Japanese>
|
||||
<Korean>고급 탄도학을 비-그룹멤버에게도 적용합니다</Korean>
|
||||
<Chinese>啟用先進彈道系統給非本地小隊成員</Chinese>
|
||||
<Chinesesimp>启用先进弹道系统给非本地小队成员</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_DisplayName">
|
||||
<English>Enabled For Everyone</English>
|
||||
<Spanish>Activada para todos</Spanish>
|
||||
<Polish>Akt. dla wszystkich</Polish>
|
||||
<German>Für jeden aktiviert</German>
|
||||
<Czech>Povoleno pro všechny</Czech>
|
||||
<Portuguese>Ativada para todos</Portuguese>
|
||||
<French>Activé pour tout le monde</French>
|
||||
<Hungarian>Mindenkinek engedélyezve</Hungarian>
|
||||
<Russian>Включена для всех</Russian>
|
||||
<Italian>Abilita per tutti</Italian>
|
||||
<Japanese>全員に有効化</Japanese>
|
||||
<Korean>모두에게 적용</Korean>
|
||||
<Chinese>啟用給所有人</Chinese>
|
||||
<Chinesesimp>启用给所有人</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulateForEveryone_Description">
|
||||
<English>Enables advanced ballistics for all non local players (enabling this may degrade performance during heavy firefights in multiplayer)</English>
|
||||
<Spanish>Activada la balística avanzada para todos los jugadores no locales (activarlo puede degradar el rendimiento durante grandes tiroteos en multijugador).</Spanish>
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla wszystkich nielokalnych graczy (aktywacja tej opcji może spodowować spory spadek wydajności podczas ciężkiej wymiany ognia)</Polish>
|
||||
<German>Aktiviert die erweiterte Ballistik für alle nicht lokalen Spieler (das Aktivieren dieser Funktion kann zur Beeinträchtigung des Spielerlebnisses im Multiplayer führen)</German>
|
||||
<Czech>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)</Czech>
|
||||
<Portuguese>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)</Portuguese>
|
||||
<French>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)</French>
|
||||
<Hungarian>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)</Hungarian>
|
||||
<Russian>Включает продвинутую баллистику для всех нелокальных игроков (включение этой опции может снизить производительность при массовых перестрелках в мультиплеере)</Russian>
|
||||
<Italian>Abilita Balistica Avanzata per tutti i giocatori non locali (abilitare questo parametro potrebbe ridurre le prestazioni durante scontri intensi in multiplayer)</Italian>
|
||||
<Japanese>非ローカルの全プレイヤーへアドバンスド バリスティックスを有効化します (マルチプレイで大規模な銃撃戦がおこなわれると、動作の低下を招きます)</Japanese>
|
||||
<Korean>고급 탄도학을 모든 비-로컬그룹에게도 적용합니다(적용 후 대규모 전투시 성능하락을 유발할 수 있습니다)</Korean>
|
||||
<Chinese>啟用先進彈道系統給所有非本地玩家 (啟用此功能後,在多人連線大量交火時可能會降低效能)</Chinese>
|
||||
<Chinesesimp>启用先进弹道系统给所有非本地玩家 (启用此功能后,在多人连线大量交火时可能会降低效能)</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_DisplayName">
|
||||
<English>Always Enabled For Group Members</English>
|
||||
<Polish>Zawsze akt. dla czł. grupy</Polish>
|
||||
<Spanish>Siempre activada para miembros de grupo</Spanish>
|
||||
<German>Für Gruppenmitglieder immer aktiviert</German>
|
||||
<Czech>Vždy povoleno pro členy skupiny</Czech>
|
||||
<Portuguese>Sempre ativada para membros do grupo</Portuguese>
|
||||
<French>Toujours activer pour les membres du groupe</French>
|
||||
<Hungarian>Mindig engedélyezve csoporttagoknak</Hungarian>
|
||||
<Russian>Всегда включена для членов группы</Russian>
|
||||
<Italian>Sempre abilitato per Membri del Gruppo</Italian>
|
||||
<Japanese>常にグループ メンバーへ有効化</Japanese>
|
||||
<Korean>그룹 멤버에게 항상 적용</Korean>
|
||||
<Chinese>永遠啟用給小隊成員</Chinese>
|
||||
<Chinesesimp>永远启用给小队成员</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_alwaysSimulateForGroupMembers_Description">
|
||||
<English>Always enables advanced ballistics when a group member fires</English>
|
||||
<Polish>Aktywuje zaawansowaną balistykę dla wszystkich członków grupy</Polish>
|
||||
<Spanish>Activada la balística avanzada siempre cuando miembros de grupo disparan</Spanish>
|
||||
<German>Aktiviert die erweiterte Ballistik immer, wenn ein Gruppenmitglied schießt</German>
|
||||
<Czech>Aktivuje pokročilou balistiku pro členy skupiny</Czech>
|
||||
<Portuguese>Sempre ative balística avançada quando um membro do grupo disparar</Portuguese>
|
||||
<French>Active tout le temps la balistique avancée quand un membre du groupe ouvre le feu</French>
|
||||
<Hungarian>Mindig engedélyezi a fejlett ballisztikát, ha egy csoporttag tüzel</Hungarian>
|
||||
<Russian>Всегда включает продвинутую баллистику когда стреляет член группы</Russian>
|
||||
<Italian>Abilita sempre Balistica Avanzata quando un membro del gruppo spara</Italian>
|
||||
<Japanese>グループ メンバーが射撃した時、常にアドバンスド バリスティックスを有効化します</Japanese>
|
||||
<Korean>그룹 멤버가 발사시 항상 고급 탄도학을 적용합니다</Korean>
|
||||
<Chinese>當小隊成員開火時,永遠啟用先進彈道系統</Chinese>
|
||||
<Chinesesimp>当小队成员开火时,永远启用先进弹道系统</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_DisplayName">
|
||||
<English>Disabled In FullAuto Mode</English>
|
||||
<Polish>Wył. podczas ognia auto.</Polish>
|
||||
<Spanish>Desactivada en modo automático</Spanish>
|
||||
<German>Beim vollautomatischen Feuern deaktiviert</German>
|
||||
<Czech>Zakázáno v automatickém režimu střelby</Czech>
|
||||
<Portuguese>Desabilitar no modo automático</Portuguese>
|
||||
<French>Désactiver en mode automatique</French>
|
||||
<Hungarian>Automata módban letiltva</Hungarian>
|
||||
<Russian>Выкл. для автомат. режима</Russian>
|
||||
<Italian>Disabilita in modalità di fuoco automatico</Italian>
|
||||
<Japanese>フルオートでは無効化</Japanese>
|
||||
<Korean>조정간 자동시 비활성화</Korean>
|
||||
<Chinese>在全自動模式時關閉</Chinese>
|
||||
<Chinesesimp>在全自动模式时关闭</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_disabledInFullAutoMod_Description">
|
||||
<English>Disables the advanced ballistics during full auto fire</English>
|
||||
<Polish>Dezaktywuje zaawansowaną balistykę podczas ognia automatycznego</Polish>
|
||||
<Spanish>Desactivada la balística avanzada durante el fuego automático</Spanish>
|
||||
<German>Deaktiviert die erweiterte Ballistik beim vollautomatischen Feuern</German>
|
||||
<Czech>Zákáže pokročilou balistiku během střelby v režimu automat</Czech>
|
||||
<Portuguese>Desabilitar a balística avançada durante fogo automático</Portuguese>
|
||||
<French>Désactive la balistique avancée pour les tirs en automatique</French>
|
||||
<Hungarian>Letiltja a fejlett ballisztikát automata tüzelés folyamán</Hungarian>
|
||||
<Russian>Выключает продвинутую баллистику при стрельбе в полностью автоматическом режиме</Russian>
|
||||
<Italian>Disabilita Balistica Avanzata durante fuoco automatico</Italian>
|
||||
<Japanese>フルオートで射撃中ではアドバンスド バリスティックスを無効化します</Japanese>
|
||||
<Korean>조정간 자동시 고급 탄도학을 비활성화 합니다</Korean>
|
||||
<Chinese>在全自動模式開火時,關閉先進彈道系統</Chinese>
|
||||
<Chinesesimp>在全自动模式开火时,关闭先进弹道系统</Chinesesimp>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_muzzleVelocityVariationEnabled_Description">
|
||||
<English>Simulates slight variations in muzzle velocity between each shot</English>
|
||||
<German>Simuliert leichte Variationen der Mündungsgeschwindigkeit zwischen jedem Schuss.</German>
|
||||
<Japanese>発射毎に僅かな銃口初速の変化をシミュレートします。</Japanese>
|
||||
<Italian>Simula lievi variazioni della velocità della volata tra un colpo e l'altro</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_ammoTemperatureEnabled_DisplayName">
|
||||
<English>Enable Ammo Temperature Simulation</English>
|
||||
@ -252,7 +104,7 @@
|
||||
<Hungarian>Lőszer-hő szimuláció engedélyezése</Hungarian>
|
||||
<Russian>Симуляция температуры для боеприпасов</Russian>
|
||||
<Italian>Abilita simulazione della temperatura delle munizioni</Italian>
|
||||
<Japanese>弾薬の温度シミュレーションを有効化</Japanese>
|
||||
<Japanese>弾薬温度シミュレーション</Japanese>
|
||||
<Korean>탄약 온도 구현 적용</Korean>
|
||||
<Chinese>啟用彈藥溫度模擬系統</Chinese>
|
||||
<Chinesesimp>启用弹药温度模拟系统</Chinesesimp>
|
||||
@ -268,7 +120,7 @@
|
||||
<Hungarian>A kezdősebesség a lőszer hőmérsékletétől függően változó</Hungarian>
|
||||
<Russian>Начальная скорость пули зависит от температуры</Russian>
|
||||
<Italian>La velocità dello sparo varia a seconda della temperatura delle munizioni</Italian>
|
||||
<Japanese>弾薬の温度により初速値を変化させます</Japanese>
|
||||
<Japanese>弾薬の温度により銃口初速を変化させます</Japanese>
|
||||
<Korean>탄약 온도에 비례해 총구 속도가 달라집니다</Korean>
|
||||
<Chinese>子彈初速將隨彈藥溫度而有所變化</Chinese>
|
||||
<Chinesesimp>子弹初速将随弹药温度而有所变化</Chinesesimp>
|
||||
@ -284,7 +136,7 @@
|
||||
<Hungarian>Csőhossz-szimuláció engedélyezése</Hungarian>
|
||||
<Russian>Симуляция длины ствола</Russian>
|
||||
<Italian>Abilita simulazione della lunghezza della canna</Italian>
|
||||
<Japanese>銃身長のシミュレーションを有効化</Japanese>
|
||||
<Japanese>銃身長シミュレーション</Japanese>
|
||||
<Korean>총열 길이 구현 적용</Korean>
|
||||
<Chinese>啟用槍管長度模擬系統</Chinese>
|
||||
<Chinesesimp>启用枪管长度模拟系统</Chinesesimp>
|
||||
@ -300,7 +152,7 @@
|
||||
<Hungarian>A kezdősebesség a cső hosszától függően változó</Hungarian>
|
||||
<Russian>Начальная скорость пули зависит от длины ствола</Russian>
|
||||
<Italian>La velocità di sparo varia a seconda della lunghezza della canna</Italian>
|
||||
<Japanese>銃身長により初速値を変化させます</Japanese>
|
||||
<Japanese>銃身長により銃口初速を変化させます</Japanese>
|
||||
<Korean>총구 속도가 총열에 비례해 달라집니다</Korean>
|
||||
<Chinese>子彈初速將隨槍管長度而有所變化</Chinese>
|
||||
<Chinesesimp>子弹初速将随枪管长度而有所变化</Chinesesimp>
|
||||
@ -316,7 +168,7 @@
|
||||
<Hungarian>Nyomkövető-effekt engedélyezése</Hungarian>
|
||||
<Russian>Следы пуль</Russian>
|
||||
<Italian>Abilita effetto dei Proiettili Traccianti</Italian>
|
||||
<Japanese>弾丸の痕跡表示を有効化</Japanese>
|
||||
<Japanese>弾丸の痕跡表示</Japanese>
|
||||
<Korean>예광탄 효과 적용</Korean>
|
||||
<Chinese>啟用曳光彈效果</Chinese>
|
||||
<Chinesesimp>启用曳光弹效果</Chinesesimp>
|
||||
@ -354,10 +206,10 @@
|
||||
<Chinesesimp>模拟间隔</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Ballistics_simulationInterval_Description">
|
||||
<English>Defines the interval between every calculation step</English>
|
||||
<English>Defines the interval between each calculation step</English>
|
||||
<Polish>Określa interwał pomiędzy każdym krokiem kalkulacji</Polish>
|
||||
<Spanish>Define el intervalo entre cada cálculo</Spanish>
|
||||
<German>Legt das Intervall zwischen den Berechnungsschritten fest</German>
|
||||
<German>Definiert das Intervall zwischen den einzelnen Simulationsschritten</German>
|
||||
<Czech>Určuje interval mezi každým výpočtem</Czech>
|
||||
<Portuguese>Define o intervalo entre cada cálculo</Portuguese>
|
||||
<French>Définit un intervalle de calcul entre deux simulations</French>
|
||||
@ -380,7 +232,7 @@
|
||||
<Hungarian>Szimuláció hatóköre</Hungarian>
|
||||
<Russian>Радиус симуляции</Russian>
|
||||
<Italian>Raggio Simulazione</Italian>
|
||||
<Japanese>シミュレーションの適用範囲</Japanese>
|
||||
<Japanese>シミュレーション適用範囲</Japanese>
|
||||
<Korean>구현 범위</Korean>
|
||||
<Chinese>模擬半徑</Chinese>
|
||||
<Chinesesimp>模拟半径</Chinesesimp>
|
||||
|
@ -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};
|
||||
};
|
||||
};
|
||||
|
@ -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);
|
||||
|
@ -8,6 +8,7 @@
|
||||
<Chinesesimp>进阶疲劳</Chinesesimp>
|
||||
<Japanese>アドバンスド疲労</Japanese>
|
||||
<Italian>Fatica Avanzata</Italian>
|
||||
<Korean>고급 피로도</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Advanced_Fatigue_PerformanceFactor">
|
||||
<English>Performance Factor</English>
|
||||
|
@ -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]";
|
||||
};
|
||||
};
|
||||
|
@ -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 {
|
||||
|
@ -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]}
|
||||
|
@ -17,8 +17,6 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_logic", "_units", "_activated"];
|
||||
|
||||
if (!_activated) exitWith {};
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -28,7 +28,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_Enable_DisplayName">
|
||||
<English>Enable Advanced Throwing</English>
|
||||
<Russian>Включить улучшенный бросок</Russian>
|
||||
<Japanese>アドバンスド投てきを有効化</Japanese>
|
||||
<Japanese>アドバンスド投てき</Japanese>
|
||||
<Polish>Aktywuj zaawansowane rzucanie</Polish>
|
||||
<German>Aktiviere erweitertes Wurfsystem</German>
|
||||
<Korean>고급 투척 활성화 </Korean>
|
||||
@ -100,7 +100,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUp_DisplayName">
|
||||
<English>Enable Throwables Pick Up</English>
|
||||
<Russian>Включить подбор гранат</Russian>
|
||||
<Japanese>投てき物の拾い上げを有効化</Japanese>
|
||||
<Japanese>投てき物の拾い上げ</Japanese>
|
||||
<Polish>Zezwól na podnoszenie obiektów miotanych</Polish>
|
||||
<German>Aktiviere Aufheben von Wurfobjekten</German>
|
||||
<Korean>투척물 줍기 활성화</Korean>
|
||||
@ -124,7 +124,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_EnablePickUpAttached_DisplayName">
|
||||
<English>Enable Attached Throwables Pick Up</English>
|
||||
<Russian>Включить подбор прикрепленных гранат</Russian>
|
||||
<Japanese>拾い上げた投てき物の取り付けを有効化</Japanese>
|
||||
<Japanese>拾った投てき物の取り付け</Japanese>
|
||||
<Polish>Zezwól na podnoszenie przyczepionych obiektów miotanych</Polish>
|
||||
<German>Aktiviere erneute Aufnahme befestigter Wurfobjekte</German>
|
||||
<Korean>부착 투척물 줍기 활성화</Korean>
|
||||
@ -172,7 +172,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_DropModeToggle">
|
||||
<English>Throwable Drop Mode (Toggle)</English>
|
||||
<Russian>Режим броска гранаты (переключить)</Russian>
|
||||
<Japanese>投てきモード (切り替え)</Japanese>
|
||||
<Japanese>投てきモード (切替)</Japanese>
|
||||
<Polish>Tryb upuszczania ob. miotanego (przełącz)</Polish>
|
||||
<German>Wurfobjekt Fallmodus (umschalten)</German>
|
||||
<Korean>투척물 떨어뜨리기 모드(토글)</Korean>
|
||||
@ -184,7 +184,7 @@
|
||||
<Key ID="STR_ACE_Advanced_Throwing_Primed">
|
||||
<English>Primed</English>
|
||||
<Russian>Подготовлена</Russian>
|
||||
<Japanese>起動した</Japanese>
|
||||
<Japanese>作動させた</Japanese>
|
||||
<Polish>Odbezpieczony</Polish>
|
||||
<German>Scharf gemacht</German>
|
||||
<Korean>뇌관 작동</Korean>
|
||||
|
@ -8,6 +8,7 @@
|
||||
<Italian>Posizione invalida fornita.</Italian>
|
||||
<Chinese>提供的位置無效。</Chinese>
|
||||
<Chinesesimp>提供的位置无效。</Chinesesimp>
|
||||
<Korean>위치가 잘못되었습니다.</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_ai_GarrisonNoUnits">
|
||||
<English>No units provided.</English>
|
||||
@ -16,6 +17,7 @@
|
||||
<Italian>Nessuna unità fornita.</Italian>
|
||||
<Chinese>找不到可用的單位。</Chinese>
|
||||
<Chinesesimp>找不到可用的单位。</Chinesesimp>
|
||||
<Korean>병력이 없습니다.</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_ai_GarrisonNotEnoughPos">
|
||||
<English>There aren't enough positions to place all units.</English>
|
||||
@ -24,6 +26,7 @@
|
||||
<Italian>Non ci sono abbastanza posizioni per piazzare tutte le unità.</Italian>
|
||||
<Chinese>沒有足夠的位置能擺放所有單位。</Chinese>
|
||||
<Chinesesimp>没有足够的位置能摆放所有单位。</Chinesesimp>
|
||||
<Korean>모든 병력을 배치 할 공간이 없습니다.</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_ai_GarrisonNoBuilding">
|
||||
<English>No building found.</English>
|
||||
@ -32,6 +35,7 @@
|
||||
<Italian>Nessun edificio trovato.</Italian>
|
||||
<Chinese>沒找到建築物。</Chinese>
|
||||
<Chinesesimp>没找到建筑物。</Chinesesimp>
|
||||
<Korean>건물이 없습니다.</Korean>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
@ -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 {};
|
||||
};
|
||||
};
|
||||
|
1
addons/arsenal/$PBOPREFIX$
Normal file
1
addons/arsenal/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\arsenal
|
18
addons/arsenal/CfgEventHandlers.hpp
Normal file
18
addons/arsenal/CfgEventHandlers.hpp
Normal file
@ -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));
|
||||
};
|
||||
};
|
45
addons/arsenal/XEH_PREP.hpp
Normal file
45
addons/arsenal/XEH_PREP.hpp
Normal file
@ -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);
|
82
addons/arsenal/XEH_postInit.sqf
Normal file
82
addons/arsenal/XEH_postInit.sqf
Normal file
@ -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;
|
21
addons/arsenal/XEH_preInit.sqf
Normal file
21
addons/arsenal/XEH_preInit.sqf
Normal file
@ -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;
|
5
addons/arsenal/XEH_preStart.sqf
Normal file
5
addons/arsenal/XEH_preStart.sqf
Normal file
@ -0,0 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "XEH_PREP.hpp"
|
||||
|
||||
call FUNC(scanConfig);
|
40
addons/arsenal/config.cpp
Normal file
40
addons/arsenal/config.cpp
Normal file
@ -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"
|
BIN
addons/arsenal/data/iconClearContainer.paa
Normal file
BIN
addons/arsenal/data/iconClearContainer.paa
Normal file
Binary file not shown.
BIN
addons/arsenal/data/iconPublic.paa
Normal file
BIN
addons/arsenal/data/iconPublic.paa
Normal file
Binary file not shown.
BIN
addons/arsenal/data/iconPublicBlank.paa
Normal file
BIN
addons/arsenal/data/iconPublicBlank.paa
Normal file
Binary file not shown.
BIN
addons/arsenal/data/iconSecondaryMuzzle.paa
Normal file
BIN
addons/arsenal/data/iconSecondaryMuzzle.paa
Normal file
Binary file not shown.
332
addons/arsenal/defines.hpp
Normal file
332
addons/arsenal/defines.hpp
Normal file
@ -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")];
|
63
addons/arsenal/functions/fnc_addListBoxItem.sqf
Normal file
63
addons/arsenal/functions/fnc_addListBoxItem.sqf
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Author: Dedmen
|
||||
* Add a listbox row.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Config category <STRING> (must be "CfgWeapons", "CfgVehicles", "CfgMagazines", "CfgVoice")
|
||||
* 1: Classname <STRING>
|
||||
* 2: Panel control <CONTROL>
|
||||
* 3: Name of the picture entry in that Cfg class <STRING>
|
||||
*
|
||||
* 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]];
|
223
addons/arsenal/functions/fnc_addVirtualItems.sqf
Normal file
223
addons/arsenal/functions/fnc_addVirtualItems.sqf
Normal file
@ -0,0 +1,223 @@
|
||||
/*
|
||||
* Author: Alganthe, Dedmen
|
||||
* Add virtual items to the provided target.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target <OBJECT>
|
||||
* 1: Items <ARRAY of strings> <BOOL>
|
||||
* 2: Add globally <BOOL>
|
||||
*
|
||||
* 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];
|
92
addons/arsenal/functions/fnc_buttonCargo.sqf
Normal file
92
addons/arsenal/functions/fnc_buttonCargo.sqf
Normal file
@ -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 <DISPLAY>
|
||||
* 1: Add or remove <SCALAR> (-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);
|
62
addons/arsenal/functions/fnc_buttonClearAll.sqf
Normal file
62
addons/arsenal/functions/fnc_buttonClearAll.sqf
Normal file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Clear the current container.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <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);
|
51
addons/arsenal/functions/fnc_buttonExport.sqf
Normal file
51
addons/arsenal/functions/fnc_buttonExport.sqf
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Export current loadout / default loadouts list to clipboard.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <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);
|
||||
};
|
52
addons/arsenal/functions/fnc_buttonHide.sqf
Normal file
52
addons/arsenal/functions/fnc_buttonHide.sqf
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Hide / show arsenal interface.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <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
|
||||
];
|
111
addons/arsenal/functions/fnc_buttonImport.sqf
Normal file
111
addons/arsenal/functions/fnc_buttonImport.sqf
Normal file
@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Import loadout / default loadouts list from clipboard.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <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);
|
||||
};
|
||||
};
|
55
addons/arsenal/functions/fnc_buttonLoadoutsDelete.sqf
Normal file
55
addons/arsenal/functions/fnc_buttonLoadoutsDelete.sqf
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Delete / unshare loadout currently selected.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Button control <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);
|
||||
};
|
90
addons/arsenal/functions/fnc_buttonLoadoutsLoad.sqf
Normal file
90
addons/arsenal/functions/fnc_buttonLoadoutsLoad.sqf
Normal file
@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Load selected loadout.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Button control <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);
|
70
addons/arsenal/functions/fnc_buttonLoadoutsRename.sqf
Normal file
70
addons/arsenal/functions/fnc_buttonLoadoutsRename.sqf
Normal file
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Rename selected loadout.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Button control <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);
|
288
addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf
Normal file
288
addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf
Normal file
@ -0,0 +1,288 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Save selected loadout.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Button control <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;
|
55
addons/arsenal/functions/fnc_buttonLoadoutsShare.sqf
Normal file
55
addons/arsenal/functions/fnc_buttonLoadoutsShare.sqf
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Share selected loadout.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Button control <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));
|
28
addons/arsenal/functions/fnc_clearSearchbar.sqf
Normal file
28
addons/arsenal/functions/fnc_clearSearchbar.sqf
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Clear the provided searchbar.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Searchbar control <CONTROL>
|
||||
* 2: Right button state <BOOL>
|
||||
*
|
||||
* 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);
|
||||
};
|
189
addons/arsenal/functions/fnc_fillLeftPanel.sqf
Normal file
189
addons/arsenal/functions/fnc_fillLeftPanel.sqf
Normal file
@ -0,0 +1,189 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Fill left panel.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Tab control <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;
|
||||
};
|
118
addons/arsenal/functions/fnc_fillLoadoutsList.sqf
Normal file
118
addons/arsenal/functions/fnc_fillLoadoutsList.sqf
Normal file
@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Fill loadouts list.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Loadouts display <DISPLAY>
|
||||
* 1: Tab control <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];
|
361
addons/arsenal/functions/fnc_fillRightPanel.sqf
Normal file
361
addons/arsenal/functions/fnc_fillRightPanel.sqf
Normal file
@ -0,0 +1,361 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Fill right panel.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Tab control <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;
|
||||
};
|
||||
};
|
73
addons/arsenal/functions/fnc_handleMouse.sqf
Normal file
73
addons/arsenal/functions/fnc_handleMouse.sqf
Normal file
@ -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 <ARRAY>
|
||||
* 1.1: Mouse area control <CONTROL>
|
||||
* 1.2: Mouse X position <SCALAR>
|
||||
* 1.3: Mouse Y position <SCALAR>
|
||||
*
|
||||
* 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;
|
||||
};
|
25
addons/arsenal/functions/fnc_handleScrollWheel.sqf
Normal file
25
addons/arsenal/functions/fnc_handleScrollWheel.sqf
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Handle the mouse wheel.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Not used
|
||||
* 1: Mousewheel Z position <SCALAR>
|
||||
*
|
||||
* 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];
|
92
addons/arsenal/functions/fnc_handleSearchbar.sqf
Normal file
92
addons/arsenal/functions/fnc_handleSearchbar.sqf
Normal file
@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Handles keyboard inputs inside the searchbars text boxes.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Searchbar control <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);
|
||||
};
|
61
addons/arsenal/functions/fnc_initBox.sqf
Normal file
61
addons/arsenal/functions/fnc_initBox.sqf
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Initialize a box / object for arsenal.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target <OBJECT>
|
||||
* 1: Items <BOOL> or <ARRAY>
|
||||
* 2: Initialize globally <BOOL>
|
||||
*
|
||||
* 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);
|
||||
};
|
||||
};
|
75
addons/arsenal/functions/fnc_itemInfo.sqf
Normal file
75
addons/arsenal/functions/fnc_itemInfo.sqf
Normal file
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Update arsenal's info box.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Current panel control <CONTROL>
|
||||
* 2: Current panel selection <SCALAR>
|
||||
* 3: Item config entry <CONFIG>
|
||||
*
|
||||
* 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;
|
||||
};
|
77
addons/arsenal/functions/fnc_loadoutsChangeTab.sqf
Normal file
77
addons/arsenal/functions/fnc_loadoutsChangeTab.sqf
Normal file
@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Handles tab changing for the loadouts display.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Tab control <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);
|
54
addons/arsenal/functions/fnc_message.sqf
Normal file
54
addons/arsenal/functions/fnc_message.sqf
Normal file
@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Displays messages in arsenal.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Message <STRING>
|
||||
*
|
||||
* 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];
|
101
addons/arsenal/functions/fnc_onArsenalClose.sqf
Normal file
101
addons/arsenal/functions/fnc_onArsenalClose.sqf
Normal file
@ -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;
|
287
addons/arsenal/functions/fnc_onArsenalOpen.sqf
Normal file
287
addons/arsenal/functions/fnc_onArsenalOpen.sqf
Normal file
@ -0,0 +1,287 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* onLoad EH for arsenal.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Ignored
|
||||
* 1: Arguments <ARRAY>
|
||||
* 1.1: Arsenal display <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) }];
|
140
addons/arsenal/functions/fnc_onKeyDown.sqf
Normal file
140
addons/arsenal/functions/fnc_onKeyDown.sqf
Normal file
@ -0,0 +1,140 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Handles keyboard inputs in arsenal.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Key being pressed <SCALAR>
|
||||
* 2: Shift state <BOOL>
|
||||
* 3: Ctrl state <BOOL>
|
||||
* 4: Alt state <BOOL>
|
||||
*
|
||||
* 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
|
29
addons/arsenal/functions/fnc_onLoadoutsClose.sqf
Normal file
29
addons/arsenal/functions/fnc_onLoadoutsClose.sqf
Normal file
@ -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);
|
58
addons/arsenal/functions/fnc_onLoadoutsOpen.sqf
Normal file
58
addons/arsenal/functions/fnc_onLoadoutsOpen.sqf
Normal file
@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* onLoad EH for arsenal loadouts display.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Ignored
|
||||
* 1: Arguments <ARRAY>
|
||||
* 1.1: Loadouts display <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);
|
6
addons/arsenal/functions/fnc_onMouseButtonDown.sqf
Normal file
6
addons/arsenal/functions/fnc_onMouseButtonDown.sqf
Normal file
@ -0,0 +1,6 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["", "_args"];
|
||||
_args params ["", "_buttonPressed", "_xPos", "_yPos"];
|
||||
|
||||
GVAR(mouseButtonState) set [_buttonPressed, [_xPos, _yPos]];
|
6
addons/arsenal/functions/fnc_onMouseButtonUp.sqf
Normal file
6
addons/arsenal/functions/fnc_onMouseButtonUp.sqf
Normal file
@ -0,0 +1,6 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["", "_args"];
|
||||
_args params ["", "_buttonPressed"];
|
||||
|
||||
GVAR(mouseButtonState) set [_buttonPressed, []];
|
413
addons/arsenal/functions/fnc_onSelChangedLeft.sqf
Normal file
413
addons/arsenal/functions/fnc_onSelChangedLeft.sqf
Normal file
@ -0,0 +1,413 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Handles selection changes on the left panel.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Left panel control <CONTROL>
|
||||
* 1: Left panel selection <SCALAR>
|
||||
*
|
||||
* 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)]);
|
103
addons/arsenal/functions/fnc_onSelChangedLoadouts.sqf
Normal file
103
addons/arsenal/functions/fnc_onSelChangedLoadouts.sqf
Normal file
@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Handles selection changes on loadouts panel.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Loadouts panel control <CONTROL>
|
||||
* 1: Loadouts panel selection <SCALAR>
|
||||
*
|
||||
* 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]);
|
||||
};
|
||||
};
|
77
addons/arsenal/functions/fnc_onSelChangedRight.sqf
Normal file
77
addons/arsenal/functions/fnc_onSelChangedRight.sqf
Normal file
@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Handles selection changes on the right panel.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Right panel control <CONTROL>
|
||||
* 1: Right panel selection <SCALAR>
|
||||
*
|
||||
* 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)]);
|
51
addons/arsenal/functions/fnc_onSelChangedRightListnBox.sqf
Normal file
51
addons/arsenal/functions/fnc_onSelChangedRightListnBox.sqf
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Handles selection changes on the right panel (listnbox).
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Right panel control <CONTROL>
|
||||
* 1: Right panel selection <SCALAR>
|
||||
*
|
||||
* 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;
|
||||
};
|
17
addons/arsenal/functions/fnc_open3DEN.sqf
Normal file
17
addons/arsenal/functions/fnc_open3DEN.sqf
Normal file
@ -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);
|
53
addons/arsenal/functions/fnc_openBox.sqf
Normal file
53
addons/arsenal/functions/fnc_openBox.sqf
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Open arsenal.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Box <OBJECT>
|
||||
* 1: Unit to open the arsenal on <OBJECT>
|
||||
* 2: Ignore virtual items and fill arsenal <BOOL>
|
||||
*
|
||||
* 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);
|
35
addons/arsenal/functions/fnc_removeBox.sqf
Normal file
35
addons/arsenal/functions/fnc_removeBox.sqf
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Remove arsenal from target.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target <OBJECT>
|
||||
* 1: Remove globally <BOOL>
|
||||
*
|
||||
* 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);
|
||||
};
|
80
addons/arsenal/functions/fnc_removeVirtualItems.sqf
Normal file
80
addons/arsenal/functions/fnc_removeVirtualItems.sqf
Normal file
@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Remove virtual items to the provided target.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target <OBJECT>
|
||||
* 1: Items <ARRAY of strings> <BOOL>
|
||||
* 2: Add globally <BOOL>
|
||||
*
|
||||
* 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];
|
||||
};
|
||||
};
|
184
addons/arsenal/functions/fnc_scanConfig.sqf
Normal file
184
addons/arsenal/functions/fnc_scanConfig.sqf
Normal file
@ -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];
|
75
addons/arsenal/functions/fnc_showItem.sqf
Normal file
75
addons/arsenal/functions/fnc_showItem.sqf
Normal file
@ -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;
|
||||
};
|
64
addons/arsenal/functions/fnc_sortPanel.sqf
Normal file
64
addons/arsenal/functions/fnc_sortPanel.sqf
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Author: Alganthe, Dedmen
|
||||
* Sort arsenal panel.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Panel's control to sort <CONTROL>
|
||||
* 1: Sorting mode <SCALAR>
|
||||
*
|
||||
* 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};
|
||||
};
|
||||
};
|
||||
};
|
27
addons/arsenal/functions/fnc_updateCamPos.sqf
Normal file
27
addons/arsenal/functions/fnc_updateCamPos.sqf
Normal file
@ -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]);
|
||||
};
|
57
addons/arsenal/functions/fnc_updateRightPanel.sqf
Normal file
57
addons/arsenal/functions/fnc_updateRightPanel.sqf
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Update the right panel (listnbox).
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Right panel control <CONTROL>
|
||||
* 1: Max load of the current container <STRING>
|
||||
*
|
||||
* 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;
|
||||
};
|
118
addons/arsenal/functions/fnc_updateUniqueItemsList.sqf
Normal file
118
addons/arsenal/functions/fnc_updateUniqueItemsList.sqf
Normal file
@ -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;
|
239
addons/arsenal/functions/fnc_verifyLoadout.sqf
Normal file
239
addons/arsenal/functions/fnc_verifyLoadout.sqf
Normal file
@ -0,0 +1,239 @@
|
||||
/*
|
||||
* Author: Alganthe
|
||||
* Verify the provided loadout.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Loadout <ARRAY> (getUnitLoadout format)
|
||||
*
|
||||
* Return Value:
|
||||
* Verified loadout and missing / unavailable items list and count <ARRAY>
|
||||
*
|
||||
* 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]
|
1
addons/arsenal/functions/script_component.hpp
Normal file
1
addons/arsenal/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\arsenal\script_component.hpp"
|
17
addons/arsenal/script_component.hpp
Normal file
17
addons/arsenal/script_component.hpp
Normal file
@ -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"
|
437
addons/arsenal/stringtable.xml
Normal file
437
addons/arsenal/stringtable.xml
Normal file
@ -0,0 +1,437 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="Arsenal">
|
||||
<Key ID="STR_ACE_Arsenal_buttonHideText">
|
||||
<English>Hide</English>
|
||||
<French>Cacher</French>
|
||||
<German>Verstecken</German>
|
||||
<Polish>Ukryj</Polish>
|
||||
<Japanese>非表示</Japanese>
|
||||
<Italian>Nascondere</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonHideTooltip">
|
||||
<English>Hide interface</English>
|
||||
<French>Cache l'interface</French>
|
||||
<German>Oberfläche verstecken</German>
|
||||
<Polish>Ukryj interfejs</Polish>
|
||||
<Japanese>インターフェイスを隠す</Japanese>
|
||||
<Italian>Nascondi interfaccia</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonLoadoutsText">
|
||||
<English>Loadouts</English>
|
||||
<French>Équipements</French>
|
||||
<German>Ausrüstungen</German>
|
||||
<Polish>Zestawy wyposażenia</Polish>
|
||||
<Japanese>装備</Japanese>
|
||||
<Italian>Equipaggiamenti</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonExportText">
|
||||
<English>Export</English>
|
||||
<French>Exporter</French>
|
||||
<German>Exportieren</German>
|
||||
<Polish>Eksportuj</Polish>
|
||||
<Japanese>出力</Japanese>
|
||||
<Italian>Esporta</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonImportText">
|
||||
<English>Import</English>
|
||||
<French>Importer</French>
|
||||
<German>Importieren</German>
|
||||
<Polish>Importuj</Polish>
|
||||
<Japanese>取込</Japanese>
|
||||
<Italian>Importa</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonCloseText">
|
||||
<English>Close</English>
|
||||
<French>Fermer</French>
|
||||
<German>Schließen</German>
|
||||
<Polish>Zamknij</Polish>
|
||||
<Japanese>閉じる</Japanese>
|
||||
<Italian>Chiudi</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_noVirtualItems">
|
||||
<English>No virtual item available</English>
|
||||
<French>Aucun objet virtuel disponible</French>
|
||||
<German>Kein virtuelles Objekt verfügbar</German>
|
||||
<Polish>Brak dostępnych przedmiotów wirtualnych</Polish>
|
||||
<Japanese>利用可能なバーチャル アイテムは無し</Japanese>
|
||||
<Italian>Nessun oggetto virtuale disponibile</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonSaveText">
|
||||
<English>Save</English>
|
||||
<French>Enregister</French>
|
||||
<German>Speichern</German>
|
||||
<Polish>Zapisz</Polish>
|
||||
<Japanese>保存</Japanese>
|
||||
<Italian>Salva</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonSaveTooltip">
|
||||
<English>Save the current loadout</English>
|
||||
<French>Enregistre l'équipement actuel</French>
|
||||
<German>Ausgewählte Ausrüstung speichern</German>
|
||||
<Polish>Zapisz obecny zestaw</Polish>
|
||||
<Japanese>現在の装備を保存します</Japanese>
|
||||
<Italian>Salva l'equipaggiamento corrente</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonRenameText">
|
||||
<English>Rename</English>
|
||||
<French>Renommer</French>
|
||||
<German>Umbenennen</German>
|
||||
<Polish>Zmień nazwę</Polish>
|
||||
<Japanese>改名</Japanese>
|
||||
<Italian>Rinomina</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonRenameTooltip">
|
||||
<English>Rename the selected loadout</English>
|
||||
<French>Renomme l'équipement sélectionné</French>
|
||||
<German>Ausgewählte Ausrüstung umbenennen</German>
|
||||
<Polish>Zmień nazwę wybranego zestawu</Polish>
|
||||
<Japanese>現在選択中の装備を改名します</Japanese>
|
||||
<Italian>Rinomina l'equipaggiamento selezionato</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonLoadText">
|
||||
<English>Load</English>
|
||||
<French>Charger</French>
|
||||
<German>Laden</German>
|
||||
<Polish>Wczytaj</Polish>
|
||||
<Japanese>読み込む</Japanese>
|
||||
<Italian>Carica</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonLoadTooltip">
|
||||
<English>Load the selected loadout</English>
|
||||
<French>Charger l'équipement sélectionné</French>
|
||||
<German>Ausgewählte Ausrüstung laden</German>
|
||||
<Polish>Wczytaj wybrany zestaw</Polish>
|
||||
<Japanese>現在選択中の装備を読み込みます</Japanese>
|
||||
<Italian>Carica l'equipaggiamento selezionato</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonDeleteText">
|
||||
<English>Delete</English>
|
||||
<French>Supprimer</French>
|
||||
<German>Entfernen</German>
|
||||
<Polish>Skasuj</Polish>
|
||||
<Japanese>削除</Japanese>
|
||||
<Italian>Elimina</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonDeleteTooltip">
|
||||
<English>Delete the selected loadout</English>
|
||||
<French>Supprimer l'équipement sélectionné</French>
|
||||
<German>Ausgewählte Ausrüstung entfernen</German>
|
||||
<Polish>Skasuj wybrany zestaw</Polish>
|
||||
<Japanese>現在選択中の装備を削除します</Japanese>
|
||||
<Italian>Elimina l'equipaggiamento selezionato</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_tabMyLoadoutsText">
|
||||
<English>My loadouts</English>
|
||||
<French>Mes équipements</French>
|
||||
<German>Meine Ausrüstungen</German>
|
||||
<Polish>Moje zestawy</Polish>
|
||||
<Japanese>自分の装備</Japanese>
|
||||
<Italian>I miei equipaggiamenti</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_tabMyLoadoutsTooltip">
|
||||
<English>Loadouts saved in your profile</English>
|
||||
<French>Équipements enregistrés dans votre profil</French>
|
||||
<German>Ausrüstungen, die in deinem Profil gespeichert sind</German>
|
||||
<Polish>Zestawy zapisane w Twoim profilu</Polish>
|
||||
<Japanese>自プロフィールに保存された装備です</Japanese>
|
||||
<Italian>Gli equipaggiamenti salvati nel tuo profilo</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_tabDefaultLoadoutsText">
|
||||
<English>Default loadouts</English>
|
||||
<French>Équipements de base</French>
|
||||
<German>Standard-Ausrüstungen</German>
|
||||
<Polish>Domyślne zestawy</Polish>
|
||||
<Japanese>標準の装備</Japanese>
|
||||
<Italian>Equipaggiamenti standard</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_tabDefaultLoadoutsTooltip">
|
||||
<English>Loadouts made available by the mission maker</English>
|
||||
<French>Équipements faits par l'auteur de la mission</French>
|
||||
<German>Ausrüstungen, die durch den Missionsersteller zur Verfügung gestellt worden sind</German>
|
||||
<Polish>Zestawy udostępnione przez twórcę misji</Polish>
|
||||
<Japanese>装備はミッション著者によって利用できます</Japanese>
|
||||
<Italian>Equipaggiamenti resi disponibili dal creatore della missione</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_tabSharedLoadoutsText">
|
||||
<English>Public loadouts</English>
|
||||
<French>Équipements publics</French>
|
||||
<German>Veröffentlichte Ausrüstungen</German>
|
||||
<Polish>Publiczne zestawy</Polish>
|
||||
<Japanese>公開装備</Japanese>
|
||||
<Italian>Equipaggiamenti pubblici</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_tabSharedLoadoutsTooltip">
|
||||
<English>Loadouts shared by you and other players</English>
|
||||
<French>Équipements mis à disposition par vous ou les autres joueurs</French>
|
||||
<German>Ausrüstungen, die von dir und anderen Spielern geteilt wurden</German>
|
||||
<Polish>Zestawy udostępnione przez Ciebie i innych graczy</Polish>
|
||||
<Japanese>自分か他人によって共有された装備です</Japanese>
|
||||
<Italian>Equipaggiamenti condivisi da te e da altri giocatori</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_sortByWeightText">
|
||||
<English>Sort by weight</English>
|
||||
<French>Trier par poids</French>
|
||||
<German>Nach Gewicht sortieren</German>
|
||||
<Polish>Sortuj wg wagi</Polish>
|
||||
<Japanese>重量で並び替え</Japanese>
|
||||
<Italian>Ordina per peso</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_sortByAmountText">
|
||||
<English>Sort by amount</English>
|
||||
<French>Trier par quantité</French>
|
||||
<German>Nach Menge sortieren</German>
|
||||
<Polish>Sortuj wg ilości</Polish>
|
||||
<Japanese>量で並び替え</Japanese>
|
||||
<Italian>Ordina per quantitativo</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonShareTooltip">
|
||||
<English>Share or stop sharing the selected loadout</English>
|
||||
<French>Partager ou arrêter de partager cet équipement</French>
|
||||
<German>Ausgewählte Ausrüstung teilen oder nicht mehr teilen</German>
|
||||
<Polish>Udostępnij lub przestań udostępniać wybrany zestaw</Polish>
|
||||
<Japanese>選択した装備の共有設定</Japanese>
|
||||
<Italian>Condividi o smetti di condividere l'equipaggiamento selezionato</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonSharePrivateText">
|
||||
<English>Private</English>
|
||||
<French>Privé</French>
|
||||
<German>Privat</German>
|
||||
<Polish>Prywatny</Polish>
|
||||
<Japanese>非公開</Japanese>
|
||||
<Italian>Privato</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonSharePublicText">
|
||||
<English>Public</English>
|
||||
<French>Public</French>
|
||||
<German>Öffentlich</German>
|
||||
<Polish>Publiczny</Polish>
|
||||
<Japanese>公開</Japanese>
|
||||
<Italian>Pubblico</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_exportDefaultError">
|
||||
<English>The default loadouts list is empty!</English>
|
||||
<French>La liste d'équipements de base est vide !</French>
|
||||
<German>Die Standard-Ausrüstungen-Liste ist leer!</German>
|
||||
<Polish>Lista domyślnych zestawów jest pusta!</Polish>
|
||||
<Japanese>標準の装備一欄が空です!</Japanese>
|
||||
<Italian>La lista degli equipaggiamenti standard è vuota!</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_exportDefault">
|
||||
<English>Default loadouts list exported to clipboard</English>
|
||||
<French>Liste d'équipements de base exportée dans le presse papier</French>
|
||||
<German>Standard-Ausrüstungen-Liste in die Zwischenablage exportiert</German>
|
||||
<Polish>Lista domyślnych zestawów została eksportowana do schowka</Polish>
|
||||
<Japanese>標準の装備一欄はクリップボードへ出力されました</Japanese>
|
||||
<Italian>La lista degli equipaggiamenti standard è stata esportata negli appunti</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_exportCurrent">
|
||||
<English>Current loadout exported to clipboard</English>
|
||||
<French>Équipement actuel exporté dans le presse papier</French>
|
||||
<German>Derzeitige Ausrüstung in die Zwischenablage exportiert</German>
|
||||
<Polish>Obecny zestaw został eksportowany do schowka</Polish>
|
||||
<Japanese>現在の装備はクリップボードへ出力されました</Japanese>
|
||||
<Italian>Equipaggiamento corrente esportato negli appunti</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_importFormatError">
|
||||
<English>Wrong format provided</English>
|
||||
<French>Mauvais format fourni</French>
|
||||
<German>Falsches Format verwendet</German>
|
||||
<Polish>Podano zły format</Polish>
|
||||
<Japanese>間違ったフォーマットが入力されました</Japanese>
|
||||
<Italian>Formato fornito sbagliato</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_importedDefault">
|
||||
<English>Default loadouts list imported from clipboard</English>
|
||||
<French>Liste d'équipements de base importée depuis le presse papier</French>
|
||||
<German>Standard-Ausrüstungen-Liste aus der Zwischenablage importiert</German>
|
||||
<Polish>Lista domyślnych zestawów została importowana ze schowka</Polish>
|
||||
<Japanese>標準の装備一欄はクリップボードから取込されました</Japanese>
|
||||
<Italian>La lista degli equipaggiamenti standard è stata importata dagli appunti</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_importedCurrent">
|
||||
<English>Loadout imported from clipboard</English>
|
||||
<French>Équipement importé depuis le presse papier</French>
|
||||
<German>Ausrüstung aus der Zwischenablage importiert</German>
|
||||
<Polish>Zestaw został importowany ze schowka</Polish>
|
||||
<Japanese>装備はクリップボードから取込されました</Japanese>
|
||||
<Italian>Equipaggiamento importato dagli appunti</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_loadoutDeleted">
|
||||
<English>The following loadout was deleted:</English>
|
||||
<French>L'équipement suivant fut supprimé:</French>
|
||||
<German>Folgende Ausrüstung wurde entfernt:</German>
|
||||
<Polish>Następujący zestaw został skasowany:</Polish>
|
||||
<Japanese>次の装備は削除されました:</Japanese>
|
||||
<Italian>Il seguente equipaggiamento è stato eliminato:</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_loadoutUnshared">
|
||||
<English>The following loadout is not public anymore:</English>
|
||||
<French>L'équipement suivant n'est plus public:</French>
|
||||
<German>Folgende Ausrüstung ist nicht mehr öffentlich:</German>
|
||||
<Polish>Następujący zestaw nie jest już publiczny:</Polish>
|
||||
<Japanese>次の装備は非公開になりました:</Japanese>
|
||||
<Italian>Il seguente eequipaggiamento non è più pubblico:</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_saveEmptyNameBox">
|
||||
<English>The name field is empty!</English>
|
||||
<French>Le champ nom est vide !</French>
|
||||
<German>Das Feld "Name" ist leer!</German>
|
||||
<Polish>Pole nazwy jest puste!</Polish>
|
||||
<Japanese>名前欄が空白です!</Japanese>
|
||||
<Italian>Il campo del nome è vuoto!</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_saveAuthorError">
|
||||
<English>You are the author of this loadout</English>
|
||||
<French>Vous êtes l'auteur de cet équipement</French>
|
||||
<German>Du bist der Ersteller dieser Ausrüstung</German>
|
||||
<Polish>Jesteś autorem tego zestawu</Polish>
|
||||
<Japanese>あなたはこの装備の作者です</Japanese>
|
||||
<Italian>Sei l'autore di questo equipaggiamento</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_saveSharedError">
|
||||
<English>A loadout of yours with the same name is public</English>
|
||||
<French>Un de vos équipements avec le même nom est public</French>
|
||||
<German>Eine deiner Ausrüstungen mit dem gleichen Namen ist öffentlich</German>
|
||||
<Polish>Jeden z Twoich zestawów nazwany tak samo jest już publiczny</Polish>
|
||||
<Japanese>あなたの装備は既に公開されているものと同名です</Japanese>
|
||||
<Italian>Un tuo equipaggiamento con lo stesso nome è pubblico</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_loadoutSaved">
|
||||
<English>The following loadout was saved:</English>
|
||||
<French>L'équipement suivant fut enregistré:</French>
|
||||
<German>Folgende Ausrüstung wurde gespeichert:</German>
|
||||
<Polish>Następujący zestaw został zapisany:</Polish>
|
||||
<Japanese>次の装備は保存されました:</Japanese>
|
||||
<Italian>Il seguente equipaggiamento è stato salvato:</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_loadoutLoaded">
|
||||
<English>The following loadout was loaded:</English>
|
||||
<French>L'équipement suivant fut chargé:</French>
|
||||
<German>Folgene Ausrüstung wurde geladen:</German>
|
||||
<Polish>Następujący zestaw został wczytany:</Polish>
|
||||
<Japanese>次の装備が読み込みされました:</Japanese>
|
||||
<Italian>Il seguente equipaggiamento è stato caricato:</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_renameExistError">
|
||||
<English>A loadout with the same name already exist!</English>
|
||||
<French>Un équipement avec le même nom existe déjà !</French>
|
||||
<German>Eine Ausrüstung mit dem gleichen Namen existiert bereits!</German>
|
||||
<Polish>Zestaw z tą nazwą już istnieje!</Polish>
|
||||
<Japanese>既にその名前は装備に使われています!</Japanese>
|
||||
<Italian>Un equipaggiamento con lo stesso nome è gia esistente!</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_loadoutRenamed">
|
||||
<English>was renamed to</English>
|
||||
<French>fut renommé en</French>
|
||||
<German>wurde umbenannt in</German>
|
||||
<Polish>zmienił nazwę na</Polish>
|
||||
<Japanese>次の名前に改名されました</Japanese>
|
||||
<Italian>E' stato rinominato in</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_invertCameraSetting">
|
||||
<English>Invert camera controls</English>
|
||||
<French>Inverser les contrôles de la caméra</French>
|
||||
<German>Kamerasteuerung invertieren</German>
|
||||
<Polish>Odwróć sterowanie kamerą</Polish>
|
||||
<Japanese>カメラ操作を反転</Japanese>
|
||||
<Italian>Inverti comandi camera</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_modIconsSetting">
|
||||
<English>Enable mod icons</English>
|
||||
<French>Afficher les icônes de mod</French>
|
||||
<German>Aktiviert Mod-Icons</German>
|
||||
<Polish>Włącz ikony modów</Polish>
|
||||
<Japanese>MOD アイコンを表示</Japanese>
|
||||
<Italian>Abilita icone mod</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_fontHeightSetting">
|
||||
<English>Panel font height</English>
|
||||
<French>taille de police des panneaux</French>
|
||||
<German>Schrifthöhe für die linke und rechte Liste</German>
|
||||
<Polish>Wysokość czcionki</Polish>
|
||||
<Japanese>パネルにあるフォントの高さ</Japanese>
|
||||
<Italian>Altezza carattere del pannello</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_allowDefaultLoadoutsSetting">
|
||||
<English>Allow default loadouts</English>
|
||||
<French>Activer l'onglet équipement de base</French>
|
||||
<German>Erlaubt die Benutzung des Standard-Ausrüstungen-Reiters</German>
|
||||
<Polish>Zezwól na użycie domyślnych zestawów</Polish>
|
||||
<Japanese>標準の装備を許可</Japanese>
|
||||
<Italian>Consenti equipaggiamenti standard</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_allowSharingSetting">
|
||||
<English>Allow loadout sharing</English>
|
||||
<French>Autoriser le partage d'équipement</French>
|
||||
<German>Erlaubt das Teilen von Ausrüstungen</German>
|
||||
<Polish>Zezwól na udostępnianie zestawów</Polish>
|
||||
<Japanese>装備の共有を許可</Japanese>
|
||||
<Italian>Consenti condivisione equipaggiamenti</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_printToRPTSetting">
|
||||
<English>Log missing / unavailable items</English>
|
||||
<French>Enregistrer les objets manquants</French>
|
||||
<German>Aktiviert die Aufzeichnung fehlender Gegenstände in der RPT</German>
|
||||
<Polish>Rejestruj brakujące / niedostępne przedmioty</Polish>
|
||||
<Japanese>欠落 / 利用不可アイテムを記録</Japanese>
|
||||
<Italian>Log mancante / oggetto non disponibile</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonCurrentMagTooltip">
|
||||
<English>Primary magazine</English>
|
||||
<French>Chargeur principal </French>
|
||||
<Polish>Główny magazynek</Polish>
|
||||
<Japanese>プライマリ弾倉</Japanese>
|
||||
<Italian>Caricatore primario</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_buttonCurrentMag2Tooltip">
|
||||
<English>Secondary magazine</English>
|
||||
<French>Chargeur secondaire</French>
|
||||
<Polish>Dodatkowy magazynek</Polish>
|
||||
<Japanese>セカンダリ弾倉</Japanese>
|
||||
<Italian>Caricatore secondario</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_settingCategory">
|
||||
<English>ACE Arsenal</English>
|
||||
<French>ACE Arsenal</French>
|
||||
<Polish>ACE Arsenał</Polish>
|
||||
<Japanese>ACE 武器庫</Japanese>
|
||||
<Italian>Arsenale ACE</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_defaultLoadoutsTooltip">
|
||||
<English>Allow the use of the default loadouts tab</English>
|
||||
<French>Autorise l'usage de l'onglet équipements de base</French>
|
||||
<Polish>Zezwól na użycie zakładki domyślnych zestawów</Polish>
|
||||
<Japanese>標準の装備タブの使用を許可します</Japanese>
|
||||
<Italian>Consenti l'uso della sezione per gli equipaggiamenti standard</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_modIconsTooltip">
|
||||
<English>Show / hide mod icons for the left panel</English>
|
||||
<French>Montrer / cacher les icones de mod pour le panneau de gauche</French>
|
||||
<Polish>Pokaż / ukryj ikony modów w lewym panelu</Polish>
|
||||
<Japanese>左パネルにある MOD アイコンの表示 / 非表示をします</Japanese>
|
||||
<Italian>Mostra / nascondi le icone delle mod dal pannello sinistro</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_fontHeightTooltip">
|
||||
<English>Change the font height for text in the left / right panels</English>
|
||||
<French>Change la taille de police du texte des panneaux gauche / droite</French>
|
||||
<Polish>Zmień wysokość czcionki dla tekstu lewego i prawego panelu</Polish>
|
||||
<Japanese>右か左パネルにあるフォントの高さを変更します。</Japanese>
|
||||
<Italian>Cambia l'altezza del font per il testo sul pannello sinistro / destro</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_printToRPTTooltip">
|
||||
<English>Log missing / unavailable items in the RPT</English>
|
||||
<French>Enregistre les objets manquants / indisponibles dans le RPT</French>
|
||||
<Polish>Rejestruj brakujące / niedostępne przedmioty do pliku RPT</Polish>
|
||||
<Japanese>PRT で欠落 / 利用不可アイテムを記録します</Japanese>
|
||||
<Italian>Log mancante / oggetto non disponibile nell' RPT</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_CantOpenDisplay">
|
||||
<English>Unable to open ACE arsenal</English>
|
||||
<French>Impossible d'ouvrir ACE arsenal</French>
|
||||
<German>Kann ACE Arsenal nicht anzeigen</German>
|
||||
<Italian>Impossibile aprire l'arsenale ACE</Italian>
|
||||
<Japanese>ACE 武器庫を開けません</Japanese>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
898
addons/arsenal/ui/RscAttributes.hpp
Normal file
898
addons/arsenal/ui/RscAttributes.hpp
Normal file
@ -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);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
278
addons/arsenal/ui/RscCommon.hpp
Normal file
278
addons/arsenal/ui/RscCommon.hpp
Normal file
@ -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));
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
1
addons/arsenal/ui/script_component.hpp
Normal file
1
addons/arsenal/ui/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\arsenal\script_component.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);
|
||||
|
@ -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);
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
|
@ -84,6 +84,8 @@ GVAR(truingDropMuzzleVelocity) = 0;
|
||||
|
||||
GVAR(targetSolutionInput) = nil;
|
||||
|
||||
GVAR(targetRangeDirtyFlag) = false;
|
||||
|
||||
GVAR(showMainPage) = true;
|
||||
GVAR(showAddNewGun) = false;
|
||||
GVAR(showAtmoEnvData) = false;
|
||||
|
@ -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)];
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user