mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into magneticDeclation
This commit is contained in:
commit
69893c4f39
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,3 +20,4 @@ CHANGELOG.md
|
|||||||
sqfvm.exe
|
sqfvm.exe
|
||||||
ArmaScriptCompiler.exe
|
ArmaScriptCompiler.exe
|
||||||
*.sqfc
|
*.sqfc
|
||||||
|
!extras/**/*.zip
|
||||||
|
@ -126,6 +126,7 @@ Keithen <Keithen.Neu@gmail.com>
|
|||||||
Kllrt <kllrtik@gmail.com>
|
Kllrt <kllrtik@gmail.com>
|
||||||
KokaKolaA3
|
KokaKolaA3
|
||||||
Krzyciu
|
Krzyciu
|
||||||
|
LAxemann
|
||||||
legman <juicemelon@msn.com>
|
legman <juicemelon@msn.com>
|
||||||
Legolasindar "Viper" <legolasindar@gmail.com>
|
Legolasindar "Viper" <legolasindar@gmail.com>
|
||||||
licht-im-Norden87 <lichtimnorden87@gmail.com>
|
licht-im-Norden87 <lichtimnorden87@gmail.com>
|
||||||
@ -190,3 +191,4 @@ YetheSamartaka
|
|||||||
xrufix
|
xrufix
|
||||||
Zakant <Zakant@gmx.de>
|
Zakant <Zakant@gmx.de>
|
||||||
zGuba
|
zGuba
|
||||||
|
Zman6258
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
//IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"];
|
//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);
|
TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret);
|
||||||
|
|
||||||
if (!(_ammo isKindOf "BulletBase")) exitWith {};
|
if (!(_ammo isKindOf "BulletBase")) exitWith {};
|
||||||
if (!alive _projectile) exitWith {};
|
if (!alive _projectile) exitWith {};
|
||||||
|
@ -22,7 +22,7 @@ private _initStartTime = diag_tickTime;
|
|||||||
private _mapSize = worldSize;
|
private _mapSize = worldSize;
|
||||||
|
|
||||||
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
|
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
|
||||||
INFO_1("Terrain already initialized [world: %1]", worldName);
|
INFO_1("Terrain already initialized [world: %1]",worldName);
|
||||||
#ifdef DEBUG_MODE_FULL
|
#ifdef DEBUG_MODE_FULL
|
||||||
systemChat "AdvancedBallistics: Terrain already initialized";
|
systemChat "AdvancedBallistics: Terrain already initialized";
|
||||||
#endif
|
#endif
|
||||||
@ -33,14 +33,14 @@ private _gridCells = _mapGrids * _mapGrids;
|
|||||||
|
|
||||||
GVAR(currentGrid) = 0;
|
GVAR(currentGrid) = 0;
|
||||||
|
|
||||||
INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldName);
|
INFO_2("Starting Terrain Extension [cells: %1] [world: %2]",_gridCells,worldName);
|
||||||
|
|
||||||
[{
|
[{
|
||||||
params ["_args","_idPFH"];
|
params ["_args","_idPFH"];
|
||||||
_args params ["_mapGrids", "_gridCells", "_initStartTime"];
|
_args params ["_mapGrids", "_gridCells", "_initStartTime"];
|
||||||
|
|
||||||
if (GVAR(currentGrid) >= _gridCells) exitWith {
|
if (GVAR(currentGrid) >= _gridCells) exitWith {
|
||||||
INFO_2("Finished terrain initialization in %1 seconds [world: %2]", (diag_tickTime - _initStartTime) toFixed 2, worldName);
|
INFO_2("Finished terrain initialization in %1 seconds [world: %2]",(diag_tickTime - _initStartTime) toFixed 2,worldName);
|
||||||
#ifdef DEBUG_MODE_FULL
|
#ifdef DEBUG_MODE_FULL
|
||||||
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", (diag_tickTime - _initStartTime) toFixed 2];
|
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", (diag_tickTime - _initStartTime) toFixed 2];
|
||||||
#endif
|
#endif
|
||||||
@ -53,7 +53,7 @@ INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldNa
|
|||||||
private _gridCenter = [_x + 25, _y + 25];
|
private _gridCenter = [_x + 25, _y + 25];
|
||||||
private _gridHeight = round(getTerrainHeightASL _gridCenter);
|
private _gridHeight = round(getTerrainHeightASL _gridCenter);
|
||||||
private _gridNumObjects = count (_gridCenter nearObjects ["Building", 50]);
|
private _gridNumObjects = count (_gridCenter nearObjects ["Building", 50]);
|
||||||
private _gridSurfaceIsWater = if (surfaceIsWater _gridCenter) then {1} else {0};
|
private _gridSurfaceIsWater = parseNumber (surfaceIsWater _gridCenter);
|
||||||
"ace_advanced_ballistics" callExtension format["set:%1:%2:%3", _gridHeight, _gridNumObjects, _gridSurfaceIsWater];
|
"ace_advanced_ballistics" callExtension format["set:%1:%2:%3", _gridHeight, _gridNumObjects, _gridSurfaceIsWater];
|
||||||
GVAR(currentGrid) = GVAR(currentGrid) + 1;
|
GVAR(currentGrid) = GVAR(currentGrid) + 1;
|
||||||
if (GVAR(currentGrid) >= _gridCells) exitWith {};
|
if (GVAR(currentGrid) >= _gridCells) exitWith {};
|
||||||
|
@ -66,7 +66,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
|
|||||||
if (_inheritedBarrelConfig || _inheritedTempConfig) then {
|
if (_inheritedBarrelConfig || _inheritedTempConfig) then {
|
||||||
private _parentConfig = inheritsFrom _ammoConfig;
|
private _parentConfig = inheritsFrom _ammoConfig;
|
||||||
private _parentSpeed = getNumber (_parentConfig >> "typicalSpeed");
|
private _parentSpeed = getNumber (_parentConfig >> "typicalSpeed");
|
||||||
WARNING_4("Subsonic Ammo %1 (%2 m/s) missing `ACE_muzzleVelocities` or `ACE_ammoTempMuzzleVelocityShifts` configs, attempting to use parent %3 (%4m/s)",_this,_typicalSpeed,configName _parentConfig, _parentSpeed);
|
WARNING_4("Subsonic Ammo %1 (%2 m/s) missing `ACE_muzzleVelocities` or `ACE_ammoTempMuzzleVelocityShifts` configs, attempting to use parent %3 (%4m/s)",_this,_typicalSpeed,configName _parentConfig,_parentSpeed);
|
||||||
if (_parentSpeed <= 0) exitWith {//Handle weird or null parent
|
if (_parentSpeed <= 0) exitWith {//Handle weird or null parent
|
||||||
_muzzleVelocityTable = [];
|
_muzzleVelocityTable = [];
|
||||||
_ammoTempMuzzleVelocityShifts = [];
|
_ammoTempMuzzleVelocityShifts = [];
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
private _weaponConfig = (configFile >> "CfgWeapons" >> _this);
|
private _weaponConfig = (configFile >> "CfgWeapons" >> _this);
|
||||||
|
|
||||||
private _barrelTwist = 0 max getNumber(_weaponConfig >> "ACE_barrelTwist");
|
private _barrelTwist = 0 max getNumber(_weaponConfig >> "ACE_barrelTwist");
|
||||||
private _twistDirection = [0, 1] select (_barrelTwist != 0);
|
private _twistDirection = parseNumber (_barrelTwist != 0);
|
||||||
if (isNumber (_weaponConfig >> "ACE_twistDirection")) then {
|
if (isNumber (_weaponConfig >> "ACE_twistDirection")) then {
|
||||||
_twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection");
|
_twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection");
|
||||||
if !(_twistDirection in [-1, 0, 1]) then {
|
if !(_twistDirection in [-1, 0, 1]) then {
|
||||||
|
@ -60,7 +60,7 @@ if (!hasInterface) exitWith {};
|
|||||||
}, true] call CBA_fnc_addPlayerEventHandler;
|
}, true] call CBA_fnc_addPlayerEventHandler;
|
||||||
|
|
||||||
// - Duty factors -------------------------------------------------------------
|
// - Duty factors -------------------------------------------------------------
|
||||||
if (["ace_medical"] call EFUNC(common,isModLoaded)) then {
|
if (GVAR(medicalLoaded)) then {
|
||||||
[QEGVAR(medical,pain), { // 0->1.0, 0.5->1.05, 1->1.1
|
[QEGVAR(medical,pain), { // 0->1.0, 0.5->1.05, 1->1.1
|
||||||
linearConversion [0, 1, (_this getVariable [QEGVAR(medical,pain), 0]), 1, 1.1, true];
|
linearConversion [0, 1, (_this getVariable [QEGVAR(medical,pain), 0]), 1, 1.1, true];
|
||||||
}] call FUNC(addDutyFactor);
|
}] call FUNC(addDutyFactor);
|
||||||
|
@ -13,5 +13,6 @@ GVAR(dutyList) = createHashMap;
|
|||||||
GVAR(setAnimExclusions) = [];
|
GVAR(setAnimExclusions) = [];
|
||||||
GVAR(inertia) = 0;
|
GVAR(inertia) = 0;
|
||||||
GVAR(inertiaCache) = createHashMap;
|
GVAR(inertiaCache) = createHashMap;
|
||||||
|
GVAR(medicalLoaded) = ["ace_medical"] call EFUNC(common,isModLoaded);
|
||||||
|
|
||||||
ADDON = true;
|
ADDON = true;
|
||||||
|
@ -23,6 +23,12 @@ if (!alive ACE_player) exitWith {
|
|||||||
_staminaBarContainer ctrlCommit 1;
|
_staminaBarContainer ctrlCommit 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
private _oxygen = 0.9; // Default AF oxygen saturation
|
||||||
|
if (GVAR(medicalLoaded) && {EGVAR(medical_vitals,simulateSpo2)}) then {
|
||||||
|
_oxygen = (ACE_player getVariable [QEGVAR(medical,spo2), 97]) / 100;
|
||||||
|
};
|
||||||
|
|
||||||
private _currentWork = REE;
|
private _currentWork = REE;
|
||||||
private _currentSpeed = (vectorMagnitude (velocity ACE_player)) min 6;
|
private _currentSpeed = (vectorMagnitude (velocity ACE_player)) min 6;
|
||||||
|
|
||||||
@ -42,8 +48,8 @@ GVAR(muscleDamage) = (GVAR(muscleDamage) + (_currentWork / GVAR(peakPower)) ^ 3.
|
|||||||
private _muscleIntegritySqrt = sqrt (1 - GVAR(muscleDamage));
|
private _muscleIntegritySqrt = sqrt (1 - GVAR(muscleDamage));
|
||||||
|
|
||||||
// Calculate available power
|
// Calculate available power
|
||||||
private _ae1PathwayPowerFatigued = GVAR(ae1PathwayPower) * sqrt (GVAR(ae1Reserve) / AE1_MAXRESERVE) * OXYGEN * _muscleIntegritySqrt;
|
private _ae1PathwayPowerFatigued = GVAR(ae1PathwayPower) * sqrt (GVAR(ae1Reserve) / AE1_MAXRESERVE) * _oxygen * _muscleIntegritySqrt;
|
||||||
private _ae2PathwayPowerFatigued = GVAR(ae2PathwayPower) * sqrt (GVAR(ae2Reserve) / AE2_MAXRESERVE) * OXYGEN * _muscleIntegritySqrt;
|
private _ae2PathwayPowerFatigued = GVAR(ae2PathwayPower) * sqrt (GVAR(ae2Reserve) / AE2_MAXRESERVE) * _oxygen * _muscleIntegritySqrt;
|
||||||
|
|
||||||
// Calculate how much power is consumed from each reserve
|
// Calculate how much power is consumed from each reserve
|
||||||
private _ae1Power = _currentWork min _ae1PathwayPowerFatigued;
|
private _ae1Power = _currentWork min _ae1PathwayPowerFatigued;
|
||||||
@ -58,8 +64,8 @@ GVAR(anReserve) = GVAR(anReserve) - _anPower / WATTSPERATP;
|
|||||||
GVAR(anFatigue) = GVAR(anFatigue) + _anPower * (0.057 / GVAR(peakPower)) * 1.1;
|
GVAR(anFatigue) = GVAR(anFatigue) + _anPower * (0.057 / GVAR(peakPower)) * 1.1;
|
||||||
|
|
||||||
// Aerobic ATP reserve recovery
|
// Aerobic ATP reserve recovery
|
||||||
GVAR(ae1Reserve) = ((GVAR(ae1Reserve) + OXYGEN * 6.60 * (GVAR(ae1PathwayPower) - _ae1Power) / GVAR(ae1PathwayPower) * GVAR(recoveryFactor)) min AE1_MAXRESERVE) max 0;
|
GVAR(ae1Reserve) = ((GVAR(ae1Reserve) + _oxygen * 6.60 * (GVAR(ae1PathwayPower) - _ae1Power) / GVAR(ae1PathwayPower) * GVAR(recoveryFactor)) min AE1_MAXRESERVE) max 0;
|
||||||
GVAR(ae2Reserve) = ((GVAR(ae2Reserve) + OXYGEN * 5.83 * (GVAR(ae2PathwayPower) - _ae2Power) / GVAR(ae2PathwayPower) * GVAR(recoveryFactor)) min AE2_MAXRESERVE) max 0;
|
GVAR(ae2Reserve) = ((GVAR(ae2Reserve) + _oxygen * 5.83 * (GVAR(ae2PathwayPower) - _ae2Power) / GVAR(ae2PathwayPower) * GVAR(recoveryFactor)) min AE2_MAXRESERVE) max 0;
|
||||||
|
|
||||||
// Anaerobic ATP reserver and fatigue recovery
|
// Anaerobic ATP reserver and fatigue recovery
|
||||||
GVAR(anReserve) = ((GVAR(anReserve)
|
GVAR(anReserve) = ((GVAR(anReserve)
|
||||||
@ -70,9 +76,9 @@ GVAR(anFatigue) = ((GVAR(anFatigue)
|
|||||||
- (_ae1PathwayPowerFatigued + _ae2PathwayPowerFatigued - _ae1Power - _ae2Power) * (0.057 / GVAR(peakPower)) * GVAR(anFatigue) ^ 2 * GVAR(recoveryFactor)
|
- (_ae1PathwayPowerFatigued + _ae2PathwayPowerFatigued - _ae1Power - _ae2Power) * (0.057 / GVAR(peakPower)) * GVAR(anFatigue) ^ 2 * GVAR(recoveryFactor)
|
||||||
) min 1) max 0;
|
) min 1) max 0;
|
||||||
|
|
||||||
private _aeReservePercentage = (GVAR(ae1Reserve) / AE1_MAXRESERVE + GVAR(ae2Reserve) / AE2_MAXRESERVE) / 2;
|
GVAR(aeReservePercentage) = (GVAR(ae1Reserve) / AE1_MAXRESERVE + GVAR(ae2Reserve) / AE2_MAXRESERVE) / 2;
|
||||||
private _anReservePercentage = GVAR(anReserve) / AN_MAXRESERVE;
|
GVAR(anReservePercentage) = GVAR(anReserve) / AN_MAXRESERVE;
|
||||||
private _perceivedFatigue = 1 - (_anReservePercentage min _aeReservePercentage);
|
private _perceivedFatigue = 1 - (GVAR(anReservePercentage) min GVAR(aeReservePercentage));
|
||||||
|
|
||||||
[ACE_player, _perceivedFatigue, _currentSpeed, GVAR(anReserve) == 0] call FUNC(handleEffects);
|
[ACE_player, _perceivedFatigue, _currentSpeed, GVAR(anReserve) == 0] call FUNC(handleEffects);
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ switch (_fillingType) do {
|
|||||||
} else {
|
} else {
|
||||||
private _pos = _building select 0;
|
private _pos = _building select 0;
|
||||||
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
|
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
|
||||||
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
|
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits,{floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
|
||||||
|
|
||||||
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
|
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
|
||||||
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
|
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
|
||||||
@ -177,7 +177,7 @@ switch (_fillingType) do {
|
|||||||
} else {
|
} else {
|
||||||
private _pos = _building select 0;
|
private _pos = _building select 0;
|
||||||
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
|
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
|
||||||
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
|
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits,{floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
|
||||||
|
|
||||||
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
|
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
|
||||||
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
|
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
|
||||||
@ -224,7 +224,7 @@ switch (_fillingType) do {
|
|||||||
} else {
|
} else {
|
||||||
private _pos = selectRandom _building;
|
private _pos = selectRandom _building;
|
||||||
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
|
private _nearestUnits = (_pos nearEntities ["CAManBase", 2]);
|
||||||
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits, {floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
|
LOG(format [ARR_3("fnc_garrison: Unit detection | %1 units nearby | %2 units within height",count _nearestUnits,{floor ((getPos _x) select 2) == floor (_pos select 2)} count _nearestUnits)]);
|
||||||
|
|
||||||
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
|
if (count _nearestUnits > 0 && {[_nearestUnits, _pos] call _fnc_comparePos}) then {
|
||||||
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
|
LOG(format [ARR_2("fnc_garrison: Unit present | removing position | %1 positions remaining for this building",count (_buildingsIndex select (_buildingsIndex find _building)) - 1)]);
|
||||||
@ -258,7 +258,7 @@ switch (_fillingType) do {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
TRACE_1(format [ARR_2("fnc_garrison: while loop ended | %1 units ready to be treated by PFH",count _unitMoveList)], _teleport);
|
TRACE_1(format [ARR_2("fnc_garrison: while loop ended | %1 units ready to be treated by PFH",count _unitMoveList)],_teleport);
|
||||||
|
|
||||||
// Update the unit list and remove duplicate positions and units
|
// Update the unit list and remove duplicate positions and units
|
||||||
private _garrison_unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
private _garrison_unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||||
@ -279,5 +279,5 @@ if (_teleport) then {
|
|||||||
[_unitMoveList] call FUNC(garrisonMove);
|
[_unitMoveList] call FUNC(garrisonMove);
|
||||||
};
|
};
|
||||||
|
|
||||||
TRACE_1(format [ARR_3("fnc_garrison: End | %1 units left | %2 buildings left", count _unitsArray, count _buildingsIndex)], _unitsArray);
|
TRACE_1(format [ARR_3("fnc_garrison: End | %1 units left | %2 buildings left",count _unitsArray,count _buildingsIndex)],_unitsArray);
|
||||||
_unitsArray
|
_unitsArray
|
||||||
|
@ -81,13 +81,13 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then {
|
|||||||
[QGVAR(enableAttack), [[_unit], true], _unit] call CBA_fnc_targetEvent;
|
[QGVAR(enableAttack), [[_unit], true], _unit] call CBA_fnc_targetEvent;
|
||||||
};
|
};
|
||||||
|
|
||||||
LOG(format [ARR_2("garrisonMove PFH: unit in position | %1 units left", count _unitMoveList)]);
|
LOG(format [ARR_2("garrisonMove PFH: unit in position | %1 units left",count _unitMoveList)]);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Check if unit is alive or even existing
|
// Check if unit is alive or even existing
|
||||||
if (!alive _unit || {_unit getVariable [QGVAR(garrisoned), false]}) then {
|
if (!alive _unit || {_unit getVariable [QGVAR(garrisoned), false]}) then {
|
||||||
_unitMoveList deleteAt (_unitMoveList find _x);
|
_unitMoveList deleteAt (_unitMoveList find _x);
|
||||||
LOG(format [ARR_2("garrisonMove PFH: unit dead, deleted or garrisoned via TP | %1 units left", count _unitMoveList)]);
|
LOG(format [ARR_2("garrisonMove PFH: unit dead, deleted or garrisoned via TP | %1 units left",count _unitMoveList)]);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
private _unitPos = getPos _unit;
|
private _unitPos = getPos _unit;
|
||||||
|
@ -28,7 +28,7 @@ _units = _units select {local _x};
|
|||||||
|
|
||||||
private _leader = leader _unit;
|
private _leader = leader _unit;
|
||||||
|
|
||||||
TRACE_3("fnc_ungarrison: unit and leader",_unit , _leader, (_leader == _unit));
|
TRACE_3("fnc_ungarrison: unit and leader",_unit,_leader,(_leader == _unit));
|
||||||
|
|
||||||
_unit setVariable [QGVAR(garrisonned), false, true];
|
_unit setVariable [QGVAR(garrisonned), false, true];
|
||||||
|
|
||||||
|
@ -29,7 +29,10 @@ private _currentLoiterRadius = waypointLoiterRadius _waypoint;
|
|||||||
private _currentLoiterType = waypointLoiterType _waypoint;
|
private _currentLoiterType = waypointLoiterType _waypoint;
|
||||||
|
|
||||||
// Set pos to ATL
|
// Set pos to ATL
|
||||||
_pos set [2, if (_currentHeight >= 50) then { _currentHeight } else { 0 }];
|
_pos set [
|
||||||
|
2,
|
||||||
|
[0, _currentHeight] select (_currentHeight >= 50)
|
||||||
|
];
|
||||||
|
|
||||||
// [_group] call CBA_fnc_clearWaypoints;
|
// [_group] call CBA_fnc_clearWaypoints;
|
||||||
_waypoint = _group addWaypoint [_pos, 0];
|
_waypoint = _group addWaypoint [_pos, 0];
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<Russian>Открыть грузовой отсек</Russian>
|
<Russian>Открыть грузовой отсек</Russian>
|
||||||
<Italian>Apri la rampa di carico</Italian>
|
<Italian>Apri la rampa di carico</Italian>
|
||||||
<Portuguese>Abrir porta de carga</Portuguese>
|
<Portuguese>Abrir porta de carga</Portuguese>
|
||||||
<Japanese>カーゴ ドアを開く</Japanese>
|
<Japanese>貨物室ドアを 開く</Japanese>
|
||||||
<Korean>화물칸 개방</Korean>
|
<Korean>화물칸 개방</Korean>
|
||||||
<Chinese>開啟貨艙門</Chinese>
|
<Chinese>開啟貨艙門</Chinese>
|
||||||
<Chinesesimp>开启货舱门</Chinesesimp>
|
<Chinesesimp>开启货舱门</Chinesesimp>
|
||||||
@ -46,7 +46,7 @@
|
|||||||
<Russian>Закрыть грузовой отсек</Russian>
|
<Russian>Закрыть грузовой отсек</Russian>
|
||||||
<Italian>Chiudi la rampa di carico</Italian>
|
<Italian>Chiudi la rampa di carico</Italian>
|
||||||
<Portuguese>Fechar porta de carga</Portuguese>
|
<Portuguese>Fechar porta de carga</Portuguese>
|
||||||
<Japanese>カーゴ ドアを閉じる</Japanese>
|
<Japanese>貨物室ドアを 閉じる</Japanese>
|
||||||
<Korean>화물칸 폐쇄</Korean>
|
<Korean>화물칸 폐쇄</Korean>
|
||||||
<Chinese>關閉貨艙門</Chinese>
|
<Chinese>關閉貨艙門</Chinese>
|
||||||
<Chinesesimp>关闭货舱门</Chinesesimp>
|
<Chinesesimp>关闭货舱门</Chinesesimp>
|
||||||
|
@ -110,7 +110,7 @@ class Cfg3DEN {
|
|||||||
h = QUOTE(65 * ATTRIBUTE_H);
|
h = QUOTE(65 * ATTRIBUTE_H);
|
||||||
drawSideArrows = 1;
|
drawSideArrows = 1;
|
||||||
disableOverflow = 1;
|
disableOverflow = 1;
|
||||||
columns[] = {0.05, 0.15, 0.85};
|
columns[] = {0.05, 0.15, 0.83, 0.87};
|
||||||
};
|
};
|
||||||
class ArrowLeft: ctrlButton {
|
class ArrowLeft: ctrlButton {
|
||||||
idc = IDC_ATTRIBUTE_LIST_LEFT;
|
idc = IDC_ATTRIBUTE_LIST_LEFT;
|
||||||
|
@ -22,7 +22,8 @@ GVAR(lastSortDirectionRight) = DESCENDING;
|
|||||||
params ["_object"];
|
params ["_object"];
|
||||||
|
|
||||||
// If the arsenal is already open, refresh arsenal display
|
// If the arsenal is already open, refresh arsenal display
|
||||||
if (!isNil QGVAR(currentBox) && {GVAR(currentBox) isEqualTo _object}) then {
|
// Deliberate == check, fail on objNull
|
||||||
|
if (!isNil QGVAR(currentBox) && {GVAR(currentBox) == _object}) then {
|
||||||
[true, true] call FUNC(refresh);
|
[true, true] call FUNC(refresh);
|
||||||
};
|
};
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
@ -69,7 +70,7 @@ GVAR(lastSortDirectionRight) = DESCENDING;
|
|||||||
if (!isNil QGVAR(currentLoadoutsTab) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then {
|
if (!isNil QGVAR(currentLoadoutsTab) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then {
|
||||||
private _curSelData = _contentPanelCtrl lnbData [lnbCurSelRow _contentPanelCtrl, 1];
|
private _curSelData = _contentPanelCtrl lnbData [lnbCurSelRow _contentPanelCtrl, 1];
|
||||||
|
|
||||||
([_loadoutData] call FUNC(verifyLoadout)) params ["_extendedLoadout", "_nullItemsAmount", "_unavailableItemsAmount"];
|
([_loadoutData] call FUNC(verifyLoadout)) params ["_extendedLoadout", "_nullItemsList", "_unavailableItemsList"];
|
||||||
_extendedLoadout params ["_loadout"];
|
_extendedLoadout params ["_loadout"];
|
||||||
|
|
||||||
private _newRow = _contentPanelCtrl lnbAddRow [_playerName, _loadoutName];
|
private _newRow = _contentPanelCtrl lnbAddRow [_playerName, _loadoutName];
|
||||||
@ -80,10 +81,10 @@ GVAR(lastSortDirectionRight) = DESCENDING;
|
|||||||
_contentPanelCtrl lnbSetData [[_newRow, 1], _playerName + _loadoutName];
|
_contentPanelCtrl lnbSetData [[_newRow, 1], _playerName + _loadoutName];
|
||||||
|
|
||||||
// Set color of row, depending if items are unavailable/missing
|
// Set color of row, depending if items are unavailable/missing
|
||||||
if (_nullItemsAmount > 0) then {
|
if (_nullItemsList isNotEqualTo []) then {
|
||||||
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]];
|
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]];
|
||||||
} else {
|
} else {
|
||||||
if (_unavailableItemsAmount > 0) then {
|
if (_unavailableItemsList isNotEqualTo []) then {
|
||||||
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]];
|
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -107,24 +108,16 @@ GVAR(lastSortDirectionRight) = DESCENDING;
|
|||||||
private _face = _extendedInfo getOrDefault [QGVAR(face), ""];
|
private _face = _extendedInfo getOrDefault [QGVAR(face), ""];
|
||||||
|
|
||||||
if (_face != "") then {
|
if (_face != "") then {
|
||||||
if (isMultiplayer) then {
|
private _id = [QGVAR(broadcastFace), [_unit, _face], QGVAR(centerFace_) + hashValue _unit] call CBA_fnc_globalEventJIP;
|
||||||
private _id = [QGVAR(broadcastFace), [_unit, _face], QGVAR(centerFace_) + netId _unit] call CBA_fnc_globalEventJIP;
|
[_id, _unit] call CBA_fnc_removeGlobalEventJIP;
|
||||||
[_id, _unit] call CBA_fnc_removeGlobalEventJIP;
|
|
||||||
} else {
|
|
||||||
_unit setFace _face;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set voice
|
// Set voice
|
||||||
private _voice = _extendedInfo getOrDefault [QGVAR(voice), ""];
|
private _voice = _extendedInfo getOrDefault [QGVAR(voice), ""];
|
||||||
|
|
||||||
if (_voice != "") then {
|
if (_voice != "") then {
|
||||||
if (isMultiplayer) then {
|
private _id = [QGVAR(broadcastVoice), [_unit, _voice], QGVAR(centerVoice_) + hashValue _unit] call CBA_fnc_globalEventJIP;
|
||||||
private _id = [QGVAR(broadcastVoice), [_unit, _voice], QGVAR(centerVoice_) + netId _unit] call CBA_fnc_globalEventJIP;
|
[_id, _unit] call CBA_fnc_removeGlobalEventJIP;
|
||||||
[_id, _unit] call CBA_fnc_removeGlobalEventJIP;
|
|
||||||
} else {
|
|
||||||
_unit setSpeaker _voice;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set insignia
|
// Set insignia
|
||||||
@ -146,7 +139,7 @@ GVAR(lastSortDirectionRight) = DESCENDING;
|
|||||||
|
|
||||||
// Set voice if enabled
|
// Set voice if enabled
|
||||||
if (GVAR(loadoutsSaveVoice)) then {
|
if (GVAR(loadoutsSaveVoice)) then {
|
||||||
_extendedInfo set [QGVAR(voice), speaker _unit];
|
_extendedInfo set [QGVAR(voice), (speaker _unit) call EFUNC(common,getConfigName)];
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set insignia if enabled
|
// Set insignia if enabled
|
||||||
|
@ -36,7 +36,59 @@ call FUNC(compileStats);
|
|||||||
EGVAR(common,blockItemReplacement) = false;
|
EGVAR(common,blockItemReplacement) = false;
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
[QGVAR(cargoChanged), {
|
||||||
|
params ["_display"];
|
||||||
|
// Only update actions if necessary, this can get performance-intensive using the arrow keys
|
||||||
|
if (!GVAR(updateActionsOnCargoChange)) exitWith {};
|
||||||
|
private _actionInfo = [_display];
|
||||||
|
_actionInfo append GVAR(actionInfo);
|
||||||
|
[QGVAR(displayActions), _actionInfo] call CBA_fnc_localEvent;
|
||||||
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
// Setup Tools tab
|
// Setup Tools tab
|
||||||
[keys (uiNamespace getVariable [QGVAR(configItemsTools), createHashMap]), LLSTRING(toolsTab), TOOLS_TAB_ICON, -1, true] call FUNC(addRightPanelButton);
|
[keys (uiNamespace getVariable [QGVAR(configItemsTools), createHashMap]), LLSTRING(toolsTab), TOOLS_TAB_ICON, -1, true] call FUNC(addRightPanelButton);
|
||||||
|
|
||||||
|
// TODO: make IDCs able to match IDX with simple math?
|
||||||
|
GVAR(idxMap) = createHashMapFromArray [
|
||||||
|
[IDC_buttonPrimaryWeapon, IDX_VIRT_PRIMARY_WEAPONS],
|
||||||
|
[IDC_buttonHandgun, IDX_VIRT_HANDGUN_WEAPONS],
|
||||||
|
[IDC_buttonSecondaryWeapon, IDX_VIRT_SECONDARY_WEAPONS],
|
||||||
|
[IDC_buttonHeadgear, IDX_VIRT_HEADGEAR],
|
||||||
|
[IDC_buttonUniform, IDX_VIRT_UNIFORM],
|
||||||
|
[IDC_buttonVest, IDX_VIRT_VEST],
|
||||||
|
[IDC_buttonBackpack, IDX_VIRT_BACKPACK],
|
||||||
|
[IDC_buttonGoggles, IDX_VIRT_GOGGLES],
|
||||||
|
[IDC_buttonNVG, IDX_VIRT_NVG],
|
||||||
|
[IDC_buttonBinoculars, IDX_VIRT_BINO],
|
||||||
|
[IDC_buttonMap, IDX_VIRT_MAP],
|
||||||
|
[IDC_buttonGPS, IDX_VIRT_COMMS],
|
||||||
|
[IDC_buttonRadio, IDX_VIRT_RADIO],
|
||||||
|
[IDC_buttonCompass, IDX_VIRT_COMPASS],
|
||||||
|
[IDC_buttonWatch, IDX_VIRT_WATCH]
|
||||||
|
];
|
||||||
|
|
||||||
|
// Make new hashmaps for face/voice/insignia so mission makers can disable them
|
||||||
|
// Copies of hashmaps aren't final
|
||||||
|
GVAR(faceCache) = +(uiNamespace getVariable QGVAR(faceCache));
|
||||||
|
GVAR(voiceCache) = +(uiNamespace getVariable QGVAR(voiceCache));
|
||||||
|
GVAR(insigniaCache) = +(uiNamespace getVariable QGVAR(insigniaCache));
|
||||||
|
|
||||||
|
// Get mission/campaign insignias
|
||||||
|
// BIS_fnc_setUnitInsignia will look in mission config, then campaign, then global config last, so overwrite accordingly
|
||||||
|
private _insigniaCondition = toString {
|
||||||
|
if (isNumber (_x >> "scope")) then {
|
||||||
|
getNumber (_x >> "scope") == 2
|
||||||
|
} else {
|
||||||
|
true
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// Ref fnc_addListBoxItem, 0/nil = configFile, 1 = campaignConfigFile, 2 = missionConfigFile
|
||||||
|
{
|
||||||
|
GVAR(insigniaCache) set [_x, 1];
|
||||||
|
} forEach (_insigniaCondition configClasses (campaignConfigFile >> "CfgUnitInsignia"));
|
||||||
|
{
|
||||||
|
GVAR(insigniaCache) set [_x, 2];
|
||||||
|
} forEach (_insigniaCondition configClasses (missionConfigFile >> "CfgUnitInsignia"));
|
||||||
|
|
||||||
ADDON = true;
|
ADDON = true;
|
||||||
|
@ -155,6 +155,8 @@
|
|||||||
#define IDC_statsNextPage 53
|
#define IDC_statsNextPage 53
|
||||||
#define IDC_statsCurrentPage 54
|
#define IDC_statsCurrentPage 54
|
||||||
#define IDC_actionsBox 90
|
#define IDC_actionsBox 90
|
||||||
|
#define IDC_actionsBackground1 90010
|
||||||
|
#define IDC_actionsBackground2 90011
|
||||||
#define IDC_actionsText1 9001
|
#define IDC_actionsText1 9001
|
||||||
#define IDC_actionsButton1 9002
|
#define IDC_actionsButton1 9002
|
||||||
#define IDC_actionsText2 9003
|
#define IDC_actionsText2 9003
|
||||||
@ -268,6 +270,7 @@
|
|||||||
#define IDX_VIRT_UNIQUE_UNKNOWN_ITEMS 25
|
#define IDX_VIRT_UNIQUE_UNKNOWN_ITEMS 25
|
||||||
|
|
||||||
// Indexes of current items array
|
// Indexes of current items array
|
||||||
|
// Should match IDX_VIRT_X macros for any left panel tabs
|
||||||
#define IDX_CURR_PRIMARY_WEAPON 0
|
#define IDX_CURR_PRIMARY_WEAPON 0
|
||||||
#define IDX_CURR_SECONDARY_WEAPON 1
|
#define IDX_CURR_SECONDARY_WEAPON 1
|
||||||
#define IDX_CURR_HANDGUN_WEAPON 2
|
#define IDX_CURR_HANDGUN_WEAPON 2
|
||||||
@ -487,3 +490,6 @@ if (!isNil QGVAR(customRightPanelButtons)) then {\
|
|||||||
_contentPanelCtrl lnbSetPicture [[_newRow, 7], getText (configFile >> "CfgVehicles" >> (_loadout select IDX_LOADOUT_BACKPACK) select 0 >> "picture")];\
|
_contentPanelCtrl lnbSetPicture [[_newRow, 7], getText (configFile >> "CfgVehicles" >> (_loadout select IDX_LOADOUT_BACKPACK) select 0 >> "picture")];\
|
||||||
_contentPanelCtrl lnbSetPicture [[_newRow, 8], getText (_cfgWeapons >> _loadout select IDX_LOADOUT_HEADGEAR >> "picture")];\
|
_contentPanelCtrl lnbSetPicture [[_newRow, 8], getText (_cfgWeapons >> _loadout select IDX_LOADOUT_HEADGEAR >> "picture")];\
|
||||||
_contentPanelCtrl lnbSetPicture [[_newRow, 9], getText (configFile >> "CfgGlasses" >> _loadout select IDX_LOADOUT_GOGGLES >> "picture")];
|
_contentPanelCtrl lnbSetPicture [[_newRow, 9], getText (configFile >> "CfgGlasses" >> _loadout select IDX_LOADOUT_GOGGLES >> "picture")];
|
||||||
|
|
||||||
|
#define ACTION_TYPE_TEXT 0
|
||||||
|
#define ACTION_TYPE_BUTTON 1
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "..\script_component.hpp"
|
#include "..\script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: johnb43
|
* Author: johnb43
|
||||||
* Adds custom action buttons.
|
* Adds custom action buttons.
|
||||||
@ -10,6 +11,7 @@
|
|||||||
* 3: Actions <ARRAY of ARRAYS>
|
* 3: Actions <ARRAY of ARRAYS>
|
||||||
* 4: Condition <CODE> (default: {true})
|
* 4: Condition <CODE> (default: {true})
|
||||||
* 5: Scope editor <NUMBER> (default: 2)
|
* 5: Scope editor <NUMBER> (default: 2)
|
||||||
|
* 6: Update when cargo content changes <BOOL> (default: false)
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* 0: Array of IDs <ARRAY of STRINGS>
|
* 0: Array of IDs <ARRAY of STRINGS>
|
||||||
@ -30,7 +32,8 @@ params [
|
|||||||
["_title", "", [""]],
|
["_title", "", [""]],
|
||||||
["_actions", [], [[]]],
|
["_actions", [], [[]]],
|
||||||
["_rootCondition", {true}, [{}]],
|
["_rootCondition", {true}, [{}]],
|
||||||
["_scopeEditor", 2, [0]]
|
["_scopeEditor", 2, [0]],
|
||||||
|
["_updateOnCargoChange", false, [false]]
|
||||||
];
|
];
|
||||||
|
|
||||||
// Compile actions from config (in case this is called before preInit)
|
// Compile actions from config (in case this is called before preInit)
|
||||||
@ -38,13 +41,13 @@ call FUNC(compileActions);
|
|||||||
|
|
||||||
// Skip if not allowed in editor and in editor
|
// Skip if not allowed in editor and in editor
|
||||||
if (is3DEN && {_scopeEditor != 2}) exitWith {
|
if (is3DEN && {_scopeEditor != 2}) exitWith {
|
||||||
TRACE_1("Skipping action because in editor", _rootClass);
|
TRACE_1("Skipping action because in editor",_rootClass);
|
||||||
[]
|
[]
|
||||||
};
|
};
|
||||||
|
|
||||||
// Class can't contain ~, because it's used for formatting result
|
// Class can't contain ~, because it's used for formatting result
|
||||||
if ("~" in _rootClass) exitWith {
|
if ("~" in _rootClass) exitWith {
|
||||||
TRACE_1("Classname can't contain '~'", _rootClass);
|
TRACE_1("Classname can't contain '~'",_rootClass);
|
||||||
[]
|
[]
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -65,7 +68,7 @@ private _fnc_addToGroup = {
|
|||||||
|
|
||||||
// Don't allow two of the same class
|
// Don't allow two of the same class
|
||||||
if (_group findIf {(_x select 0) == _class} != -1) then {
|
if (_group findIf {(_x select 0) == _class} != -1) then {
|
||||||
TRACE_1("An action with this ID already exists", _class);
|
TRACE_1("An action with this ID already exists",_class);
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -119,4 +122,8 @@ private _group = [];
|
|||||||
};
|
};
|
||||||
} forEach _tabs;
|
} forEach _tabs;
|
||||||
|
|
||||||
|
if (_updateOnCargoChange) then {
|
||||||
|
GVAR(updateActionsOnCargoChange) = true;
|
||||||
|
};
|
||||||
|
|
||||||
_return
|
_return
|
||||||
|
@ -6,9 +6,10 @@
|
|||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Config category, must be "CfgWeapons", "CfgVehicles", "CfgMagazines", "CfgVoice" or "CfgUnitInsignia" <STRING>
|
* 0: Config category, must be "CfgWeapons", "CfgVehicles", "CfgMagazines", "CfgVoice" or "CfgUnitInsignia" <STRING>
|
||||||
* 1: Classname <STRING>
|
* 1: Classname (must be in config case) <STRING>
|
||||||
* 2: Panel control <CONTROL>
|
* 2: Panel control <CONTROL>
|
||||||
* 3: Name of the picture entry in that Cfg class <STRING> (default: "picture")
|
* 3: Name of the picture entry in that Cfg class <STRING> (default: "picture")
|
||||||
|
* 4: Config root <NUMBER> (default: 0 -> configFile)
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
@ -19,7 +20,7 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_configCategory", "_className", "_ctrlPanel", ["_pictureEntryName", "picture", [""]]];
|
params ["_configCategory", "_className", "_ctrlPanel", ["_pictureEntryName", "picture", [""]], ["_configRoot", 0, [0]]];
|
||||||
|
|
||||||
private _skip = GVAR(favoritesOnly) && {!(_className in GVAR(currentItems))} && {!((toLower _className) in GVAR(favorites))};
|
private _skip = GVAR(favoritesOnly) && {!(_className in GVAR(currentItems))} && {!((toLower _className) in GVAR(favorites))};
|
||||||
if (_skip) then {
|
if (_skip) then {
|
||||||
@ -41,10 +42,10 @@ if (_skip) then {
|
|||||||
|
|
||||||
if (_skip) exitWith {};
|
if (_skip) exitWith {};
|
||||||
|
|
||||||
// Sanitise key, as it's public; If not in cache, find info and cache it for later use
|
// If not in cache, find info and cache it for later use
|
||||||
((uiNamespace getVariable QGVAR(addListBoxItemCache)) getOrDefaultCall [_configCategory + _className, {
|
((uiNamespace getVariable QGVAR(addListBoxItemCache)) getOrDefaultCall [_configCategory + _className + str _configRoot, {
|
||||||
// Get classname (config case), display name, picture and DLC
|
// Get classname (config case), display name, picture and DLC
|
||||||
private _configPath = configFile >> _configCategory >> _className;
|
private _configPath = ([configFile, campaignConfigFile, missionConfigFile] select _configRoot) >> _configCategory >> _className;
|
||||||
private _dlcName = _configPath call EFUNC(common,getAddon);
|
private _dlcName = _configPath call EFUNC(common,getAddon);
|
||||||
|
|
||||||
// If _pictureEntryName is empty, then this item has no picture (e.g. faces)
|
// If _pictureEntryName is empty, then this item has no picture (e.g. faces)
|
||||||
|
@ -72,7 +72,7 @@ private _fnc_addToTabs = {
|
|||||||
_currentTab pushBack _sort;
|
_currentTab pushBack _sort;
|
||||||
_return pushBack _sortName;
|
_return pushBack _sortName;
|
||||||
} else {
|
} else {
|
||||||
TRACE_1("A sort with this ID already exists", _sortName);
|
TRACE_1("A sort with this ID already exists",_sortName);
|
||||||
};
|
};
|
||||||
} forEach _tabsToAddTo;
|
} forEach _tabsToAddTo;
|
||||||
};
|
};
|
||||||
|
@ -77,7 +77,7 @@ private _fnc_addToTabs = {
|
|||||||
|
|
||||||
// Find if there is an entry with same ID
|
// Find if there is an entry with same ID
|
||||||
if (_currentTab findIf {_x select 5 == _statName} != -1) then {
|
if (_currentTab findIf {_x select 5 == _statName} != -1) then {
|
||||||
TRACE_1("A stat with this ID already exists", _statName);
|
TRACE_1("A stat with this ID already exists",_statName);
|
||||||
} else {
|
} else {
|
||||||
_stat = +_finalArray;
|
_stat = +_finalArray;
|
||||||
_stat set [5, _statName];
|
_stat set [5, _statName];
|
||||||
@ -109,11 +109,10 @@ private _tabToChange = [];
|
|||||||
{
|
{
|
||||||
_x params ["_tab", "_tabSide"];
|
_x params ["_tab", "_tabSide"];
|
||||||
|
|
||||||
_tabToChange = if (_tabSide == "R") then {
|
_tabToChange = [
|
||||||
|
GVAR(statsListLeftPanel),
|
||||||
GVAR(statsListRightPanel)
|
GVAR(statsListRightPanel)
|
||||||
} else {
|
] select (_tabSide == "R");
|
||||||
GVAR(statsListLeftPanel)
|
|
||||||
};
|
|
||||||
|
|
||||||
_stats = _tabToChange select _tab;
|
_stats = _tabToChange select _tab;
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ private _cfgWeapons = configFile >> "CfgWeapons";
|
|||||||
private _cfgMagazines = configFile >> "CfgMagazines";
|
private _cfgMagazines = configFile >> "CfgMagazines";
|
||||||
private _cfgVehicles = configFile >> "CfgVehicles";
|
private _cfgVehicles = configFile >> "CfgVehicles";
|
||||||
private _cfgGlasses = configFile >> "CfgGlasses";
|
private _cfgGlasses = configFile >> "CfgGlasses";
|
||||||
|
private _dlcName = "";
|
||||||
|
|
||||||
// Exit with current items (no specific category)
|
// Exit with current items (no specific category)
|
||||||
if (_category == IDX_CAT_ALL) exitWith {
|
if (_category == IDX_CAT_ALL) exitWith {
|
||||||
@ -73,6 +74,12 @@ if (_category == IDX_CAT_ALL) exitWith {
|
|||||||
_listbox lnbSetData [[_index, 1], _x];
|
_listbox lnbSetData [[_index, 1], _x];
|
||||||
_listbox lnbSetPicture [[_index, 0], getText (_config >> "picture")];
|
_listbox lnbSetPicture [[_index, 0], getText (_config >> "picture")];
|
||||||
_listbox lnbSetTooltip [[_index, 0], _x];
|
_listbox lnbSetTooltip [[_index, 0], _x];
|
||||||
|
|
||||||
|
_dlcName = _config call EFUNC(common,getAddon);
|
||||||
|
|
||||||
|
if (_dlcName != "") then {
|
||||||
|
_listbox lnbSetPicture [[_index, 2], (modParams [_dlcName, ["logo"]]) param [0, ""]];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
} forEach _attributeItems;
|
} forEach _attributeItems;
|
||||||
|
|
||||||
@ -130,12 +137,20 @@ private _config = _cfgClass;
|
|||||||
_alpha = 0.5;
|
_alpha = 0.5;
|
||||||
};
|
};
|
||||||
|
|
||||||
_index = _listbox lnbAddRow ["", _displayName, _symbol];
|
_index = _listbox lnbAddRow ["", _displayName, "", _symbol];
|
||||||
_listbox lnbSetData [[_index, 1], _x];
|
_listbox lnbSetData [[_index, 1], _x];
|
||||||
_listbox lnbSetPicture [[_index, 0], getText (_config >> _x >> "picture")];
|
_listbox lnbSetPicture [[_index, 0], getText (_config >> _x >> "picture")];
|
||||||
_listbox lnbSetTooltip [[_index, 0], _x];
|
_listbox lnbSetTooltip [[_index, 0], _x];
|
||||||
_listbox lnbSetColor [[_index, 1], [1, 1, 1, _alpha]];
|
_listbox lnbSetColor [[_index, 1], [1, 1, 1, _alpha]];
|
||||||
_listbox lnbSetColor [[_index, 2], [1, 1, 1, _alpha]];
|
_listbox lnbSetColor [[_index, 3], [1, 1, 1, _alpha]];
|
||||||
|
|
||||||
|
// Mod icon is in column 2
|
||||||
|
_dlcName = (_config >> _x) call EFUNC(common,getAddon);
|
||||||
|
|
||||||
|
if (_dlcName != "") then {
|
||||||
|
_listbox lnbSetPicture [[_index, 2], (modParams [_dlcName, ["logo"]]) param [0, ""]];
|
||||||
|
_listbox lnbSetPictureColor [[_index, 2], [1, 1, 1, _alpha]];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
} forEach (keys _categoryItems);
|
} forEach (keys _categoryItems);
|
||||||
|
|
||||||
|
@ -35,9 +35,10 @@ if (_addItem && {_itemIndex == -1}) exitWith {
|
|||||||
_attributeItems pushBack _itemClassname;
|
_attributeItems pushBack _itemClassname;
|
||||||
|
|
||||||
// Change symbol and increase alpha
|
// Change symbol and increase alpha
|
||||||
_listbox lnbSetText [[_currentRow, 2], [SYMBOL_ITEM_VIRTUAL, SYMBOL_ITEM_REMOVE] select _attributeMode];
|
_listbox lnbSetText [[_currentRow, 3], [SYMBOL_ITEM_VIRTUAL, SYMBOL_ITEM_REMOVE] select _attributeMode];
|
||||||
_listbox lnbSetColor [[_currentRow, 1], [1, 1, 1, 1]];
|
_listbox lnbSetColor [[_currentRow, 1], [1, 1, 1, 1]];
|
||||||
_listbox lnbSetColor [[_currentRow, 2], [1, 1, 1, 1]];
|
_listbox lnbSetPictureColor [[_currentRow, 2], [1, 1, 1, 1]]; // mod icon is in column 2
|
||||||
|
_listbox lnbSetColor [[_currentRow, 3], [1, 1, 1, 1]];
|
||||||
};
|
};
|
||||||
|
|
||||||
// Remove item if in list
|
// Remove item if in list
|
||||||
@ -45,7 +46,8 @@ if (!_addItem && {_itemIndex != -1}) exitWith {
|
|||||||
_attributeItems deleteAt _itemIndex;
|
_attributeItems deleteAt _itemIndex;
|
||||||
|
|
||||||
// Change symbol and reduce alpha
|
// Change symbol and reduce alpha
|
||||||
_listbox lnbSetText [[_currentRow, 2], SYMBOL_ITEM_NONE];
|
_listbox lnbSetText [[_currentRow, 3], SYMBOL_ITEM_NONE];
|
||||||
_listbox lnbSetColor [[_currentRow, 1], [1, 1, 1, 0.5]];
|
_listbox lnbSetColor [[_currentRow, 1], [1, 1, 1, 0.5]];
|
||||||
_listbox lnbSetColor [[_currentRow, 2], [1, 1, 1, 0.5]];
|
_listbox lnbSetPictureColor [[_currentRow, 2], [1, 1, 1, 0.5]]; // mod icon is in column 2
|
||||||
|
_listbox lnbSetColor [[_currentRow, 3], [1, 1, 1, 0.5]];
|
||||||
};
|
};
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
params ["_display", "_control", "_nextPage"];
|
params ["_display", "_control", "_nextPage"];
|
||||||
|
|
||||||
TRACE_1("control enabled", ctrlEnabled _control);
|
TRACE_1("control enabled",ctrlEnabled _control);
|
||||||
if !(ctrlEnabled _control) exitWith {};
|
if !(ctrlEnabled _control) exitWith {};
|
||||||
|
|
||||||
GVAR(currentActionPage) = GVAR(currentActionPage) + ([-1, 1] select _nextPage);
|
GVAR(currentActionPage) = GVAR(currentActionPage) + ([-1, 1] select _nextPage);
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
params ["_display", "_control", "_nextPage"];
|
params ["_display", "_control", "_nextPage"];
|
||||||
|
|
||||||
TRACE_1("control enabled", ctrlEnabled _control);
|
TRACE_1("control enabled",ctrlEnabled _control);
|
||||||
if !(ctrlEnabled _control) exitWith {};
|
if !(ctrlEnabled _control) exitWith {};
|
||||||
|
|
||||||
GVAR(currentStatPage) = GVAR(currentStatPage) + ([-1, 1] select _nextPage);
|
GVAR(currentStatPage) = GVAR(currentStatPage) + ([-1, 1] select _nextPage);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "..\script_component.hpp"
|
#include "..\script_component.hpp"
|
||||||
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Brett Mayson
|
* Author: Brett Mayson
|
||||||
* Create the internal actions arrays when needed for the first time.
|
* Create the internal actions arrays when needed for the first time.
|
||||||
@ -37,6 +38,8 @@ private _actionList = [
|
|||||||
|
|
||||||
private _configGroupEntries = "true" configClasses (configFile >> QGVAR(actions));
|
private _configGroupEntries = "true" configClasses (configFile >> QGVAR(actions));
|
||||||
|
|
||||||
|
GVAR(updateActionsOnCargoChange) = false;
|
||||||
|
|
||||||
{
|
{
|
||||||
private _scopeEditor = getNumber (_x >> "scopeEditor");
|
private _scopeEditor = getNumber (_x >> "scopeEditor");
|
||||||
|
|
||||||
@ -48,6 +51,10 @@ private _configGroupEntries = "true" configClasses (configFile >> QGVAR(actions)
|
|||||||
private _rootDisplayName = getText (_x >> "displayName");
|
private _rootDisplayName = getText (_x >> "displayName");
|
||||||
private _rootCondition = getText (_x >> "condition");
|
private _rootCondition = getText (_x >> "condition");
|
||||||
private _rootTabs = getArray (_x >> "tabs");
|
private _rootTabs = getArray (_x >> "tabs");
|
||||||
|
private _updateOnCargoChanged = getNumber (_x >> "updateOnCargoChanged");
|
||||||
|
if (_updateOnCargoChanged > 0) then {
|
||||||
|
GVAR(updateActionsOnCargoChange) = true;
|
||||||
|
};
|
||||||
|
|
||||||
if (_rootCondition != "") then {
|
if (_rootCondition != "") then {
|
||||||
_rootCondition = compile _rootCondition;
|
_rootCondition = compile _rootCondition;
|
||||||
|
@ -101,7 +101,7 @@ private _priority = 0;
|
|||||||
(_finalArray select 4) set [1, compile (getText (_x >> "textStatement"))];
|
(_finalArray select 4) set [1, compile (getText (_x >> "textStatement"))];
|
||||||
};
|
};
|
||||||
|
|
||||||
TRACE_3("stats array", _finalArray, _leftTabsList, _rightTabsList);
|
TRACE_3("stats array",_finalArray,_leftTabsList,_rightTabsList);
|
||||||
|
|
||||||
if (_leftTabsList isNotEqualTo []) then {
|
if (_leftTabsList isNotEqualTo []) then {
|
||||||
[_statsListLeftPanel, _leftTabsList, "L"] call _fnc_addToTabs;
|
[_statsListLeftPanel, _leftTabsList, "L"] call _fnc_addToTabs;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "..\script_component.hpp"
|
#include "..\script_component.hpp"
|
||||||
#include "..\defines.hpp"
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe, johnb43
|
* Author: Alganthe, johnb43, LinkIsGrim
|
||||||
* Fills left panel.
|
* Fills left panel.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
@ -17,21 +17,28 @@
|
|||||||
|
|
||||||
params ["_display", "_control", ["_animate", true]];
|
params ["_display", "_control", ["_animate", true]];
|
||||||
|
|
||||||
|
private _ctrlIDC = ctrlIDC _control;
|
||||||
|
private _ctrlPanel = _display displayCtrl IDC_leftTabContent;
|
||||||
|
private _idxVirt = GVAR(idxMap) getOrDefault [_ctrlIDC, -1, true];
|
||||||
|
|
||||||
// Fade old control background
|
// Fade old control background
|
||||||
if (!isNil QGVAR(currentLeftPanel)) then {
|
if (!isNil QGVAR(currentLeftPanel)) then {
|
||||||
private _previousCtrlBackground = _display displayCtrl (GVAR(currentLeftPanel) - 1);
|
private _previousCtrlBackground = _display displayCtrl (GVAR(currentLeftPanel) - 1);
|
||||||
_previousCtrlBackground ctrlSetFade 1;
|
_previousCtrlBackground ctrlSetFade 1;
|
||||||
_previousCtrlBackground ctrlCommit ([0, FADE_DELAY] select _animate);
|
_previousCtrlBackground ctrlCommit ([0, FADE_DELAY] select _animate);
|
||||||
|
|
||||||
|
// When switching tabs, clear searchbox
|
||||||
|
if (GVAR(currentLeftPanel) != _ctrlIDC) then {
|
||||||
|
(_display displayCtrl IDC_leftSearchbar) ctrlSetText "";
|
||||||
|
(_display displayCtrl IDC_rightSearchbar) ctrlSetText "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Show new control background
|
// Show new control background
|
||||||
private _ctrlIDC = ctrlIDC _control;
|
|
||||||
private _ctrlBackground = _display displayCtrl (_ctrlIDC - 1);
|
private _ctrlBackground = _display displayCtrl (_ctrlIDC - 1);
|
||||||
_ctrlBackground ctrlSetFade 0;
|
_ctrlBackground ctrlSetFade 0;
|
||||||
_ctrlBackground ctrlCommit ([0, FADE_DELAY] select _animate);
|
_ctrlBackground ctrlCommit ([0, FADE_DELAY] select _animate);
|
||||||
|
|
||||||
private _ctrlPanel = _display displayCtrl IDC_leftTabContent;
|
|
||||||
|
|
||||||
// Force a "refresh" animation of the panel
|
// Force a "refresh" animation of the panel
|
||||||
if (_animate) then {
|
if (_animate) then {
|
||||||
_ctrlPanel ctrlSetFade 1;
|
_ctrlPanel ctrlSetFade 1;
|
||||||
@ -41,212 +48,82 @@ if (_animate) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_ctrlPanel lbSetCurSel -1;
|
_ctrlPanel lbSetCurSel -1;
|
||||||
|
// Purge old data
|
||||||
|
lbClear _ctrlPanel;
|
||||||
|
|
||||||
// Handle icons and filling
|
// For every left tab except faces and voices, add "Empty" entry
|
||||||
private _selectedItem = switch (true) do {
|
if !(_ctrlIDC in [IDC_buttonFace, IDC_buttonVoice]) then {
|
||||||
// Primary weapons, secondary weapons, handgun weapons
|
private _addEmpty = _ctrlPanel lbAdd format [" <%1>", localize "str_empty"];
|
||||||
case (_ctrlIDC in [IDC_buttonPrimaryWeapon, IDC_buttonHandgun, IDC_buttonSecondaryWeapon]): {
|
_ctrlPanel lbSetValue [_addEmpty, -1];
|
||||||
// Purge old data
|
|
||||||
lbClear _ctrlPanel;
|
|
||||||
|
|
||||||
// Add "Empty" entry
|
|
||||||
private _addEmpty = _ctrlPanel lbAdd format [" <%1>", localize "str_empty"];
|
|
||||||
_ctrlPanel lbSetValue [_addEmpty, -1];
|
|
||||||
|
|
||||||
// Add selected tab's weapons
|
|
||||||
private _index = [IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find _ctrlIDC;
|
|
||||||
|
|
||||||
{
|
|
||||||
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
|
|
||||||
} forEach (keys ((GVAR(virtualItems) get IDX_VIRT_WEAPONS) get _index));
|
|
||||||
|
|
||||||
GVAR(currentItems) select _index
|
|
||||||
};
|
|
||||||
// Uniforms, vests, backpacks
|
|
||||||
case (_ctrlIDC in [IDC_buttonUniform, IDC_buttonVest, IDC_buttonBackpack]): {
|
|
||||||
// Purge old data
|
|
||||||
lbClear _ctrlPanel;
|
|
||||||
|
|
||||||
// Add "Empty" entry
|
|
||||||
private _addEmpty = _ctrlPanel lbAdd format [" <%1>", localize "str_empty"];
|
|
||||||
_ctrlPanel lbSetValue [_addEmpty, -1];
|
|
||||||
|
|
||||||
switch (_ctrlIDC) do {
|
|
||||||
// Add uniforms
|
|
||||||
case IDC_buttonUniform: {
|
|
||||||
{
|
|
||||||
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
|
|
||||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_UNIFORM));
|
|
||||||
|
|
||||||
GVAR(currentItems) select IDX_CURR_UNIFORM
|
|
||||||
};
|
|
||||||
// Add vests
|
|
||||||
case IDC_buttonVest: {
|
|
||||||
{
|
|
||||||
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
|
|
||||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_VEST));
|
|
||||||
|
|
||||||
GVAR(currentItems) select IDX_CURR_VEST
|
|
||||||
};
|
|
||||||
// Add backpacks
|
|
||||||
case IDC_buttonBackpack: {
|
|
||||||
{
|
|
||||||
["CfgVehicles", _x, _ctrlPanel] call FUNC(addListBoxItem);
|
|
||||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_BACKPACK));
|
|
||||||
|
|
||||||
GVAR(currentItems) select IDX_CURR_BACKPACK
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
// Other
|
|
||||||
default {
|
|
||||||
// Don't reset right panel selection if left tab is binos
|
|
||||||
if (_ctrlIDC != IDC_buttonBinoculars) then {
|
|
||||||
GVAR(currentRightPanel) = nil;
|
|
||||||
};
|
|
||||||
|
|
||||||
lbClear _ctrlPanel;
|
|
||||||
|
|
||||||
// For every left tab except faces and voices, add "Empty" entry
|
|
||||||
if !(_ctrlIDC in [IDC_buttonFace, IDC_buttonVoice]) then {
|
|
||||||
private _addEmpty = _ctrlPanel lbAdd format [" <%1>", localize "str_empty"];
|
|
||||||
_ctrlPanel lbSetValue [_addEmpty, -1];
|
|
||||||
};
|
|
||||||
|
|
||||||
switch (_ctrlIDC) do {
|
|
||||||
// Headgear
|
|
||||||
case IDC_buttonHeadgear: {
|
|
||||||
{
|
|
||||||
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
|
|
||||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_HEADGEAR));
|
|
||||||
|
|
||||||
GVAR(currentItems) select IDX_CURR_HEADGEAR
|
|
||||||
};
|
|
||||||
// Facewear
|
|
||||||
case IDC_buttonGoggles: {
|
|
||||||
{
|
|
||||||
["CfgGlasses", _x, _ctrlPanel] call FUNC(addListBoxItem);
|
|
||||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_GOGGLES));
|
|
||||||
|
|
||||||
GVAR(currentItems) select IDX_CURR_GOGGLES
|
|
||||||
};
|
|
||||||
// NVGs
|
|
||||||
case IDC_buttonNVG: {
|
|
||||||
{
|
|
||||||
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
|
|
||||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_NVG));
|
|
||||||
|
|
||||||
GVAR(currentItems) select IDX_CURR_NVG
|
|
||||||
};
|
|
||||||
// Binoculars
|
|
||||||
case IDC_buttonBinoculars: {
|
|
||||||
{
|
|
||||||
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
|
|
||||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_BINO));
|
|
||||||
|
|
||||||
GVAR(currentItems) select IDX_CURR_BINO
|
|
||||||
};
|
|
||||||
// Maps
|
|
||||||
case IDC_buttonMap: {
|
|
||||||
{
|
|
||||||
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
|
|
||||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_MAP));
|
|
||||||
|
|
||||||
GVAR(currentItems) select IDX_CURR_MAP
|
|
||||||
};
|
|
||||||
// Compasses
|
|
||||||
case IDC_buttonCompass: {
|
|
||||||
{
|
|
||||||
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
|
|
||||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_COMPASS));
|
|
||||||
|
|
||||||
GVAR(currentItems) select IDX_CURR_COMPASS
|
|
||||||
};
|
|
||||||
// Radios
|
|
||||||
case IDC_buttonRadio: {
|
|
||||||
{
|
|
||||||
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
|
|
||||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_RADIO));
|
|
||||||
|
|
||||||
GVAR(currentItems) select IDX_CURR_RADIO
|
|
||||||
};
|
|
||||||
// Watches
|
|
||||||
case IDC_buttonWatch: {
|
|
||||||
{
|
|
||||||
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
|
|
||||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_WATCH));
|
|
||||||
|
|
||||||
GVAR(currentItems) select IDX_CURR_WATCH
|
|
||||||
};
|
|
||||||
// GPS and UAV Terminals
|
|
||||||
case IDC_buttonGPS: {
|
|
||||||
{
|
|
||||||
["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem);
|
|
||||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_COMMS));
|
|
||||||
|
|
||||||
GVAR(currentItems) select IDX_CURR_COMMS
|
|
||||||
};
|
|
||||||
// Faces
|
|
||||||
case IDC_buttonFace: {
|
|
||||||
private _lbAdd = -1;
|
|
||||||
|
|
||||||
{
|
|
||||||
_y params ["_displayName", "_modPicture"];
|
|
||||||
|
|
||||||
_lbAdd = _ctrlPanel lbAdd _displayName;
|
|
||||||
_ctrlPanel lbSetData [_lbAdd, _x];
|
|
||||||
_ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _x]];
|
|
||||||
_ctrlPanel lbSetPictureRight [_lbAdd, _modPicture];
|
|
||||||
} forEach (uiNamespace getVariable QGVAR(faceCache));
|
|
||||||
|
|
||||||
GVAR(currentFace)
|
|
||||||
};
|
|
||||||
// Voices
|
|
||||||
case IDC_buttonVoice: {
|
|
||||||
{
|
|
||||||
["CfgVoice", _x, _ctrlPanel, "icon"] call FUNC(addListBoxItem);
|
|
||||||
} forEach (uiNamespace getVariable QGVAR(voiceCache));
|
|
||||||
|
|
||||||
GVAR(currentVoice)
|
|
||||||
};
|
|
||||||
// Insignia
|
|
||||||
case IDC_buttonInsignia: {
|
|
||||||
// Insignia from config
|
|
||||||
{
|
|
||||||
["CfgUnitInsignia", _x, _ctrlPanel, "texture"] call FUNC(addListBoxItem);
|
|
||||||
} forEach (uiNamespace getVariable QGVAR(insigniaCache));
|
|
||||||
|
|
||||||
private _displayName = "";
|
|
||||||
private _className = "";
|
|
||||||
private _lbAdd = -1;
|
|
||||||
|
|
||||||
// Insignia from mission file
|
|
||||||
{
|
|
||||||
_className = configName _x;
|
|
||||||
_displayName = getText (_x >> "displayName");
|
|
||||||
_lbAdd = _ctrlPanel lbAdd _displayName;
|
|
||||||
|
|
||||||
_ctrlPanel lbSetData [_lbAdd, _className];
|
|
||||||
_ctrlPanel lbSetPicture [_lbAdd, getText (_x >> "texture")];
|
|
||||||
_ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _className]];
|
|
||||||
} forEach ("(if (isNumber (_x >> 'scope')) then {getNumber (_x >> 'scope')} else {2}) == 2" configClasses (missionConfigFile >> "CfgUnitInsignia"));
|
|
||||||
|
|
||||||
GVAR(currentInsignia)
|
|
||||||
};
|
|
||||||
// Unknown
|
|
||||||
default {""};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// When switching tabs, clear searchbox
|
// Don't reset the current right panel for weapons, binos and containers
|
||||||
if (GVAR(currentLeftPanel) != _ctrlIDC) then {
|
if !(_idxVirt in [IDX_VIRT_PRIMARY_WEAPONS, IDX_VIRT_SECONDARY_WEAPONS, IDX_VIRT_HANDGUN_WEAPONS, IDX_VIRT_BINO, IDX_VIRT_UNIFORM, IDX_VIRT_VEST, IDX_VIRT_BACKPACK]) then {
|
||||||
(_display displayCtrl IDC_leftSearchbar) ctrlSetText "";
|
GVAR(currentRightPanel) = nil;
|
||||||
(_display displayCtrl IDC_rightSearchbar) ctrlSetText "";
|
};
|
||||||
|
GVAR(currentLeftPanel) = _ctrlIDC;
|
||||||
|
|
||||||
|
// Add items to the listbox
|
||||||
|
private _selectedItem = if (_idxVirt != -1) then { // Items
|
||||||
|
private _configParent = switch (_idxVirt) do {
|
||||||
|
case IDX_VIRT_GOGGLES: {"CfgGlasses"};
|
||||||
|
case IDX_VIRT_BACKPACK: {"CfgVehicles"};
|
||||||
|
default {"CfgWeapons"};
|
||||||
|
};
|
||||||
|
|
||||||
|
private _items = if (_idxVirt < IDX_VIRT_HEADGEAR) then {
|
||||||
|
keys ((GVAR(virtualItems) get IDX_VIRT_WEAPONS) get _idxVirt)
|
||||||
|
} else {
|
||||||
|
keys (GVAR(virtualItems) get _idxVirt)
|
||||||
|
};
|
||||||
|
|
||||||
|
{
|
||||||
|
[_configParent, _x, _ctrlPanel] call FUNC(addListBoxItem);
|
||||||
|
} forEach _items;
|
||||||
|
|
||||||
|
GVAR(currentItems) select _idxVirt
|
||||||
|
} else { // Special cases
|
||||||
|
switch (_ctrlIDC) do {
|
||||||
|
// Faces
|
||||||
|
case IDC_buttonFace: {
|
||||||
|
private _lbAdd = -1; // micro-optimization
|
||||||
|
// Faces need to be added like this because their config path is
|
||||||
|
// configFile >> "CfgFaces" >> face category >> className
|
||||||
|
{
|
||||||
|
_y params ["_displayName", "_modPicture"];
|
||||||
|
_lbAdd = _ctrlPanel lbAdd _displayName;
|
||||||
|
_ctrlPanel lbSetData [_lbAdd, _x];
|
||||||
|
_ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _x]];
|
||||||
|
_ctrlPanel lbSetPictureRight [_lbAdd, ["", _modPicture] select GVAR(enableModIcons)];
|
||||||
|
} forEach GVAR(faceCache); // HashMap, not array
|
||||||
|
|
||||||
|
GVAR(currentFace)
|
||||||
|
};
|
||||||
|
// Voices
|
||||||
|
case IDC_buttonVoice: {
|
||||||
|
{
|
||||||
|
["CfgVoice", _x, _ctrlPanel, "icon"] call FUNC(addListBoxItem);
|
||||||
|
} forEach (keys GVAR(voiceCache));
|
||||||
|
|
||||||
|
GVAR(currentVoice)
|
||||||
|
};
|
||||||
|
// Insignia
|
||||||
|
case IDC_buttonInsignia: {
|
||||||
|
{
|
||||||
|
["CfgUnitInsignia", _x, _ctrlPanel, "texture", _y] call FUNC(addListBoxItem);
|
||||||
|
} forEach GVAR(insigniaCache);
|
||||||
|
|
||||||
|
GVAR(currentInsignia)
|
||||||
|
};
|
||||||
|
// Unknown
|
||||||
|
default {
|
||||||
|
WARNING_1("Unknown arsenal left panel with IDC %1, update ace_arsenal_idxMap and relevant macros if adding a new tab",_ctrlIDC);
|
||||||
|
""
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Trigger event
|
// Trigger event
|
||||||
GVAR(currentLeftPanel) = _ctrlIDC;
|
|
||||||
[QGVAR(leftPanelFilled), [_display, _ctrlIDC, GVAR(currentRightPanel)]] call CBA_fnc_localEvent;
|
[QGVAR(leftPanelFilled), [_display, _ctrlIDC, GVAR(currentRightPanel)]] call CBA_fnc_localEvent;
|
||||||
|
|
||||||
// Sort
|
// Sort
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
#include "..\script_component.hpp"
|
#include "..\script_component.hpp"
|
||||||
#include "..\defines.hpp"
|
#include "..\defines.hpp"
|
||||||
/*
|
/*
|
||||||
* Author: Alganthe, johnb43
|
* Author: Alganthe, johnb43, LinkIsGrim
|
||||||
* Fill loadouts list.
|
* Fill loadouts list over multiple frames. LOADOUTS_PER_FRAME macro does what it says on the tin.
|
||||||
|
* Should only ever be called by display load (with optional params as default) and by itself.
|
||||||
|
* Listen to ace_arsenal_loadoutsListFilled event if you need to iterate over the loadouts list.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Loadouts display <DISPLAY>
|
* 0: Loadouts display <DISPLAY>
|
||||||
* 1: Tab control <CONTROL>
|
* 1: Tab control <CONTROL>
|
||||||
|
* 2: Current frame filling loadouts list <NUMBER> (default: 0)
|
||||||
|
* 3: Frames necessary to fill loadouts list <NUMBER> (default: -1)
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* None
|
* None
|
||||||
@ -14,29 +18,46 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_display", "_control"];
|
// Can just be modified directly, no further setup needed
|
||||||
|
#define LOADOUTS_PER_FRAME 10
|
||||||
|
|
||||||
(_display displayCtrl IDC_textEditBox) ctrlSetText "";
|
params ["_display", "_control", ["_currentFrame", 0], ["_framesToFill", -1]];
|
||||||
|
|
||||||
|
if (isNull _display) exitWith {
|
||||||
|
TRACE_2("display closed, aborting",_currentFrame,_framesToFill);
|
||||||
|
};
|
||||||
|
|
||||||
private _contentPanelCtrl = _display displayCtrl IDC_contentPanel;
|
private _contentPanelCtrl = _display displayCtrl IDC_contentPanel;
|
||||||
|
if (_currentFrame == 0) then {
|
||||||
|
(_display displayCtrl IDC_textEditBox) ctrlSetText "";
|
||||||
|
|
||||||
// Force a "refresh" animation of the panel
|
// Force a "refresh" animation of the panel
|
||||||
_contentPanelCtrl ctrlSetFade 1;
|
_contentPanelCtrl ctrlSetFade 1;
|
||||||
_contentPanelCtrl ctrlCommit 0;
|
_contentPanelCtrl ctrlCommit 0;
|
||||||
_contentPanelCtrl ctrlSetFade 0;
|
_contentPanelCtrl ctrlSetFade 0;
|
||||||
_contentPanelCtrl ctrlCommit FADE_DELAY;
|
_contentPanelCtrl ctrlCommit FADE_DELAY;
|
||||||
|
|
||||||
_contentPanelCtrl lnbSetCurSelRow -1;
|
_contentPanelCtrl lnbSetCurSelRow -1;
|
||||||
lnbClear _contentPanelCtrl;
|
lnbClear _contentPanelCtrl;
|
||||||
|
};
|
||||||
|
|
||||||
private _sharedLoadoutsVars = GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars);
|
private _sharedLoadoutsVars = GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars);
|
||||||
private _cfgWeapons = configFile >> "CfgWeapons";
|
private _cfgWeapons = configFile >> "CfgWeapons"; // Used by ADD_LOADOUTS_LIST_PICTURES macro, do not remove
|
||||||
private _newRow = -1;
|
private _newRow = -1;
|
||||||
|
|
||||||
if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
|
if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
|
||||||
private _loadoutNameAndTab = "";
|
private _loadoutNameAndTab = "";
|
||||||
private _loadoutCachedInfo = "";
|
private _loadoutCachedInfo = "";
|
||||||
private _sharingEnabled = GVAR(allowSharedLoadouts) && {isMultiplayer};
|
private _sharingEnabled = GVAR(allowSharedLoadouts) && {isMultiplayer};
|
||||||
|
private _loadouts = [
|
||||||
|
profileNamespace getVariable [QGVAR(saved_loadouts), []],
|
||||||
|
GVAR(defaultLoadoutsList)
|
||||||
|
] select (ctrlIDC _control == IDC_buttonDefaultLoadouts);
|
||||||
|
if (_currentFrame == 0) then {
|
||||||
|
_framesToFill = floor ((count _loadouts) / LOADOUTS_PER_FRAME);
|
||||||
|
TRACE_2("filling loadouts list",_currentFrame,_framesToFill);
|
||||||
|
_this set [3, _framesToFill];
|
||||||
|
};
|
||||||
|
|
||||||
// Add all loadouts to loadout list
|
// Add all loadouts to loadout list
|
||||||
{
|
{
|
||||||
@ -50,15 +71,16 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
|
|||||||
_loadoutCachedInfo = [_loadoutData] call FUNC(verifyLoadout);
|
_loadoutCachedInfo = [_loadoutData] call FUNC(verifyLoadout);
|
||||||
_contentPanelCtrl setVariable [_loadoutNameAndTab, _loadoutCachedInfo];
|
_contentPanelCtrl setVariable [_loadoutNameAndTab, _loadoutCachedInfo];
|
||||||
|
|
||||||
_loadoutCachedInfo params ["", "_nullItemsAmount", "_unavailableItemsAmount", "_nullItemsList", "_unavailableItemsList"];
|
_loadoutCachedInfo params ["", "_nullItemsList", "_unavailableItemsList", "_missingExtendedInfo"];
|
||||||
|
|
||||||
// Log missing / nil items to RPT (only once per arsenal session)
|
// Log missing / nil items to RPT (only once per arsenal session)
|
||||||
if (GVAR(EnableRPTLog) && {(_nullItemsAmount > 0) || {_unavailableItemsAmount > 0}}) then {
|
if (GVAR(EnableRPTLog) && {(_nullItemsList isNotEqualTo []) || {_unavailableItemsList isNotEqualTo [] || {_missingExtendedInfo isNotEqualTo []}}}) then {
|
||||||
private _printComponent = "ACE_Arsenal - Loadout:";
|
private _printComponent = "ACE_Arsenal - Loadout:";
|
||||||
private _printNullItemsList = ["Missing items:", str _nullItemsList] joinString " ";
|
private _printNullItemsList = ["Missing items:", str _nullItemsList] joinString " ";
|
||||||
private _printUnavailableItemsList = ["Unavailable items:", str _unavailableItemsList] joinString " ";
|
private _printUnavailableItemsList = ["Unavailable items:", str _unavailableItemsList] joinString " ";
|
||||||
|
private _printMissingExtendedInfo = ["Missing extended loadout:", str _missingExtendedInfo] joinString " ";
|
||||||
|
|
||||||
diag_log text (format ["%1%5 %2%5 %3%5 %4", _printComponent, "Name: " + _loadoutName, _printNullItemsList, _printUnavailableItemsList, endl]);
|
diag_log text (format ["%1%6 %2%6 %3%6 %4%6 %5", _printComponent, "Name: " + _loadoutName, _printNullItemsList, _printUnavailableItemsList, _printMissingExtendedInfo, endl]);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -69,18 +91,18 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
|
|||||||
_contentPanelCtrl lnbSetColumnsPos [0, 0.05, 0.40, 0.50, 0.60, 0.70, 0.75, 0.80, 0.85, 0.90];
|
_contentPanelCtrl lnbSetColumnsPos [0, 0.05, 0.40, 0.50, 0.60, 0.70, 0.75, 0.80, 0.85, 0.90];
|
||||||
};
|
};
|
||||||
|
|
||||||
_loadoutCachedInfo params ["_extendedLoadout", "_nullItemsAmount", "_unavailableItemsAmount"];
|
_loadoutCachedInfo params ["_extendedLoadout", "_nullItemsList", "_unavailableItemsList"];
|
||||||
_extendedLoadout params ["_loadout"];
|
_extendedLoadout params ["_loadout"]; // Used by ADD_LOADOUTS_LIST_PICTURES macro, do not remove
|
||||||
|
|
||||||
_newRow = _contentPanelCtrl lnbAddRow ["", _loadoutName];
|
_newRow = _contentPanelCtrl lnbAddRow ["", _loadoutName];
|
||||||
|
|
||||||
ADD_LOADOUTS_LIST_PICTURES
|
ADD_LOADOUTS_LIST_PICTURES
|
||||||
|
|
||||||
// Change color on loadout lines that have items that aren't available or don't exist
|
// Change color on loadout lines that have items that aren't available or don't exist
|
||||||
if (_nullItemsAmount > 0) then {
|
if (_nullItemsList isNotEqualTo []) then {
|
||||||
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]]; // Red
|
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]]; // Red
|
||||||
} else {
|
} else {
|
||||||
if (_unavailableItemsAmount > 0) then {
|
if (_unavailableItemsList isNotEqualTo []) then {
|
||||||
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; // Gray
|
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; // Gray
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -90,10 +112,16 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
|
|||||||
_contentPanelCtrl lnbSetPicture [[_newRow, 0], QPATHTOF(data\iconPublic.paa)];
|
_contentPanelCtrl lnbSetPicture [[_newRow, 0], QPATHTOF(data\iconPublic.paa)];
|
||||||
_contentPanelCtrl lnbSetValue [[_newRow, 0], 1];
|
_contentPanelCtrl lnbSetValue [[_newRow, 0], 1];
|
||||||
};
|
};
|
||||||
} forEach ([profileNamespace getVariable [QGVAR(saved_loadouts), []], GVAR(defaultLoadoutsList)] select (ctrlIDC _control == IDC_buttonDefaultLoadouts));
|
} forEach (_loadouts select [_currentFrame * LOADOUTS_PER_FRAME, [LOADOUTS_PER_FRAME, count _loadouts] select is3DEN]);
|
||||||
} else {
|
} else {
|
||||||
private _allPlayerNames = allPlayers apply {name _x};
|
private _allPlayerNames = allPlayers apply {name _x};
|
||||||
|
private _loadouts = _sharedLoadoutsVars apply {GVAR(sharedLoadoutsNamespace) getVariable _x};
|
||||||
private _loadoutVar = "";
|
private _loadoutVar = "";
|
||||||
|
if (_currentFrame == 0) then {
|
||||||
|
_framesToFill = floor ((count _loadouts) / LOADOUTS_PER_FRAME);
|
||||||
|
TRACE_2("filling loadouts list",_currentFrame,_framesToFill);
|
||||||
|
_this set [3, _framesToFill];
|
||||||
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
_x params ["_playerName", "_loadoutName", "_loadoutData"];
|
_x params ["_playerName", "_loadoutName", "_loadoutData"];
|
||||||
@ -107,8 +135,8 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
|
|||||||
|
|
||||||
[QGVAR(loadoutUnshared), [_contentPanelCtrl, profileName, _loadoutName]] call CBA_fnc_remoteEvent;
|
[QGVAR(loadoutUnshared), [_contentPanelCtrl, profileName, _loadoutName]] call CBA_fnc_remoteEvent;
|
||||||
} else {
|
} else {
|
||||||
([_loadoutData] call FUNC(verifyLoadout)) params ["_extendedLoadout", "_nullItemsAmount", "_unavailableItemsAmount"];
|
([_loadoutData] call FUNC(verifyLoadout)) params ["_extendedLoadout", "_nullItemsList", "_unavailableItemsList"];
|
||||||
_extendedLoadout params ["_loadout"];
|
_extendedLoadout params ["_loadout"]; // Used by ADD_LOADOUTS_LIST_PICTURES macro, do not remove
|
||||||
|
|
||||||
_contentPanelCtrl lnbSetColumnsPos [0, 0.15, 0.40, 0.50, 0.60, 0.70, 0.75, 0.80, 0.85, 0.90];
|
_contentPanelCtrl lnbSetColumnsPos [0, 0.15, 0.40, 0.50, 0.60, 0.70, 0.75, 0.80, 0.85, 0.90];
|
||||||
_newRow = _contentPanelCtrl lnbAddRow [_playerName, _loadoutName];
|
_newRow = _contentPanelCtrl lnbAddRow [_playerName, _loadoutName];
|
||||||
@ -118,17 +146,23 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then {
|
|||||||
_contentPanelCtrl lnbSetData [[_newRow, 1], _loadoutVar];
|
_contentPanelCtrl lnbSetData [[_newRow, 1], _loadoutVar];
|
||||||
|
|
||||||
// Change color on loadout lines that have items that aren't available or don't exist
|
// Change color on loadout lines that have items that aren't available or don't exist
|
||||||
if (_nullItemsAmount > 0) then {
|
if (_nullItemsList isNotEqualTo []) then {
|
||||||
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]]; // Red
|
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]]; // Red
|
||||||
} else {
|
} else {
|
||||||
if (_unavailableItemsAmount > 0) then {
|
if (_unavailableItemsList isNotEqualTo []) then {
|
||||||
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; // Gray
|
_contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; // Gray
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} forEach (_sharedLoadoutsVars apply {GVAR(sharedLoadoutsNamespace) getVariable _x});
|
} forEach (_loadouts select [_currentFrame * LOADOUTS_PER_FRAME, [LOADOUTS_PER_FRAME, count _loadouts] select is3DEN]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!is3DEN && _currentFrame != _framesToFill) exitWith {
|
||||||
|
_this set [2, _currentFrame + 1];
|
||||||
|
[FUNC(fillLoadoutsList), _this] call CBA_fnc_execNextFrame;
|
||||||
|
};
|
||||||
|
TRACE_3("finished",_currentFrame,_framesToFill,lnbSize _contentPanelCtrl);
|
||||||
|
|
||||||
[QGVAR(loadoutsListFilled), [_display, _control]] call CBA_fnc_localEvent;
|
[QGVAR(loadoutsListFilled), [_display, _control]] call CBA_fnc_localEvent;
|
||||||
|
|
||||||
// Sort loadouts alphabetically
|
// Sort loadouts alphabetically
|
||||||
|
@ -87,7 +87,7 @@ private _fnc_fillRightContainer = {
|
|||||||
_ctrlPanel lnbSetText [[_lbAdd, 1], _displayName];
|
_ctrlPanel lnbSetText [[_lbAdd, 1], _displayName];
|
||||||
_ctrlPanel lnbSetData [[_lbAdd, 0], _className];
|
_ctrlPanel lnbSetData [[_lbAdd, 0], _className];
|
||||||
_ctrlPanel lnbSetPicture [[_lbAdd, 0], _picture];
|
_ctrlPanel lnbSetPicture [[_lbAdd, 0], _picture];
|
||||||
_ctrlPanel lnbSetValue [[_lbAdd, 2], [0, 1] select _isUnique];
|
_ctrlPanel lnbSetValue [[_lbAdd, 2], parseNumber _isUnique];
|
||||||
_ctrlPanel lnbSetTooltip [[_lbAdd, 0], format ["%1\n%2", _displayName, _className]];
|
_ctrlPanel lnbSetTooltip [[_lbAdd, 0], format ["%1\n%2", _displayName, _className]];
|
||||||
if ((toLower _className) in GVAR(favorites)) then {
|
if ((toLower _className) in GVAR(favorites)) then {
|
||||||
_ctrlPanel lnbSetColor [[_lbAdd, 1], FAVORITES_COLOR];
|
_ctrlPanel lnbSetColor [[_lbAdd, 1], FAVORITES_COLOR];
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_display", "_control", "_curSel", "_itemCfg"];
|
params ["_display", "_control", "_curSel", "_itemCfg"];
|
||||||
|
|
||||||
GVAR(actionsInfo) = [_control, _curSel, _itemCfg];
|
GVAR(actionsInfo) = [_control, _curSel, _itemCfg];
|
||||||
@ -46,13 +45,12 @@ private _groups = (GVAR(actionList) select _panel) select {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private _show = _groups isNotEqualTo [];
|
private _show = _groups isNotEqualTo [];
|
||||||
private _ctrl = _display displayCtrl IDC_actionsBox;
|
private _actionsBoxCtrl = _display displayCtrl IDC_actionsBox;
|
||||||
_ctrl ctrlShow _show;
|
_actionsBoxCtrl ctrlShow _show;
|
||||||
_ctrl ctrlCommit 0.15;
|
_actionsBoxCtrl ctrlCommit FADE_DELAY;
|
||||||
|
|
||||||
if (!_show) exitWith {};
|
if (!_show) exitWith {};
|
||||||
|
|
||||||
private _actionsBoxCtrl = _display displayCtrl IDC_actionsBox;
|
|
||||||
private _actionsCurrentPageCtrl = _display displayCtrl IDC_actionsCurrentPage;
|
private _actionsCurrentPageCtrl = _display displayCtrl IDC_actionsCurrentPage;
|
||||||
|
|
||||||
private _currentPage = GVAR(currentActionPage);
|
private _currentPage = GVAR(currentActionPage);
|
||||||
@ -79,33 +77,29 @@ private _items = _group select 3 select {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_actionsCurrentPageCtrl ctrlSetText (_group select 1);
|
_actionsCurrentPageCtrl ctrlSetText (_group select 1);
|
||||||
_actionsCurrentPageCtrl ctrlSetFade 0;
|
|
||||||
_actionsCurrentPageCtrl ctrlShow true;
|
_actionsCurrentPageCtrl ctrlShow true;
|
||||||
_actionsCurrentPageCtrl ctrlCommit 0;
|
_actionsCurrentPageCtrl ctrlCommit 0;
|
||||||
|
|
||||||
|
private _activeCtrls = [];
|
||||||
{
|
{
|
||||||
_x params ["", "_type", "_label", "_statement"];
|
_x params ["", "_type", "_label", "_statement"];
|
||||||
|
|
||||||
private _idc = 9001 + _forEachIndex * 2;
|
private _idc = IDC_actionsText1 + _type + _forEachIndex * 2;
|
||||||
private _actionTextCtrl = _display displayCtrl _idc;
|
private _actionCtrl = _display displayCtrl _idc;
|
||||||
private _actionButtonCtrl = _display displayCtrl (_idc + 1);
|
|
||||||
|
|
||||||
switch (_type) do {
|
switch (_type) do {
|
||||||
case ACTION_TYPE_BUTTON: {
|
case ACTION_TYPE_BUTTON: {
|
||||||
_actionButtonCtrl ctrlRemoveAllEventHandlers "ButtonClick";
|
_actionCtrl ctrlRemoveAllEventHandlers "ButtonClick";
|
||||||
_actionButtonCtrl ctrlAddEventHandler ["ButtonClick", {
|
_actionCtrl ctrlAddEventHandler ["ButtonClick", {
|
||||||
if (is3DEN) exitWith {[true] call FUNC(refresh)};
|
if (is3DEN) exitWith {[true] call FUNC(refresh)};
|
||||||
[{
|
[{
|
||||||
[true] call FUNC(refresh);
|
[true] call FUNC(refresh);
|
||||||
}] call CBA_fnc_execNextFrame;
|
}] call CBA_fnc_execNextFrame;
|
||||||
}];
|
}];
|
||||||
_actionButtonCtrl ctrlAddEventHandler ["ButtonClick", _statement];
|
|
||||||
_actionButtonCtrl ctrlSetText _label;
|
_actionCtrl ctrlAddEventHandler ["ButtonClick", _statement];
|
||||||
_actionButtonCtrl ctrlSetFade 0;
|
_actionCtrl ctrlSetText _label;
|
||||||
_actionButtonCtrl ctrlEnable true;
|
_actionCtrl ctrlEnable true;
|
||||||
_actionButtonCtrl ctrlCommit 0;
|
|
||||||
_actionTextCtrl ctrlSetFade 1;
|
|
||||||
_actionTextCtrl ctrlCommit 0;
|
|
||||||
};
|
};
|
||||||
case ACTION_TYPE_TEXT: {
|
case ACTION_TYPE_TEXT: {
|
||||||
private _text = call _statement;
|
private _text = call _statement;
|
||||||
@ -113,38 +107,43 @@ _actionsCurrentPageCtrl ctrlCommit 0;
|
|||||||
if (isNil "_text") then {
|
if (isNil "_text") then {
|
||||||
_text = "";
|
_text = "";
|
||||||
};
|
};
|
||||||
|
if (_text isEqualType []) then {
|
||||||
|
_text = _text joinString endl;
|
||||||
|
};
|
||||||
|
|
||||||
_actionTextCtrl ctrlSetText _text;
|
_actionCtrl ctrlSetText _text;
|
||||||
_actionTextCtrl ctrlSetFade 0;
|
_actionCtrl ctrlSetPositionH (ctrlTextHeight _actionCtrl);
|
||||||
_actionTextCtrl ctrlCommit 0;
|
_actionCtrl ctrlEnable false;
|
||||||
_actionButtonCtrl ctrlSetFade 1;
|
|
||||||
_actionButtonCtrl ctrlEnable false;
|
|
||||||
_actionButtonCtrl ctrlCommit 0;
|
|
||||||
};
|
|
||||||
default {
|
|
||||||
_actionTextCtrl ctrlSetFade 1;
|
|
||||||
_actionTextCtrl ctrlCommit 0;
|
|
||||||
_actionButtonCtrl ctrlSetFade 1;
|
|
||||||
_actionButtonCtrl ctrlEnable false;
|
|
||||||
_actionButtonCtrl ctrlCommit 0;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (_activeCtrls isNotEqualTo []) then {
|
||||||
|
(ctrlPosition (_activeCtrls select -1)) params ["", "_lastPosY", "", "_lastPosH"];
|
||||||
|
_actionCtrl ctrlSetPositionY (_lastPosY + _lastPosH + GRID_H);
|
||||||
|
} else {
|
||||||
|
_actionCtrl ctrlSetPositionY ((5 + _type) * GRID_H);
|
||||||
|
};
|
||||||
|
|
||||||
|
_actionCtrl ctrlShow true;
|
||||||
|
_actionCtrl ctrlCommit 0;
|
||||||
|
_activeCtrls pushBack _actionCtrl;
|
||||||
} forEach _items;
|
} forEach _items;
|
||||||
|
|
||||||
private _actionCount = count _items;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
private _idc = 9001 + _x * 2;
|
private _idc = ctrlIDC _x;
|
||||||
private _actionTextCtrl = _display displayCtrl _idc;
|
if (_idc < IDC_actionsText1 || _idc > IDC_actionsButton5) then {continue};
|
||||||
private _actionButtonCtrl = _display displayCtrl (_idc + 1);
|
|
||||||
|
|
||||||
_actionTextCtrl ctrlSetFade 1;
|
_x ctrlShow false;
|
||||||
_actionTextCtrl ctrlCommit 0;
|
_x ctrlEnable false;
|
||||||
_actionButtonCtrl ctrlSetFade 1;
|
_x ctrlSetPositionY 0;
|
||||||
_actionButtonCtrl ctrlCommit 0;
|
_x ctrlCommit 0;
|
||||||
} forEach ([0, 1, 2, 3, 4] select [_actionCount, 5]);
|
} forEach ((allControls _actionsBoxCtrl) select {!(_x in _activeCtrls)});
|
||||||
|
|
||||||
private _pos = ctrlPosition _actionsBoxCtrl;
|
(ctrlPosition (_activeCtrls select -1)) params ["", "_lastPosY", "", "_lastPosH"];
|
||||||
_pos set [3, ([11, (5 * _actionCount) + 6] select (_actionCount > 0)) * GRID_H];
|
private _actionsBoxHeight = _lastPosY + _lastPosH + GRID_H;
|
||||||
_actionsBoxCtrl ctrlSetPosition _pos;
|
_actionsBoxCtrl ctrlSetPositionH _actionsBoxHeight;
|
||||||
_actionsBoxCtrl ctrlCommit 0;
|
_actionsBoxCtrl ctrlCommit 0;
|
||||||
|
|
||||||
|
private _background = _display displayCtrl IDC_actionsBackground1;
|
||||||
|
_background ctrlSetPositionH _actionsBoxHeight;
|
||||||
|
_background ctrlCommit 0;
|
||||||
|
@ -68,7 +68,7 @@ if (isNil QGVAR(virtualItems)) then {
|
|||||||
GVAR(virtualItemsFlatAll) = +GVAR(virtualItemsFlat);
|
GVAR(virtualItemsFlatAll) = +GVAR(virtualItemsFlat);
|
||||||
|
|
||||||
GVAR(currentFace) = face GVAR(center);
|
GVAR(currentFace) = face GVAR(center);
|
||||||
GVAR(currentVoice) = speaker GVAR(center);
|
GVAR(currentVoice) = (speaker GVAR(center)) call EFUNC(common,getConfigName);
|
||||||
GVAR(currentInsignia) = GVAR(center) call BIS_fnc_getUnitInsignia;
|
GVAR(currentInsignia) = GVAR(center) call BIS_fnc_getUnitInsignia;
|
||||||
|
|
||||||
GVAR(currentAction) = "Stand";
|
GVAR(currentAction) = "Stand";
|
||||||
|
@ -147,7 +147,7 @@ if (!isNull _loadoutsDisplay) then {
|
|||||||
// Right panel lnb + and - buttons
|
// Right panel lnb + and - buttons
|
||||||
case (_keyPressed in [DIK_LEFT, DIK_RIGHT]): {
|
case (_keyPressed in [DIK_LEFT, DIK_RIGHT]): {
|
||||||
if (GVAR(rightTabLnBFocus)) then {
|
if (GVAR(rightTabLnBFocus)) then {
|
||||||
[_display, [1, 0] select (_keyPressed == DIK_LEFT)] call FUNC(buttonCargo);
|
[_display, parseNumber (_keyPressed != DIK_LEFT)] call FUNC(buttonCargo);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -683,14 +683,19 @@ switch (GVAR(currentLeftPanel)) do {
|
|||||||
|
|
||||||
TOGGLE_RIGHT_PANEL_HIDE
|
TOGGLE_RIGHT_PANEL_HIDE
|
||||||
|
|
||||||
private _unitInsigniaConfig = configFile >> "CfgUnitInsignia" >> _item;
|
// Check for correct config: First mission, then campaign and finally regular config
|
||||||
|
private _itemCfg = missionConfigFile >> "CfgUnitInsignia" >> _item;
|
||||||
|
|
||||||
|
if (isNull _itemCfg) then {
|
||||||
|
_itemCfg = campaignConfigFile >> "CfgUnitInsignia" >> _item;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (isNull _itemCfg) then {
|
||||||
|
_itemCfg = configFile >> "CfgUnitInsignia" >> _item;
|
||||||
|
};
|
||||||
|
|
||||||
// Display new items's info on the bottom right
|
// Display new items's info on the bottom right
|
||||||
if (isNull _unitInsigniaConfig) then {
|
[_display, _control, _curSel, _itemCfg] call FUNC(itemInfo);
|
||||||
[_display, _control, _curSel, missionConfigFile >> "CfgUnitInsignia" >> _item] call FUNC(itemInfo);
|
|
||||||
} else {
|
|
||||||
[_display, _control, _curSel, _unitInsigniaConfig] call FUNC(itemInfo);
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -25,6 +25,11 @@ if (canSuspend) exitWith {
|
|||||||
[{_this call FUNC(refresh)}, _this] call CBA_fnc_directCall;
|
[{_this call FUNC(refresh)}, _this] call CBA_fnc_directCall;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private _display = findDisplay IDD_ace_arsenal;
|
||||||
|
|
||||||
|
// Exit quietly if no display found
|
||||||
|
if (isNull _display) exitWith {};
|
||||||
|
|
||||||
if (_updateItems) then {
|
if (_updateItems) then {
|
||||||
// Update current item list
|
// Update current item list
|
||||||
call FUNC(updateCurrentItemsList);
|
call FUNC(updateCurrentItemsList);
|
||||||
@ -65,6 +70,4 @@ if (!_animate) then {
|
|||||||
[{GVAR(refreshing) = false}, nil, 3] call CBA_fnc_execAfterNFrames;
|
[{GVAR(refreshing) = false}, nil, 3] call CBA_fnc_execAfterNFrames;
|
||||||
};
|
};
|
||||||
|
|
||||||
private _display = findDisplay IDD_ace_arsenal;
|
|
||||||
|
|
||||||
[_display, _display displayCtrl GVAR(currentLeftPanel), _animate] call FUNC(fillLeftPanel);
|
[_display, _display displayCtrl GVAR(currentLeftPanel), _animate] call FUNC(fillLeftPanel);
|
||||||
|
@ -42,8 +42,14 @@ if (_global && {isMultiplayer} && {!isNil "_id"}) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// If the arsenal is already open and not ignoring content (see FUNC(openBox)), close arsenal display
|
// If the arsenal is already open and not ignoring content (see FUNC(openBox)), close arsenal display
|
||||||
if (!isNil QGVAR(currentBox) && {GVAR(currentBox) isEqualTo _object} && {isNil QGVAR(ignoredVirtualItems)}) then {
|
// Deliberate == check, fail on objNull
|
||||||
[LLSTRING(noVirtualItems), false, 5, 1] call EFUNC(common,displayText);
|
if (!isNil QGVAR(currentBox) && {GVAR(currentBox) == _object} && {isNil QGVAR(ignoredVirtualItems)}) then {
|
||||||
// Delay a frame in case this is running on display open
|
// Delay a frame in case this is running on display open/close
|
||||||
[{(findDisplay IDD_ace_arsenal) closeDisplay 0}] call CBA_fnc_execNextFrame;
|
[{
|
||||||
|
private _display = findDisplay IDD_ace_arsenal;
|
||||||
|
if (isNull _display) exitWith {};
|
||||||
|
|
||||||
|
[LLSTRING(noVirtualItems), false, 5, 1] call EFUNC(common,displayText);
|
||||||
|
_display closeDisplay 0;
|
||||||
|
}] call CBA_fnc_execNextFrame;
|
||||||
};
|
};
|
||||||
|
@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
params ["_control"];
|
params ["_control"];
|
||||||
|
|
||||||
|
// https://community.bistudio.com/wiki/toString, see comment
|
||||||
|
// However, using 55295 did not work as expected, 55291 was found by trial and error
|
||||||
|
#define HIGHEST_VALUE_CHAR 55291
|
||||||
|
|
||||||
// When filling the sorting panel, FUNC(sortPanel) is called twice, so ignore first call
|
// When filling the sorting panel, FUNC(sortPanel) is called twice, so ignore first call
|
||||||
if (GVAR(ignoreFirstSortPanelCall)) exitWith {
|
if (GVAR(ignoreFirstSortPanelCall)) exitWith {
|
||||||
GVAR(ignoreFirstSortPanelCall) = false;
|
GVAR(ignoreFirstSortPanelCall) = false;
|
||||||
@ -29,6 +33,7 @@ private _sortDirectionCtrl = _display displayCtrl ([IDC_sortLeftTabDirection, ID
|
|||||||
private _cfgMagazines = configFile >> "CfgMagazines";
|
private _cfgMagazines = configFile >> "CfgMagazines";
|
||||||
private _cfgFaces = configFile >> "CfgFaces";
|
private _cfgFaces = configFile >> "CfgFaces";
|
||||||
private _cfgUnitInsignia = configFile >> "CfgUnitInsignia";
|
private _cfgUnitInsignia = configFile >> "CfgUnitInsignia";
|
||||||
|
private _cfgUnitInsigniaCampaign = campaignConfigFile >> "CfgUnitInsignia";
|
||||||
private _cfgUnitInsigniaMission = missionConfigFile >> "CfgUnitInsignia";
|
private _cfgUnitInsigniaMission = missionConfigFile >> "CfgUnitInsignia";
|
||||||
|
|
||||||
if (_rightSort) then {
|
if (_rightSort) then {
|
||||||
@ -126,7 +131,6 @@ private _selected = if (_right) then {
|
|||||||
_panel lbData _curSel
|
_panel lbData _curSel
|
||||||
};
|
};
|
||||||
|
|
||||||
private _originalNames = createHashMap;
|
|
||||||
private _item = "";
|
private _item = "";
|
||||||
private _quantity = "";
|
private _quantity = "";
|
||||||
private _itemCfg = configNull;
|
private _itemCfg = configNull;
|
||||||
@ -136,12 +140,8 @@ private _fillerChar = toString [1];
|
|||||||
|
|
||||||
private _magazineMiscItems = uiNamespace getVariable QGVAR(magazineMiscItems);
|
private _magazineMiscItems = uiNamespace getVariable QGVAR(magazineMiscItems);
|
||||||
private _sortCache = uiNamespace getVariable QGVAR(sortCache);
|
private _sortCache = uiNamespace getVariable QGVAR(sortCache);
|
||||||
|
private _faceCache = uiNamespace getVariable QGVAR(faceCache);
|
||||||
private _faceCache = if (_cfgClass == _cfgFaces) then {
|
private _insigniaCache = uiNamespace getVariable QGVAR(insigniaCache);
|
||||||
uiNamespace getVariable [QGVAR(faceCache), createHashMap]
|
|
||||||
} else {
|
|
||||||
createHashMap
|
|
||||||
};
|
|
||||||
|
|
||||||
private _countColumns = if (_right) then {
|
private _countColumns = if (_right) then {
|
||||||
count lnbGetColumnsPosition _panel
|
count lnbGetColumnsPosition _panel
|
||||||
@ -150,9 +150,9 @@ private _countColumns = if (_right) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private _for = if (_right) then {
|
private _for = if (_right) then {
|
||||||
for '_i' from 0 to (lnbSize _panel select 0) - 1
|
for "_i" from 0 to (lnbSize _panel select 0) - 1
|
||||||
} else {
|
} else {
|
||||||
for '_i' from 0 to (lbSize _panel) - 1
|
for "_i" from 0 to (lbSize _panel) - 1
|
||||||
};
|
};
|
||||||
|
|
||||||
_for do {
|
_for do {
|
||||||
@ -163,6 +163,14 @@ _for do {
|
|||||||
_panel lbData _i
|
_panel lbData _i
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Check if entry is "Empty"
|
||||||
|
if (!_right && {(_panel lbValue _i) == -1}) then {
|
||||||
|
// Set to lowest/highest lexicographical value, so that "Empty" is always at the top
|
||||||
|
_panel lbSetTextRight [_i, ["", toString [HIGHEST_VALUE_CHAR, HIGHEST_VALUE_CHAR, HIGHEST_VALUE_CHAR, HIGHEST_VALUE_CHAR, HIGHEST_VALUE_CHAR]] select (_sortDirection == ASCENDING)];
|
||||||
|
|
||||||
|
continue;
|
||||||
|
};
|
||||||
|
|
||||||
// Get item's count
|
// Get item's count
|
||||||
_quantity = if (_right) then {
|
_quantity = if (_right) then {
|
||||||
parseNumber (_panel lnbText [_i, 2])
|
parseNumber (_panel lnbText [_i, 2])
|
||||||
@ -179,18 +187,22 @@ _for do {
|
|||||||
_itemCfg = if !(_cfgClass in [_cfgFaces, _cfgUnitInsignia]) then {
|
_itemCfg = if !(_cfgClass in [_cfgFaces, _cfgUnitInsignia]) then {
|
||||||
_cfgClass >> _item
|
_cfgClass >> _item
|
||||||
} else {
|
} else {
|
||||||
// If insignia, check both config and mission file
|
// If insignia, check for correct config: First mission, then campaign and finally regular config
|
||||||
if (_cfgClass == _cfgUnitInsignia) then {
|
if (_cfgClass == _cfgUnitInsignia) then {
|
||||||
_itemCfg = _cfgClass >> _item;
|
_itemCfg = _cfgUnitInsigniaMission >> _item;
|
||||||
|
|
||||||
if (isNull _itemCfg) then {
|
if (isNull _itemCfg) then {
|
||||||
_itemCfg = _cfgUnitInsigniaMission >> _item;
|
_itemCfg = _cfgUnitInsigniaCampaign >> _item;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (isNull _itemCfg) then {
|
||||||
|
_itemCfg = _cfgUnitInsignia >> _item;
|
||||||
};
|
};
|
||||||
|
|
||||||
_itemCfg
|
_itemCfg
|
||||||
} else {
|
} else {
|
||||||
// If face, check correct category
|
// If face, check correct category
|
||||||
_cfgClass >> (_faceCache get _item) param [2, "Man_A3"] >> _item
|
_cfgClass >> (_faceCache getOrDefault [_item, []]) param [2, "Man_A3"] >> _item
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -216,37 +228,29 @@ _for do {
|
|||||||
_value
|
_value
|
||||||
}, true];
|
}, true];
|
||||||
|
|
||||||
// Save the current row's item's name in a cache and set text to it's sorting value
|
// Set the right text temporarily, so it can be used for sorting
|
||||||
if (_right) then {
|
if (_right) then {
|
||||||
_name = _panel lnbText [_i, 1];
|
|
||||||
_originalNames set [_item, _name];
|
|
||||||
|
|
||||||
// Use value, display name and classname to sort, which means a fixed alphabetical order is guaranteed
|
// Use value, display name and classname to sort, which means a fixed alphabetical order is guaranteed
|
||||||
// Filler char has lowest lexicographical order possible
|
// Filler char has lowest lexicographical value possible
|
||||||
_panel lnbSetText [[_i, 1], format ["%1%2%4%3", _value, _name, _item, _fillerChar]];
|
_panel lnbSetTextRight [[_i, 1], format ["%1%2%4%3", _value, _panel lnbText [_i, 1], _item, _fillerChar]];
|
||||||
} else {
|
} else {
|
||||||
if (_item != "") then {
|
if (_item != "") then {
|
||||||
_name = _panel lbText _i;
|
|
||||||
_originalNames set [_item, _name];
|
|
||||||
|
|
||||||
// Use value, display name and classname to sort, which means a fixed alphabetical order is guaranteed
|
// Use value, display name and classname to sort, which means a fixed alphabetical order is guaranteed
|
||||||
// Filler char has lowest lexicographical order possible
|
// Filler char has lowest lexicographical value possible
|
||||||
_panel lbSetText [_i, format ["%1%2%4%3", _value, _name, _item, _fillerChar]];
|
_panel lbSetTextRight [_i, format ["%1%2%4%3", _value, _panel lbText _i, _item, _fillerChar]];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Sort alphabetically, find the previously selected item, select it again and reset text to original text
|
// Sort alphabetically, find the previously selected item and select it again
|
||||||
if (_right) then {
|
if (_right) then {
|
||||||
_panel lnbSort [1, _sortDirection == ASCENDING];
|
[_panel, 1] lnbSortBy ["TEXT", _sortDirection == ASCENDING, false, true, false];
|
||||||
|
|
||||||
_for do {
|
_for do {
|
||||||
_item = _panel lnbData [_i, 0];
|
// Remove sorting text, as it blocks the item name otherwise
|
||||||
|
_panel lnbSetTextRight [[_i, 1], ""];
|
||||||
|
|
||||||
_panel lnbSetText [[_i, 1], _originalNames get _item];
|
if (_curSel != -1 && {(_panel lnbData [_i, 0]) == _selected}) then {
|
||||||
|
|
||||||
// Set selection after text, otherwise item info box on the right side shows invalid name
|
|
||||||
if (_curSel != -1 && {_item == _selected}) then {
|
|
||||||
_panel lnbSetCurSelRow _i;
|
_panel lnbSetCurSelRow _i;
|
||||||
|
|
||||||
// To avoid unnecessary checks after previsouly selected item was found
|
// To avoid unnecessary checks after previsouly selected item was found
|
||||||
@ -254,17 +258,17 @@ if (_right) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
lbSort [_panel, ["DESC", "ASC"] select _sortDirection];
|
_panel lbSortBy ["TEXT", _sortDirection == ASCENDING, false, true, false];
|
||||||
|
|
||||||
_for do {
|
_for do {
|
||||||
_item = _panel lbData _i;
|
_item = _panel lbData _i;
|
||||||
|
|
||||||
// Check if valid item (problems can be caused when searching)
|
// Check if valid item (problems can be caused when searching)
|
||||||
if (_item != "") then {
|
if (_item != "") then {
|
||||||
_panel lbSetText [_i, _originalNames get _item];
|
// Remove sorting text, as it blocks the item name otherwise
|
||||||
|
_panel lbSetTextRight [_i, ""];
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set selection after text, otherwise item info box on the right side shows invalid name
|
|
||||||
if (_curSel != -1 && {_item == _selected}) then {
|
if (_curSel != -1 && {_item == _selected}) then {
|
||||||
_panel lbSetCurSel _i;
|
_panel lbSetCurSel _i;
|
||||||
|
|
||||||
|
@ -31,9 +31,9 @@ if (_allItems isEqualTo []) then { _allItems = [configName _config] };
|
|||||||
|| {_illum && {([_xCfg >> "Flashlight" >> "irLight", "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1}};
|
|| {_illum && {([_xCfg >> "Flashlight" >> "irLight", "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1}};
|
||||||
|
|
||||||
private _text = switch (true) do { // shorthand roughly based on PEQ-15
|
private _text = switch (true) do { // shorthand roughly based on PEQ-15
|
||||||
case (_laser && _illum): { if (_isIR) then { "IR-DUAL" } else { "VIS-DUAL" } };
|
case (_laser && _illum): { ["VIS-DUAL", "IR-DUAL"] select _isIR }; // DUAL
|
||||||
case (_laser): { if (_isIR) then { "IR-AIM" } else { "VIS-AIM" } }; // AIM
|
case (_laser): { ["VIS-AIM", "IR-AIM"] select _isIR }; // AIM
|
||||||
case (_illum): { if (_isIR) then { "IR-ILM" } else { "VIS-ILM" } }; // ILLUMIATION
|
case (_illum): { ["VIS-ILM", "IR-ILM"] select _isIR }; // ILLUMIATION
|
||||||
default { "_" }; // there are some purely cosmetic attachements
|
default { "_" }; // there are some purely cosmetic attachements
|
||||||
};
|
};
|
||||||
_allModes pushBackUnique _text;
|
_allModes pushBackUnique _text;
|
||||||
|
@ -19,283 +19,74 @@ private _extendedInfo = createHashMap;
|
|||||||
|
|
||||||
// Check if the provided loadout is a CBA extended loadout
|
// Check if the provided loadout is a CBA extended loadout
|
||||||
if (count _loadout == 2) then {
|
if (count _loadout == 2) then {
|
||||||
_extendedInfo = _loadout select 1;
|
_extendedInfo = +(_loadout select 1); // Copy the hashmap to prevent events from modifiyng the profileNamespace extendedInfo
|
||||||
_loadout = _loadout select 0;
|
_loadout = _loadout select 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
private _cfgWeapons = configFile >> "CfgWeapons";
|
|
||||||
private _cfgMagazines = configFile >> "CfgMagazines";
|
|
||||||
private _cfgVehicles = configFile >> "CfgVehicles";
|
|
||||||
private _cfgGlasses = configFile >> "CfgGlasses";
|
|
||||||
|
|
||||||
private _weapons = GVAR(virtualItems) get IDX_VIRT_WEAPONS;
|
|
||||||
private _attachments = GVAR(virtualItems) get IDX_VIRT_ATTACHMENTS;
|
|
||||||
|
|
||||||
private _name = "";
|
private _name = "";
|
||||||
private _nullItemsAmount = 0;
|
private _itemArray = [];
|
||||||
private _unavailableItemsAmount = 0;
|
|
||||||
private _nullItemsList = [];
|
private _nullItemsList = [];
|
||||||
private _unavailableItemsList = [];
|
private _unavailableItemsList = [];
|
||||||
|
private _missingExtendedInfo = [];
|
||||||
|
|
||||||
// Search for all items and turn them into config case; Don't touch other value types
|
// Search for all items and check their availability
|
||||||
private _fnc_toConfigCase = {
|
private _fnc_filterLoadout = {
|
||||||
_this apply {
|
_this apply {
|
||||||
if (_x isEqualType "") then {
|
if (_x isEqualType "" && {_x != ""}) then {
|
||||||
if (_x != "") then {
|
_name = _x call EFUNC(common,getConfigName);
|
||||||
_name = _x call EFUNC(common,getConfigName);
|
|
||||||
|
|
||||||
// If item doesn't exist in config, "" is returned
|
// If item doesn't exist in config, "" is returned
|
||||||
// Just return unaltered item name in that case, so it can be documented as being unavailable
|
if (_name == "") then {
|
||||||
if (_name != "") then {
|
_nullItemsList pushBack _x;
|
||||||
_name
|
|
||||||
} else {
|
|
||||||
_x
|
|
||||||
};
|
|
||||||
} else {
|
} else {
|
||||||
_x
|
// Check if item or its base weapon exist in the arsenal
|
||||||
|
if !(_name in GVAR(virtualItemsFlat)) then {
|
||||||
|
_name = _name call FUNC(baseWeapon);
|
||||||
|
if !(_name in GVAR(virtualItemsFlat)) then {
|
||||||
|
_unavailableItemsList pushBack _name;
|
||||||
|
_name = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_name
|
||||||
} else {
|
} else {
|
||||||
// Handle arrays
|
// Handle arrays
|
||||||
if (_x isEqualType []) then {
|
if (_x isEqualType []) then {
|
||||||
_x call _fnc_toConfigCase
|
_itemArray = _x call _fnc_filterLoadout;
|
||||||
|
// If "" is given as a container, an error is thrown, therefore, filter out all unavailable/null containers
|
||||||
|
if (count _itemArray == 2 && {(_itemArray select 0) isEqualTo ""} && {(_itemArray select 1) isEqualType []}) then {
|
||||||
|
_itemArray = [];
|
||||||
|
};
|
||||||
|
_itemArray
|
||||||
} else {
|
} else {
|
||||||
// All other types
|
// All other types and empty strings
|
||||||
_x
|
_x
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Convert loadout to config case
|
// Convert loadout to config case and replace null/unavailable items
|
||||||
// Loadout might come from a different modpack, which might have different config naming
|
// Loadout might come from a different modpack, which might have different config naming
|
||||||
_loadout = _loadout call _fnc_toConfigCase;
|
_loadout = _loadout call _fnc_filterLoadout;
|
||||||
|
|
||||||
// Check a weapon, with its attachments and magazines, if items are available
|
{
|
||||||
private _fnc_weaponCheck = {
|
private _class = _extendedInfo getOrDefault [_x, ""];
|
||||||
params ["_weaponArray", ["_index", -1]];
|
private _cache = missionNamespace getVariable (_x + "Cache");
|
||||||
|
|
||||||
{
|
// Previously voices were stored in lower case (speaker command returns lower case), so this is to make old loadouts compatible
|
||||||
// Weapons and attachments
|
if (_class != "" && {_x == QGVAR(voice)}) then {
|
||||||
if (_x isEqualType "") then {
|
_class = _class call EFUNC(common,getConfigName);
|
||||||
if (_x != "") then {
|
|
||||||
// Check if item exists
|
|
||||||
if (isClass (_cfgWeapons >> _x)) then {
|
|
||||||
// Get base weapon
|
|
||||||
_x = _x call FUNC(baseWeapon);
|
|
||||||
|
|
||||||
// Check if item is available in arsenal
|
|
||||||
if !(
|
|
||||||
// Weapon class name is at the very start of the array
|
|
||||||
if (_forEachIndex == 0) then {
|
|
||||||
// If the type of weapon is known, only look through that array
|
|
||||||
if (_index != -1) then {
|
|
||||||
// If binos, choose differently
|
|
||||||
if (_index == IDX_LOADOUT_BINO) then {
|
|
||||||
_x in (GVAR(virtualItems) get IDX_VIRT_BINO)
|
|
||||||
} else {
|
|
||||||
_x in (_weapons get _index)
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_x in (_weapons get IDX_VIRT_PRIMARY_WEAPONS) ||
|
|
||||||
{_x in (_weapons get IDX_VIRT_SECONDARY_WEAPONS)} ||
|
|
||||||
{_x in (_weapons get IDX_VIRT_HANDGUN_WEAPONS)} ||
|
|
||||||
{_x in (GVAR(virtualItems) get IDX_VIRT_BINO)}
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_x in (_attachments get IDX_VIRT_OPTICS_ATTACHMENTS) ||
|
|
||||||
{_x in (_attachments get IDX_VIRT_FLASHLIGHT_ATTACHMENTS)} ||
|
|
||||||
{_x in (_attachments get IDX_VIRT_MUZZLE_ATTACHMENTS)} ||
|
|
||||||
{_x in (_attachments get IDX_VIRT_BIPOD_ATTACHMENTS)}
|
|
||||||
}
|
|
||||||
) then {
|
|
||||||
_unavailableItemsList pushBackUnique _x;
|
|
||||||
_weaponArray set [_forEachIndex, ""];
|
|
||||||
INC(_unavailableItemsAmount);
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_nullItemsList pushBackUnique _x;
|
|
||||||
_weaponArray set [_forEachIndex, ""];
|
|
||||||
INC(_nullItemsAmount);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
// Magazines
|
|
||||||
if (_x isNotEqualTo []) then {
|
|
||||||
_x params ["_magazine"];
|
|
||||||
|
|
||||||
// Check if item exists
|
|
||||||
if (isClass (_cfgMagazines >> _magazine)) then {
|
|
||||||
// Check if item is available in arsenal
|
|
||||||
if !(_magazine in (GVAR(virtualItems) get IDX_VIRT_ITEMS_ALL)) then {
|
|
||||||
_unavailableItemsList pushBackUnique _magazine;
|
|
||||||
_weaponArray set [_forEachIndex, []];
|
|
||||||
INC(_unavailableItemsAmount);
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_nullItemsList pushBackUnique _magazine;
|
|
||||||
_weaponArray set [_forEachIndex, []];
|
|
||||||
INC(_nullItemsAmount);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
} forEach _weaponArray;
|
|
||||||
};
|
|
||||||
|
|
||||||
private _item = "";
|
|
||||||
|
|
||||||
// Go through entire loadout to check if items are available in current arsenal
|
|
||||||
for "_dataIndex" from IDX_LOADOUT_PRIMARY_WEAPON to IDX_LOADOUT_ASSIGNEDITEMS do {
|
|
||||||
switch (_dataIndex) do {
|
|
||||||
// Primary weapon, Secondary weapon, Handgun weapon, Binoculars
|
|
||||||
case IDX_LOADOUT_PRIMARY_WEAPON;
|
|
||||||
case IDX_LOADOUT_SECONDARY_WEAPON;
|
|
||||||
case IDX_LOADOUT_HANDGUN_WEAPON;
|
|
||||||
case IDX_LOADOUT_BINO: {
|
|
||||||
[_loadout select _dataIndex, _dataIndex] call _fnc_weaponCheck;
|
|
||||||
};
|
|
||||||
// Uniform, vest, backpack
|
|
||||||
case IDX_LOADOUT_UNIFORM;
|
|
||||||
case IDX_LOADOUT_VEST;
|
|
||||||
case IDX_LOADOUT_BACKPACK: {
|
|
||||||
(_loadout select _dataIndex) params [["_item", ""], ["_containerItems", []]];
|
|
||||||
|
|
||||||
if (_item != "") then {
|
|
||||||
// Check if item exists
|
|
||||||
if (isClass (_cfgVehicles >> _item) || {isClass (_cfgWeapons >> _item)}) then {
|
|
||||||
// Check if item is available in arsenal
|
|
||||||
if !(_item in (GVAR(virtualItems) get (_dataIndex + 1))) then {
|
|
||||||
_unavailableItemsList pushBackUnique _item;
|
|
||||||
_loadout set [_dataIndex, []];
|
|
||||||
INC(_unavailableItemsAmount);
|
|
||||||
} else {
|
|
||||||
{
|
|
||||||
switch (true) do {
|
|
||||||
// Magazines have each 3 entries: Name, number of magazines and ammo count
|
|
||||||
case (_x isEqualTypeArray ["", 0, 0]): {
|
|
||||||
_x params ["_item"];
|
|
||||||
|
|
||||||
// Check if item exists
|
|
||||||
if (isClass (_cfgMagazines >> _item)) then {
|
|
||||||
// Check if item is available in arsenal
|
|
||||||
if !(
|
|
||||||
_item in (GVAR(virtualItems) get IDX_VIRT_ITEMS_ALL) ||
|
|
||||||
{_item in (GVAR(virtualItems) get IDX_VIRT_GRENADES)} ||
|
|
||||||
{_item in (GVAR(virtualItems) get IDX_VIRT_EXPLOSIVES)} ||
|
|
||||||
{_item in (GVAR(virtualItems) get IDX_VIRT_MISC_ITEMS)}
|
|
||||||
) then {
|
|
||||||
_unavailableItemsList pushBackUnique _item;
|
|
||||||
((_loadout select _dataIndex) select 1) set [_forEachIndex, []];
|
|
||||||
INC(_unavailableItemsAmount);
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_nullItemsList pushBackUnique _item;
|
|
||||||
((_loadout select _dataIndex) select 1) set [_forEachIndex, []];
|
|
||||||
INC(_nullItemsAmount);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
// Weapons have 2 entries: Weapon info array and amount
|
|
||||||
case (_x isEqualTypeArray [[], 0]): {
|
|
||||||
[_x select 0] call _fnc_weaponCheck;
|
|
||||||
};
|
|
||||||
// Misc. items have 2 entries: Name and amount, containers have 2 entries: Name and isBackpack
|
|
||||||
default {
|
|
||||||
_x params ["_item"];
|
|
||||||
|
|
||||||
// Check if item exists
|
|
||||||
if (
|
|
||||||
isClass (_cfgWeapons >> _item) ||
|
|
||||||
{isClass (_cfgMagazines >> _item)} ||
|
|
||||||
{isClass (_cfgGlasses >> _item)} ||
|
|
||||||
{isClass (_cfgVehicles >> _item)}
|
|
||||||
) then {
|
|
||||||
// Check if item is available in arsenal
|
|
||||||
if !(_item in GVAR(virtualItemsFlat)) then {
|
|
||||||
_unavailableItemsList pushBackUnique _item;
|
|
||||||
((_loadout select _dataIndex) select 1) set [_forEachIndex, []];
|
|
||||||
INC(_unavailableItemsAmount);
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_nullItemsList pushBackUnique _item;
|
|
||||||
((_loadout select _dataIndex) select 1) set [_forEachIndex, []];
|
|
||||||
INC(_nullItemsAmount);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
} forEach _containerItems;
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_nullItemsList pushBackUnique _item;
|
|
||||||
_loadout set [_dataIndex, []];
|
|
||||||
INC(_nullItemsAmount);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
// Headgear
|
|
||||||
case IDX_LOADOUT_HEADGEAR: {
|
|
||||||
_item = _loadout select _dataIndex;
|
|
||||||
|
|
||||||
if (_item != "") then {
|
|
||||||
// Check if item exists
|
|
||||||
if (isClass (_cfgWeapons >> _item)) then {
|
|
||||||
// Check if item is available in arsenal
|
|
||||||
if !(_item in (GVAR(virtualItems) get IDX_VIRT_HEADGEAR)) then {
|
|
||||||
_unavailableItemsList pushBackUnique _item;
|
|
||||||
_loadout set [_dataIndex, ""];
|
|
||||||
INC(_unavailableItemsAmount);
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_nullItemsList pushBackUnique _item;
|
|
||||||
_loadout set [_dataIndex, ""];
|
|
||||||
INC(_nullItemsAmount);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
// Facewear
|
|
||||||
case IDX_LOADOUT_GOGGLES: {
|
|
||||||
_item = _loadout select _dataIndex;
|
|
||||||
|
|
||||||
if (_item != "") then {
|
|
||||||
// Check if item exists
|
|
||||||
if (isClass (_cfgGlasses >> _item)) then {
|
|
||||||
// Check if item is available in arsenal
|
|
||||||
if !(_item in (GVAR(virtualItems) get IDX_VIRT_GOGGLES)) then {
|
|
||||||
_unavailableItemsList pushBackUnique _item;
|
|
||||||
_loadout set [_dataIndex, ""];
|
|
||||||
INC(_unavailableItemsAmount);
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_nullItemsList pushBackUnique _item;
|
|
||||||
_loadout set [_dataIndex, ""];
|
|
||||||
INC(_nullItemsAmount);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
// Assigned items: Map, Compass, Watch, GPS / UAV Terminal, Radio, NVGs
|
|
||||||
case IDX_LOADOUT_ASSIGNEDITEMS: {
|
|
||||||
private _assignedItems = _loadout select _dataIndex;
|
|
||||||
|
|
||||||
for "_subIndex" from 0 to 5 do {
|
|
||||||
_item = _assignedItems select _subIndex;
|
|
||||||
|
|
||||||
if (_item != "") then {
|
|
||||||
// Check if item exists
|
|
||||||
if (isClass (_cfgWeapons >> _item)) then {
|
|
||||||
// Check if item is available in arsenal
|
|
||||||
if !(_item in (GVAR(virtualItems) get (IDX_VIRT_NVG + ([2, 6, 4, 3, 5, 0] select _subIndex)))) then {
|
|
||||||
_unavailableItemsList pushBackUnique _item;
|
|
||||||
_assignedItems set [_subIndex, ""];
|
|
||||||
INC(_unavailableItemsAmount);
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_nullItemsList pushBackUnique _item;
|
|
||||||
_assignedItems set [_subIndex, ""];
|
|
||||||
INC(_nullItemsAmount);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
if (_class != "" && {!(_class in _cache)}) then {
|
||||||
|
_missingExtendedInfo pushBack [_x, _class];
|
||||||
|
_extendedInfo deleteAt _x;
|
||||||
|
};
|
||||||
|
} forEach [QGVAR(insignia), QGVAR(face), QGVAR(voice)];
|
||||||
|
|
||||||
[[_loadout, _extendedInfo], _nullItemsAmount, _unavailableItemsAmount, _nullItemsList, _unavailableItemsList]
|
// Raise event for 3rd party: mostly for handling extended info
|
||||||
|
// Pass all items, including duplicates
|
||||||
|
[QGVAR(loadoutVerified), [_loadout, _extendedInfo, _nullItemsList, _unavailableItemsList, _missingExtendedInfo]] call CBA_fnc_localEvent;
|
||||||
|
|
||||||
|
[[_loadout, _extendedInfo], _nullItemsList arrayIntersect _nullItemsList, _unavailableItemsList arrayIntersect _unavailableItemsList, _missingExtendedInfo]
|
||||||
|
@ -15,6 +15,3 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "\z\ace\addons\main\script_macros.hpp"
|
#include "\z\ace\addons\main\script_macros.hpp"
|
||||||
|
|
||||||
#define ACTION_TYPE_BUTTON 0
|
|
||||||
#define ACTION_TYPE_TEXT 1
|
|
||||||
|
@ -613,7 +613,7 @@
|
|||||||
<French>Le set d'équipement suivant a été supprimé :</French>
|
<French>Le set d'équipement suivant a été supprimé :</French>
|
||||||
<German>Folgende Ausrüstung wurde entfernt:</German>
|
<German>Folgende Ausrüstung wurde entfernt:</German>
|
||||||
<Polish>Następujący zestaw został skasowany:</Polish>
|
<Polish>Następujący zestaw został skasowany:</Polish>
|
||||||
<Japanese>次の装備は削除されました:</Japanese>
|
<Japanese>装備を削除しました:</Japanese>
|
||||||
<Italian>Il seguente equipaggiamento è stato eliminato:</Italian>
|
<Italian>Il seguente equipaggiamento è stato eliminato:</Italian>
|
||||||
<Korean>다음 로드아웃이 삭제됨 :</Korean>
|
<Korean>다음 로드아웃이 삭제됨 :</Korean>
|
||||||
<Chinese>以下的裝備已被刪除:</Chinese>
|
<Chinese>以下的裝備已被刪除:</Chinese>
|
||||||
@ -629,7 +629,7 @@
|
|||||||
<French>Le set d'équipement suivant n'est plus public :</French>
|
<French>Le set d'équipement suivant n'est plus public :</French>
|
||||||
<German>Folgende Ausrüstung ist nicht mehr öffentlich:</German>
|
<German>Folgende Ausrüstung ist nicht mehr öffentlich:</German>
|
||||||
<Polish>Następujący zestaw nie jest już publiczny:</Polish>
|
<Polish>Następujący zestaw nie jest już publiczny:</Polish>
|
||||||
<Japanese>次の装備は非公開になりました:</Japanese>
|
<Japanese>装備を非公開にしました:</Japanese>
|
||||||
<Italian>Il seguente equipaggiamento non è più pubblico:</Italian>
|
<Italian>Il seguente equipaggiamento non è più pubblico:</Italian>
|
||||||
<Korean>다음 로드아웃이 더이상 공용이 아님:</Korean>
|
<Korean>다음 로드아웃이 더이상 공용이 아님:</Korean>
|
||||||
<Chinese>以下的裝備已不再被分享:</Chinese>
|
<Chinese>以下的裝備已不再被分享:</Chinese>
|
||||||
@ -645,7 +645,7 @@
|
|||||||
<French>Le champ "nom" est vide !</French>
|
<French>Le champ "nom" est vide !</French>
|
||||||
<German>Das Feld "Name" ist leer!</German>
|
<German>Das Feld "Name" ist leer!</German>
|
||||||
<Polish>Pole nazwy jest puste!</Polish>
|
<Polish>Pole nazwy jest puste!</Polish>
|
||||||
<Japanese>名前が空白です!</Japanese>
|
<Japanese>名前が空欄です!</Japanese>
|
||||||
<Italian>Il campo del nome è vuoto!</Italian>
|
<Italian>Il campo del nome è vuoto!</Italian>
|
||||||
<Korean>이름칸이 비었습니다!</Korean>
|
<Korean>이름칸이 비었습니다!</Korean>
|
||||||
<Chinese>名稱欄位為空!</Chinese>
|
<Chinese>名稱欄位為空!</Chinese>
|
||||||
@ -677,7 +677,7 @@
|
|||||||
<French>Un de vos sets d'équipement ayant le même nom est public.</French>
|
<French>Un de vos sets d'équipement ayant le même nom est public.</French>
|
||||||
<German>Eine deiner Ausrüstungen mit dem gleichen Namen ist öffentlich</German>
|
<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>
|
<Polish>Jeden z Twoich zestawów nazwany tak samo jest już publiczny</Polish>
|
||||||
<Japanese>あなたの装備は既に公開されているものと同名です</Japanese>
|
<Japanese>あなたのものと同じ名前の装備が既に公開されています</Japanese>
|
||||||
<Italian>Un tuo equipaggiamento con lo stesso nome è pubblico</Italian>
|
<Italian>Un tuo equipaggiamento con lo stesso nome è pubblico</Italian>
|
||||||
<Korean>같은 이름의 로드아웃이 공용에 있습니다.</Korean>
|
<Korean>같은 이름의 로드아웃이 공용에 있습니다.</Korean>
|
||||||
<Chinese>已有相同名稱的裝備在公用分享區</Chinese>
|
<Chinese>已有相同名稱的裝備在公用分享區</Chinese>
|
||||||
@ -693,7 +693,7 @@
|
|||||||
<French>Le set d'équipement suivant a été enregistré :</French>
|
<French>Le set d'équipement suivant a été enregistré :</French>
|
||||||
<German>Folgende Ausrüstung wurde gespeichert:</German>
|
<German>Folgende Ausrüstung wurde gespeichert:</German>
|
||||||
<Polish>Następujący zestaw został zapisany:</Polish>
|
<Polish>Następujący zestaw został zapisany:</Polish>
|
||||||
<Japanese>次の装備は保存されました:</Japanese>
|
<Japanese>装備を保存しました:</Japanese>
|
||||||
<Italian>Il seguente equipaggiamento è stato salvato:</Italian>
|
<Italian>Il seguente equipaggiamento è stato salvato:</Italian>
|
||||||
<Korean>다음 로드아웃이 저장됨:</Korean>
|
<Korean>다음 로드아웃이 저장됨:</Korean>
|
||||||
<Chinese>以下的裝備已被保存:</Chinese>
|
<Chinese>以下的裝備已被保存:</Chinese>
|
||||||
@ -709,7 +709,7 @@
|
|||||||
<French>Le set d'équipement suivant a été chargé :</French>
|
<French>Le set d'équipement suivant a été chargé :</French>
|
||||||
<German>Folgene Ausrüstung wurde geladen:</German>
|
<German>Folgene Ausrüstung wurde geladen:</German>
|
||||||
<Polish>Następujący zestaw został wczytany:</Polish>
|
<Polish>Następujący zestaw został wczytany:</Polish>
|
||||||
<Japanese>次の装備が読み込みされました:</Japanese>
|
<Japanese>装備を読み込みました:</Japanese>
|
||||||
<Italian>Il seguente equipaggiamento è stato caricato:</Italian>
|
<Italian>Il seguente equipaggiamento è stato caricato:</Italian>
|
||||||
<Korean>다음 로드아웃을 불러옴:</Korean>
|
<Korean>다음 로드아웃을 불러옴:</Korean>
|
||||||
<Chinese>以下的裝備已被載入:</Chinese>
|
<Chinese>以下的裝備已被載入:</Chinese>
|
||||||
@ -725,7 +725,7 @@
|
|||||||
<French>Un set d'équipement ayant le même nom existe déjà !</French>
|
<French>Un set d'équipement ayant le même nom existe déjà !</French>
|
||||||
<German>Eine Ausrüstung mit dem gleichen Namen existiert bereits!</German>
|
<German>Eine Ausrüstung mit dem gleichen Namen existiert bereits!</German>
|
||||||
<Polish>Zestaw z tą nazwą już istnieje!</Polish>
|
<Polish>Zestaw z tą nazwą już istnieje!</Polish>
|
||||||
<Japanese>既にその名前は装備に使われています!</Japanese>
|
<Japanese>既に同じ名前の装備が存在しています!</Japanese>
|
||||||
<Italian>Un equipaggiamento con lo stesso nome è gia esistente!</Italian>
|
<Italian>Un equipaggiamento con lo stesso nome è gia esistente!</Italian>
|
||||||
<Korean>같은 이름의 로드아웃이 이미 존재합니다!</Korean>
|
<Korean>같은 이름의 로드아웃이 이미 존재합니다!</Korean>
|
||||||
<Chinese>已有相同名稱的裝備!</Chinese>
|
<Chinese>已有相同名稱的裝備!</Chinese>
|
||||||
@ -741,7 +741,7 @@
|
|||||||
<French>a été renommé en</French>
|
<French>a été renommé en</French>
|
||||||
<German>wurde umbenannt in</German>
|
<German>wurde umbenannt in</German>
|
||||||
<Polish>zmienił nazwę na</Polish>
|
<Polish>zmienił nazwę na</Polish>
|
||||||
<Japanese>次の名前に変更されました</Japanese>
|
<Japanese>を次の名前に変更しました:</Japanese>
|
||||||
<Italian>È stato rinominato in</Italian>
|
<Italian>È stato rinominato in</Italian>
|
||||||
<Korean>이름이 다음과 같이 변경됨:</Korean>
|
<Korean>이름이 다음과 같이 변경됨:</Korean>
|
||||||
<Chinese>已被改名為</Chinese>
|
<Chinese>已被改名為</Chinese>
|
||||||
@ -1181,7 +1181,7 @@
|
|||||||
<English>Nightvision Support</English>
|
<English>Nightvision Support</English>
|
||||||
<Spanish>Soporte de visión nocturna</Spanish>
|
<Spanish>Soporte de visión nocturna</Spanish>
|
||||||
<German>Nachtsicht Unterstützung</German>
|
<German>Nachtsicht Unterstützung</German>
|
||||||
<Japanese>暗視装置への対応有無</Japanese>
|
<Japanese>暗視装置への対応</Japanese>
|
||||||
<Polish>Wsparcie noktowizyjne</Polish>
|
<Polish>Wsparcie noktowizyjne</Polish>
|
||||||
<Italian>Supporto visore notturno</Italian>
|
<Italian>Supporto visore notturno</Italian>
|
||||||
<Russian>Поддержка ночного видения</Russian>
|
<Russian>Поддержка ночного видения</Russian>
|
||||||
@ -1240,9 +1240,11 @@
|
|||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Arsenal_statVisionMode_ti">
|
<Key ID="STR_ACE_Arsenal_statVisionMode_ti">
|
||||||
<English>Thermal integrated</English>
|
<English>Thermal integrated</English>
|
||||||
|
<Japanese>熱画像装置内蔵</Japanese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Arsenal_statVisionMode_intPrimTi">
|
<Key ID="STR_ACE_Arsenal_statVisionMode_intPrimTi">
|
||||||
<English>Thermal & Primary integrated</English>
|
<English>Thermal & Primary integrated</English>
|
||||||
|
<Japanese>熱画像装置内蔵・プライマリに内蔵</Japanese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Arsenal_statVisionMode_NoSup">
|
<Key ID="STR_ACE_Arsenal_statVisionMode_NoSup">
|
||||||
<English>Not Supported</English>
|
<English>Not Supported</English>
|
||||||
@ -1263,7 +1265,7 @@
|
|||||||
<Key ID="STR_ACE_Arsenal_statVisionModeGeneric">
|
<Key ID="STR_ACE_Arsenal_statVisionModeGeneric">
|
||||||
<English>Vision Mode</English>
|
<English>Vision Mode</English>
|
||||||
<German>Sichtmodus</German>
|
<German>Sichtmodus</German>
|
||||||
<Japanese>ビジョン モード</Japanese>
|
<Japanese>映像モード</Japanese>
|
||||||
<Italian>Modalità Visiva</Italian>
|
<Italian>Modalità Visiva</Italian>
|
||||||
<Chinese>視覺模式</Chinese>
|
<Chinese>視覺模式</Chinese>
|
||||||
<Chinesesimp>视觉模式</Chinesesimp>
|
<Chinesesimp>视觉模式</Chinesesimp>
|
||||||
@ -1501,7 +1503,7 @@
|
|||||||
<Spanish>Añade automáticamente accesorios o cargadores (de la categoría seleccionada) a todas las armas de la lista de objetos</Spanish>
|
<Spanish>Añade automáticamente accesorios o cargadores (de la categoría seleccionada) a todas las armas de la lista de objetos</Spanish>
|
||||||
<German>Es werden automatisch kompatible Aufsätze oder Magazine für alle ausgewählten Waffen hinzugefügt</German>
|
<German>Es werden automatisch kompatible Aufsätze oder Magazine für alle ausgewählten Waffen hinzugefügt</German>
|
||||||
<Polish>Automatycznie doda kompatybilne dodatki oraz magazynki (odpowiednio do każdej kategorii) dla wszystkich broni na liście</Polish>
|
<Polish>Automatycznie doda kompatybilne dodatki oraz magazynki (odpowiednio do każdej kategorii) dla wszystkich broni na liście</Polish>
|
||||||
<Japanese>現在のアイテムリスト内にある全武器に対応する アタッチメントと弾倉(選択したカテゴリに基づく)を自動的に追加します</Japanese>
|
<Japanese>現在のアイテムリスト内の全武器に対応する アタッチメントと弾倉(選択したカテゴリに基づく)を自動的に追加します</Japanese>
|
||||||
<Russian>Добавляет совместимые приспособления или магазины (в зависимости от выбранной категории) для всего оружия в текущем списке предметов</Russian>
|
<Russian>Добавляет совместимые приспособления или магазины (в зависимости от выбранной категории) для всего оружия в текущем списке предметов</Russian>
|
||||||
<Portuguese>Irá automaticamente adicionar acessórios ou carregadores (baseado na categoria selecionada) para todas as armas na lista de itens atual</Portuguese>
|
<Portuguese>Irá automaticamente adicionar acessórios ou carregadores (baseado na categoria selecionada) para todas as armas na lista de itens atual</Portuguese>
|
||||||
<French>Ajoute automatiquement des accessoires ou des chargeurs compatibles (en fonction de la catégorie sélectionnée), pour toutes les armes de la liste actuelle.</French>
|
<French>Ajoute automatiquement des accessoires ou des chargeurs compatibles (en fonction de la catégorie sélectionnée), pour toutes les armes de la liste actuelle.</French>
|
||||||
|
@ -450,24 +450,23 @@ class GVAR(display) {
|
|||||||
h = QUOTE(55 * GRID_H);
|
h = QUOTE(55 * GRID_H);
|
||||||
class controls {
|
class controls {
|
||||||
class actionsStaticBackground1: ctrlStaticBackground {
|
class actionsStaticBackground1: ctrlStaticBackground {
|
||||||
idc = -1;
|
idc = IDC_actionsBackground1;
|
||||||
x = QUOTE(0);
|
x = QUOTE(0);
|
||||||
y = QUOTE(0);
|
y = QUOTE(0);
|
||||||
w = QUOTE(47 * GRID_W);
|
w = QUOTE(47 * GRID_W);
|
||||||
h = QUOTE(56 * GRID_H);
|
h = QUOTE(55 * GRID_H);
|
||||||
colorBackground[]={0.1,0.1,0.1,0.5};
|
colorBackground[]={0.1,0.1,0.1,0.5};
|
||||||
};
|
};
|
||||||
class actionsStaticBackground2: ctrlStaticBackground {
|
class actionsStaticBackground2: ctrlStaticBackground {
|
||||||
idc = -1;
|
idc = IDC_actionsBackground2;
|
||||||
x = QUOTE(0);
|
x = QUOTE(0);
|
||||||
y = QUOTE(0);
|
y = QUOTE(0);
|
||||||
w = QUOTE(47 * GRID_W);
|
w = QUOTE(47 * GRID_W);
|
||||||
h = QUOTE(5 * GRID_H);
|
h = QUOTE(5 * GRID_H);
|
||||||
colorBackground[]={0.1,0.1,0.1,0.8};
|
colorBackground[]={0.1,0.1,0.1,0.8};
|
||||||
};
|
};
|
||||||
class actionsText1: RscText {
|
class actionsText1: RscTextMulti {
|
||||||
idc = IDC_actionsText1;
|
idc = IDC_actionsText1;
|
||||||
fade = 1;
|
|
||||||
x = QUOTE(0 * GRID_W);
|
x = QUOTE(0 * GRID_W);
|
||||||
y = QUOTE(5 * GRID_H);
|
y = QUOTE(5 * GRID_H);
|
||||||
w = QUOTE(45 * GRID_W);
|
w = QUOTE(45 * GRID_W);
|
||||||
@ -479,7 +478,6 @@ class GVAR(display) {
|
|||||||
};
|
};
|
||||||
class actionsButton1: ctrlButton {
|
class actionsButton1: ctrlButton {
|
||||||
idc = IDC_actionsButton1;
|
idc = IDC_actionsButton1;
|
||||||
fade = 1;
|
|
||||||
text = "";
|
text = "";
|
||||||
x = QUOTE(1 * GRID_W);
|
x = QUOTE(1 * GRID_W);
|
||||||
y = QUOTE(6 * GRID_H);
|
y = QUOTE(6 * GRID_H);
|
||||||
@ -566,6 +564,7 @@ class GVAR(display) {
|
|||||||
colorSelect[] = {1,1,1,1};
|
colorSelect[] = {1,1,1,1};
|
||||||
colorSelect2[] = {1,1,1,1};
|
colorSelect2[] = {1,1,1,1};
|
||||||
colorPictureRightSelected[] = {1,1,1,1};
|
colorPictureRightSelected[] = {1,1,1,1};
|
||||||
|
colorTextRight[] = {0.5, 0.5, 0.5, 0};
|
||||||
onLBSelChanged = QUOTE(_this call FUNC(onSelChangedLeft));
|
onLBSelChanged = QUOTE(_this call FUNC(onSelChangedLeft));
|
||||||
onLBDblClick = QUOTE(_this call FUNC(onPanelDblClick));
|
onLBDblClick = QUOTE(_this call FUNC(onPanelDblClick));
|
||||||
onSetFocus = QUOTE(GVAR(leftTabFocus) = true);
|
onSetFocus = QUOTE(GVAR(leftTabFocus) = true);
|
||||||
@ -596,6 +595,7 @@ class GVAR(display) {
|
|||||||
colorSelect[] = {1,1,1,1};
|
colorSelect[] = {1,1,1,1};
|
||||||
colorSelect2[] = {1,1,1,1};
|
colorSelect2[] = {1,1,1,1};
|
||||||
colorPictureRightSelected[] = {1,1,1,1};
|
colorPictureRightSelected[] = {1,1,1,1};
|
||||||
|
colorTextRight[] = {0.5, 0.5, 0.5, 0};
|
||||||
columns[] = {0.07, 0.15, 0.75};
|
columns[] = {0.07, 0.15, 0.75};
|
||||||
idcLeft = IDC_arrowMinus;
|
idcLeft = IDC_arrowMinus;
|
||||||
idcRIght = IDC_arrowPlus;
|
idcRIght = IDC_arrowPlus;
|
||||||
|
@ -1 +0,0 @@
|
|||||||
#include "..\script_component.hpp"
|
|
@ -65,7 +65,7 @@ GVAR(magModeData) = [];
|
|||||||
{
|
{
|
||||||
_x params ["_xDisplayNameShort", "_xDisplayName", "_xInitSpeed", "_xAirFriction"];
|
_x params ["_xDisplayNameShort", "_xDisplayName", "_xInitSpeed", "_xAirFriction"];
|
||||||
if (_allSameCharge) then {
|
if (_allSameCharge) then {
|
||||||
_ctrlChargeList lbAdd format ["%1", _xDisplayNameShort];
|
_ctrlChargeList lbAdd _xDisplayNameShort;
|
||||||
_ctrlChargeList lbSetTooltip [count GVAR(magModeData), format ["%1\n%2 m/s\n%3", _xDisplayName, _xInitSpeed toFixed 1, _xAirFriction]];
|
_ctrlChargeList lbSetTooltip [count GVAR(magModeData), format ["%1\n%2 m/s\n%3", _xDisplayName, _xInitSpeed toFixed 1, _xAirFriction]];
|
||||||
GVAR(magModeData) pushBack [_xInitSpeed, _xAirFriction];
|
GVAR(magModeData) pushBack [_xInitSpeed, _xAirFriction];
|
||||||
} else {
|
} else {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LOG_2("Trying to load gunlist from profile [Version: %1][Count: %2]", profileNamespace getVariable [ARR_2(QGVAR(profileNamespaceVersion), 'none')], count (profileNamespace getVariable [ARR_2(QGVAR(gunList), [])]));
|
LOG_2("Trying to load gunlist from profile [Version: %1][Count: %2]",profileNamespace getVariable [ARR_2(QGVAR(profileNamespaceVersion),'none')],count (profileNamespace getVariable [ARR_2(QGVAR(gunList),[])]));
|
||||||
|
|
||||||
private _resetGunList = true;
|
private _resetGunList = true;
|
||||||
if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) == ATRAGMX_PROFILE_NAMESPACE_VERSION && {count (profileNamespace getVariable ["ACE_ATragMX_gunList", []]) > 0}) then {
|
if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) == ATRAGMX_PROFILE_NAMESPACE_VERSION && {count (profileNamespace getVariable ["ACE_ATragMX_gunList", []]) > 0}) then {
|
||||||
|
@ -90,7 +90,7 @@ if (GVAR(showWind2)) then {
|
|||||||
|
|
||||||
_elevationAbs = Round(_elevationAbs * 100) / 100;
|
_elevationAbs = Round(_elevationAbs * 100) / 100;
|
||||||
if (_elevationAbs > 0) then {
|
if (_elevationAbs > 0) then {
|
||||||
ctrlSetText [400, format["%1", abs(_elevationAbs)]];
|
ctrlSetText [400, str abs _elevationAbs];
|
||||||
} else {
|
} else {
|
||||||
if (_elevationAbs < 0) then {
|
if (_elevationAbs < 0) then {
|
||||||
ctrlSetText [400, format["%1D", abs(_elevationAbs)]];
|
ctrlSetText [400, format["%1D", abs(_elevationAbs)]];
|
||||||
@ -100,7 +100,7 @@ if (_elevationAbs > 0) then {
|
|||||||
};
|
};
|
||||||
_elevationRel = Round(_elevationRel * 100) / 100;
|
_elevationRel = Round(_elevationRel * 100) / 100;
|
||||||
if (_elevationRel > 0) then {
|
if (_elevationRel > 0) then {
|
||||||
ctrlSetText [401, format["%1", abs(_elevationRel)]];
|
ctrlSetText [401, str abs _elevationRel];
|
||||||
} else {
|
} else {
|
||||||
if (_elevationRel < 0) then {
|
if (_elevationRel < 0) then {
|
||||||
ctrlSetText [401, format["%1D", abs(_elevationRel)]];
|
ctrlSetText [401, format["%1D", abs(_elevationRel)]];
|
||||||
@ -110,7 +110,7 @@ if (_elevationRel > 0) then {
|
|||||||
};
|
};
|
||||||
_elevationCur = Round(_elevationCur * 100) / 100;
|
_elevationCur = Round(_elevationCur * 100) / 100;
|
||||||
if (_elevationCur > 0) then {
|
if (_elevationCur > 0) then {
|
||||||
ctrlSetText [402, format["%1", abs(_elevationCur)]];
|
ctrlSetText [402, str abs _elevationCur];
|
||||||
} else {
|
} else {
|
||||||
if (_elevationCur < 0) then {
|
if (_elevationCur < 0) then {
|
||||||
ctrlSetText [402, format["%1D", abs(_elevationCur)]];
|
ctrlSetText [402, format["%1D", abs(_elevationCur)]];
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_vehicle"];
|
params ["_vehicle"];
|
||||||
TRACE_1("params", _vehicle);
|
TRACE_1("params",_vehicle);
|
||||||
|
|
||||||
scopeName "main";
|
scopeName "main";
|
||||||
|
|
||||||
|
@ -15,3 +15,17 @@ class Extended_PostInit_EventHandlers {
|
|||||||
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
|
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class Extended_Killed_EventHandlers {
|
||||||
|
class CAManBase {
|
||||||
|
class ADDON {
|
||||||
|
killed = QUOTE((_this select 0) call FUNC(handleDeployInterrupt));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Extended_DisplayLoad_EventHandlers {
|
||||||
|
class RscDisplayMission {
|
||||||
|
ADDON = QUOTE(_this call COMPILE_SCRIPT(XEH_missionDisplayLoad));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
@ -2,10 +2,15 @@ PREP(addCargoItem);
|
|||||||
PREP(addCargoVehiclesActions);
|
PREP(addCargoVehiclesActions);
|
||||||
PREP(canLoadItemIn);
|
PREP(canLoadItemIn);
|
||||||
PREP(canUnloadItem);
|
PREP(canUnloadItem);
|
||||||
|
PREP(deployCancel);
|
||||||
|
PREP(deployConfirm);
|
||||||
PREP(getCargoSpaceLeft);
|
PREP(getCargoSpaceLeft);
|
||||||
PREP(getNameItem);
|
PREP(getNameItem);
|
||||||
|
PREP(getSelectedItem);
|
||||||
PREP(getSizeItem);
|
PREP(getSizeItem);
|
||||||
PREP(handleDestroyed);
|
PREP(handleDestroyed);
|
||||||
|
PREP(handleDeployInterrupt);
|
||||||
|
PREP(handleScrollWheel);
|
||||||
PREP(initObject);
|
PREP(initObject);
|
||||||
PREP(initVehicle);
|
PREP(initVehicle);
|
||||||
PREP(loadItem);
|
PREP(loadItem);
|
||||||
@ -16,6 +21,7 @@ PREP(removeCargoItem);
|
|||||||
PREP(renameObject);
|
PREP(renameObject);
|
||||||
PREP(setSize);
|
PREP(setSize);
|
||||||
PREP(setSpace);
|
PREP(setSpace);
|
||||||
|
PREP(startDeploy);
|
||||||
PREP(startLoadIn);
|
PREP(startLoadIn);
|
||||||
PREP(startUnload);
|
PREP(startUnload);
|
||||||
PREP(unloadCarryItem);
|
PREP(unloadCarryItem);
|
||||||
|
11
addons/cargo/XEH_missionDisplayLoad.sqf
Normal file
11
addons/cargo/XEH_missionDisplayLoad.sqf
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
params ["_display"];
|
||||||
|
|
||||||
|
_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];
|
||||||
|
_display displayAddEventHandler ["MouseButtonDown", {
|
||||||
|
// Right clicking cancels deployment
|
||||||
|
if (_this select 1 == 1) then {
|
||||||
|
ACE_player call FUNC(handleDeployInterrupt);
|
||||||
|
};
|
||||||
|
}];
|
@ -17,10 +17,10 @@
|
|||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["ace_unloadCargo", {
|
["ace_unloadCargo", {
|
||||||
params ["_item", "_vehicle", ["_unloader", objNull]];
|
params ["_item", "_vehicle", ["_unloader", objNull], ["_place", []]];
|
||||||
TRACE_3("UnloadCargo EH",_item,_vehicle,_unloader);
|
TRACE_4("UnloadCargo EH",_item,_vehicle,_unloader,_place);
|
||||||
|
|
||||||
private _unloaded = [_item, _vehicle, _unloader] call FUNC(unloadItem); // returns true if successful
|
private _unloaded = [_item, _vehicle, _unloader, _place] call FUNC(unloadItem); // returns true if successful
|
||||||
|
|
||||||
// Show hint as feedback
|
// Show hint as feedback
|
||||||
private _hint = [LSTRING(unloadingFailed), LSTRING(unloadedItem)] select _unloaded;
|
private _hint = [LSTRING(unloadingFailed), LSTRING(unloadedItem)] select _unloaded;
|
||||||
@ -36,13 +36,25 @@
|
|||||||
};
|
};
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
// Direction must be set before setting position according to wiki
|
||||||
|
[QGVAR(setDirAndUnload), {
|
||||||
|
params ["_item", "_emptyPosAGL", "_direction"];
|
||||||
|
|
||||||
|
_item setDir _direction;
|
||||||
|
|
||||||
|
[QGVAR(serverUnload), [_item, _emptyPosAGL]] call CBA_fnc_serverEvent;
|
||||||
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
// hideObjectGlobal must be executed before setPos to ensure light objects are rendered correctly
|
||||||
|
// Do both on server to ensure they are executed in the correct order
|
||||||
[QGVAR(serverUnload), {
|
[QGVAR(serverUnload), {
|
||||||
params ["_item", "_emptyPosAGL"];
|
params ["_item", "_emptyPosAGL"];
|
||||||
|
|
||||||
_item hideObjectGlobal false;
|
_item hideObjectGlobal false;
|
||||||
_item setPosASL (AGLtoASL _emptyPosAGL);
|
_item setPosASL (AGLtoASL _emptyPosAGL);
|
||||||
|
|
||||||
[_item, "blockDamage", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set);
|
// Let objects remain invulernable for a short while after placement
|
||||||
|
[EFUNC(common,statusEffect_set), [_item, "blockDamage", QUOTE(ADDON), false], 2] call CBA_fnc_waitAndExecute;
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
[QGVAR(paradropItem), {
|
[QGVAR(paradropItem), {
|
||||||
@ -166,3 +178,38 @@ if (isServer) then {
|
|||||||
_bodyBag setVariable [QGVAR(customName), [_target, false, true] call EFUNC(common,getName), true];
|
_bodyBag setVariable [QGVAR(customName), [_target, false, true] call EFUNC(common,getName), true];
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Set variables, even on machines without interfaces, just to be safe
|
||||||
|
GVAR(selectedItem) = objNull;
|
||||||
|
GVAR(itemPreviewObject) = objNull;
|
||||||
|
GVAR(deployPFH) = -1;
|
||||||
|
GVAR(deployDistance) = -1;
|
||||||
|
GVAR(deployDirection) = 0;
|
||||||
|
GVAR(deployHeight) = 0;
|
||||||
|
GVAR(canDeploy) = false;
|
||||||
|
|
||||||
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
|
// Cancel object deployment if interact menu opened
|
||||||
|
["ace_interactMenuOpened", {ACE_player call FUNC(handleDeployInterrupt)}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
// Cancel deploy on player change. This does work when returning to lobby, but not when hard disconnecting
|
||||||
|
["unit", LINKFUNC(handleDeployInterrupt)] call CBA_fnc_addPlayerEventHandler;
|
||||||
|
["vehicle", {(_this select 0) call FUNC(handleDeployInterrupt)}] call CBA_fnc_addPlayerEventHandler;
|
||||||
|
["weapon", {(_this select 0) call FUNC(handleDeployInterrupt)}] call CBA_fnc_addPlayerEventHandler;
|
||||||
|
|
||||||
|
// When changing feature cameras, stop deployment
|
||||||
|
["featureCamera", {(_this select 0) call FUNC(handleDeployInterrupt)}] call CBA_fnc_addPlayerEventHandler;
|
||||||
|
|
||||||
|
// Handle falling unconscious while trying to deploy
|
||||||
|
["ace_unconscious", {(_this select 0) call FUNC(handleDeployInterrupt)}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
|
// Handle surrendering and handcuffing
|
||||||
|
["ace_captiveStatusChanged", {
|
||||||
|
params ["_unit", "_state"];
|
||||||
|
|
||||||
|
// If surrendered or handcuffed, stop deployment
|
||||||
|
if (_state) then {
|
||||||
|
_unit call FUNC(handleDeployInterrupt);
|
||||||
|
};
|
||||||
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
39
addons/cargo/functions/fnc_deployCancel.sqf
Normal file
39
addons/cargo/functions/fnc_deployCancel.sqf
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
/*
|
||||||
|
* Author: Garth 'L-H' de Wet, Ruthberg, commy2, Smith
|
||||||
|
* Cancels unloading when deploying.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Unit <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* player call ace_cargo_fnc_deployCancel
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (GVAR(deployPFH) == -1) exitWith {};
|
||||||
|
|
||||||
|
// Remove deployment pfh
|
||||||
|
GVAR(deployPFH) call CBA_fnc_removePerFrameHandler;
|
||||||
|
GVAR(deployPFH) = -1;
|
||||||
|
|
||||||
|
params ["_unit"];
|
||||||
|
|
||||||
|
// Enable running again
|
||||||
|
[_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set);
|
||||||
|
[_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set);
|
||||||
|
|
||||||
|
// Delete placement dummy
|
||||||
|
deleteVehicle GVAR(itemPreviewObject);
|
||||||
|
|
||||||
|
// Remove mouse button actions
|
||||||
|
call EFUNC(interaction,hideMouseHint);
|
||||||
|
|
||||||
|
[_unit, "DefaultAction", _unit getVariable [QGVAR(deploy), -1]] call EFUNC(common,removeActionEventHandler);
|
||||||
|
_unit setVariable [QGVAR(deploy), -1];
|
||||||
|
|
||||||
|
_unit setVariable [QGVAR(isDeploying), false, true];
|
56
addons/cargo/functions/fnc_deployConfirm.sqf
Normal file
56
addons/cargo/functions/fnc_deployConfirm.sqf
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
/*
|
||||||
|
* Author: Garth 'L-H' de Wet, Ruthberg, commy2, Smith
|
||||||
|
* Confirms unloading when deploying.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Unit <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* player call ace_cargo_fnc_deployConfirm
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (GVAR(deployPFH) == -1) exitWith {};
|
||||||
|
|
||||||
|
params ["_unit"];
|
||||||
|
|
||||||
|
// Delete placement dummy and unload real item from cargo at dummy position
|
||||||
|
if (!isNull GVAR(itemPreviewObject) && {[GVAR(selectedItem), GVAR(interactionVehicle), _unit, false, true] call FUNC(canUnloadItem)}) then {
|
||||||
|
// Position is AGL for unloading event
|
||||||
|
private _position = ASLToAGL getPosASL GVAR(itemPreviewObject);
|
||||||
|
private _direction = getDir GVAR(itemPreviewObject);
|
||||||
|
private _duration = GVAR(loadTimeCoefficient) * (GVAR(selectedItem) call FUNC(getSizeItem));
|
||||||
|
|
||||||
|
// If unload time is 0, don't show a progress bar
|
||||||
|
if (_duration <= 0) exitWith {
|
||||||
|
["ace_unloadCargo", [GVAR(selectedItem), GVAR(interactionVehicle), _unit, [_position, _direction]]] call CBA_fnc_localEvent;
|
||||||
|
};
|
||||||
|
|
||||||
|
[
|
||||||
|
_duration,
|
||||||
|
[GVAR(selectedItem), GVAR(interactionVehicle), _unit, [_position, _direction]],
|
||||||
|
{
|
||||||
|
TRACE_1("deploy finish",_this);
|
||||||
|
|
||||||
|
["ace_unloadCargo", _this select 0] call CBA_fnc_localEvent;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
TRACE_1("deploy fail",_this);
|
||||||
|
},
|
||||||
|
format [LLSTRING(unloadingItem), [GVAR(selectedItem), true] call FUNC(getNameItem), getText (configOf GVAR(interactionVehicle) >> "displayName")],
|
||||||
|
{
|
||||||
|
(_this select 0) params ["_item", "_vehicle", "_unit"];
|
||||||
|
|
||||||
|
[_item, _vehicle, _unit, false, true] call FUNC(canUnloadItem) // don't check for a suitable unloading position when deploying
|
||||||
|
},
|
||||||
|
["isNotSwimming"]
|
||||||
|
] call EFUNC(common,progressBar);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Cleanup EHs and preview object
|
||||||
|
_unit call FUNC(deployCancel);
|
29
addons/cargo/functions/fnc_getSelectedItem.sqf
Normal file
29
addons/cargo/functions/fnc_getSelectedItem.sqf
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
/*
|
||||||
|
* Author: Glowbal, Smith
|
||||||
|
* Get selected item from cargo menu.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* Classname of selected item or selected object <STRING> or <OBJECT> (default: nil)
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* call ace_cargo_fnc_getSelectedItem
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
disableSerialization;
|
||||||
|
|
||||||
|
private _display = uiNamespace getVariable QGVAR(menuDisplay);
|
||||||
|
|
||||||
|
if (isNil "_display") exitWith {};
|
||||||
|
|
||||||
|
private _loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []];
|
||||||
|
|
||||||
|
if (_loaded isEqualTo []) exitWith {};
|
||||||
|
|
||||||
|
// This can be an object or a classname string
|
||||||
|
_loaded param [lbCurSel (_display displayCtrl 100), nil]
|
30
addons/cargo/functions/fnc_handleDeployInterrupt.sqf
Normal file
30
addons/cargo/functions/fnc_handleDeployInterrupt.sqf
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
/*
|
||||||
|
* Author: commy2, Smith
|
||||||
|
* Handle various interruption types.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: (New) unit <OBJECT>
|
||||||
|
* 1: Old unit (for player change) <OBJECT> (default: objNull)
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* player call ace_cargo_fnc_handleDeployInterrupt
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
params ["_newPlayer", ["_oldPlayer", objNull]];
|
||||||
|
TRACE_2("params",_newPlayer,_oldPlayer);
|
||||||
|
|
||||||
|
if (!local _newPlayer) exitWith {};
|
||||||
|
|
||||||
|
if (_newPlayer getVariable [QGVAR(isDeploying), false]) then {
|
||||||
|
_newPlayer call FUNC(deployCancel);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_oldPlayer getVariable [QGVAR(isDeploying), false]) then {
|
||||||
|
_oldPlayer call FUNC(deployCancel);
|
||||||
|
};
|
58
addons/cargo/functions/fnc_handleScrollWheel.sqf
Normal file
58
addons/cargo/functions/fnc_handleScrollWheel.sqf
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
/*
|
||||||
|
* Author: L-H, commy2, Smith
|
||||||
|
* Handles rotation of object to unload.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Scroll amount <NUMBER>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* If the scroll was handled <BOOL>
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* 1.2 call ace_cargo_fnc_handleScrollWheel
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (GVAR(deployPFH) == -1) exitWith {false};
|
||||||
|
|
||||||
|
params ["_scrollAmount"];
|
||||||
|
|
||||||
|
private _deployedItem = GVAR(itemPreviewObject);
|
||||||
|
|
||||||
|
if (!CBA_events_control) then {
|
||||||
|
private _unit = ACE_player;
|
||||||
|
|
||||||
|
// Raise/lower
|
||||||
|
// Move deployed item 15 cm per scroll interval
|
||||||
|
_scrollAmount = _scrollAmount * 0.15;
|
||||||
|
|
||||||
|
private _position = getPosASL _deployedItem;
|
||||||
|
private _maxHeight = (_unit modelToWorldVisualWorld [0, 0, 0]) select 2;
|
||||||
|
|
||||||
|
_position set [2, ((_position select 2) + _scrollAmount min (_maxHeight + 1.5)) max _maxHeight];
|
||||||
|
|
||||||
|
// Move up/down object and reattach at current position
|
||||||
|
detach _deployedItem;
|
||||||
|
|
||||||
|
// Uses this method of selecting position because setPosATL did not have immediate effect
|
||||||
|
private _positionChange = _position vectorDiff (getPosASL _deployedItem);
|
||||||
|
private _selectionPosition = _unit worldToModel (ASLtoAGL getPosWorld _deployedItem);
|
||||||
|
_selectionPosition = _selectionPosition vectorAdd _positionChange;
|
||||||
|
_deployedItem attachTo [_unit, _selectionPosition];
|
||||||
|
|
||||||
|
// Reset the deploy direction
|
||||||
|
private _direction = _deployedItem getVariable [QGVAR(deployDirection_temp), 0];
|
||||||
|
_deployedItem setDir _direction;
|
||||||
|
} else {
|
||||||
|
// Rotate
|
||||||
|
private _direction = _deployedItem getVariable [QGVAR(deployDirection_temp), 0];
|
||||||
|
_scrollAmount = _scrollAmount * 10;
|
||||||
|
_direction = _direction + _scrollAmount;
|
||||||
|
|
||||||
|
_deployedItem setDir _direction;
|
||||||
|
_deployedItem setVariable [QGVAR(deployDirection_temp), _direction];
|
||||||
|
};
|
||||||
|
|
||||||
|
true
|
@ -44,7 +44,7 @@ if (_item getVariable [QGVAR(initObject),false]) exitWith {};
|
|||||||
if (_canLoadConfig) then {
|
if (_canLoadConfig) then {
|
||||||
GVAR(initializedItemClasses) pushBack _type;
|
GVAR(initializedItemClasses) pushBack _type;
|
||||||
|
|
||||||
TRACE_1("Adding load cargo action to class", _type);
|
TRACE_1("Adding load cargo action to class",_type);
|
||||||
|
|
||||||
{
|
{
|
||||||
[_type, 0, ["ACE_MainActions"], _x] call EFUNC(interact_menu,addActionToClass);
|
[_type, 0, ["ACE_MainActions"], _x] call EFUNC(interact_menu,addActionToClass);
|
||||||
@ -52,7 +52,7 @@ if (_canLoadConfig) then {
|
|||||||
} else {
|
} else {
|
||||||
_item setVariable [QGVAR(initObject), true];
|
_item setVariable [QGVAR(initObject), true];
|
||||||
|
|
||||||
TRACE_1("Adding load cargo action to object", _item);
|
TRACE_1("Adding load cargo action to object",_item);
|
||||||
|
|
||||||
{
|
{
|
||||||
[_item, 0, ["ACE_MainActions"], _x] call EFUNC(interact_menu,addActionToObject);
|
[_item, 0, ["ACE_MainActions"], _x] call EFUNC(interact_menu,addActionToObject);
|
||||||
|
@ -16,17 +16,23 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_vehicle"];
|
params ["_vehicle"];
|
||||||
TRACE_1("params", _vehicle);
|
TRACE_1("params",_vehicle);
|
||||||
|
|
||||||
private _type = typeOf _vehicle;
|
private _type = typeOf _vehicle;
|
||||||
private _config = configOf _vehicle;
|
private _config = configOf _vehicle;
|
||||||
|
|
||||||
// If vehicle had space given to it via eden/public, then override config hasCargo setting
|
// If vehicle had space given to it via eden/public, then override config hasCargo setting
|
||||||
private _hasCargoPublic = _vehicle getVariable [QGVAR(hasCargo), false];
|
private _hasCargoPublic = _item getVariable QGVAR(hasCargo);
|
||||||
|
private _hasCargoPublicDefined = !isNil "_canLoadPublic";
|
||||||
|
|
||||||
|
if (_hasCargoPublicDefined && {!(_hasCargoPublic isEqualType false)}) then {
|
||||||
|
WARNING_4("%1[%2] - Variable %3 is %4 - Should be bool",_item,_type,QGVAR(hasCargo),_hasCargoPublic);
|
||||||
|
};
|
||||||
|
|
||||||
private _hasCargoConfig = getNumber (_config >> QGVAR(hasCargo)) == 1;
|
private _hasCargoConfig = getNumber (_config >> QGVAR(hasCargo)) == 1;
|
||||||
|
|
||||||
// Nothing to do here if vehicle has no cargo space
|
// Nothing to do here if vehicle has no cargo space
|
||||||
if !(_hasCargoConfig || _hasCargoPublic) exitWith {};
|
if !((_hasCargoPublicDefined && {_hasCargoPublic in [true, 1]}) || {!_hasCargoPublicDefined && {_hasCargoConfig}}) exitWith {};
|
||||||
|
|
||||||
// Check if cargo is in cargo holder types (checked when trying to search for loadable objects)
|
// Check if cargo is in cargo holder types (checked when trying to search for loadable objects)
|
||||||
private _addCargoType = GVAR(cargoHolderTypes) findIf {_type isKindOf _x} == -1;
|
private _addCargoType = GVAR(cargoHolderTypes) findIf {_type isKindOf _x} == -1;
|
||||||
@ -68,13 +74,13 @@ if (_type in GVAR(initializedVehicleClasses)) exitWith {};
|
|||||||
if (_hasCargoConfig) then {
|
if (_hasCargoConfig) then {
|
||||||
GVAR(initializedVehicleClasses) pushBack _type;
|
GVAR(initializedVehicleClasses) pushBack _type;
|
||||||
|
|
||||||
TRACE_1("Adding unload cargo action to class", _type);
|
TRACE_1("Adding unload cargo action to class",_type);
|
||||||
|
|
||||||
[_type, 0, ["ACE_MainActions"], GVAR(vehicleAction)] call EFUNC(interact_menu,addActionToClass);
|
[_type, 0, ["ACE_MainActions"], GVAR(vehicleAction)] call EFUNC(interact_menu,addActionToClass);
|
||||||
} else {
|
} else {
|
||||||
_vehicle setVariable [QGVAR(initVehicle), true];
|
_vehicle setVariable [QGVAR(initVehicle), true];
|
||||||
|
|
||||||
TRACE_1("Adding unload cargo action to object", _vehicle);
|
TRACE_1("Adding unload cargo action to object",_vehicle);
|
||||||
|
|
||||||
[_vehicle, 0, ["ACE_MainActions"], GVAR(vehicleAction)] call EFUNC(interact_menu,addActionToObject);
|
[_vehicle, 0, ["ACE_MainActions"], GVAR(vehicleAction)] call EFUNC(interact_menu,addActionToObject);
|
||||||
};
|
};
|
||||||
|
@ -25,6 +25,9 @@ if (GVAR(interactionParadrop)) then {
|
|||||||
(_display displayCtrl 12) ctrlSetText LLSTRING(paradropButton);
|
(_display displayCtrl 12) ctrlSetText LLSTRING(paradropButton);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Disable deploy option if paradropping or in Zeus
|
||||||
|
(_display displayCtrl 13) ctrlEnable (GVAR(enableDeploy) && !GVAR(interactionParadrop) && {isNull curatorCamera});
|
||||||
|
|
||||||
[{
|
[{
|
||||||
params ["_vehicle", "_pfhID"];
|
params ["_vehicle", "_pfhID"];
|
||||||
|
|
||||||
@ -33,7 +36,6 @@ if (GVAR(interactionParadrop)) then {
|
|||||||
private _display = uiNamespace getVariable QGVAR(menuDisplay);
|
private _display = uiNamespace getVariable QGVAR(menuDisplay);
|
||||||
|
|
||||||
if (isNil "_display") exitWith {
|
if (isNil "_display") exitWith {
|
||||||
GVAR(interactionVehicle) = nil;
|
|
||||||
GVAR(interactionParadrop) = nil;
|
GVAR(interactionParadrop) = nil;
|
||||||
|
|
||||||
_pfhID call CBA_fnc_removePerFrameHandler;
|
_pfhID call CBA_fnc_removePerFrameHandler;
|
||||||
@ -41,18 +43,18 @@ if (GVAR(interactionParadrop)) then {
|
|||||||
|
|
||||||
// Close menu if in invalid state
|
// Close menu if in invalid state
|
||||||
if (
|
if (
|
||||||
!alive _vehicle ||
|
!alive ACE_player ||
|
||||||
|
{!alive _vehicle} ||
|
||||||
{locked _vehicle >= 2} ||
|
{locked _vehicle >= 2} ||
|
||||||
{!(_vehicle getVariable [QGVAR(hasCargo), true])} || // if the cargo menu could be opened, the vehicle has QGVAR(hasCargo) in its config or the variable is set using FUNC(setSpace)
|
{!(_vehicle getVariable [QGVAR(hasCargo), true])} || // if the cargo menu could be opened, the vehicle has QGVAR(hasCargo) in its config or the variable is set using FUNC(setSpace)
|
||||||
{
|
{
|
||||||
isNull findDisplay 312 && // if in Zeus, ignore the following checks
|
isNull curatorCamera && // if in Zeus, ignore the checks that follow
|
||||||
{([ACE_player, _vehicle] call EFUNC(interaction,getInteractionDistance)) >= MAX_LOAD_DISTANCE} &&
|
{([ACE_player, _vehicle] call EFUNC(interaction,getInteractionDistance)) >= MAX_LOAD_DISTANCE} &&
|
||||||
{(vehicle ACE_player) != _vehicle}
|
{(vehicle ACE_player) != _vehicle}
|
||||||
}
|
}
|
||||||
) exitWith {
|
) exitWith {
|
||||||
closeDialog 0;
|
closeDialog 0;
|
||||||
|
|
||||||
GVAR(interactionVehicle) = nil;
|
|
||||||
GVAR(interactionParadrop) = nil;
|
GVAR(interactionParadrop) = nil;
|
||||||
|
|
||||||
_pfhID call CBA_fnc_removePerFrameHandler;
|
_pfhID call CBA_fnc_removePerFrameHandler;
|
||||||
|
86
addons/cargo/functions/fnc_startDeploy.sqf
Normal file
86
addons/cargo/functions/fnc_startDeploy.sqf
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
/*
|
||||||
|
* Author: Garth 'L-H' de Wet, Ruthberg, commy2, Smith
|
||||||
|
* Starts the deploy process for unloading an object.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Unit deploying <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* player call ace_cargo_fnc_startDeploy
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Deny creating preview item as it will destroy player vehicle instantly by collision
|
||||||
|
if (GVAR(interactionParadrop)) exitWith {};
|
||||||
|
|
||||||
|
params ["_unit"];
|
||||||
|
|
||||||
|
// Don't allow deploying if already deploying
|
||||||
|
if (_unit getVariable [QGVAR(isDeploying), false]) exitWith {};
|
||||||
|
|
||||||
|
// This can be an object or a classname string
|
||||||
|
private _item = call FUNC(getSelectedItem);
|
||||||
|
|
||||||
|
if (isNil "_item") exitWith {};
|
||||||
|
|
||||||
|
// Close opened cargo menu
|
||||||
|
closeDialog 0;
|
||||||
|
|
||||||
|
GVAR(selectedItem) = _item;
|
||||||
|
|
||||||
|
private _classname = _item;
|
||||||
|
|
||||||
|
if (_classname isEqualType objNull) then {
|
||||||
|
_classname = typeOf _classname;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Prevent the placing unit from running
|
||||||
|
[_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
|
||||||
|
[_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set);
|
||||||
|
|
||||||
|
// Create a local preview object
|
||||||
|
private _itemPreviewObject = createVehicleLocal [_classname, [0, 0, 0], [], 0, "CAN_COLLIDE"];
|
||||||
|
|
||||||
|
GVAR(itemPreviewObject) = _itemPreviewObject;
|
||||||
|
|
||||||
|
// Prevent collisions with object
|
||||||
|
_itemPreviewObject disableCollisionWith _unit;
|
||||||
|
_itemPreviewObject enableSimulation false;
|
||||||
|
_itemPreviewObject setMass 1e-12;
|
||||||
|
|
||||||
|
// Detect radius of zone where collision can damage the player
|
||||||
|
private _itemPreviewObjectRadius = 1 max ((boundingBoxReal [_itemPreviewObject, "FireGeometry"]) select 2);
|
||||||
|
|
||||||
|
// Add height offset of model
|
||||||
|
private _offset = ((_itemPreviewObject modelToWorldVisual [0, 0, 0]) select 2) - ((_unit modelToWorldVisual [0, 0, 0]) select 2) + 1;
|
||||||
|
|
||||||
|
// Attach object
|
||||||
|
_itemPreviewObject attachTo [_unit, [0, 1.5 * _itemPreviewObjectRadius, _offset]];
|
||||||
|
|
||||||
|
// PFH that runs while the deployment is in progress
|
||||||
|
GVAR(deployPFH) = [{
|
||||||
|
(_this select 0) params ["_unit", "_vehicle", "_item", "_itemPreviewObject"];
|
||||||
|
|
||||||
|
if !(
|
||||||
|
!isNull _itemPreviewObject &&
|
||||||
|
{[_item, _vehicle, _unit, false, true] call FUNC(canUnloadItem)} // don't check for a suitable unloading position when deploying
|
||||||
|
) exitWith {
|
||||||
|
_unit call FUNC(deployCancel);
|
||||||
|
};
|
||||||
|
}, 0.5, [_unit, GVAR(interactionVehicle), _item, _itemPreviewObject]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
|
// Add mouse button action and hint
|
||||||
|
[LLSTRING(unloadObject), localize "STR_DISP_CANCEL", LLSTRING(scrollAction)] call EFUNC(interaction,showMouseHint);
|
||||||
|
|
||||||
|
_unit setVariable [QGVAR(deploy), [
|
||||||
|
_unit, "DefaultAction",
|
||||||
|
{GVAR(deployPFH) != -1},
|
||||||
|
{[_this select 0] call FUNC(deployConfirm)}
|
||||||
|
] call EFUNC(common,addActionEventHandler)];
|
||||||
|
|
||||||
|
_unit setVariable [QGVAR(isDeploying), true, true];
|
@ -64,6 +64,8 @@ if ([_item, _vehicle] call FUNC(canLoadItemIn)) then {
|
|||||||
|
|
||||||
[objNull, _item, true] call EFUNC(common,claim);
|
[objNull, _item, true] call EFUNC(common,claim);
|
||||||
|
|
||||||
|
[[LSTRING(loadingFailed), [_item, true] call FUNC(getNameItem)], 3] call EFUNC(common,displayTextStructured);
|
||||||
|
|
||||||
// Fix cancelling loading a carried item
|
// Fix cancelling loading a carried item
|
||||||
if (!isNull attachedTo _item) then {
|
if (!isNull attachedTo _item) then {
|
||||||
detach _item;
|
detach _item;
|
||||||
@ -85,6 +87,9 @@ if ([_item, _vehicle] call FUNC(canLoadItemIn)) then {
|
|||||||
|
|
||||||
true // return
|
true // return
|
||||||
} else {
|
} else {
|
||||||
|
// Unlock the object
|
||||||
|
[objNull, _item, true] call EFUNC(common,claim);
|
||||||
|
|
||||||
[[LSTRING(loadingFailed), [_item, true] call FUNC(getNameItem)], 3] call EFUNC(common,displayTextStructured);
|
[[LSTRING(loadingFailed), [_item, true] call FUNC(getNameItem)], 3] call EFUNC(common,displayTextStructured);
|
||||||
|
|
||||||
// Fix cancelling loading a carried item
|
// Fix cancelling loading a carried item
|
||||||
|
@ -15,18 +15,8 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
disableSerialization;
|
|
||||||
|
|
||||||
private _display = uiNamespace getVariable QGVAR(menuDisplay);
|
|
||||||
|
|
||||||
if (isNil "_display") exitWith {};
|
|
||||||
|
|
||||||
private _loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []];
|
|
||||||
|
|
||||||
if (_loaded isEqualTo []) exitWith {};
|
|
||||||
|
|
||||||
// This can be an object or a classname string
|
// This can be an object or a classname string
|
||||||
private _item = _loaded param [lbCurSel (_display displayCtrl 100), nil];
|
private _item = call FUNC(getSelectedItem);
|
||||||
|
|
||||||
if (isNil "_item") exitWith {};
|
if (isNil "_item") exitWith {};
|
||||||
|
|
||||||
@ -60,11 +50,11 @@ if (GVAR(interactionParadrop)) exitWith {
|
|||||||
},
|
},
|
||||||
format [LLSTRING(unloadingItem), [_item, true] call FUNC(getNameItem), getText (configOf GVAR(interactionVehicle) >> "displayName")],
|
format [LLSTRING(unloadingItem), [_item, true] call FUNC(getNameItem), getText (configOf GVAR(interactionVehicle) >> "displayName")],
|
||||||
{
|
{
|
||||||
(_this select 0) params ["", "_target"];
|
(_this select 0) params ["", "_vehicle"];
|
||||||
|
|
||||||
if ((acos ((vectorUp _target) select 2)) > 30) exitWith {false}; // check flight level
|
if ((acos ((vectorUp _vehicle) select 2)) > 30) exitWith {false}; // check flight level
|
||||||
if (((getPos _target) select 2) < 25) exitWith {false}; // check height
|
if (((getPos _vehicle) select 2) < 25) exitWith {false}; // check height
|
||||||
if ((speed _target) < -5) exitWith {false}; // check reverse
|
if ((speed _vehicle) < -5) exitWith {false}; // check reverse
|
||||||
|
|
||||||
true
|
true
|
||||||
},
|
},
|
||||||
@ -74,7 +64,7 @@ if (GVAR(interactionParadrop)) exitWith {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// If in zeus
|
// If in zeus
|
||||||
if (!isNull findDisplay 312) exitWith {
|
if (!isNull curatorCamera) exitWith {
|
||||||
// Do not check distance to unit, but do check for valid position
|
// Do not check distance to unit, but do check for valid position
|
||||||
if !([_item, GVAR(interactionVehicle), objNull, true] call FUNC(canUnloadItem)) exitWith {
|
if !([_item, GVAR(interactionVehicle), objNull, true] call FUNC(canUnloadItem)) exitWith {
|
||||||
[[LSTRING(unloadingFailed), [_item, true] call FUNC(getNameItem)], 3] call EFUNC(common,displayTextStructured);
|
[[LSTRING(unloadingFailed), [_item, true] call FUNC(getNameItem)], 3] call EFUNC(common,displayTextStructured);
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
* 0: Item to be unloaded <STRING> or <OBJECT> (default: "")
|
* 0: Item to be unloaded <STRING> or <OBJECT> (default: "")
|
||||||
* 1: Holder object (vehicle) <OBJECT> (default: objNull)
|
* 1: Holder object (vehicle) <OBJECT> (default: objNull)
|
||||||
* 2: Unloader <OBJECT> (default: objNull)
|
* 2: Unloader <OBJECT> (default: objNull)
|
||||||
|
* 3: Deploy parameters <ARRAY> (default: [])
|
||||||
|
* - 0: Position AGL <ARRAY>
|
||||||
|
* - 1: Direction <NUMBER>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Object unloaded <BOOL>
|
* Object unloaded <BOOL>
|
||||||
@ -17,8 +20,10 @@
|
|||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params [["_item", "", [objNull, ""]], ["_vehicle", objNull, [objNull]], ["_unloader", objNull, [objNull]]];
|
params [["_item", "", [objNull, ""]], ["_vehicle", objNull, [objNull]], ["_unloader", objNull, [objNull]], ["_deploy", []]];
|
||||||
TRACE_3("params",_item,_vehicle,_unloader);
|
_deploy params ["_emptyPosAGL", "_direction"];
|
||||||
|
|
||||||
|
TRACE_4("params",_item,_vehicle,_unloader,_deploy);
|
||||||
|
|
||||||
// Get config sensitive case name
|
// Get config sensitive case name
|
||||||
if (_item isEqualType "") then {
|
if (_item isEqualType "") then {
|
||||||
@ -41,9 +46,18 @@ if (_itemSize < 0) exitWith {
|
|||||||
false // return
|
false // return
|
||||||
};
|
};
|
||||||
|
|
||||||
// This covers testing vehicle stability and finding a safe position
|
private _deployed = _deploy isNotEqualTo [];
|
||||||
private _emptyPosAGL = [_vehicle, _item, _unloader] call EFUNC(common,findUnloadPosition);
|
|
||||||
TRACE_1("findUnloadPosition",_emptyPosAGL);
|
if (!_deployed) then {
|
||||||
|
// This covers testing vehicle stability and finding a safe position
|
||||||
|
for "_i" from 1 to 3 do {
|
||||||
|
_emptyPosAGL = [_vehicle, _item, _unloader] call EFUNC(common,findUnloadPosition);
|
||||||
|
|
||||||
|
if (_emptyPosAGL isNotEqualTo []) exitWith {};
|
||||||
|
};
|
||||||
|
|
||||||
|
TRACE_1("findUnloadPosition",_emptyPosAGL);
|
||||||
|
};
|
||||||
|
|
||||||
if (_emptyPosAGL isEqualTo []) exitWith {
|
if (_emptyPosAGL isEqualTo []) exitWith {
|
||||||
// Display text saying there are no safe places to exit the vehicle
|
// Display text saying there are no safe places to exit the vehicle
|
||||||
@ -67,9 +81,12 @@ private _object = _item;
|
|||||||
if (_object isEqualType objNull) then {
|
if (_object isEqualType objNull) then {
|
||||||
detach _object;
|
detach _object;
|
||||||
|
|
||||||
// hideObjectGlobal must be executed before setPos to ensure light objects are rendered correctly
|
// If player unloads via deployment, set direction first, then unload
|
||||||
// Do both on server to ensure they are executed in the correct order
|
if (_deployed) then {
|
||||||
[QGVAR(serverUnload), [_object, _emptyPosAGL]] call CBA_fnc_serverEvent;
|
[QGVAR(setDirAndUnload), [_object, _emptyPosAGL, _direction], _object] call CBA_fnc_targetEvent;
|
||||||
|
} else {
|
||||||
|
[QGVAR(serverUnload), [_object, _emptyPosAGL]] call CBA_fnc_serverEvent;
|
||||||
|
};
|
||||||
|
|
||||||
if (["ace_zeus"] call EFUNC(common,isModLoaded)) then {
|
if (["ace_zeus"] call EFUNC(common,isModLoaded)) then {
|
||||||
// Get which curators had this object as editable
|
// Get which curators had this object as editable
|
||||||
@ -81,6 +98,12 @@ if (_object isEqualType objNull) then {
|
|||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
_object = createVehicle [_item, _emptyPosAGL, [], 0, "NONE"];
|
_object = createVehicle [_item, _emptyPosAGL, [], 0, "NONE"];
|
||||||
|
|
||||||
|
// If player unloads via deployment, set direction. Must happen before setPosASL command according to wiki
|
||||||
|
if (_deployed) then {
|
||||||
|
_object setDir _direction;
|
||||||
|
};
|
||||||
|
|
||||||
_object setPosASL (AGLtoASL _emptyPosAGL);
|
_object setPosASL (AGLtoASL _emptyPosAGL);
|
||||||
|
|
||||||
[QEGVAR(common,fixCollision), _object] call CBA_fnc_localEvent;
|
[QEGVAR(common,fixCollision), _object] call CBA_fnc_localEvent;
|
||||||
@ -88,7 +111,9 @@ if (_object isEqualType objNull) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Dragging integration
|
// Dragging integration
|
||||||
[_unloader, _object] call FUNC(unloadCarryItem);
|
if (!_deployed) then {
|
||||||
|
[_unloader, _object] call FUNC(unloadCarryItem);
|
||||||
|
};
|
||||||
|
|
||||||
// Invoke listenable event
|
// Invoke listenable event
|
||||||
["ace_cargoUnloaded", [_object, _vehicle, "unload"]] call CBA_fnc_globalEvent;
|
["ace_cargoUnloaded", [_object, _vehicle, "unload"]] call CBA_fnc_globalEvent;
|
||||||
|
@ -6,7 +6,7 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
|
|||||||
[LSTRING(ModuleSettings_enable), LSTRING(ModuleSettings_enable_Description)],
|
[LSTRING(ModuleSettings_enable), LSTRING(ModuleSettings_enable_Description)],
|
||||||
_category,
|
_category,
|
||||||
true,
|
true,
|
||||||
true,
|
1,
|
||||||
{[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)}
|
{[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)}
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
|
|||||||
[LSTRING(loadTimeCoefficient), LSTRING(loadTimeCoefficient_description)],
|
[LSTRING(loadTimeCoefficient), LSTRING(loadTimeCoefficient_description)],
|
||||||
_category,
|
_category,
|
||||||
[0, 10, 5, 1],
|
[0, 10, 5, 1],
|
||||||
true,
|
1,
|
||||||
{[QGVAR(loadTimeCoefficient), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
|
{[QGVAR(loadTimeCoefficient), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
|
|||||||
[LSTRING(paradropTimeCoefficent), LSTRING(paradropTimeCoefficent_description)],
|
[LSTRING(paradropTimeCoefficent), LSTRING(paradropTimeCoefficent_description)],
|
||||||
_category,
|
_category,
|
||||||
[0, 10, 2.5, 1],
|
[0, 10, 2.5, 1],
|
||||||
true,
|
1,
|
||||||
{[QGVAR(paradropTimeCoefficent), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
|
{[QGVAR(paradropTimeCoefficent), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
@ -36,26 +36,36 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
|
|||||||
[LSTRING(openAfterUnload), LSTRING(openAfterUnload_description)],
|
[LSTRING(openAfterUnload), LSTRING(openAfterUnload_description)],
|
||||||
_category,
|
_category,
|
||||||
[[0, 1, 2, 3], [ELSTRING(common,never), LSTRING(unloadObject), LSTRING(paradropButton), ELSTRING(common,both)], 0],
|
[[0, 1, 2, 3], [ELSTRING(common,never), LSTRING(unloadObject), LSTRING(paradropButton), ELSTRING(common,both)], 0],
|
||||||
false,
|
0,
|
||||||
{[QGVAR(openAfterUnload), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
|
{[QGVAR(openAfterUnload), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
[
|
|
||||||
QGVAR(enableRename),
|
|
||||||
"CHECKBOX",
|
|
||||||
[LSTRING(ModuleSettings_enableRename), LSTRING(ModuleSettings_enableRename_Description)],
|
|
||||||
_category,
|
|
||||||
true,
|
|
||||||
false,
|
|
||||||
{[QGVAR(enableRename), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
|
|
||||||
] call CBA_fnc_addSetting;
|
|
||||||
|
|
||||||
[
|
[
|
||||||
QGVAR(carryAfterUnload),
|
QGVAR(carryAfterUnload),
|
||||||
"CHECKBOX",
|
"CHECKBOX",
|
||||||
[LSTRING(carryAfterUnload), LSTRING(carryAfterUnload_description)],
|
[LSTRING(carryAfterUnload), LSTRING(carryAfterUnload_description)],
|
||||||
_category,
|
_category,
|
||||||
true,
|
true,
|
||||||
false,
|
0,
|
||||||
{[QGVAR(carryAfterUnload), _this] call EFUNC(common,cbaSettings_settingChanged)}
|
{[QGVAR(carryAfterUnload), _this] call EFUNC(common,cbaSettings_settingChanged)}
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
|
[
|
||||||
|
QGVAR(enableDeploy),
|
||||||
|
"CHECKBOX",
|
||||||
|
[LSTRING(enableDeploy), LSTRING(enableDeploy_description)],
|
||||||
|
_category,
|
||||||
|
true,
|
||||||
|
1,
|
||||||
|
{[QGVAR(enableDeploy), _this] call EFUNC(common,cbaSettings_settingChanged)}
|
||||||
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
|
[
|
||||||
|
QGVAR(enableRename),
|
||||||
|
"CHECKBOX",
|
||||||
|
[LSTRING(ModuleSettings_enableRename), LSTRING(ModuleSettings_enableRename_Description)],
|
||||||
|
_category,
|
||||||
|
true,
|
||||||
|
0,
|
||||||
|
{[QGVAR(enableRename), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
|
||||||
|
] call CBA_fnc_addSetting;
|
||||||
|
@ -17,7 +17,7 @@ class GVAR(menu) {
|
|||||||
};
|
};
|
||||||
class CenterBackground: HeaderBackground {
|
class CenterBackground: HeaderBackground {
|
||||||
y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||||
h = "13.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
h = "14.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||||
text = "#(argb,8,8,3)color(0,0,0,0.8)";
|
text = "#(argb,8,8,3)color(0,0,0,0.8)";
|
||||||
colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
|
colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
|
||||||
colorBackground[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
|
colorBackground[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"};
|
||||||
@ -72,7 +72,7 @@ class GVAR(menu) {
|
|||||||
idc = 11;
|
idc = 11;
|
||||||
x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||||
y = "14.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
y = "14.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||||
w = "5 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
w = "6 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||||
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||||
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
|
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
|
||||||
@ -96,8 +96,15 @@ class GVAR(menu) {
|
|||||||
class btnUnload: btnCancel {
|
class btnUnload: btnCancel {
|
||||||
text = CSTRING(unloadObject);
|
text = CSTRING(unloadObject);
|
||||||
idc = 12;
|
idc = 12;
|
||||||
x = "20.9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
x = "19.9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||||
action = QUOTE(ACE_player call FUNC(startUnload));
|
action = QUOTE(ACE_player call FUNC(startUnload));
|
||||||
};
|
};
|
||||||
|
class btnPlace: btnUnload {
|
||||||
|
text = CSTRING(deployObject);
|
||||||
|
idc = 13;
|
||||||
|
y = "15.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
|
||||||
|
action = QUOTE(ACE_player call FUNC(startDeploy));
|
||||||
|
colorDisabled[] = {0.25, 0.25, 0.25, 1};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -33,6 +33,40 @@
|
|||||||
<Chinesesimp>卸载</Chinesesimp>
|
<Chinesesimp>卸载</Chinesesimp>
|
||||||
<Turkish>Boşalt</Turkish>
|
<Turkish>Boşalt</Turkish>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Cargo_deployObject">
|
||||||
|
<English>Deploy</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Cargo_ScrollAction">
|
||||||
|
<English>Raise/Lower | (Ctrl + Scroll) Rotate</English>
|
||||||
|
<German>Heben/Senken | (Strg + Scrollen) Drehen</German>
|
||||||
|
<Italian>Alza/Abbassa | (Ctrl + Rotellina) Ruota</Italian>
|
||||||
|
<French>Lever/Baisser | (Ctrl + Scroll) Rotation</French>
|
||||||
|
<Japanese>上げる/下げる | (Ctrl + スクロール) 回転</Japanese>
|
||||||
|
<Czech>Zvednout/Snížit | (Ctrl + Kolečko myši) Otáčet</Czech>
|
||||||
|
<Russian>Поднять/опустить | (Ctrl + Скролл) Крутить</Russian>
|
||||||
|
<Polish>Wyżej/niżej | (Ctrl + Kółko myszy) obracanie</Polish>
|
||||||
|
<Turkish>Yükselt/Alçalt | (Ctrl + Tekerlek) Döndür</Turkish>
|
||||||
|
<Spanish>Subir/Bajar | (Ctrl + Scroll) Rotar</Spanish>
|
||||||
|
<Chinesesimp>抬起/放低 |(Ctrl + 鼠标滚轮)旋转</Chinesesimp>
|
||||||
|
<Korean>높이기/내리기 | (컨트롤 + 스크롤) 회전</Korean>
|
||||||
|
<Portuguese>Subir/Abaixar | (Ctrl + Scroll) Rotacionar</Portuguese>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Cargo_BlockedAction">
|
||||||
|
<English>Blocked</English>
|
||||||
|
<Spanish>Obstruido</Spanish>
|
||||||
|
<Portuguese>Bloqueado</Portuguese>
|
||||||
|
<Russian>Заблокировано</Russian>
|
||||||
|
<Czech>Blokováno</Czech>
|
||||||
|
<Polish>Zablokowany</Polish>
|
||||||
|
<Italian>Bloccato</Italian>
|
||||||
|
<German>Blockiert</German>
|
||||||
|
<French>Bloqué</French>
|
||||||
|
<Japanese>取り付け不可</Japanese>
|
||||||
|
<Korean>막힘</Korean>
|
||||||
|
<Chinesesimp>断开</Chinesesimp>
|
||||||
|
<Chinese>斷開</Chinese>
|
||||||
|
<Turkish>Bloke Edilmiş</Turkish>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_Cargo_renamedObject">
|
<Key ID="STR_ACE_Cargo_renamedObject">
|
||||||
<English>Renamed to:<br/>%1</English>
|
<English>Renamed to:<br/>%1</English>
|
||||||
<Japanese>名前を次に変更:<br/>%1</Japanese>
|
<Japanese>名前を次に変更:<br/>%1</Japanese>
|
||||||
@ -48,7 +82,7 @@
|
|||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Cargo_clearedCustomName">
|
<Key ID="STR_ACE_Cargo_clearedCustomName">
|
||||||
<English>Custom name has been cleared.</English>
|
<English>Custom name has been cleared.</English>
|
||||||
<Japanese>カスタムネームが削除されました。</Japanese>
|
<Japanese>カスタム名が削除されました。</Japanese>
|
||||||
<French>Le nom personnalisé a été supprimé.</French>
|
<French>Le nom personnalisé a été supprimé.</French>
|
||||||
<Russian>Пользовательское название удалено.</Russian>
|
<Russian>Пользовательское название удалено.</Russian>
|
||||||
<German>Eigener Name wurde gelöscht.</German>
|
<German>Eigener Name wurde gelöscht.</German>
|
||||||
@ -108,7 +142,7 @@
|
|||||||
<Spanish>Carga</Spanish>
|
<Spanish>Carga</Spanish>
|
||||||
<Italian>Carico</Italian>
|
<Italian>Carico</Italian>
|
||||||
<French>Cargaison</French>
|
<French>Cargaison</French>
|
||||||
<Japanese>カーゴ</Japanese>
|
<Japanese>貨物</Japanese>
|
||||||
<Korean>화물</Korean>
|
<Korean>화물</Korean>
|
||||||
<Chinese>貨物</Chinese>
|
<Chinese>貨物</Chinese>
|
||||||
<Chinesesimp>货物</Chinesesimp>
|
<Chinesesimp>货物</Chinesesimp>
|
||||||
@ -124,7 +158,7 @@
|
|||||||
<Spanish>Menu de carga</Spanish>
|
<Spanish>Menu de carga</Spanish>
|
||||||
<Italian>Menù del Carico</Italian>
|
<Italian>Menù del Carico</Italian>
|
||||||
<French>Menu de cargaison</French>
|
<French>Menu de cargaison</French>
|
||||||
<Japanese>カーゴ メニュー</Japanese>
|
<Japanese>貨物メニュー</Japanese>
|
||||||
<Korean>화물 메뉴</Korean>
|
<Korean>화물 메뉴</Korean>
|
||||||
<Chinese>貨物選單</Chinese>
|
<Chinese>貨物選單</Chinese>
|
||||||
<Chinesesimp>货物菜单</Chinesesimp>
|
<Chinesesimp>货物菜单</Chinesesimp>
|
||||||
@ -140,7 +174,7 @@
|
|||||||
<Spanish>Espacio de carga restante: %1</Spanish>
|
<Spanish>Espacio de carga restante: %1</Spanish>
|
||||||
<Italian>Spazio di carico rimanente: %1</Italian>
|
<Italian>Spazio di carico rimanente: %1</Italian>
|
||||||
<French>Espace de chargement restant : %1</French>
|
<French>Espace de chargement restant : %1</French>
|
||||||
<Japanese>カーゴの空き容量: %1</Japanese>
|
<Japanese>貨物室の空き容量: %1</Japanese>
|
||||||
<Korean>선적 공간 남음: %1</Korean>
|
<Korean>선적 공간 남음: %1</Korean>
|
||||||
<Chinese>貨物剩餘空間: %1</Chinese>
|
<Chinese>貨物剩餘空間: %1</Chinese>
|
||||||
<Chinesesimp>货物剩余空间:%1</Chinesesimp>
|
<Chinesesimp>货物剩余空间:%1</Chinesesimp>
|
||||||
@ -156,7 +190,7 @@
|
|||||||
<Spanish>Habilitar carga</Spanish>
|
<Spanish>Habilitar carga</Spanish>
|
||||||
<Italian>Abilita Carico</Italian>
|
<Italian>Abilita Carico</Italian>
|
||||||
<French>Activer la cargaison</French>
|
<French>Activer la cargaison</French>
|
||||||
<Japanese>カーゴを有効化</Japanese>
|
<Japanese>貨物を有効化</Japanese>
|
||||||
<Korean>화물 활성화</Korean>
|
<Korean>화물 활성화</Korean>
|
||||||
<Chinese>啟用貨物裝載</Chinese>
|
<Chinese>啟用貨物裝載</Chinese>
|
||||||
<Chinesesimp>启用货物装载</Chinesesimp>
|
<Chinesesimp>启用货物装载</Chinesesimp>
|
||||||
@ -172,7 +206,7 @@
|
|||||||
<Czech>Umožňuje naložit předměty do nákladového prostoru vozidla</Czech>
|
<Czech>Umožňuje naložit předměty do nákladového prostoru vozidla</Czech>
|
||||||
<Italian>Abilita il modulo di caricamento nel carico</Italian>
|
<Italian>Abilita il modulo di caricamento nel carico</Italian>
|
||||||
<French>Active la possibilité de charger du matériel dans un module de fret (véhicule/container).</French>
|
<French>Active la possibilité de charger du matériel dans un module de fret (véhicule/container).</French>
|
||||||
<Japanese>カーゴ モジュールで積み込みを有効化</Japanese>
|
<Japanese>貨物積載モジュールを有効化</Japanese>
|
||||||
<Korean>화물 모듈을 활성화합니다</Korean>
|
<Korean>화물 모듈을 활성화합니다</Korean>
|
||||||
<Chinese>啟用貨物裝載功能</Chinese>
|
<Chinese>啟用貨物裝載功能</Chinese>
|
||||||
<Chinesesimp>启用货物装载功能</Chinesesimp>
|
<Chinesesimp>启用货物装载功能</Chinesesimp>
|
||||||
@ -187,7 +221,7 @@
|
|||||||
<Spanish>Ajustes de carga</Spanish>
|
<Spanish>Ajustes de carga</Spanish>
|
||||||
<Italian>Impostazioni Carico</Italian>
|
<Italian>Impostazioni Carico</Italian>
|
||||||
<French>Paramètres de cargaison</French>
|
<French>Paramètres de cargaison</French>
|
||||||
<Japanese>カーゴ設定</Japanese>
|
<Japanese>貨物設定</Japanese>
|
||||||
<Korean>화물 설정</Korean>
|
<Korean>화물 설정</Korean>
|
||||||
<Chinese>貨物設定</Chinese>
|
<Chinese>貨物設定</Chinese>
|
||||||
<Chinesesimp>货物设定</Chinesesimp>
|
<Chinesesimp>货物设定</Chinesesimp>
|
||||||
@ -203,7 +237,7 @@
|
|||||||
<Czech>Konfigurace nákladního modulu</Czech>
|
<Czech>Konfigurace nákladního modulu</Czech>
|
||||||
<Italian>Configura le impostazioni del modulo carico</Italian>
|
<Italian>Configura le impostazioni del modulo carico</Italian>
|
||||||
<French>Configure les paramètres du module de cargaison.</French>
|
<French>Configure les paramètres du module de cargaison.</French>
|
||||||
<Japanese>カーゴ モジュールの設定を構成</Japanese>
|
<Japanese>貨物モジュールの設定を変更します</Japanese>
|
||||||
<Korean>화물 모듈의 환경 설정을 바꿉니다</Korean>
|
<Korean>화물 모듈의 환경 설정을 바꿉니다</Korean>
|
||||||
<Chinese>配置貨物模塊設定</Chinese>
|
<Chinese>配置貨物模塊設定</Chinese>
|
||||||
<Chinesesimp>配置货物模块设定</Chinesesimp>
|
<Chinesesimp>配置货物模块设定</Chinesesimp>
|
||||||
@ -219,7 +253,7 @@
|
|||||||
<Italian>%1<br/>caricato su<br/>%2</Italian>
|
<Italian>%1<br/>caricato su<br/>%2</Italian>
|
||||||
<Hungarian>%1<br/>berakodva ide:<br/>%2</Hungarian>
|
<Hungarian>%1<br/>berakodva ide:<br/>%2</Hungarian>
|
||||||
<Russian>%1<br/>загружен в<br/>%2</Russian>
|
<Russian>%1<br/>загружен в<br/>%2</Russian>
|
||||||
<Japanese>%1 は<br/>%2 へ<br/>積み込まれました</Japanese>
|
<Japanese>%1 を<br/>%2 に<br/>積み込みました</Japanese>
|
||||||
<Korean>%1은(는)<br/>%2 에 실림</Korean>
|
<Korean>%1은(는)<br/>%2 에 실림</Korean>
|
||||||
<Chinese>%1<br/>裝載至<br/>%2</Chinese>
|
<Chinese>%1<br/>裝載至<br/>%2</Chinese>
|
||||||
<Chinesesimp>%1<br/>装载至<br/>%2</Chinesesimp>
|
<Chinesesimp>%1<br/>装载至<br/>%2</Chinesesimp>
|
||||||
@ -235,7 +269,7 @@
|
|||||||
<Italian>Hai scaricato<br/>%1 da<br/>%2</Italian>
|
<Italian>Hai scaricato<br/>%1 da<br/>%2</Italian>
|
||||||
<Hungarian>1%<br/>kirakodva ebből:<br/>%2</Hungarian>
|
<Hungarian>1%<br/>kirakodva ebből:<br/>%2</Hungarian>
|
||||||
<Russian>%1<br/>разгружен из<br/>%2</Russian>
|
<Russian>%1<br/>разгружен из<br/>%2</Russian>
|
||||||
<Japanese>%1 が<br/>%2 から<br/>降ろされました</Japanese>
|
<Japanese>%1 を<br/>%2 から<br/>降ろしました</Japanese>
|
||||||
<Korean>%1은(는)<br/>%2에서 내려짐</Korean>
|
<Korean>%1은(는)<br/>%2에서 내려짐</Korean>
|
||||||
<Chinese>從<br/>%2卸載<br/>%1</Chinese>
|
<Chinese>從<br/>%2卸載<br/>%1</Chinese>
|
||||||
<Chinesesimp>从<br/>%2卸载<br/>%1</Chinesesimp>
|
<Chinesesimp>从<br/>%2卸载<br/>%1</Chinesesimp>
|
||||||
@ -243,10 +277,12 @@
|
|||||||
<Key ID="STR_ACE_Cargo_LoadingItem">
|
<Key ID="STR_ACE_Cargo_LoadingItem">
|
||||||
<English>Loading %1 into %2...</English>
|
<English>Loading %1 into %2...</English>
|
||||||
<Spanish>Cargando %1 en %2...</Spanish>
|
<Spanish>Cargando %1 en %2...</Spanish>
|
||||||
|
<Japanese>%1 を %2 に積み込んでいます・・・</Japanese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Cargo_UnloadingItem">
|
<Key ID="STR_ACE_Cargo_UnloadingItem">
|
||||||
<English>Unloading %1 from %2...</English>
|
<English>Unloading %1 from %2...</English>
|
||||||
<Spanish>Descargando %1 de %2...</Spanish>
|
<Spanish>Descargando %1 de %2...</Spanish>
|
||||||
|
<Japanese>%1 を %2 から降ろしています・・・</Japanese>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Cargo_LoadingFailed">
|
<Key ID="STR_ACE_Cargo_LoadingFailed">
|
||||||
<English>%1<br/>could not be loaded</English>
|
<English>%1<br/>could not be loaded</English>
|
||||||
@ -285,7 +321,7 @@
|
|||||||
<German>Kann nicht entladen werden</German>
|
<German>Kann nicht entladen werden</German>
|
||||||
<Italian>Impossibile da scaricare</Italian>
|
<Italian>Impossibile da scaricare</Italian>
|
||||||
<French>Ne peut pas être déchargé</French>
|
<French>Ne peut pas être déchargé</French>
|
||||||
<Japanese>降ろせません</Japanese>
|
<Japanese>荷降ろし不可能です</Japanese>
|
||||||
<Korean>하역할 수가 없습니다</Korean>
|
<Korean>하역할 수가 없습니다</Korean>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Cargo_SizeMenu">
|
<Key ID="STR_ACE_Cargo_SizeMenu">
|
||||||
@ -293,12 +329,12 @@
|
|||||||
<German>Frachtgröße: %1</German>
|
<German>Frachtgröße: %1</German>
|
||||||
<Italian>Dimensione Carico: %1</Italian>
|
<Italian>Dimensione Carico: %1</Italian>
|
||||||
<French>Encombrement fret: %1</French>
|
<French>Encombrement fret: %1</French>
|
||||||
<Japanese>カーゴ サイズ: %1</Japanese>
|
<Japanese>貨物のサイズ: %1</Japanese>
|
||||||
<Korean>화물 크기: %1</Korean>
|
<Korean>화물 크기: %1</Korean>
|
||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Cargo_customName_edenName">
|
<Key ID="STR_ACE_Cargo_customName_edenName">
|
||||||
<English>Custom Name</English>
|
<English>Custom Name</English>
|
||||||
<Japanese>カスタムネーム</Japanese>
|
<Japanese>カスタム名</Japanese>
|
||||||
<French>Nom personnalisé</French>
|
<French>Nom personnalisé</French>
|
||||||
<German>Eigener Name</German>
|
<German>Eigener Name</German>
|
||||||
<Italian>Nome Personalizzato</Italian>
|
<Italian>Nome Personalizzato</Italian>
|
||||||
@ -311,7 +347,7 @@
|
|||||||
</Key>
|
</Key>
|
||||||
<Key ID="STR_ACE_Cargo_customName_edenDesc">
|
<Key ID="STR_ACE_Cargo_customName_edenDesc">
|
||||||
<English>Set a custom cargo name used in the cargo interface.</English>
|
<English>Set a custom cargo name used in the cargo interface.</English>
|
||||||
<Japanese>カーゴ一覧で使用されるカスタムネームを設定します。</Japanese>
|
<Japanese>貨物インターフェイスで使用されるカスタム名を設定します。</Japanese>
|
||||||
<French>Définit un nom de fret personnalisé qui sera visible dans le menu de cargaison.</French>
|
<French>Définit un nom de fret personnalisé qui sera visible dans le menu de cargaison.</French>
|
||||||
<Russian>Установить пользовательское имя груза, используемое в интерфейсе погрузки.</Russian>
|
<Russian>Установить пользовательское имя груза, используемое в интерфейсе погрузки.</Russian>
|
||||||
<German>Definiere eigenen Frachtnamen, welcher im Frachtraum genutzt wird.</German>
|
<German>Definiere eigenen Frachtnamen, welcher im Frachtraum genutzt wird.</German>
|
||||||
@ -326,7 +362,7 @@
|
|||||||
<English>Cargo Space</English>
|
<English>Cargo Space</English>
|
||||||
<German>Frachtraum</German>
|
<German>Frachtraum</German>
|
||||||
<Italian>Spazio di Carico</Italian>
|
<Italian>Spazio di Carico</Italian>
|
||||||
<Japanese>カーゴ スペース</Japanese>
|
<Japanese>貨物室の容量</Japanese>
|
||||||
<Chinese>貨物空間</Chinese>
|
<Chinese>貨物空間</Chinese>
|
||||||
<Chinesesimp>货物空间</Chinesesimp>
|
<Chinesesimp>货物空间</Chinesesimp>
|
||||||
<Polish>Przestrzeń ładunkowa</Polish>
|
<Polish>Przestrzeń ładunkowa</Polish>
|
||||||
@ -342,7 +378,7 @@
|
|||||||
<English>The cargo space available in this vehicle/container</English>
|
<English>The cargo space available in this vehicle/container</English>
|
||||||
<German>Verfügbarer Frachtraum in diesem Fahrzeug/Container</German>
|
<German>Verfügbarer Frachtraum in diesem Fahrzeug/Container</German>
|
||||||
<Italian>Lo spazio disponibile in questo veicolo/container</Italian>
|
<Italian>Lo spazio disponibile in questo veicolo/container</Italian>
|
||||||
<Japanese>この車両/コンテナでカーゴ スペースを使えるようにします</Japanese>
|
<Japanese>この車両/コンテナで使用可能な貨物室の容量</Japanese>
|
||||||
<Chinese>設定此載具/集裝箱可裝載多少貨物</Chinese>
|
<Chinese>設定此載具/集裝箱可裝載多少貨物</Chinese>
|
||||||
<Chinesesimp>设定此载具/集装箱可装载多少货物</Chinesesimp>
|
<Chinesesimp>设定此载具/集装箱可装载多少货物</Chinesesimp>
|
||||||
<Polish>Dostępna przestrzeń ładunkowa w tym pojeździe/kontenerze</Polish>
|
<Polish>Dostępna przestrzeń ładunkowa w tym pojeździe/kontenerze</Polish>
|
||||||
@ -357,7 +393,7 @@
|
|||||||
<English>Cargo Size</English>
|
<English>Cargo Size</English>
|
||||||
<German>Frachtgröße</German>
|
<German>Frachtgröße</German>
|
||||||
<Italian>Dimensioni nel Carico</Italian>
|
<Italian>Dimensioni nel Carico</Italian>
|
||||||
<Japanese>カーゴ サイズ</Japanese>
|
<Japanese>貨物のサイズ</Japanese>
|
||||||
<Chinese>貨物的大小</Chinese>
|
<Chinese>貨物的大小</Chinese>
|
||||||
<Chinesesimp>货物的大小</Chinesesimp>
|
<Chinesesimp>货物的大小</Chinesesimp>
|
||||||
<Polish>Wielkość ładunku</Polish>
|
<Polish>Wielkość ładunku</Polish>
|
||||||
@ -373,7 +409,7 @@
|
|||||||
<English>The cargo space required to hold this object (-1 for not loadable)</English>
|
<English>The cargo space required to hold this object (-1 for not loadable)</English>
|
||||||
<German>Frachtraumgröße, welche zum Einladen dieses Objektes benötigt wird (-1 nicht einladbar)</German>
|
<German>Frachtraumgröße, welche zum Einladen dieses Objektes benötigt wird (-1 nicht einladbar)</German>
|
||||||
<Italian>Lo spazio di carico necessario per contenere questo oggetto (-1 per non caricabile)</Italian>
|
<Italian>Lo spazio di carico necessario per contenere questo oggetto (-1 per non caricabile)</Italian>
|
||||||
<Japanese>オブジェクトを積載するのに必要なカーゴ スペース (-1 で積載不可にします)</Japanese>
|
<Japanese>このオブジェクトの積載に必要な貨物室の容量 (-1 で積載不可に)</Japanese>
|
||||||
<Chinese>此貨物會佔掉多少空間(設定-1的話此貨物就不能被裝載)</Chinese>
|
<Chinese>此貨物會佔掉多少空間(設定-1的話此貨物就不能被裝載)</Chinese>
|
||||||
<Chinesesimp>此货物会占掉多少空间(设定 -1 的话此货物就不能被装载)</Chinesesimp>
|
<Chinesesimp>此货物会占掉多少空间(设定 -1 的话此货物就不能被装载)</Chinesesimp>
|
||||||
<Polish>Wymagana przestrzeń ładunkowa dla tego obiektu (-1 dla niemożliwych do załadowania)</Polish>
|
<Polish>Wymagana przestrzeń ładunkowa dla tego obiektu (-1 dla niemożliwych do załadowania)</Polish>
|
||||||
@ -432,7 +468,7 @@
|
|||||||
<Key ID="STR_ACE_Cargo_paradropTimeCoefficent_description">
|
<Key ID="STR_ACE_Cargo_paradropTimeCoefficent_description">
|
||||||
<English>Modifier for how long it takes to paradrop a cargo item.</English>
|
<English>Modifier for how long it takes to paradrop a cargo item.</English>
|
||||||
<German>Beeinflusst die zusätzliche Zeit für Türlastabwürfe.</German>
|
<German>Beeinflusst die zusätzliche Zeit für Türlastabwürfe.</German>
|
||||||
<Japanese>カーゴ アイテムを空中投下するまでの時間を変更します。</Japanese>
|
<Japanese>貨物の空中投下に掛かる時間を変更します。</Japanese>
|
||||||
<Italian>Modifica quanto tempo viene impiegato per paracadutare oggetti dal carico.</Italian>
|
<Italian>Modifica quanto tempo viene impiegato per paracadutare oggetti dal carico.</Italian>
|
||||||
<French>Modifie le temps nécessaire au paralargage d'une cargaison.</French>
|
<French>Modifie le temps nécessaire au paralargage d'une cargaison.</French>
|
||||||
<Chinese>設定空投所需消耗的時間</Chinese>
|
<Chinese>設定空投所需消耗的時間</Chinese>
|
||||||
@ -447,7 +483,7 @@
|
|||||||
<Key ID="STR_ACE_Cargo_loadTimeCoefficient">
|
<Key ID="STR_ACE_Cargo_loadTimeCoefficient">
|
||||||
<English>Load Time Coefficient</English>
|
<English>Load Time Coefficient</English>
|
||||||
<German>Ladezeitmultiplikator</German>
|
<German>Ladezeitmultiplikator</German>
|
||||||
<Japanese>積載所要時間係数</Japanese>
|
<Japanese>積載の所要時間係数</Japanese>
|
||||||
<Polish>Współczynnik czasu załadowania</Polish>
|
<Polish>Współczynnik czasu załadowania</Polish>
|
||||||
<Italian>Coefficente Tempo Caricamento</Italian>
|
<Italian>Coefficente Tempo Caricamento</Italian>
|
||||||
<Russian>Коэф. времени погрузки</Russian>
|
<Russian>Коэф. времени погрузки</Russian>
|
||||||
@ -462,7 +498,7 @@
|
|||||||
<Key ID="STR_ACE_Cargo_loadTimeCoefficient_description">
|
<Key ID="STR_ACE_Cargo_loadTimeCoefficient_description">
|
||||||
<English>Modifies how long it takes to load/unload items.\nTime, in seconds, is the size of the item multiplied by this value.</English>
|
<English>Modifies how long it takes to load/unload items.\nTime, in seconds, is the size of the item multiplied by this value.</English>
|
||||||
<German>Gibt an, wie lange das Laden / Entladen von Gegenständen dauern soll.\nZeit in Sekunden, die mit der Größe des Gegenstandes multipliziert wird.</German>
|
<German>Gibt an, wie lange das Laden / Entladen von Gegenständen dauern soll.\nZeit in Sekunden, die mit der Größe des Gegenstandes multipliziert wird.</German>
|
||||||
<Japanese>アイテムのロード/アンロードに掛かる時間を変更します。\n時間 (秒) は、アイテムのサイズにこの値を掛けたものです。</Japanese>
|
<Japanese>貨物の積み込み/積み下ろしに掛かる時間を変更します。\n時間 (秒) は、貨物のサイズにこの値を掛けたものです。</Japanese>
|
||||||
<Polish>Modyfikuje, jak długo zajmuje załadowywanie/wyładowywanie przedmiotów. \nCzasem, w sekundach, jest wielkość przedmiotu razy jego wartość.</Polish>
|
<Polish>Modyfikuje, jak długo zajmuje załadowywanie/wyładowywanie przedmiotów. \nCzasem, w sekundach, jest wielkość przedmiotu razy jego wartość.</Polish>
|
||||||
<Italian>Modifica il tempo impiegato per caricare o scaricare gli oggetti.\nIl tempo, in secondi, equivale alla dimensione dell'oggetto moltiplicata per questo valore</Italian>
|
<Italian>Modifica il tempo impiegato per caricare o scaricare gli oggetti.\nIl tempo, in secondi, equivale alla dimensione dell'oggetto moltiplicata per questo valore</Italian>
|
||||||
<Russian>Изменяет время для загрузки/выгрузки предметов. \n Время (сек) - это размер предмета, умноженный на это значение.</Russian>
|
<Russian>Изменяет время для загрузки/выгрузки предметов. \n Время (сек) - это размер предмета, умноженный на это значение.</Russian>
|
||||||
@ -477,7 +513,7 @@
|
|||||||
<Key ID="STR_ACE_Cargo_openAfterUnload">
|
<Key ID="STR_ACE_Cargo_openAfterUnload">
|
||||||
<English>Reopen Cargo Menu</English>
|
<English>Reopen Cargo Menu</English>
|
||||||
<Turkish>Kargo Menüsünü Tekrar Aç</Turkish>
|
<Turkish>Kargo Menüsünü Tekrar Aç</Turkish>
|
||||||
<Japanese>カーゴ メニューを再度開く</Japanese>
|
<Japanese>貨物メニューを再度開く</Japanese>
|
||||||
<French>Rouvrir le menu de cargaison</French>
|
<French>Rouvrir le menu de cargaison</French>
|
||||||
<Russian>Переоткрыть меню погрузки</Russian>
|
<Russian>Переоткрыть меню погрузки</Russian>
|
||||||
<German>Frachtmenü erneut öffnen</German>
|
<German>Frachtmenü erneut öffnen</German>
|
||||||
@ -491,7 +527,7 @@
|
|||||||
<Key ID="STR_ACE_Cargo_openAfterUnload_description">
|
<Key ID="STR_ACE_Cargo_openAfterUnload_description">
|
||||||
<English>Reopen the Cargo Menu after successful unload.</English>
|
<English>Reopen the Cargo Menu after successful unload.</English>
|
||||||
<Turkish>Başarılı bir yük indirmeden sonra Kargo Menüsünü tekrar göster.</Turkish>
|
<Turkish>Başarılı bir yük indirmeden sonra Kargo Menüsünü tekrar göster.</Turkish>
|
||||||
<Japanese>カーゴを降ろした後に再びカーゴ メニューを開きます。</Japanese>
|
<Japanese>貨物を降ろした後に再び貨物メニューを開きます。</Japanese>
|
||||||
<French>Réouvre le menu de cargaison après un déchargement réussi.</French>
|
<French>Réouvre le menu de cargaison après un déchargement réussi.</French>
|
||||||
<Russian>Переоткрыть меню погрузки после успешной выгрузки.</Russian>
|
<Russian>Переоткрыть меню погрузки после успешной выгрузки.</Russian>
|
||||||
<German>Frachtmenü erneut öffnen, nach erfolgreichen Entladen.</German>
|
<German>Frachtmenü erneut öffnen, nach erfolgreichen Entladen.</German>
|
||||||
@ -507,7 +543,7 @@
|
|||||||
<Korean>화물 내린 후 운반</Korean>
|
<Korean>화물 내린 후 운반</Korean>
|
||||||
<Russian>Нести после выгрузки</Russian>
|
<Russian>Нести после выгрузки</Russian>
|
||||||
<Spanish>Llevar encima tras la descarga</Spanish>
|
<Spanish>Llevar encima tras la descarga</Spanish>
|
||||||
<Japanese>荷降ろし後の運搬</Japanese>
|
<Japanese>荷降ろし後に持ち運ぶ</Japanese>
|
||||||
<Polish>Niesienie Po Rozładowaniu</Polish>
|
<Polish>Niesienie Po Rozładowaniu</Polish>
|
||||||
<German>Nach dem Entladen tragen</German>
|
<German>Nach dem Entladen tragen</German>
|
||||||
<Italian>Trasporta dopo aver Scaricato</Italian>
|
<Italian>Trasporta dopo aver Scaricato</Italian>
|
||||||
@ -519,12 +555,18 @@
|
|||||||
<Korean>화물 아이템을 내린 후 들거나 끌지 여부를 결정합니다.</Korean>
|
<Korean>화물 아이템을 내린 후 들거나 끌지 여부를 결정합니다.</Korean>
|
||||||
<Russian>Нужно ли переносить или тащить предметы после их выгрузки.</Russian>
|
<Russian>Нужно ли переносить или тащить предметы после их выгрузки.</Russian>
|
||||||
<Spanish>Controla si los objetos de carga son llevados encima o arrastrados despues de la descarga.</Spanish>
|
<Spanish>Controla si los objetos de carga son llevados encima o arrastrados despues de la descarga.</Spanish>
|
||||||
<Japanese>荷降ろし後、貨物アイテムを運ぶか引きずるかを制御する。</Japanese>
|
<Japanese>荷降ろし後、貨物を運ぶか引きずるかを制御する。</Japanese>
|
||||||
<Polish>Kontroluje, czy przedmioty z ładunku są przenoszone lub ciągnięte po ich wyładowaniu.</Polish>
|
<Polish>Kontroluje, czy przedmioty z ładunku są przenoszone lub ciągnięte po ich wyładowaniu.</Polish>
|
||||||
<German>Steuert, ob Objekte nach dem Entladen getragen oder gezogen werden.</German>
|
<German>Steuert, ob Objekte nach dem Entladen getragen oder gezogen werden.</German>
|
||||||
<Italian>Determina se un oggetto verrà subito trasportato o trascinato dopo essere stato scaricato.</Italian>
|
<Italian>Determina se un oggetto verrà subito trasportato o trascinato dopo essere stato scaricato.</Italian>
|
||||||
<French>Active si les éléments de cargaison sont portés ou traînés après le déchargement.</French>
|
<French>Active si les éléments de cargaison sont portés ou traînés après le déchargement.</French>
|
||||||
<Portuguese>Controla se os itens de carga são carregados ou arrastados após a descarga.</Portuguese>
|
<Portuguese>Controla se os itens de carga são carregados ou arrastados após a descarga.</Portuguese>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Cargo_enableDeploy">
|
||||||
|
<English>Enable deploy</English>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Cargo_enableDeploy_description">
|
||||||
|
<English>Controls whether cargo items can be unloaded via the deploy method.</English>
|
||||||
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
_object setVariable ["acre_sys_core_isDisabled", _set > 0, true];
|
_object setVariable ["acre_sys_core_isDisabled", _set > 0, true];
|
||||||
};
|
};
|
||||||
if (["task_force_radio"] call FUNC(isModLoaded)) then {
|
if (["task_force_radio"] call FUNC(isModLoaded)) then {
|
||||||
_object setVariable ["tf_voiceVolume", [1, 0] select (_set > 0), true];
|
_object setVariable ["tf_voiceVolume", parseNumber (_set == 0), true];
|
||||||
};
|
};
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ if (isServer) then {
|
|||||||
if ((!isNil "_zeusLogic") && {!isNull _zeusLogic}) then {
|
if ((!isNil "_zeusLogic") && {!isNull _zeusLogic}) then {
|
||||||
{
|
{
|
||||||
if ((_x getvariable ["bis_fnc_moduleRemoteControl_owner", objnull]) isEqualTo _dcPlayer) exitWith {
|
if ((_x getvariable ["bis_fnc_moduleRemoteControl_owner", objnull]) isEqualTo _dcPlayer) exitWith {
|
||||||
INFO_3("[%1] DC - Was Zeus [%2] while controlling unit [%3] - manually clearing `bis_fnc_moduleRemoteControl_owner`", [_x] call FUNC(getName), _dcPlayer, _x);
|
INFO_3("[%1] DC - Was Zeus [%2] while controlling unit [%3] - manually clearing `bis_fnc_moduleRemoteControl_owner`",[_x] call FUNC(getName),_dcPlayer,_x);
|
||||||
_x setVariable ["bis_fnc_moduleRemoteControl_owner", nil, true];
|
_x setVariable ["bis_fnc_moduleRemoteControl_owner", nil, true];
|
||||||
};
|
};
|
||||||
nil
|
nil
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
if (isFilePatchingEnabled) then {
|
if (isFilePatchingEnabled) then {
|
||||||
private _notLoaded = configProperties [configfile >> "ace_notLoaded", "isText _x"];
|
private _notLoaded = configProperties [configfile >> "ace_notLoaded", "isText _x"];
|
||||||
{
|
{
|
||||||
INFO_2("%1 not loaded because %2",configName _x, getText _x);
|
INFO_2("%1 not loaded because %2",configName _x,getText _x);
|
||||||
} forEach _notLoaded;
|
} forEach _notLoaded;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -18,11 +18,11 @@ private _allUnits = [];
|
|||||||
{
|
{
|
||||||
private _class = configFile >> "CfgVehicles" >> _x;
|
private _class = configFile >> "CfgVehicles" >> _x;
|
||||||
if (isNull _class) then {
|
if (isNull _class) then {
|
||||||
WARNING_1("in units[] but null - %1", _x);
|
WARNING_1("in units[] but null - %1",_x);
|
||||||
_testPass = false;
|
_testPass = false;
|
||||||
} else {
|
} else {
|
||||||
// if (((getNumber (_class >> "scope")) != 2) && {((getNumber (_class >> "scopeCurator")) != 2)}) then {
|
// if (((getNumber (_class >> "scope")) != 2) && {((getNumber (_class >> "scopeCurator")) != 2)}) then {
|
||||||
// WARNING_2("in units[] but not public - %1 from %2", configName _class, configSourceMod _class);
|
// WARNING_2("in units[] but not public - %1 from %2",configName _class,configSourceMod _class);
|
||||||
// _testPass = false;
|
// _testPass = false;
|
||||||
// };
|
// };
|
||||||
};
|
};
|
||||||
@ -36,11 +36,11 @@ private _allWeapons = [];
|
|||||||
{
|
{
|
||||||
private _class = configFile >> "CfgWeapons" >> _x;
|
private _class = configFile >> "CfgWeapons" >> _x;
|
||||||
if (isNull _class) then {
|
if (isNull _class) then {
|
||||||
WARNING_1("in weapons[] but null - %1", _x);
|
WARNING_1("in weapons[] but null - %1",_x);
|
||||||
_testPass = false;
|
_testPass = false;
|
||||||
} else {
|
} else {
|
||||||
// if (((getNumber (_class >> "scope")) != 2) && {((getNumber (_class >> "scopeCurator")) != 2)}) then {
|
// if (((getNumber (_class >> "scope")) != 2) && {((getNumber (_class >> "scopeCurator")) != 2)}) then {
|
||||||
// WARNING_2("in weapons[] but not public - %1 from %2", configName _class, configSourceMod _class);
|
// WARNING_2("in weapons[] but not public - %1 from %2",configName _class,configSourceMod _class);
|
||||||
// _testPass = false;
|
// _testPass = false;
|
||||||
// };
|
// };
|
||||||
};
|
};
|
||||||
@ -51,7 +51,7 @@ private _vics = "(configName _x) select [0,3] == 'ace'" configClasses (configFil
|
|||||||
{
|
{
|
||||||
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then {
|
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then {
|
||||||
if (!((toLower configName _x) in _allUnits)) then {
|
if (!((toLower configName _x) in _allUnits)) then {
|
||||||
WARNING_2("Not in any units[] - %1 from %2", configName _x, configSourceMod _x);
|
WARNING_2("Not in any units[] - %1 from %2",configName _x,configSourceMod _x);
|
||||||
_testPass = false;
|
_testPass = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -63,7 +63,7 @@ private _weapons = "(configName _x) select [0,3] == 'ace'" configClasses (config
|
|||||||
private _type = toLower configName _x;
|
private _type = toLower configName _x;
|
||||||
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then {
|
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then {
|
||||||
if (!((toLower configName _x) in _allWeapons)) then {
|
if (!((toLower configName _x) in _allWeapons)) then {
|
||||||
WARNING_2("Not in any weapons[] - %1 from %2", configName _x, configSourceMod _x);
|
WARNING_2("Not in any weapons[] - %1 from %2",configName _x,configSourceMod _x);
|
||||||
_testPass = false;
|
_testPass = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,7 @@ if (isServer) then {
|
|||||||
params ["_eventName", "_client"];
|
params ["_eventName", "_client"];
|
||||||
|
|
||||||
if !(_eventName in GVAR(syncedEvents)) exitWith {
|
if !(_eventName in GVAR(syncedEvents)) exitWith {
|
||||||
ERROR_1("Request for synced event - key [%1] not found.", _eventName);
|
ERROR_1("Request for synced event - key [%1] not found.",_eventName);
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
params ["_name", "_args", "_ttl"];
|
params ["_name", "_args", "_ttl"];
|
||||||
|
|
||||||
if !(_name in GVAR(syncedEvents)) exitWith {
|
if !(_name in GVAR(syncedEvents)) exitWith {
|
||||||
ERROR_1("Synced event key [%1] not found (_handleSyncedEvent).", _name);
|
ERROR_1("Synced event key [%1] not found (_handleSyncedEvent).",_name);
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* 2: Namespace to store the cache on <NAMESPACE>
|
* 2: Namespace to store the cache on <NAMESPACE>
|
||||||
* 3: Cache uid <STRING>
|
* 3: Cache uid <STRING>
|
||||||
* 4: Max duration of the cache <NUMBER>
|
* 4: Max duration of the cache <NUMBER>
|
||||||
* 5: Event that clears the cache (default: nil) <STRING>
|
* 5: Events that clear the cache (default: nil) <STRING or ARRAY of STRING>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* Result of the function <ANY>
|
* Result of the function <ANY>
|
||||||
@ -20,41 +20,46 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params ["_params", "_function", "_namespace", "_uid", "_duration", "_event"];
|
params ["_params", "_function", "_namespace", "_uid", "_duration", "_events"];
|
||||||
|
|
||||||
if ((_namespace getVariable [_uid, [-99999]]) select 0 < diag_tickTime) then {
|
if ((_namespace getVariable [_uid, [-99999]]) select 0 < diag_tickTime) then {
|
||||||
_namespace setVariable [_uid, [diag_tickTime + _duration, _params call _function]];
|
_namespace setVariable [_uid, [diag_tickTime + _duration, _params call _function]];
|
||||||
|
|
||||||
// Does the cache need to be cleared on an event?
|
// Does the cache need to be cleared on an event?
|
||||||
if (!isNil "_event") then {
|
if (!isNil "_events") then {
|
||||||
private _varName = format [QGVAR(clearCache_%1), _event];
|
if (_events isEqualType "") then {
|
||||||
private _cacheList = missionNamespace getVariable _varName;
|
_events = [_events];
|
||||||
|
|
||||||
// If there was no EH to clear these caches, add one
|
|
||||||
if (isNil "_cacheList") then {
|
|
||||||
_cacheList = [];
|
|
||||||
missionNamespace setVariable [_varName, _cacheList];
|
|
||||||
|
|
||||||
[_event, {
|
|
||||||
#ifdef DEBUG_MODE_FULL
|
|
||||||
INFO_1("Clear cached variables on event: %1",_eventName);
|
|
||||||
#endif
|
|
||||||
// Get the list of caches to clear
|
|
||||||
//IGNORE_PRIVATE_WARNING ["_eventName"];
|
|
||||||
// _eventName is defined on the function that calls the event
|
|
||||||
private _varName = format [QGVAR(clearCache_%1), _eventName];
|
|
||||||
private _cacheList = missionNamespace getVariable [_varName, []];
|
|
||||||
// Erase all the cached results
|
|
||||||
{
|
|
||||||
_x call FUNC(eraseCache);
|
|
||||||
} forEach _cacheList;
|
|
||||||
// Empty the list
|
|
||||||
missionNamespace setVariable [_varName, []];
|
|
||||||
}] call CBA_fnc_addEventHandler;
|
|
||||||
};
|
};
|
||||||
|
{
|
||||||
|
private _event = _x;
|
||||||
|
private _varName = format [QGVAR(clearCache_%1), _event];
|
||||||
|
private _cacheList = missionNamespace getVariable _varName;
|
||||||
|
|
||||||
// Add this cache to the list of the event
|
// If there was no EH to clear these caches, add one
|
||||||
_cacheList pushBack [_namespace, _uid];
|
if (isNil "_cacheList") then {
|
||||||
|
_cacheList = [];
|
||||||
|
missionNamespace setVariable [_varName, _cacheList];
|
||||||
|
|
||||||
|
[_event, {
|
||||||
|
#ifdef DEBUG_MODE_FULL
|
||||||
|
INFO_1("Clear cached variables on event: %1",_eventName);
|
||||||
|
#endif
|
||||||
|
// Get the list of caches to clear
|
||||||
|
//IGNORE_PRIVATE_WARNING ["_eventName"];
|
||||||
|
// _eventName is defined on the function that calls the event
|
||||||
|
private _varName = format [QGVAR(clearCache_%1), _eventName];
|
||||||
|
private _cacheList = missionNamespace getVariable [_varName, []];
|
||||||
|
// Erase all the cached results
|
||||||
|
{
|
||||||
|
_x call FUNC(eraseCache);
|
||||||
|
} forEach _cacheList;
|
||||||
|
// Empty the list
|
||||||
|
missionNamespace setVariable [_varName, []];
|
||||||
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
};
|
||||||
|
// Add this cache to the list of the event
|
||||||
|
_cacheList pushBack [_namespace, _uid];
|
||||||
|
} forEach _events;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef DEBUG_MODE_FULL
|
#ifdef DEBUG_MODE_FULL
|
||||||
|
@ -22,7 +22,7 @@ private _output = [format ["// CBA Settings [ADDON: %1]:", _addon]];
|
|||||||
|
|
||||||
private _addonSearch = _addon + "_";
|
private _addonSearch = _addon + "_";
|
||||||
private _addonSearchCount = count _addonSearch;
|
private _addonSearchCount = count _addonSearch;
|
||||||
TRACE_2("",_addonSearch, _addonSearchCount);
|
TRACE_2("",_addonSearch,_addonSearchCount);
|
||||||
|
|
||||||
private _settings = configProperties [configFile >> "ACE_Settings", "(isClass _x) && {((configName _x) select [0, _addonSearchCount]) == _addonSearch}"];
|
private _settings = configProperties [configFile >> "ACE_Settings", "(isClass _x) && {((configName _x) select [0, _addonSearchCount]) == _addonSearch}"];
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ private _aceSettings = configProperties [configFile >> "ACE_Settings", "isClass
|
|||||||
if (_isClientSettable && {_currentValue isNotEqualTo _profileVar}) then {
|
if (_isClientSettable && {_currentValue isNotEqualTo _profileVar}) then {
|
||||||
// CBA_settings_fnc_set will do type checking for the old profile var
|
// CBA_settings_fnc_set will do type checking for the old profile var
|
||||||
private _ret = [_settingName, _profileVar, 0, "client", true] call CBA_settings_fnc_set;
|
private _ret = [_settingName, _profileVar, 0, "client", true] call CBA_settings_fnc_set;
|
||||||
INFO_3("Transfering setting [%1: %2] returned %3", _settingName, _profileVar, _ret);
|
INFO_3("Transfering setting [%1: %2] returned %3",_settingName,_profileVar,_ret);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} forEach _aceSettings;
|
} forEach _aceSettings;
|
||||||
|
@ -80,7 +80,7 @@ if (_oldCompats isNotEqualTo []) then {
|
|||||||
_oldCompats = _oldCompats apply {format ["%1 (%2)", _x select 0, _x select 1]};
|
_oldCompats = _oldCompats apply {format ["%1 (%2)", _x select 0, _x select 1]};
|
||||||
[{
|
[{
|
||||||
// Lasts for ~10 seconds
|
// Lasts for ~10 seconds
|
||||||
ERROR_WITH_TITLE_3("The following ACE compatiblity PBOs are outdated", "%1. ACE Main version is %2 from %3.",_this select 0,_this select 1,_this select 2);
|
ERROR_WITH_TITLE_3("The following ACE compatiblity PBOs are outdated","%1. ACE Main version is %2 from %3.",_this select 0,_this select 1,_this select 2);
|
||||||
}, [_oldCompats, _mainVersion, _mainSource], 1] call CBA_fnc_waitAndExecute;
|
}, [_oldCompats, _mainVersion, _mainSource], 1] call CBA_fnc_waitAndExecute;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ if (_state) then {
|
|||||||
// Check if the necessary keys were pressed for a keybind
|
// Check if the necessary keys were pressed for a keybind
|
||||||
_return = _comboDikPressed &&
|
_return = _comboDikPressed &&
|
||||||
{_mainDevice == "KEYBOARD"} &&
|
{_mainDevice == "KEYBOARD"} &&
|
||||||
{((GVAR(keyboardInputMain) getOrDefault [_mainDik, [false, 0]]) select 1) > ([0, 1] select _isDoubleTap)}; // check how many times the main key was pressed
|
{((GVAR(keyboardInputMain) getOrDefault [_mainDik, [false, 0]]) select 1) > (parseNumber _isDoubleTap)}; // check how many times the main key was pressed
|
||||||
|
|
||||||
// Keybind was detected
|
// Keybind was detected
|
||||||
if (_return) exitWith {
|
if (_return) exitWith {
|
||||||
@ -219,7 +219,7 @@ if (_state) then {
|
|||||||
_keyPressedInfo set [1, ((_keyPressedInfo select 1) - 1) max 0];
|
_keyPressedInfo set [1, ((_keyPressedInfo select 1) - 1) max 0];
|
||||||
|
|
||||||
if (_keyPressedInfo isEqualTo [false, 0]) then {
|
if (_keyPressedInfo isEqualTo [false, 0]) then {
|
||||||
GVAR(keyboardInputMain) deleteAt _key,
|
GVAR(keyboardInputMain) deleteAt _key;
|
||||||
};
|
};
|
||||||
}, _key, 0.5] call CBA_fnc_waitAndExecute;
|
}, _key, 0.5] call CBA_fnc_waitAndExecute;
|
||||||
}];
|
}];
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
BEGIN_COUNTER(firedEH);
|
BEGIN_COUNTER(firedEH);
|
||||||
|
|
||||||
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"];
|
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"];
|
||||||
TRACE_7("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile);
|
TRACE_7("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile);
|
||||||
|
|
||||||
if (_unit isKindOf "CAManBase") then {
|
if (_unit isKindOf "CAManBase") then {
|
||||||
// The unit it on foot
|
// The unit it on foot
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
params ["_className"];
|
params ["_className"];
|
||||||
|
|
||||||
(uiNamespace getVariable QGVAR(configNames)) getOrDefaultCall [toLower _className, {
|
(uiNamespace getVariable QGVAR(configNames)) getOrDefaultCall [toLowerANSI _className, {
|
||||||
private _config = configNull;
|
private _config = configNull;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@ if (getNumber (_unitAnimationCfg >> "terminal") == 1) exitWith {_animationState}
|
|||||||
|
|
||||||
private _unitActionsCfg = configFile >> "CfgMovesBasic" >> "Actions" >> getText (_unitAnimationCfg >> "actions");
|
private _unitActionsCfg = configFile >> "CfgMovesBasic" >> "Actions" >> getText (_unitAnimationCfg >> "actions");
|
||||||
|
|
||||||
TRACE_2("Animation/Action", configName _unitAnimationCfg, configName _unitActionsCfg);
|
TRACE_2("Animation/Action",configName _unitAnimationCfg,configName _unitActionsCfg);
|
||||||
|
|
||||||
if (vehicle _unit != _unit) then {
|
if (vehicle _unit != _unit) then {
|
||||||
private _interpolateArray = getArray (_unitAnimationCfg >> "interpolateTo");
|
private _interpolateArray = getArray (_unitAnimationCfg >> "interpolateTo");
|
||||||
|
@ -25,7 +25,7 @@ private _pov = getText (_turret >> "memoryPointGunnerOptics");
|
|||||||
private _gunBeg = getText (_turret >> "gunBeg");
|
private _gunBeg = getText (_turret >> "gunBeg");
|
||||||
private _gunEnd = getText (_turret >> "gunEnd");
|
private _gunEnd = getText (_turret >> "gunEnd");
|
||||||
|
|
||||||
TRACE_3("", _pov, _gunBeg, _gunEnd);
|
TRACE_3("",_pov,_gunBeg,_gunEnd);
|
||||||
|
|
||||||
// Pull the PIP pov or barrel direction, depending on how the model is set up
|
// Pull the PIP pov or barrel direction, depending on how the model is set up
|
||||||
private _povPos = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition _pov);
|
private _povPos = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition _pov);
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: The Unit (usually the player) <OBJECT>
|
* 0: The Unit (usually the player) <OBJECT>
|
||||||
* 1: Force a return type <NUMBER, BOOLEAN>
|
* 1: Return imperial units <NUMBER, BOOLEAN>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* The return value <NUMBER>
|
* Weight string <STRING>
|
||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [player] call ace_common_fnc_getWeight
|
* [player] call ace_common_fnc_getWeight
|
||||||
|
@ -22,7 +22,7 @@ params ["_soundClass", "_posASL", "_volume", "_distance"];
|
|||||||
|
|
||||||
private _sound = getArray (configFile >> "CfgSounds" >> _soundClass >> "sound");
|
private _sound = getArray (configFile >> "CfgSounds" >> _soundClass >> "sound");
|
||||||
if (_sound isEqualTo []) exitWith {
|
if (_sound isEqualTo []) exitWith {
|
||||||
ERROR_1("CfgSounds class [%1] does not exist or contains empty sound array", _soundClass);
|
ERROR_1("CfgSounds class [%1] does not exist or contains empty sound array",_soundClass);
|
||||||
};
|
};
|
||||||
TRACE_2("sound",_soundClass,_sound);
|
TRACE_2("sound",_soundClass,_sound);
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ params ["_logic", "_settingName", "_moduleVariable"];
|
|||||||
|
|
||||||
// Check if the variable is already defined
|
// Check if the variable is already defined
|
||||||
if (isNil _settingName) exitWith {
|
if (isNil _settingName) exitWith {
|
||||||
ERROR_1("readSettingFromModule - param [%1] is not an ace_setting", _settingName);
|
ERROR_1("readSettingFromModule - param [%1] is not an ace_setting",_settingName);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Check if the parameter is defined in the module
|
// Check if the parameter is defined in the module
|
||||||
|
@ -32,7 +32,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray);
|
|||||||
|
|
||||||
// Check if the variable is already defined
|
// Check if the variable is already defined
|
||||||
if (isNil _settingName) exitWith {
|
if (isNil _settingName) exitWith {
|
||||||
ERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName);
|
ERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting",_settingName);
|
||||||
};
|
};
|
||||||
|
|
||||||
// The setting is not forced, so update the value
|
// The setting is not forced, so update the value
|
||||||
@ -52,7 +52,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray);
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (!_validValue) exitWith {
|
if (!_validValue) exitWith {
|
||||||
WARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]", _settingName,_settingValue,_settingType);
|
WARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]",_settingName,_settingValue,_settingType);
|
||||||
};
|
};
|
||||||
|
|
||||||
if ([_settingName, "mission"] call CBA_settings_fnc_isForced) then {
|
if ([_settingName, "mission"] call CBA_settings_fnc_isForced) then {
|
||||||
|
@ -31,7 +31,7 @@ if (isLocalized _requestMessage) then {
|
|||||||
_requestMessage = format [_requestMessage, [_caller, false, true] call FUNC(getName)];
|
_requestMessage = format [_requestMessage, [_caller, false, true] call FUNC(getName)];
|
||||||
};
|
};
|
||||||
|
|
||||||
hint format ["%1", _requestMessage]; // @todo ?
|
hint str _requestMessage; // @todo ?
|
||||||
|
|
||||||
if (!isNil QGVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT)) then {
|
if (!isNil QGVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT)) then {
|
||||||
terminate GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT);
|
terminate GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
params ["_name"];
|
params ["_name"];
|
||||||
|
|
||||||
if !(_name in GVAR(syncedEvents)) exitWith {
|
if !(_name in GVAR(syncedEvents)) exitWith {
|
||||||
ERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name);
|
ERROR_1("Synced event key [%1] not found (removeSyncedEventHandler)",_name);
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ private _startTime = diag_tickTime;
|
|||||||
private _fails = [];
|
private _fails = [];
|
||||||
private _total = 0;
|
private _total = 0;
|
||||||
|
|
||||||
INFO_1("ace_common_fnc_runTests starting for [%1]", _specificTest);
|
INFO_1("ace_common_fnc_runTests starting for [%1]",_specificTest);
|
||||||
|
|
||||||
{
|
{
|
||||||
private _testName = configName _x;
|
private _testName = configName _x;
|
||||||
@ -41,8 +41,8 @@ INFO_1("ace_common_fnc_runTests starting for [%1]", _specificTest);
|
|||||||
};
|
};
|
||||||
} forEach (configProperties [configFile >> "ACE_Tests"]);
|
} forEach (configProperties [configFile >> "ACE_Tests"]);
|
||||||
|
|
||||||
INFO_1("ace_common_fnc_runTests finished in %1 ms", (1000 * (diag_tickTime - _startTime)) toFixed 1);
|
INFO_1("ace_common_fnc_runTests finished in %1 ms",(1000 * (diag_tickTime - _startTime)) toFixed 1);
|
||||||
INFO_2("[%1 / %2] Tests Passed", (_total - (count _fails)), _total);
|
INFO_2("[%1 / %2] Tests Passed",(_total - (count _fails)),_total);
|
||||||
if (_fails isNotEqualTo []) then {
|
if (_fails isNotEqualTo []) then {
|
||||||
INFO_1("Failed: %1", _fails);
|
INFO_1("Failed: %1",_fails);
|
||||||
};
|
};
|
||||||
|
@ -38,4 +38,4 @@ if (abs(_value - _oldValue) < _tolerance) exitWith {};
|
|||||||
_object setVariable [_varName, _value, true];
|
_object setVariable [_varName, _value, true];
|
||||||
_object setVariable [_oldVarName, _value];
|
_object setVariable [_oldVarName, _value];
|
||||||
|
|
||||||
TRACE_2("Published variable:", _varName, _value);
|
TRACE_2("Published variable:",_varName,_value);
|
||||||
|
@ -34,7 +34,7 @@ if (_object isEqualTo (_object getVariable [format ["ACE_onEmbargo_%1", _varName
|
|||||||
_object setVariable [_varName, _value, true];
|
_object setVariable [_varName, _value, true];
|
||||||
_object setVariable [format ["ACE_onEmbargo_%1", _varName], _object];
|
_object setVariable [format ["ACE_onEmbargo_%1", _varName], _object];
|
||||||
|
|
||||||
TRACE_2("Starting Embargo", _varName, _delay);
|
TRACE_2("Starting Embargo",_varName,_delay);
|
||||||
|
|
||||||
[{
|
[{
|
||||||
params ["_object", "_varName", "_value"];
|
params ["_object", "_varName", "_value"];
|
||||||
@ -43,7 +43,7 @@ TRACE_2("Starting Embargo", _varName, _delay);
|
|||||||
_object setVariable [format ["ACE_onEmbargo_%1", _varName], nil]; //Remove Embargo
|
_object setVariable [format ["ACE_onEmbargo_%1", _varName], nil]; //Remove Embargo
|
||||||
private _curValue = _object getVariable _varName;
|
private _curValue = _object getVariable _varName;
|
||||||
|
|
||||||
TRACE_4("End of embargo", _object, _varName, _value, _curValue);
|
TRACE_4("End of embargo",_object,_varName,_value,_curValue);
|
||||||
|
|
||||||
//If value at start of embargo doesn't equal current, then broadcast and start new embargo
|
//If value at start of embargo doesn't equal current, then broadcast and start new embargo
|
||||||
if (_value isNotEqualTo _curValue) then {
|
if (_value isNotEqualTo _curValue) then {
|
||||||
|
@ -41,11 +41,11 @@ if (isArray (missionConfigFile >> "showHUD")) then {
|
|||||||
if (_reason != "") then {
|
if (_reason != "") then {
|
||||||
_reason = toLower _reason;
|
_reason = toLower _reason;
|
||||||
if (_mask isEqualTo []) then {
|
if (_mask isEqualTo []) then {
|
||||||
TRACE_2("Removing", _reason, _mask);
|
TRACE_2("Removing",_reason,_mask);
|
||||||
GVAR(showHudHash) deleteAt _reason;
|
GVAR(showHudHash) deleteAt _reason;
|
||||||
} else {
|
} else {
|
||||||
while {(count _mask) < 10} do { _mask pushBack true; };
|
while {(count _mask) < 10} do { _mask pushBack true; };
|
||||||
TRACE_2("Setting", _reason, _mask);
|
TRACE_2("Setting",_reason,_mask);
|
||||||
GVAR(showHudHash) set [_reason, _mask];
|
GVAR(showHudHash) set [_reason, _mask];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -63,7 +63,7 @@ for "_index" from 0 to 9 do {
|
|||||||
_resultMask pushBack _set;
|
_resultMask pushBack _set;
|
||||||
};
|
};
|
||||||
|
|
||||||
TRACE_2("showHud", _resultMask, keys GVAR(showHudHash));
|
TRACE_2("showHud",_resultMask,keys GVAR(showHudHash));
|
||||||
showHud _resultMask;
|
showHud _resultMask;
|
||||||
|
|
||||||
_resultMask
|
_resultMask
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
params [["_name", "", [""]], ["_isGlobal", false, [false]], ["_commonReasonsArray", [], [[]]], ["_sendJIP", false, [false]]];
|
params [["_name", "", [""]], ["_isGlobal", false, [false]], ["_commonReasonsArray", [], [[]]], ["_sendJIP", false, [false]]];
|
||||||
TRACE_3("params",_name,_isGlobal,_commonReasonsArray);
|
TRACE_3("params",_name,_isGlobal,_commonReasonsArray);
|
||||||
|
|
||||||
if (_name == "") exitWith {ERROR_1("addStatusEffect - Bad Name %1", _this)};
|
if (_name == "") exitWith {ERROR_1("addStatusEffect - Bad Name %1",_this)};
|
||||||
if (_name in GVAR(statusEffect_Names)) exitWith {WARNING_1("addStatusEffect - Effect Already Added (note, will not update global bit) %1", _this)};
|
if (_name in GVAR(statusEffect_Names)) exitWith {WARNING_1("addStatusEffect - Effect Already Added (note, will not update global bit) %1",_this)};
|
||||||
if (_sendJIP && !_isGlobal) exitWith {WARNING_1("addStatusEffect - Trying to add non-global JIP effect %1",_this)};
|
if (_sendJIP && !_isGlobal) exitWith {WARNING_1("addStatusEffect - Trying to add non-global JIP effect %1",_this)};
|
||||||
|
|
||||||
GVAR(statusEffect_Names) pushBack _name;
|
GVAR(statusEffect_Names) pushBack _name;
|
||||||
|
@ -22,12 +22,12 @@ TRACE_2("params",_object,_isLocal);
|
|||||||
//Only run this after the settings are initialized
|
//Only run this after the settings are initialized
|
||||||
//Need to wait for all EH to be installed (local event will happen between pre and post init)
|
//Need to wait for all EH to be installed (local event will happen between pre and post init)
|
||||||
if !(GVAR(settingsInitFinished)) exitWith {
|
if !(GVAR(settingsInitFinished)) exitWith {
|
||||||
TRACE_1("pushing to runAtSettingsInitialized", _this);
|
TRACE_1("pushing to runAtSettingsInitialized",_this);
|
||||||
GVAR(runAtSettingsInitialized) pushBack [FUNC(statusEffect_localEH), _this];
|
GVAR(runAtSettingsInitialized) pushBack [FUNC(statusEffect_localEH), _this];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!_isLocal) exitWith {TRACE_1("object no longer local", _this)};
|
if (!_isLocal) exitWith {TRACE_1("object no longer local",_this)};
|
||||||
if (isNull _object) exitWith {TRACE_1("object null", _this)};
|
if (isNull _object) exitWith {TRACE_1("object null",_this)};
|
||||||
|
|
||||||
//Reset any variables because of respawn
|
//Reset any variables because of respawn
|
||||||
[_object, false] call FUNC(statusEffect_resetVariables);
|
[_object, false] call FUNC(statusEffect_resetVariables);
|
||||||
|
@ -21,12 +21,12 @@ TRACE_1("params",_object);
|
|||||||
//Only run this after the settings are initialized
|
//Only run this after the settings are initialized
|
||||||
//Need to wait for all EH to be installed (local event will happen between pre and post init)
|
//Need to wait for all EH to be installed (local event will happen between pre and post init)
|
||||||
if !(GVAR(settingsInitFinished)) exitWith {
|
if !(GVAR(settingsInitFinished)) exitWith {
|
||||||
TRACE_1("pushing to runAtSettingsInitialized", _this);
|
TRACE_1("pushing to runAtSettingsInitialized",_this);
|
||||||
GVAR(runAtSettingsInitialized) pushBack [FUNC(statusEffect_respawnEH), _this];
|
GVAR(runAtSettingsInitialized) pushBack [FUNC(statusEffect_respawnEH), _this];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!local _object) exitWith {TRACE_1("object no longer local", _this)};
|
if (!local _object) exitWith {TRACE_1("object no longer local",_this)};
|
||||||
if (isNull _object) exitWith {TRACE_1("object null", _this)};
|
if (isNull _object) exitWith {TRACE_1("object null",_this)};
|
||||||
|
|
||||||
//Reset any variables on "real" respawn
|
//Reset any variables on "real" respawn
|
||||||
[_object, false] call FUNC(statusEffect_resetVariables);
|
[_object, false] call FUNC(statusEffect_resetVariables);
|
||||||
|
@ -32,17 +32,17 @@ if (isNull _object) exitWith {};
|
|||||||
private _eventName = format [QGVAR(%1), _x];
|
private _eventName = format [QGVAR(%1), _x];
|
||||||
switch (true) do {
|
switch (true) do {
|
||||||
case (GVAR(statusEffect_sendJIP) select _forEachIndex): {
|
case (GVAR(statusEffect_sendJIP) select _forEachIndex): {
|
||||||
TRACE_2("Sending Global JIP Event", _object, _effectNumber);
|
TRACE_2("Sending Global JIP Event",_object,_effectNumber);
|
||||||
private _jipID = format [QGVAR(effect_%1_%2), _eventName, hashValue _object];
|
private _jipID = format [QGVAR(effect_%1_%2), _eventName, hashValue _object];
|
||||||
[_eventName, [_object, _effectNumber], _jipID] call CBA_fnc_globalEventJIP;
|
[_eventName, [_object, _effectNumber], _jipID] call CBA_fnc_globalEventJIP;
|
||||||
[_jipID, _object] call CBA_fnc_removeGlobalEventJIP;
|
[_jipID, _object] call CBA_fnc_removeGlobalEventJIP;
|
||||||
};
|
};
|
||||||
case (GVAR(statusEffect_isGlobal) select _forEachIndex): {
|
case (GVAR(statusEffect_isGlobal) select _forEachIndex): {
|
||||||
TRACE_2("Sending Global Event", _object, _effectNumber);
|
TRACE_2("Sending Global Event",_object,_effectNumber);
|
||||||
[_eventName, [_object, _effectNumber]] call CBA_fnc_globalEvent;
|
[_eventName, [_object, _effectNumber]] call CBA_fnc_globalEvent;
|
||||||
};
|
};
|
||||||
default {
|
default {
|
||||||
TRACE_2("Sending Target Event", _object, _effectNumber);
|
TRACE_2("Sending Target Event",_object,_effectNumber);
|
||||||
[_eventName, [_object, _effectNumber], _object] call CBA_fnc_targetEvent;
|
[_eventName, [_object, _effectNumber], _object] call CBA_fnc_targetEvent;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,7 @@ TRACE_4("params",_object,_effectName,_ID,_set);
|
|||||||
|
|
||||||
//Only run this after the settings are initialized
|
//Only run this after the settings are initialized
|
||||||
if !(GVAR(settingsInitFinished)) exitWith {
|
if !(GVAR(settingsInitFinished)) exitWith {
|
||||||
TRACE_1("pushing to runAtSettingsInitialized", _this);
|
TRACE_1("pushing to runAtSettingsInitialized",_this);
|
||||||
GVAR(runAtSettingsInitialized) pushBack [FUNC(statusEffect_set), _this];
|
GVAR(runAtSettingsInitialized) pushBack [FUNC(statusEffect_set), _this];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
params ["_name", "_args", ["_ttl", 0]];
|
params ["_name", "_args", ["_ttl", 0]];
|
||||||
|
|
||||||
if !(_name in GVAR(syncedEvents)) exitWith {
|
if !(_name in GVAR(syncedEvents)) exitWith {
|
||||||
ERROR_1("Synced event key [%1] not found (syncedEvent).", _name);
|
ERROR_1("Synced event key [%1] not found (syncedEvent)",_name);
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ if (_emptyPos isEqualTo []) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (count _emptyPos != 3) exitwith {
|
if (count _emptyPos != 3) exitwith {
|
||||||
WARNING_4("Could not find unload pos %1-ASL: %2 isTouchingGround: %3 Speed: %4",_vehicle, getPosASL _vehicle, isTouchingGround _vehicle, speed _vehicle);
|
WARNING_4("Could not find unload pos %1-ASL: %2 isTouchingGround: %3 Speed: %4",_vehicle,getPosASL _vehicle,isTouchingGround _vehicle,speed _vehicle);
|
||||||
if ((!isNull _unloader) && {[_unloader] call FUNC(isPlayer)}) then {
|
if ((!isNull _unloader) && {[_unloader] call FUNC(isPlayer)}) then {
|
||||||
//display text saying there are no safe places to exit the vehicle
|
//display text saying there are no safe places to exit the vehicle
|
||||||
[QGVAR(displayTextStructured), [localize LSTRING(NoRoomToUnload)], [_unloader]] call CBA_fnc_targetEvent;
|
[QGVAR(displayTextStructured), [localize LSTRING(NoRoomToUnload)], [_unloader]] call CBA_fnc_targetEvent;
|
||||||
|
@ -1641,7 +1641,7 @@
|
|||||||
<French>Renommer</French>
|
<French>Renommer</French>
|
||||||
<German>Umbenennen</German>
|
<German>Umbenennen</German>
|
||||||
<Polish>Zmień nazwę</Polish>
|
<Polish>Zmień nazwę</Polish>
|
||||||
<Japanese>改名</Japanese>
|
<Japanese>名前変更</Japanese>
|
||||||
<Italian>Rinomina</Italian>
|
<Italian>Rinomina</Italian>
|
||||||
<Korean>이름 바꾸기</Korean>
|
<Korean>이름 바꾸기</Korean>
|
||||||
<Chinese>重新命名</Chinese>
|
<Chinese>重新命名</Chinese>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user