mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into pr/9234
This commit is contained in:
commit
c94d29c88b
3
.github/release-drafter.yml
vendored
3
.github/release-drafter.yml
vendored
@ -5,6 +5,9 @@ branches:
|
||||
name-template: 'Version $NEXT_PATCH_VERSION'
|
||||
tag-template: 'v$NEXT_PATCH_VERSION'
|
||||
|
||||
sort-by: title # sort alphabetically
|
||||
sort-direction: ascending
|
||||
|
||||
categories:
|
||||
- title: '**ADDED:**'
|
||||
labels:
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,3 +20,4 @@ CHANGELOG.md
|
||||
sqfvm.exe
|
||||
ArmaScriptCompiler.exe
|
||||
*.sqfc
|
||||
!extras/**/*.zip
|
||||
|
@ -28,9 +28,6 @@ exclude = [
|
||||
"zeus/functions/fnc_zeusAttributes.sqf",
|
||||
]
|
||||
|
||||
[hemtt.config]
|
||||
preset = "Hemtt"
|
||||
|
||||
[hemtt.launch]
|
||||
workshop = [
|
||||
"450814997", # CBA_A3
|
||||
|
@ -126,6 +126,7 @@ Keithen <Keithen.Neu@gmail.com>
|
||||
Kllrt <kllrtik@gmail.com>
|
||||
KokaKolaA3
|
||||
Krzyciu
|
||||
LAxemann
|
||||
legman <juicemelon@msn.com>
|
||||
Legolasindar "Viper" <legolasindar@gmail.com>
|
||||
licht-im-Norden87 <lichtimnorden87@gmail.com>
|
||||
@ -190,3 +191,4 @@ YetheSamartaka
|
||||
xrufix
|
||||
Zakant <Zakant@gmx.de>
|
||||
zGuba
|
||||
Zman6258
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/acemod/ACE3/releases/latest">
|
||||
<img src="https://img.shields.io/badge/Version-3.16.1-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
<img src="https://img.shields.io/badge/Version-3.16.3-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/issues">
|
||||
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
//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 (!alive _projectile) exitWith {};
|
||||
|
@ -22,7 +22,7 @@ private _initStartTime = diag_tickTime;
|
||||
private _mapSize = worldSize;
|
||||
|
||||
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
|
||||
systemChat "AdvancedBallistics: Terrain already initialized";
|
||||
#endif
|
||||
@ -33,14 +33,14 @@ private _gridCells = _mapGrids * _mapGrids;
|
||||
|
||||
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"];
|
||||
_args params ["_mapGrids", "_gridCells", "_initStartTime"];
|
||||
|
||||
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
|
||||
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", (diag_tickTime - _initStartTime) toFixed 2];
|
||||
#endif
|
||||
@ -53,7 +53,7 @@ INFO_2("Starting Terrain Extension [cells: %1] [world: %2]", _gridCells, worldNa
|
||||
private _gridCenter = [_x + 25, _y + 25];
|
||||
private _gridHeight = round(getTerrainHeightASL _gridCenter);
|
||||
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];
|
||||
GVAR(currentGrid) = GVAR(currentGrid) + 1;
|
||||
if (GVAR(currentGrid) >= _gridCells) exitWith {};
|
||||
|
@ -66,7 +66,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
|
||||
if (_inheritedBarrelConfig || _inheritedTempConfig) then {
|
||||
private _parentConfig = inheritsFrom _ammoConfig;
|
||||
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
|
||||
_muzzleVelocityTable = [];
|
||||
_ammoTempMuzzleVelocityShifts = [];
|
||||
|
@ -21,7 +21,7 @@
|
||||
private _weaponConfig = (configFile >> "CfgWeapons" >> _this);
|
||||
|
||||
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 {
|
||||
_twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection");
|
||||
if !(_twistDirection in [-1, 0, 1]) then {
|
||||
|
@ -60,7 +60,7 @@ if (!hasInterface) exitWith {};
|
||||
}, true] call CBA_fnc_addPlayerEventHandler;
|
||||
|
||||
// - Duty factors -------------------------------------------------------------
|
||||
if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
|
||||
if (["ace_medical"] call EFUNC(common,isModLoaded)) then {
|
||||
[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];
|
||||
}] call FUNC(addDutyFactor);
|
||||
@ -68,7 +68,7 @@ if (!hasInterface) exitWith {};
|
||||
linearConversion [6, 0, (_this getVariable [QEGVAR(medical,bloodVolume), 6]), 1, 2, true];
|
||||
}] call FUNC(addDutyFactor);
|
||||
};
|
||||
if (["ACE_Dragging"] call EFUNC(common,isModLoaded)) then {
|
||||
if (["ace_dragging"] call EFUNC(common,isModLoaded)) then {
|
||||
[QEGVAR(dragging,isCarrying), {
|
||||
[1, 3] select (_this getVariable [QEGVAR(dragging,isCarrying), false]);
|
||||
}] call FUNC(addDutyFactor);
|
||||
|
@ -7,8 +7,8 @@
|
||||
* 0: The building(s) nearest this position are used <POSITION>
|
||||
* 1: Limit the building search to those type of building <ARRAY>
|
||||
* 2: Units that will be garrisoned <ARRAY>
|
||||
* 3: Radius to fill building(s) <SCALAR> (default: 50)
|
||||
* 4: 0: even filling, 1: building by building, 2: random filling <SCALAR> (default: 0)
|
||||
* 3: Radius to fill building(s) <NUMBER> (default: 50)
|
||||
* 4: 0: even filling, 1: building by building, 2: random filling <NUMBER> (default: 0)
|
||||
* 5: True to fill building(s) from top to bottom <BOOL> (default: false) (note: only works with filling mode 0 and 1)
|
||||
* 6: Teleport units <BOOL> (default: false)
|
||||
|
||||
@ -128,7 +128,7 @@ switch (_fillingType) do {
|
||||
} else {
|
||||
private _pos = _building select 0;
|
||||
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 {
|
||||
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 {
|
||||
private _pos = _building select 0;
|
||||
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 {
|
||||
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 {
|
||||
private _pos = selectRandom _building;
|
||||
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 {
|
||||
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
|
||||
private _garrison_unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []];
|
||||
@ -279,5 +279,5 @@ if (_teleport) then {
|
||||
[_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
|
||||
|
@ -81,13 +81,13 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then {
|
||||
[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
|
||||
if (!alive _unit || {_unit getVariable [QGVAR(garrisoned), false]}) then {
|
||||
_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 {
|
||||
private _unitPos = getPos _unit;
|
||||
|
@ -28,7 +28,7 @@ _units = _units select {local _x};
|
||||
|
||||
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];
|
||||
|
||||
|
@ -29,7 +29,10 @@ private _currentLoiterRadius = waypointLoiterRadius _waypoint;
|
||||
private _currentLoiterType = waypointLoiterType _waypoint;
|
||||
|
||||
// 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;
|
||||
_waypoint = _group addWaypoint [_pos, 0];
|
||||
|
@ -29,7 +29,7 @@
|
||||
<Russian>Открыть грузовой отсек</Russian>
|
||||
<Italian>Apri la rampa di carico</Italian>
|
||||
<Portuguese>Abrir porta de carga</Portuguese>
|
||||
<Japanese>カーゴ ドアを開く</Japanese>
|
||||
<Japanese>貨物室ドアを 開く</Japanese>
|
||||
<Korean>화물칸 개방</Korean>
|
||||
<Chinese>開啟貨艙門</Chinese>
|
||||
<Chinesesimp>开启货舱门</Chinesesimp>
|
||||
@ -46,7 +46,7 @@
|
||||
<Russian>Закрыть грузовой отсек</Russian>
|
||||
<Italian>Chiudi la rampa di carico</Italian>
|
||||
<Portuguese>Fechar porta de carga</Portuguese>
|
||||
<Japanese>カーゴ ドアを閉じる</Japanese>
|
||||
<Japanese>貨物室ドアを 閉じる</Japanese>
|
||||
<Korean>화물칸 폐쇄</Korean>
|
||||
<Chinese>關閉貨艙門</Chinese>
|
||||
<Chinesesimp>关闭货舱门</Chinesesimp>
|
||||
|
@ -22,7 +22,8 @@ GVAR(lastSortDirectionRight) = DESCENDING;
|
||||
params ["_object"];
|
||||
|
||||
// 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);
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
@ -12,57 +12,10 @@ PREP_RECOMPILE_END;
|
||||
#include "initSettings.inc.sqf"
|
||||
|
||||
// Arsenal events
|
||||
[QGVAR(statsToggle), {
|
||||
params ["_display", "_showStats"];
|
||||
|
||||
private _statsCtrlGroupCtrl = _display displayCtrl IDC_statsBox;
|
||||
private _statsPreviousPageCtrl = _display displayCtrl IDC_statsPreviousPage;
|
||||
private _statsNextPageCtrl = _display displayCtrl IDC_statsNextPage;
|
||||
private _statsCurrentPageCtrl = _display displayCtrl IDC_statsCurrentPage;
|
||||
|
||||
{
|
||||
_x ctrlShow (GVAR(showStats) && {_showStats});
|
||||
} forEach [
|
||||
_statsCtrlGroupCtrl,
|
||||
_statsPreviousPageCtrl,
|
||||
_statsNextPageCtrl,
|
||||
_statsCurrentPageCtrl
|
||||
];
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(statsChangePage), {
|
||||
_this call FUNC(buttonStatsPage);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(displayStats), {
|
||||
_this call FUNC(handleStats);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(actionsChangePage), {
|
||||
_this call FUNC(buttonActionsPage);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(displayActions), {
|
||||
_this call FUNC(handleActions);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
[QGVAR(actionsToggle), {
|
||||
params ["_display", "_showActions"];
|
||||
|
||||
private _actionsCtrlGroupCtrl = _display displayCtrl IDC_actionsBox;
|
||||
private _actionsPreviousPageCtrl = _display displayCtrl IDC_actionsPreviousPage;
|
||||
private _actionsNextPageCtrl = _display displayCtrl IDC_actionsNextPage;
|
||||
private _actionsCurrentPageCtrl = _display displayCtrl IDC_actionsCurrentPage;
|
||||
|
||||
{
|
||||
_x ctrlShow (GVAR(showActions) && {_showActions});
|
||||
} forEach [
|
||||
_actionsCtrlGroupCtrl,
|
||||
_actionsPreviousPageCtrl,
|
||||
_actionsNextPageCtrl,
|
||||
_actionsCurrentPageCtrl
|
||||
];
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(statsChangePage), LINKFUNC(buttonStatsPage)] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(displayStats), LINKFUNC(handleStats)] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(actionsChangePage), LINKFUNC(buttonActionsPage)] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(displayActions), LINKFUNC(handleActions)] call CBA_fnc_addEventHandler;
|
||||
|
||||
call FUNC(compileActions);
|
||||
call FUNC(compileSorts);
|
||||
@ -83,8 +36,16 @@ call FUNC(compileStats);
|
||||
EGVAR(common,blockItemReplacement) = false;
|
||||
}] 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
|
||||
[keys (uiNamespace getVariable [QGVAR(configItemsTools), createHashMap]), LLSTRING(toolsTab), TOOLS_TAB_ICON, -1, true] call FUNC(addRightPanelButton);
|
||||
|
||||
|
||||
ADDON = true;
|
||||
|
@ -155,6 +155,8 @@
|
||||
#define IDC_statsNextPage 53
|
||||
#define IDC_statsCurrentPage 54
|
||||
#define IDC_actionsBox 90
|
||||
#define IDC_actionsBackground1 90010
|
||||
#define IDC_actionsBackground2 90011
|
||||
#define IDC_actionsText1 9001
|
||||
#define IDC_actionsButton1 9002
|
||||
#define IDC_actionsText2 9003
|
||||
|
@ -10,6 +10,7 @@
|
||||
* 3: Actions <ARRAY of ARRAYS>
|
||||
* 4: Condition <CODE> (default: {true})
|
||||
* 5: Scope editor <NUMBER> (default: 2)
|
||||
* 6: Update when cargo content changes <BOOL> (default: false)
|
||||
*
|
||||
* Return Value:
|
||||
* 0: Array of IDs <ARRAY of STRINGS>
|
||||
@ -30,7 +31,8 @@ params [
|
||||
["_title", "", [""]],
|
||||
["_actions", [], [[]]],
|
||||
["_rootCondition", {true}, [{}]],
|
||||
["_scopeEditor", 2, [0]]
|
||||
["_scopeEditor", 2, [0]],
|
||||
["_updateOnCargoChange", false, [false]]
|
||||
];
|
||||
|
||||
// Compile actions from config (in case this is called before preInit)
|
||||
@ -38,13 +40,13 @@ call FUNC(compileActions);
|
||||
|
||||
// Skip if not allowed in editor and in editor
|
||||
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
|
||||
if ("~" in _rootClass) exitWith {
|
||||
TRACE_1("Classname can't contain '~'", _rootClass);
|
||||
TRACE_1("Classname can't contain '~'",_rootClass);
|
||||
[]
|
||||
};
|
||||
|
||||
@ -65,7 +67,7 @@ private _fnc_addToGroup = {
|
||||
|
||||
// Don't allow two of the same class
|
||||
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;
|
||||
};
|
||||
|
||||
@ -119,4 +121,8 @@ private _group = [];
|
||||
};
|
||||
} forEach _tabs;
|
||||
|
||||
if (_updateOnCargoChange) then {
|
||||
GVAR(updateActionsOnCargoChange) = true;
|
||||
};
|
||||
|
||||
_return
|
||||
|
@ -20,8 +20,9 @@
|
||||
|
||||
params [["_name", "", [""]], ["_loadout", [], [[]]], ["_global", false, [false]]];
|
||||
|
||||
if (_global) then {
|
||||
[QGVAR(addDefaultLoadout), [_name, _loadout]] call CBA_fnc_remoteEvent;
|
||||
if (_global) exitWith {
|
||||
private _eventID = format [QGVAR(loadouts_%1), _name];
|
||||
[QGVAR(addDefaultLoadout), [_name, _loadout], _eventID] call CBA_fnc_globalEventJIP;
|
||||
};
|
||||
|
||||
private _extendedInfo = createHashMap;
|
||||
|
@ -72,7 +72,7 @@ private _fnc_addToTabs = {
|
||||
_currentTab pushBack _sort;
|
||||
_return pushBack _sortName;
|
||||
} else {
|
||||
TRACE_1("A sort with this ID already exists", _sortName);
|
||||
TRACE_1("A sort with this ID already exists",_sortName);
|
||||
};
|
||||
} forEach _tabsToAddTo;
|
||||
};
|
||||
|
@ -77,7 +77,7 @@ private _fnc_addToTabs = {
|
||||
|
||||
// Find if there is an entry with same ID
|
||||
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 {
|
||||
_stat = +_finalArray;
|
||||
_stat set [5, _statName];
|
||||
@ -109,11 +109,10 @@ private _tabToChange = [];
|
||||
{
|
||||
_x params ["_tab", "_tabSide"];
|
||||
|
||||
_tabToChange = if (_tabSide == "R") then {
|
||||
_tabToChange = [
|
||||
GVAR(statsListLeftPanel),
|
||||
GVAR(statsListRightPanel)
|
||||
} else {
|
||||
GVAR(statsListLeftPanel)
|
||||
};
|
||||
] select (_tabSide == "R");
|
||||
|
||||
_stats = _tabToChange select _tab;
|
||||
|
||||
|
@ -2,12 +2,12 @@
|
||||
#include "..\defines.hpp"
|
||||
/*
|
||||
* Author: Brett Mayson
|
||||
* Handles the previous / next page buttons for actions
|
||||
* Handles the previous / next page buttons for actions.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Actions control <CONTROL>
|
||||
* 2: Previous or next <BOOL> (false = previous, true = next)
|
||||
* 1: Actions page <CONTROL>
|
||||
* 2: Previous (false) or next (true) page <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
@ -17,10 +17,11 @@
|
||||
|
||||
params ["_display", "_control", "_nextPage"];
|
||||
|
||||
TRACE_1("control enabled", ctrlEnabled _control);
|
||||
TRACE_1("control enabled",ctrlEnabled _control);
|
||||
if !(ctrlEnabled _control) exitWith {};
|
||||
|
||||
GVAR(currentActionPage) = GVAR(currentActionPage) + ([-1, 1] select _nextPage);
|
||||
|
||||
GVAR(actionsInfo) params ["_panelControl", "_curSel", "_itemCfg"];
|
||||
|
||||
[QGVAR(displayActions), [_display, _panelControl, _curSel, _itemCfg]] call CBA_fnc_localEvent;
|
||||
|
@ -47,8 +47,8 @@ private _container = switch (GVAR(currentLeftPanel)) do {
|
||||
};
|
||||
};
|
||||
|
||||
/// Get all items from container (excluding container itself)
|
||||
_containerItems = [GVAR(center), 0, 3, 0, 0, false] call EFUNC(common,uniqueUnitItems);
|
||||
// Get all items from container
|
||||
_containerItems = uniformItems GVAR(center);
|
||||
|
||||
// Update currentItems
|
||||
GVAR(currentItems) set [IDX_CURR_UNIFORM_ITEMS, ((getUnitLoadout GVAR(center)) select IDX_LOADOUT_UNIFORM) param [1, []]];
|
||||
@ -75,8 +75,8 @@ private _container = switch (GVAR(currentLeftPanel)) do {
|
||||
};
|
||||
};
|
||||
|
||||
// Get all items from container (excluding container itself)
|
||||
_containerItems = [GVAR(center), 0, 0, 3, 0, false] call EFUNC(common,uniqueUnitItems);
|
||||
// Get all items from container
|
||||
_containerItems = vestItems GVAR(center);
|
||||
|
||||
// Update currentItems
|
||||
GVAR(currentItems) set [IDX_CURR_VEST_ITEMS, ((getUnitLoadout GVAR(center)) select IDX_LOADOUT_VEST) param [1, []]];
|
||||
@ -103,8 +103,8 @@ private _container = switch (GVAR(currentLeftPanel)) do {
|
||||
};
|
||||
};
|
||||
|
||||
// Get all items from container (excluding container itself)
|
||||
_containerItems = [GVAR(center), 0, 0, 0, 3, false] call EFUNC(common,uniqueUnitItems);
|
||||
// Get all items from container
|
||||
_containerItems = backpackItems GVAR(center);
|
||||
|
||||
// Update currentItems
|
||||
GVAR(currentItems) set [IDX_CURR_BACKPACK_ITEMS, ((getUnitLoadout GVAR(center)) select IDX_LOADOUT_BACKPACK) param [1, []]];
|
||||
@ -117,7 +117,7 @@ private _container = switch (GVAR(currentLeftPanel)) do {
|
||||
};
|
||||
|
||||
// Find out how many items of that type there are and update the number displayed
|
||||
_ctrlList lnbSetText [[_lnbCurSel, 2], str (_containerItems getOrDefault [_item, 0])];
|
||||
_ctrlList lnbSetText [[_lnbCurSel, 2], str ({_item == _x} count _containerItems)];
|
||||
|
||||
[QGVAR(cargoChanged), [_display, _item, _addOrRemove, GVAR(shiftState)]] call CBA_fnc_localEvent;
|
||||
|
||||
|
@ -52,10 +52,20 @@ private _ctrl = controlNull;
|
||||
IDC_buttonCurrentMag2,
|
||||
IDC_iconBackgroundCurrentMag,
|
||||
IDC_iconBackgroundCurrentMag2,
|
||||
IDC_statsBox,
|
||||
IDC_statsPreviousPage,
|
||||
IDC_statsNextPage,
|
||||
IDC_statsCurrentPage
|
||||
IDC_statsCurrentPage,
|
||||
IDC_actionsBox,
|
||||
IDC_actionsPreviousPage,
|
||||
IDC_actionsNextPage,
|
||||
IDC_actionsCurrentPage
|
||||
];
|
||||
|
||||
[QGVAR(statsToggle), [_display, _showToggle]] call CBA_fnc_localEvent;
|
||||
[QGVAR(actionsToggle), [_display, _showToggle]] call CBA_fnc_localEvent;
|
||||
if (!_showToggle) exitWith {};
|
||||
|
||||
// When showing the stats/actions again, update them to fit with currently selected item
|
||||
GVAR(actionsInfo) params ["_control", "_curSel", "_itemCfg"];
|
||||
|
||||
[QGVAR(displayStats), [_display, _control, _curSel, _itemCfg]] call CBA_fnc_localEvent;
|
||||
[QGVAR(displayActions), [_display, _control, _curSel, _itemCfg]] call CBA_fnc_localEvent;
|
||||
|
@ -43,11 +43,7 @@ private _loadoutIndex = _data findIf {(_x select 0) == _loadoutName};
|
||||
(_data select _loadoutIndex) set [0, _editBoxContent];
|
||||
|
||||
if (GVAR(currentLoadoutsTab) == IDC_buttonDefaultLoadouts) then {
|
||||
if (is3DEN) then {
|
||||
set3DENMissionAttributes [[QGVAR(DummyCategory), QGVAR(DefaultLoadoutsListAttribute), GVAR(defaultLoadoutsList)]];
|
||||
} else {
|
||||
[QGVAR(renameDefaultLoadout), [_loadoutName, _editBoxContent]] call CBA_fnc_remoteEvent;
|
||||
};
|
||||
set3DENMissionAttributes [[QGVAR(DummyCategory), QGVAR(DefaultLoadoutsListAttribute), GVAR(defaultLoadoutsList)]];
|
||||
};
|
||||
|
||||
private _currentLoadoutsTab = str GVAR(currentLoadoutsTab);
|
||||
|
@ -17,11 +17,11 @@
|
||||
|
||||
params ["_display", "_control", "_nextPage"];
|
||||
|
||||
TRACE_1("control enabled", ctrlEnabled _control);
|
||||
TRACE_1("control enabled",ctrlEnabled _control);
|
||||
if !(ctrlEnabled _control) exitWith {};
|
||||
|
||||
GVAR(currentStatPage) = [GVAR(currentStatPage) - 1, GVAR(currentStatPage) + 1] select _nextPage;
|
||||
GVAR(currentStatPage) = GVAR(currentStatPage) + ([-1, 1] select _nextPage);
|
||||
|
||||
GVAR(statsInfo) params ["_isLeftPanel", "_panelControl", "_curSel", "_itemCfg"];
|
||||
GVAR(statsInfo) params ["", "_panelControl", "_curSel", "_itemCfg"];
|
||||
|
||||
[QGVAR(displayStats), [_display, _panelControl, _curSel, _itemCfg]] call CBA_fnc_localEvent;
|
||||
|
@ -37,6 +37,8 @@ private _actionList = [
|
||||
|
||||
private _configGroupEntries = "true" configClasses (configFile >> QGVAR(actions));
|
||||
|
||||
GVAR(updateActionsOnCargoChange) = false;
|
||||
|
||||
{
|
||||
private _scopeEditor = getNumber (_x >> "scopeEditor");
|
||||
|
||||
@ -48,6 +50,10 @@ private _configGroupEntries = "true" configClasses (configFile >> QGVAR(actions)
|
||||
private _rootDisplayName = getText (_x >> "displayName");
|
||||
private _rootCondition = getText (_x >> "condition");
|
||||
private _rootTabs = getArray (_x >> "tabs");
|
||||
private _updateOnCargoChanged = getNumber (_x >> "updateOnCargoChanged");
|
||||
if (_updateOnCargoChanged > 0) then {
|
||||
GVAR(updateActionsOnCargoChange) = true;
|
||||
};
|
||||
|
||||
if (_rootCondition != "") then {
|
||||
_rootCondition = compile _rootCondition;
|
||||
|
@ -101,7 +101,7 @@ private _priority = 0;
|
||||
(_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 {
|
||||
[_statsListLeftPanel, _leftTabsList, "L"] call _fnc_addToTabs;
|
||||
|
@ -196,7 +196,7 @@ private _selectedItem = switch (true) do {
|
||||
_lbAdd = _ctrlPanel lbAdd _displayName;
|
||||
_ctrlPanel lbSetData [_lbAdd, _x];
|
||||
_ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _x]];
|
||||
_ctrlPanel lbSetPictureRight [_lbAdd, _modPicture];
|
||||
_ctrlPanel lbSetPictureRight [_lbAdd, ["", _modPicture] select GVAR(enableModIcons)];
|
||||
} forEach (uiNamespace getVariable QGVAR(faceCache));
|
||||
|
||||
GVAR(currentFace)
|
||||
|
@ -44,10 +44,14 @@ private _cfgMagazines = configFile >> "CfgMagazines";
|
||||
private _cfgWeapons = configFile >> "CfgWeapons";
|
||||
private _rightPanelCache = uiNamespace getVariable QGVAR(rightPanelCache);
|
||||
|
||||
private _currentCargo = itemsWithMagazines GVAR(center);
|
||||
private _currentCargo = []; // we only need this if we're filtering for favorites
|
||||
if (GVAR(favoritesOnly)) then {
|
||||
_currentCargo = itemsWithMagazines GVAR(center) + backpacks GVAR(center);
|
||||
_currentCargo = _currentCargo arrayIntersect _currentCargo;
|
||||
};
|
||||
|
||||
private _fnc_fillRightContainer = {
|
||||
params ["_configCategory", "_className", "_hasItemInfo", ["_isUnique", false, [false]], ["_unknownOrigin", false, [false]]];
|
||||
params ["_configCategory", "_className", ["_isUnique", false, [false]], ["_unknownOrigin", false, [false]]];
|
||||
|
||||
if (GVAR(favoritesOnly) && {!(_className in _currentCargo)} && {!((toLower _className) in GVAR(favorites))}) exitWith {};
|
||||
|
||||
@ -64,7 +68,6 @@ private _fnc_fillRightContainer = {
|
||||
// "Misc. items" magazines (e.g. spare barrels, intel, photos)
|
||||
if (_className in (uiNamespace getVariable QGVAR(magazineMiscItems))) then {
|
||||
_configPath = _cfgMagazines >> _className;
|
||||
_hasItemInfo = false;
|
||||
};
|
||||
|
||||
// If an item with unknown origin is in the arsenal list, try to find it
|
||||
@ -75,35 +78,16 @@ private _fnc_fillRightContainer = {
|
||||
if (isNull _configPath) then {
|
||||
_configPath = _className call CBA_fnc_getObjectConfig;
|
||||
};
|
||||
|
||||
// Check if item is has item info
|
||||
_itemInfo = isClass (_cfgWeapons >> configName _configPath);
|
||||
};
|
||||
|
||||
// Get mass
|
||||
private _mass = if (!_hasItemInfo) then {
|
||||
getNumber (_configPath >> "mass")
|
||||
} else {
|
||||
private _mass = getNumber (_configPath >> "itemInfo" >> "mass");
|
||||
|
||||
if (_mass == 0) then {
|
||||
_mass = getNumber (_configPath >> "WeaponSlotsInfo" >> "mass");
|
||||
};
|
||||
|
||||
_mass
|
||||
};
|
||||
|
||||
_rightPanelCache set [_className, _mass]; // Needed because this provides more accurate weight for FUNC(updateRightPanel)
|
||||
|
||||
[getText (_configPath >> "displayName"), getText (_configPath >> "picture"), _mass]
|
||||
}, true]) params ["_displayName", "_picture", "_mass"];
|
||||
[getText (_configPath >> "displayName"), getText (_configPath >> "picture")]
|
||||
}, true]) params ["_displayName", "_picture"];
|
||||
|
||||
private _lbAdd = _ctrlPanel lnbAddRow ["", _displayName, "0"];
|
||||
_ctrlPanel lnbSetText [[_lbAdd, 1], _displayName];
|
||||
_ctrlPanel lnbSetData [[_lbAdd, 0], _className];
|
||||
_ctrlPanel lnbSetPicture [[_lbAdd, 0], _picture];
|
||||
_ctrlPanel lnbSetValue [[_lbAdd, 0], _mass];
|
||||
_ctrlPanel lnbSetValue [[_lbAdd, 2], [0, 1] select _isUnique];
|
||||
_ctrlPanel lnbSetValue [[_lbAdd, 2], parseNumber _isUnique];
|
||||
_ctrlPanel lnbSetTooltip [[_lbAdd, 0], format ["%1\n%2", _displayName, _className]];
|
||||
if ((toLower _className) in GVAR(favorites)) then {
|
||||
_ctrlPanel lnbSetColor [[_lbAdd, 1], FAVORITES_COLOR];
|
||||
@ -230,11 +214,11 @@ switch (_ctrlIDC) do {
|
||||
} forEach _compatibleItems;
|
||||
} else {
|
||||
{
|
||||
["CfgWeapons", _x, true] call _fnc_fillRightContainer;
|
||||
["CfgWeapons", _x] call _fnc_fillRightContainer;
|
||||
} forEach (keys ((GVAR(virtualItems) get IDX_VIRT_ATTACHMENTS) get _index));
|
||||
|
||||
{
|
||||
["CfgWeapons", _x, true, true] call _fnc_fillRightContainer;
|
||||
["CfgWeapons", _x, true] call _fnc_fillRightContainer;
|
||||
} forEach (keys ((GVAR(virtualItems) get IDX_VIRT_UNIQUE_ATTACHMENTS) get _index));
|
||||
};
|
||||
};
|
||||
@ -253,44 +237,44 @@ switch (_ctrlIDC) do {
|
||||
case IDC_buttonMag: {
|
||||
{
|
||||
if (_x in (GVAR(virtualItems) get IDX_VIRT_ITEMS_ALL)) then {
|
||||
["CfgMagazines", _x, false] call _fnc_fillRightContainer;
|
||||
["CfgMagazines", _x] call _fnc_fillRightContainer;
|
||||
|
||||
continue;
|
||||
};
|
||||
|
||||
if (_x in (GVAR(virtualItems) get IDX_VIRT_UNIQUE_VIRT_ITEMS_ALL)) then {
|
||||
["CfgMagazines", _x, false, true] call _fnc_fillRightContainer;
|
||||
["CfgMagazines", _x, true] call _fnc_fillRightContainer;
|
||||
};
|
||||
} forEach (keys _compatibleMagsAll);
|
||||
};
|
||||
// All magazines
|
||||
case IDC_buttonMagALL: {
|
||||
{
|
||||
["CfgMagazines", _x, false] call _fnc_fillRightContainer;
|
||||
["CfgMagazines", _x] call _fnc_fillRightContainer;
|
||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_ITEMS_ALL));
|
||||
|
||||
{
|
||||
["CfgMagazines", _x, false, true] call _fnc_fillRightContainer;
|
||||
["CfgMagazines", _x, true] call _fnc_fillRightContainer;
|
||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_UNIQUE_VIRT_ITEMS_ALL));
|
||||
};
|
||||
// Grenades
|
||||
case IDC_buttonThrow: {
|
||||
{
|
||||
["CfgMagazines", _x, false] call _fnc_fillRightContainer;
|
||||
["CfgMagazines", _x] call _fnc_fillRightContainer;
|
||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_GRENADES));
|
||||
|
||||
{
|
||||
["CfgMagazines", _x, false, true] call _fnc_fillRightContainer;
|
||||
["CfgMagazines", _x, true] call _fnc_fillRightContainer;
|
||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_UNIQUE_GRENADES));
|
||||
};
|
||||
// Explosives
|
||||
case IDC_buttonPut: {
|
||||
{
|
||||
["CfgMagazines", _x, false] call _fnc_fillRightContainer;
|
||||
["CfgMagazines", _x] call _fnc_fillRightContainer;
|
||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_EXPLOSIVES));
|
||||
|
||||
{
|
||||
["CfgMagazines", _x, false, true] call _fnc_fillRightContainer;
|
||||
["CfgMagazines", _x, true] call _fnc_fillRightContainer;
|
||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_UNIQUE_EXPLOSIVES));
|
||||
};
|
||||
// Misc. items
|
||||
@ -309,33 +293,35 @@ switch (_ctrlIDC) do {
|
||||
// "Regular" misc. items
|
||||
{
|
||||
if !(_x in _items) then {
|
||||
["CfgWeapons", _x, true] call _fnc_fillRightContainer;
|
||||
["CfgWeapons", _x] call _fnc_fillRightContainer;
|
||||
};
|
||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_MISC_ITEMS));
|
||||
// Unique items
|
||||
{
|
||||
if !(_x in _items) then {
|
||||
["CfgWeapons", _x, true, true] call _fnc_fillRightContainer;
|
||||
["CfgWeapons", _x, true] call _fnc_fillRightContainer;
|
||||
};
|
||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_UNIQUE_MISC_ITEMS));
|
||||
// Unique backpacks
|
||||
{
|
||||
if !(_x in _items) then {
|
||||
["CfgVehicles", _x, false, true] call _fnc_fillRightContainer;
|
||||
["CfgVehicles", _x, true] call _fnc_fillRightContainer;
|
||||
};
|
||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_UNIQUE_BACKPACKS));
|
||||
// Unique goggles
|
||||
{
|
||||
if !(_x in _items) then {
|
||||
["CfgGlasses", _x, false, true] call _fnc_fillRightContainer;
|
||||
// _y indicates if an item is truly unique or if it's a non-inventory item in a container (e.g. goggles in backpack)
|
||||
["CfgGlasses", _x, _y] call _fnc_fillRightContainer;
|
||||
};
|
||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_UNIQUE_GOGGLES));
|
||||
} forEach (GVAR(virtualItems) get IDX_VIRT_UNIQUE_GOGGLES);
|
||||
// Unknown items
|
||||
{
|
||||
if !(_x in _items) then {
|
||||
["CfgWeapons", _x, true, true, true] call _fnc_fillRightContainer;
|
||||
// _y indicates if an item is truly unique or if it's a non-inventory item in a container (e.g. helmet in backpack)
|
||||
["CfgWeapons", _x, _y, true] call _fnc_fillRightContainer;
|
||||
};
|
||||
} forEach (keys (GVAR(virtualItems) get IDX_VIRT_UNIQUE_UNKNOWN_ITEMS));
|
||||
} forEach (GVAR(virtualItems) get IDX_VIRT_UNIQUE_UNKNOWN_ITEMS); // if an item is here but in virtual items, it's just in the wrong place
|
||||
};
|
||||
// Custom buttons
|
||||
default {
|
||||
@ -347,23 +333,23 @@ switch (_ctrlIDC) do {
|
||||
switch (true) do {
|
||||
// "Regular" misc. items
|
||||
case (_x in (GVAR(virtualItems) get IDX_VIRT_MISC_ITEMS)): {
|
||||
["CfgWeapons", _x, true] call _fnc_fillRightContainer;
|
||||
["CfgWeapons", _x] call _fnc_fillRightContainer;
|
||||
};
|
||||
// Unique items
|
||||
case (_x in (GVAR(virtualItems) get IDX_VIRT_UNIQUE_MISC_ITEMS)): {
|
||||
["CfgWeapons", _x, true, true] call _fnc_fillRightContainer;
|
||||
["CfgWeapons", _x, true] call _fnc_fillRightContainer;
|
||||
};
|
||||
// Unique backpacks
|
||||
case (_x in (GVAR(virtualItems) get IDX_VIRT_UNIQUE_BACKPACKS)): {
|
||||
["CfgVehicles", _x, false, true] call _fnc_fillRightContainer;
|
||||
["CfgVehicles", _x, true] call _fnc_fillRightContainer;
|
||||
};
|
||||
// Unique goggles
|
||||
case (_x in (GVAR(virtualItems) get IDX_VIRT_UNIQUE_GOGGLES)): {
|
||||
["CfgGlasses", _x, false, true] call _fnc_fillRightContainer;
|
||||
["CfgGlasses", _x, GVAR(virtualItems) get IDX_VIRT_UNIQUE_GOGGLES get _x] call _fnc_fillRightContainer;
|
||||
};
|
||||
// Unknown items
|
||||
case (_x in (GVAR(virtualItems) get IDX_VIRT_UNIQUE_UNKNOWN_ITEMS)): {
|
||||
["CfgWeapons", _x, true, true, true] call _fnc_fillRightContainer;
|
||||
["CfgWeapons", _x, GVAR(virtualItems) get IDX_VIRT_UNIQUE_UNKNOWN_ITEMS get _x, true] call _fnc_fillRightContainer;
|
||||
};
|
||||
};
|
||||
} forEach _items;
|
||||
@ -389,8 +375,8 @@ if (_isContainer) then {
|
||||
// Update load bar
|
||||
(_display displayCtrl IDC_loadIndicatorBar) progressSetPosition (loadUniform GVAR(center));
|
||||
|
||||
// Get all items from container (excluding container itself)
|
||||
_containerItems = [GVAR(center), 0, 3, 0, 0, false] call EFUNC(common,uniqueUnitItems);
|
||||
// Get all items from container
|
||||
_containerItems = uniformItems GVAR(center);
|
||||
|
||||
uniformContainer GVAR(center)
|
||||
};
|
||||
@ -399,8 +385,8 @@ if (_isContainer) then {
|
||||
// Update load bar
|
||||
(_display displayCtrl IDC_loadIndicatorBar) progressSetPosition (loadVest GVAR(center));
|
||||
|
||||
// Get all items from container (excluding container itself)
|
||||
_containerItems = [GVAR(center), 0, 0, 3, 0, false] call EFUNC(common,uniqueUnitItems);
|
||||
// Get all items from container
|
||||
_containerItems = vestItems GVAR(center);
|
||||
|
||||
vestContainer GVAR(center)
|
||||
};
|
||||
@ -409,8 +395,8 @@ if (_isContainer) then {
|
||||
// Update load bar
|
||||
(_display displayCtrl IDC_loadIndicatorBar) progressSetPosition (loadBackpack GVAR(center));
|
||||
|
||||
// Get all items from container (excluding container itself)
|
||||
_containerItems = [GVAR(center), 0, 0, 0, 3, false] call EFUNC(common,uniqueUnitItems);
|
||||
// Get all items from container
|
||||
_containerItems = backpackItems GVAR(center);
|
||||
|
||||
backpackContainer GVAR(center)
|
||||
};
|
||||
@ -418,7 +404,8 @@ if (_isContainer) then {
|
||||
|
||||
// Find out how many items of a type there are and update the number displayed
|
||||
for "_lbIndex" from 0 to (lnbSize _ctrlPanel select 0) - 1 do {
|
||||
_ctrlPanel lnbSetText [[_lbIndex, 2], str (_containerItems getOrDefault [_ctrlPanel lnbData [_lbIndex, 0], 0])];
|
||||
private _xItem = _ctrlPanel lnbData [_lbIndex, 0];
|
||||
_ctrlPanel lnbSetText [[_lbIndex, 2], str ({_xItem == _x} count _containerItems)];
|
||||
};
|
||||
|
||||
// Refresh availibility of items based on space remaining in container
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Arguments:
|
||||
* 0: Arsenal display <DISPLAY>
|
||||
* 1: Current panel control <CONTROL>
|
||||
* 2: Current panel selection <SCALAR>
|
||||
* 2: Current panel selection <NUMBER>
|
||||
* 3: Item config entry <CONFIG>
|
||||
*
|
||||
* Return Value:
|
||||
@ -15,7 +15,6 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_display", "_control", "_curSel", "_itemCfg"];
|
||||
|
||||
GVAR(actionsInfo) = [_control, _curSel, _itemCfg];
|
||||
@ -46,13 +45,12 @@ private _groups = (GVAR(actionList) select _panel) select {
|
||||
};
|
||||
|
||||
private _show = _groups isNotEqualTo [];
|
||||
private _ctrl = _display displayCtrl IDC_actionsBox;
|
||||
_ctrl ctrlShow _show;
|
||||
_ctrl ctrlCommit 0.15;
|
||||
private _actionsBoxCtrl = _display displayCtrl IDC_actionsBox;
|
||||
_actionsBoxCtrl ctrlShow _show;
|
||||
_actionsBoxCtrl ctrlCommit 0.15;
|
||||
|
||||
if (!_show) exitWith {};
|
||||
|
||||
private _actionsBoxCtrl = _display displayCtrl IDC_actionsBox;
|
||||
private _actionsCurrentPageCtrl = _display displayCtrl IDC_actionsCurrentPage;
|
||||
|
||||
private _currentPage = GVAR(currentActionPage);
|
||||
@ -83,10 +81,11 @@ _actionsCurrentPageCtrl ctrlSetFade 0;
|
||||
_actionsCurrentPageCtrl ctrlShow true;
|
||||
_actionsCurrentPageCtrl ctrlCommit 0;
|
||||
|
||||
private _activeCtrls = [];
|
||||
{
|
||||
_x params ["", "_type", "_label", "_statement"];
|
||||
|
||||
private _idc = 9001 + _forEachIndex * 2;
|
||||
private _idc = IDC_actionsText1 + _forEachIndex * 2;
|
||||
private _actionTextCtrl = _display displayCtrl _idc;
|
||||
private _actionButtonCtrl = _display displayCtrl (_idc + 1);
|
||||
|
||||
@ -99,13 +98,23 @@ _actionsCurrentPageCtrl ctrlCommit 0;
|
||||
[true] call FUNC(refresh);
|
||||
}] call CBA_fnc_execNextFrame;
|
||||
}];
|
||||
|
||||
if (_activeCtrls isNotEqualTo []) then {
|
||||
(ctrlPosition (_activeCtrls select -1)) params ["", "_lastPosY", "", "_lastPosH"];
|
||||
_actionButtonCtrl ctrlSetPositionY (_lastPosY + _lastPosH + GRID_H);
|
||||
} else {
|
||||
_actionButtonCtrl ctrlSetPositionY (6 * GRID_H);
|
||||
};
|
||||
|
||||
_actionButtonCtrl ctrlAddEventHandler ["ButtonClick", _statement];
|
||||
_actionButtonCtrl ctrlSetText _label;
|
||||
_actionButtonCtrl ctrlSetFade 0;
|
||||
_actionButtonCtrl ctrlEnable true;
|
||||
_actionButtonCtrl ctrlCommit 0;
|
||||
_actionTextCtrl ctrlSetFade 1;
|
||||
_actionTextCtrl ctrlEnable false;
|
||||
_actionTextCtrl ctrlCommit 0;
|
||||
_activeCtrls pushBack _actionButtonCtrl;
|
||||
};
|
||||
case ACTION_TYPE_TEXT: {
|
||||
private _text = call _statement;
|
||||
@ -113,13 +122,25 @@ _actionsCurrentPageCtrl ctrlCommit 0;
|
||||
if (isNil "_text") then {
|
||||
_text = "";
|
||||
};
|
||||
if (_text isEqualType []) then {
|
||||
_text = _text joinString endl;
|
||||
};
|
||||
if (_activeCtrls isNotEqualTo []) then {
|
||||
(ctrlPosition (_activeCtrls select -1)) params ["", "_lastPosY", "", "_lastPosH"];
|
||||
_actionTextCtrl ctrlSetPositionY (_lastPosY + _lastPosH + GRID_H);
|
||||
} else {
|
||||
_actionTextCtrl ctrlSetPositionY (5 * GRID_H);
|
||||
};
|
||||
|
||||
_actionTextCtrl ctrlSetText _text;
|
||||
_actionTextCtrl ctrlSetPositionH (ctrlTextHeight _actionTextCtrl);
|
||||
_actionTextCtrl ctrlSetFade 0;
|
||||
_actionTextCtrl ctrlEnable false;
|
||||
_actionTextCtrl ctrlCommit 0;
|
||||
_actionButtonCtrl ctrlSetFade 1;
|
||||
_actionButtonCtrl ctrlEnable false;
|
||||
_actionButtonCtrl ctrlCommit 0;
|
||||
_activeCtrls pushBack _actionTextCtrl;
|
||||
};
|
||||
default {
|
||||
_actionTextCtrl ctrlSetFade 1;
|
||||
@ -134,7 +155,7 @@ _actionsCurrentPageCtrl ctrlCommit 0;
|
||||
private _actionCount = count _items;
|
||||
|
||||
{
|
||||
private _idc = 9001 + _x * 2;
|
||||
private _idc = IDC_actionsText1 + _x * 2;
|
||||
private _actionTextCtrl = _display displayCtrl _idc;
|
||||
private _actionButtonCtrl = _display displayCtrl (_idc + 1);
|
||||
|
||||
@ -145,6 +166,11 @@ private _actionCount = count _items;
|
||||
} forEach ([0, 1, 2, 3, 4] select [_actionCount, 5]);
|
||||
|
||||
private _pos = ctrlPosition _actionsBoxCtrl;
|
||||
_pos set [3, ([11, (5 * _actionCount) + 6] select (_actionCount > 0)) * GRID_H];
|
||||
_actionsBoxCtrl ctrlSetPosition _pos;
|
||||
(ctrlPosition (_activeCtrls select -1)) params ["", "_lastPosY", "", "_lastPosH"];
|
||||
private _actionsBoxHeight = _lastPosY + _lastPosH + GRID_H;
|
||||
_actionsBoxCtrl ctrlSetPositionH _actionsBoxHeight;
|
||||
_actionsBoxCtrl ctrlCommit 0;
|
||||
|
||||
private _background = _display displayCtrl IDC_actionsBackground1;
|
||||
_background ctrlSetPositionH _actionsBoxHeight;
|
||||
_background ctrlCommit 0;
|
||||
|
@ -63,6 +63,7 @@ switch (ctrlIDC _control) do {
|
||||
_saveButtonCtrl ctrlSetTooltip LLSTRING(buttonSaveTooltip);
|
||||
};
|
||||
|
||||
_renameButtonCtrl ctrlEnable is3DEN; // no renaming mid-mission
|
||||
_saveButtonCtrl ctrlEnable call FUNC(canEditDefaultLoadout);
|
||||
_saveButtonCtrl ctrlCommit 0;
|
||||
};
|
||||
|
@ -51,13 +51,6 @@ if (is3DEN) then {
|
||||
["ShowInterface", true] call BIS_fnc_3DENInterface;
|
||||
GVAR(visionMode) call BIS_fnc_3DENVisionMode;
|
||||
} else {
|
||||
// Select correct weapon
|
||||
switch (GVAR(selectedWeaponType)) do {
|
||||
case 0: {GVAR(center) selectWeapon (primaryWeapon GVAR(center))};
|
||||
case 1: {GVAR(center) selectWeapon (secondaryWeapon GVAR(center))};
|
||||
case 2: {GVAR(center) selectWeapon (handgunWeapon GVAR(center))};
|
||||
};
|
||||
|
||||
if (!isNull curatorCamera && {ACE_player == player}) then {
|
||||
curatorCamera cameraEffect ["Internal", "BACK"];
|
||||
} else {
|
||||
@ -122,12 +115,11 @@ GVAR(currentVoice) = nil;
|
||||
GVAR(currentInsignia) = nil;
|
||||
GVAR(currentAction) = nil;
|
||||
|
||||
GVAR(showStats) = nil;
|
||||
GVAR(currentStatPage) = nil;
|
||||
GVAR(statsInfo) = nil;
|
||||
|
||||
GVAR(showActions) = nil;
|
||||
GVAR(currentActionPage) = nil;
|
||||
GVAR(actionsInfo) = nil;
|
||||
|
||||
profileNamespace setVariable [QGVAR(favorites), GVAR(favorites)];
|
||||
GVAR(favoritesOnly) = nil;
|
||||
|
@ -74,12 +74,11 @@ GVAR(currentInsignia) = GVAR(center) call BIS_fnc_getUnitInsignia;
|
||||
GVAR(currentAction) = "Stand";
|
||||
GVAR(shiftState) = false;
|
||||
|
||||
GVAR(showStats) = true;
|
||||
GVAR(currentStatPage) = 0;
|
||||
GVAR(statsInfo) = [true, controlNull, nil, nil];
|
||||
|
||||
GVAR(showActions) = true;
|
||||
GVAR(currentActionPage) = 0;
|
||||
GVAR(actionsInfo) = [controlNull, nil, nil];
|
||||
|
||||
// Update current item list
|
||||
call FUNC(updateCurrentItemsList);
|
||||
@ -243,7 +242,15 @@ GVAR(refreshing) = false;
|
||||
_panel ctrlCommit 0;
|
||||
} forEach [IDC_leftTabContent, IDC_rightTabContent, IDC_rightTabContentListnBox];
|
||||
|
||||
[_display, _display displayCtrl IDC_buttonPrimaryWeapon] call FUNC(fillLeftPanel);
|
||||
// Open left panel for current weapon, do some math
|
||||
GVAR(selectedWeaponType) = [primaryWeapon GVAR(center), secondaryWeapon GVAR(center), handgunWeapon GVAR(center), binocular GVAR(center)] find (currentWeapon GVAR(center));
|
||||
if (GVAR(selectedWeaponType) == -1) then {
|
||||
GVAR(selectedWeaponType) = 0; // default to primary
|
||||
};
|
||||
|
||||
private _leftPanelIDC = [IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun, IDC_buttonBinoculars] select GVAR(selectedWeaponType);
|
||||
|
||||
[_display, _display displayCtrl _leftPanelIDC] call FUNC(fillLeftPanel);
|
||||
|
||||
//--------------- Init camera
|
||||
if (isNil QGVAR(cameraPosition)) then {
|
||||
|
@ -147,7 +147,7 @@ if (!isNull _loadoutsDisplay) then {
|
||||
// Right panel lnb + and - buttons
|
||||
case (_keyPressed in [DIK_LEFT, DIK_RIGHT]): {
|
||||
if (GVAR(rightTabLnBFocus)) then {
|
||||
[_display, [1, 0] select (_keyPressed == DIK_LEFT)] call FUNC(buttonCargo);
|
||||
[_display, parseNumber (_keyPressed != DIK_LEFT)] call FUNC(buttonCargo);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -25,6 +25,11 @@ if (canSuspend) exitWith {
|
||||
[{_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 {
|
||||
// Update current item list
|
||||
call FUNC(updateCurrentItemsList);
|
||||
@ -65,6 +70,4 @@ if (!_animate) then {
|
||||
[{GVAR(refreshing) = false}, nil, 3] call CBA_fnc_execAfterNFrames;
|
||||
};
|
||||
|
||||
private _display = findDisplay IDD_ace_arsenal;
|
||||
|
||||
[_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 (!isNil QGVAR(currentBox) && {GVAR(currentBox) isEqualTo _object} && {isNil QGVAR(ignoredVirtualItems)}) then {
|
||||
[LLSTRING(noVirtualItems), false, 5, 1] call EFUNC(common,displayText);
|
||||
// Delay a frame in case this is running on display open
|
||||
[{(findDisplay IDD_ace_arsenal) closeDisplay 0}] call CBA_fnc_execNextFrame;
|
||||
// Deliberate == check, fail on objNull
|
||||
if (!isNil QGVAR(currentBox) && {GVAR(currentBox) == _object} && {isNil QGVAR(ignoredVirtualItems)}) then {
|
||||
// Delay a frame in case this is running on display open/close
|
||||
[{
|
||||
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;
|
||||
};
|
||||
|
@ -17,8 +17,10 @@
|
||||
*/
|
||||
params [["_name", "", [""]], ["_global", false, [false]]];
|
||||
|
||||
if (_global) then {
|
||||
[QGVAR(removeDefaultLoadout), [_name]] call CBA_fnc_remoteEvent;
|
||||
if (_global) exitWith {
|
||||
private _eventID = format [QGVAR(loadouts_%1), _name];
|
||||
[_eventID] call CBA_fnc_removeGlobalEventJIP;
|
||||
[QGVAR(removeDefaultLoadout), [_name]] call CBA_fnc_globalEvent;
|
||||
};
|
||||
|
||||
GVAR(defaultLoadoutsList) deleteAt (GVAR(defaultLoadoutsList) findIf {(_x select 0) == _name});
|
||||
|
@ -15,6 +15,10 @@
|
||||
|
||||
if (GVAR(centerNotPlayer)) exitWith {};
|
||||
|
||||
if (EGVAR(common,isReloading)) exitWith { // if player is reloading then wait until it's done so we don't send magazines to the shadow realm
|
||||
[{!EGVAR(common,isReloading)}, FUNC(showItem)] call CBA_fnc_waitUntilAndExecute;
|
||||
};
|
||||
|
||||
// Determine action to play based on current category selection
|
||||
private _nextAction = switch (GVAR(currentLeftPanel)) do {
|
||||
// Primary weapon
|
||||
@ -54,10 +58,12 @@ if (_nextAction != GVAR(currentAction)) then {
|
||||
case "PrimaryWeapon": {0};
|
||||
case "SecondaryWeapon": {1};
|
||||
case "HandGunOn": {2};
|
||||
case "Binoculars": {3};
|
||||
default {GVAR(selectedWeaponType)};
|
||||
};
|
||||
|
||||
if (simulationEnabled GVAR(center)) then {
|
||||
GVAR(center) call EFUNC(common,stopGesture); // reset gesture state (if arsenal is opened on animation transition, animations played whilst in the arsenal break)
|
||||
GVAR(center) playActionNow _nextAction;
|
||||
} else {
|
||||
GVAR(center) switchAction _nextAction;
|
||||
@ -65,3 +71,7 @@ if (_nextAction != GVAR(currentAction)) then {
|
||||
|
||||
GVAR(currentAction) = _nextAction;
|
||||
};
|
||||
|
||||
if (!(GVAR(currentAction) in ["Civil", "Salute"])) then {
|
||||
GVAR(center) selectWeapon ([primaryWeapon GVAR(center), secondaryWeapon GVAR(center), handgunWeapon GVAR(center), binocular GVAR(center)] select GVAR(selectedWeaponType)); // select correct weapon, prevents floating weapons
|
||||
};
|
||||
|
@ -31,9 +31,9 @@ if (_allItems isEqualTo []) then { _allItems = [configName _config] };
|
||||
|| {_illum && {([_xCfg >> "Flashlight" >> "irLight", "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1}};
|
||||
|
||||
private _text = switch (true) do { // shorthand roughly based on PEQ-15
|
||||
case (_laser && _illum): { if (_isIR) then { "IR-DUAL" } else { "VIS-DUAL" } };
|
||||
case (_laser): { if (_isIR) then { "IR-AIM" } else { "VIS-AIM" } }; // AIM
|
||||
case (_illum): { if (_isIR) then { "IR-ILM" } else { "VIS-ILM" } }; // ILLUMIATION
|
||||
case (_laser && _illum): { ["VIS-DUAL", "IR-DUAL"] select _isIR }; // DUAL
|
||||
case (_laser): { ["VIS-AIM", "IR-AIM"] select _isIR }; // AIM
|
||||
case (_illum): { ["VIS-ILM", "IR-ILM"] select _isIR }; // ILLUMIATION
|
||||
default { "_" }; // there are some purely cosmetic attachements
|
||||
};
|
||||
_allModes pushBackUnique _text;
|
||||
|
@ -67,7 +67,9 @@ if (!_primaryNVGSupported && {(_opticsModes select {_x select 1}) isEqualTo _opt
|
||||
_primaryNVGSupported = true;
|
||||
};
|
||||
|
||||
if (_primaryNVGIntegrated) exitWith {LLSTRING(statVisionMode_IntPrim)};
|
||||
if (_primaryTiIntegrated && _primaryNVGIntegrated) exitWith {LLSTRING(statVisionMode_intPrimTi)};
|
||||
if (_primaryTiIntegrated) exitWith {LLSTRING(statVisionMode_ti)};
|
||||
if (_primaryNVGIntegrated) exitWith {LLSTRING(statVisionMode_intPrim)};
|
||||
if (_primaryNVGSupported) exitWith {LLSTRING(statVisionMode_supPrim)};
|
||||
if (_secondaryNVGSupported) exitWith {LLSTRING(statVisionMode_supSec)};
|
||||
|
||||
|
@ -18,19 +18,18 @@
|
||||
params ["_control", "_container", "_hasItems"];
|
||||
|
||||
private _loadRemaining = maxLoad _container - loadAbs _container;
|
||||
private _rightPanelCache = uiNamespace getVariable [QGVAR(rightPanelCache), createHashMap];
|
||||
|
||||
private _mass = -1;
|
||||
private _item = "";
|
||||
private _color = [];
|
||||
private _alpha = 1;
|
||||
|
||||
// Grey out items that are too big to fit in remaining space of the container
|
||||
for "_row" from 0 to (lnbSize _control select 0) - 1 do {
|
||||
_mass = _rightPanelCache getOrDefault [_control lnbData [_row, 0], 0];
|
||||
_item = _control lnbData [_row, 0];
|
||||
_color = _control lnbColor [_row, 1];
|
||||
|
||||
// Lower alpha on color for items that can't fit
|
||||
_alpha = [0.25, 1] select (_mass <= _loadRemaining);
|
||||
_alpha = [0.25, 1] select (_container canAdd _item);
|
||||
_color set [3, _alpha];
|
||||
_control lnbSetColor [[_row, 1], _color];
|
||||
_control lnbSetColor [[_row, 2], [1, 1, 1, _alpha]];
|
||||
@ -55,6 +54,6 @@ private _curSel = lnbCurSelRow _control;
|
||||
// Disable '+' button if item is unique or too big to fit in remaining space
|
||||
if (_curSel != -1) then {
|
||||
private _plusButtonCtrl = _display displayCtrl IDC_arrowPlus;
|
||||
_plusButtonCtrl ctrlEnable !((_control lnbValue [_curSel, 2]) == 1 || {(_rightPanelCache getOrDefault [_control lnbData [_curSel, 0], 0]) > _loadRemaining});
|
||||
_plusButtonCtrl ctrlEnable ((_control lnbValue [_curSel, 2]) != 1 && {_container canAdd (_control lnbData [_curSel, 0])});
|
||||
_plusButtonCtrl ctrlCommit FADE_DELAY;
|
||||
};
|
||||
|
@ -125,7 +125,8 @@ private _fnc_uniqueEquipment = {
|
||||
};
|
||||
} forEach (getUnitLoadout GVAR(center)); // Only need items, not extended loadout
|
||||
|
||||
|
||||
// Get all items from unit
|
||||
_items = itemsWithMagazines GVAR(center) + backpacks GVAR(center);
|
||||
private _isMagazine = false;
|
||||
private _isWeapon = false;
|
||||
private _isGrenade = false;
|
||||
@ -136,6 +137,9 @@ private _simulationType = "";
|
||||
private _configItemInfo = "";
|
||||
private _hasItemInfo = false;
|
||||
private _itemInfoType = 0;
|
||||
private _baseWeapon = "";
|
||||
private _weapons = GVAR(virtualItems) get IDX_VIRT_WEAPONS;
|
||||
private _attachments = GVAR(virtualItems) get IDX_VIRT_ATTACHMENTS;
|
||||
|
||||
{
|
||||
_isMagazine = isClass (_cfgMagazines >> _x);
|
||||
@ -184,8 +188,13 @@ private _itemInfoType = 0;
|
||||
// Unknown
|
||||
default {
|
||||
// Don't add items that are part of the arsenal
|
||||
if !(_x in GVAR(virtualItemsFlatAll)) then {
|
||||
(GVAR(virtualItems) get IDX_VIRT_UNIQUE_UNKNOWN_ITEMS) set [_x, nil];
|
||||
if (
|
||||
!(_x in (GVAR(virtualItems) get IDX_VIRT_MISC_ITEMS)) &&
|
||||
{!(_x in (GVAR(virtualItems) get IDX_VIRT_GRENADES))} &&
|
||||
{!(_x in (GVAR(virtualItems) get IDX_VIRT_EXPLOSIVES))} &&
|
||||
{!(_x in (GVAR(virtualItems) get IDX_VIRT_ITEMS_ALL))}
|
||||
) then {
|
||||
(GVAR(virtualItems) get IDX_VIRT_UNIQUE_UNKNOWN_ITEMS) set [_x, true];
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -199,11 +208,17 @@ private _itemInfoType = 0;
|
||||
_itemInfoType = if (_hasItemInfo) then {getNumber (_configItemInfo >> "type")} else {0};
|
||||
_isMiscItem = _x isKindOf ["CBA_MiscItem", _cfgWeapons];
|
||||
|
||||
_baseWeapon = if (!_isMiscItem) then {
|
||||
_x call FUNC(baseWeapon)
|
||||
} else {
|
||||
_x
|
||||
};
|
||||
|
||||
switch (true) do {
|
||||
// Optics
|
||||
case (
|
||||
!(_x in ((GVAR(virtualItems) get IDX_VIRT_ATTACHMENTS) get IDX_VIRT_OPTICS_ATTACHMENTS)) &&
|
||||
{_x in ((_configItems get IDX_VIRT_ATTACHMENTS) get IDX_VIRT_OPTICS_ATTACHMENTS) ||
|
||||
!(_baseWeapon in (_attachments get IDX_VIRT_OPTICS_ATTACHMENTS)) &&
|
||||
{_baseWeapon in ((_configItems get IDX_VIRT_ATTACHMENTS) get IDX_VIRT_OPTICS_ATTACHMENTS) ||
|
||||
{_hasItemInfo &&
|
||||
{!_isMiscItem} &&
|
||||
{_itemInfoType == TYPE_OPTICS}}}
|
||||
@ -212,8 +227,8 @@ private _itemInfoType = 0;
|
||||
};
|
||||
// Flashlights
|
||||
case (
|
||||
!(_x in ((GVAR(virtualItems) get IDX_VIRT_ATTACHMENTS) get IDX_VIRT_FLASHLIGHT_ATTACHMENTS)) &&
|
||||
{_x in ((_configItems get IDX_VIRT_ATTACHMENTS) get IDX_VIRT_FLASHLIGHT_ATTACHMENTS) ||
|
||||
!(_baseWeapon in (_attachments get IDX_VIRT_FLASHLIGHT_ATTACHMENTS)) &&
|
||||
{_baseWeapon in ((_configItems get IDX_VIRT_ATTACHMENTS) get IDX_VIRT_FLASHLIGHT_ATTACHMENTS) ||
|
||||
{_hasItemInfo &&
|
||||
{!_isMiscItem} &&
|
||||
{_itemInfoType == TYPE_FLASHLIGHT}}}
|
||||
@ -222,8 +237,8 @@ private _itemInfoType = 0;
|
||||
};
|
||||
// Muzzle attachments
|
||||
case (
|
||||
!(_x in ((GVAR(virtualItems) get IDX_VIRT_ATTACHMENTS) get IDX_VIRT_MUZZLE_ATTACHMENTS)) &&
|
||||
{_x in ((_configItems get IDX_VIRT_ATTACHMENTS) get IDX_VIRT_MUZZLE_ATTACHMENTS) ||
|
||||
!(_baseWeapon in (_attachments get IDX_VIRT_MUZZLE_ATTACHMENTS)) &&
|
||||
{_baseWeapon in ((_configItems get IDX_VIRT_ATTACHMENTS) get IDX_VIRT_MUZZLE_ATTACHMENTS) ||
|
||||
{_hasItemInfo &&
|
||||
{!_isMiscItem} &&
|
||||
{_itemInfoType == TYPE_MUZZLE}}}
|
||||
@ -232,8 +247,8 @@ private _itemInfoType = 0;
|
||||
};
|
||||
// Bipods
|
||||
case (
|
||||
!(_x in ((GVAR(virtualItems) get IDX_VIRT_ATTACHMENTS) get IDX_VIRT_BIPOD_ATTACHMENTS)) &&
|
||||
{_x in ((_configItems get IDX_VIRT_ATTACHMENTS) get IDX_VIRT_BIPOD_ATTACHMENTS) ||
|
||||
!(_baseWeapon in (_attachments get IDX_VIRT_BIPOD_ATTACHMENTS)) &&
|
||||
{_baseWeapon in ((_configItems get IDX_VIRT_ATTACHMENTS) get IDX_VIRT_BIPOD_ATTACHMENTS) ||
|
||||
{_hasItemInfo &&
|
||||
{!_isMiscItem} &&
|
||||
{_itemInfoType == TYPE_BIPOD}}}
|
||||
@ -242,7 +257,7 @@ private _itemInfoType = 0;
|
||||
};
|
||||
// Misc. items
|
||||
case (
|
||||
!(_x in (GVAR(virtualItems) get IDX_VIRT_MISC_ITEMS)) &&
|
||||
!(_x in (GVAR(virtualItems) get IDX_VIRT_MISC_ITEMS)) && // misc. items don't use 'baseWeapon'
|
||||
{_x in (_configItems get IDX_VIRT_MISC_ITEMS) ||
|
||||
{_hasItemInfo &&
|
||||
{_isMiscItem &&
|
||||
@ -254,9 +269,21 @@ private _itemInfoType = 0;
|
||||
};
|
||||
// Unknown
|
||||
default {
|
||||
// Don't add items that are part of the arsenal
|
||||
if !(_x in GVAR(virtualItemsFlatAll)) then {
|
||||
(GVAR(virtualItems) get IDX_VIRT_UNIQUE_UNKNOWN_ITEMS) set [_x, nil];
|
||||
// Don't add attachments or misc. items
|
||||
if (
|
||||
!(_baseWeapon in (_attachments get IDX_VIRT_OPTICS_ATTACHMENTS)) &&
|
||||
{!(_baseWeapon in (_attachments get IDX_VIRT_FLASHLIGHT_ATTACHMENTS))} &&
|
||||
{!(_baseWeapon in (_attachments get IDX_VIRT_MUZZLE_ATTACHMENTS))} &&
|
||||
{!(_baseWeapon in (_attachments get IDX_VIRT_BIPOD_ATTACHMENTS))} &&
|
||||
{!(_x in (GVAR(virtualItems) get IDX_VIRT_MISC_ITEMS))}
|
||||
) then {
|
||||
// If item is a weapon (including binos), make it unique
|
||||
(GVAR(virtualItems) get IDX_VIRT_UNIQUE_UNKNOWN_ITEMS) set [_x,
|
||||
_baseWeapon in (_weapons get IDX_VIRT_PRIMARY_WEAPONS) ||
|
||||
{_baseWeapon in (_weapons get IDX_VIRT_HANDGUN_WEAPONS)} ||
|
||||
{_baseWeapon in (_weapons get IDX_VIRT_SECONDARY_WEAPONS)} ||
|
||||
{_baseWeapon in (GVAR(virtualItems) get IDX_VIRT_BINO)}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -267,14 +294,14 @@ private _itemInfoType = 0;
|
||||
};
|
||||
// Facewear
|
||||
case (isClass (_cfgGlasses >> _x)): {
|
||||
(GVAR(virtualItems) get IDX_VIRT_UNIQUE_GOGGLES) set [_x, nil];
|
||||
(GVAR(virtualItems) get IDX_VIRT_UNIQUE_GOGGLES) set [_x, !(_x in (GVAR(virtualItems) get IDX_VIRT_GOGGLES))];
|
||||
};
|
||||
// Unknown
|
||||
default {
|
||||
// Don't add items that are part of the arsenal
|
||||
if !(_x in GVAR(virtualItemsFlatAll)) then {
|
||||
(GVAR(virtualItems) get IDX_VIRT_UNIQUE_UNKNOWN_ITEMS) set [_x, nil];
|
||||
(GVAR(virtualItems) get IDX_VIRT_UNIQUE_UNKNOWN_ITEMS) set [_x, true];
|
||||
};
|
||||
};
|
||||
};
|
||||
} forEach (keys ([GVAR(center), 0, 3, 3, 3, false] call EFUNC(common,uniqueUnitItems))); // Get all items from unit
|
||||
} forEach (_items arrayIntersect _items);
|
||||
|
@ -46,11 +46,7 @@ private _fnc_toConfigCase = {
|
||||
|
||||
// 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 {
|
||||
_name
|
||||
} else {
|
||||
_x
|
||||
};
|
||||
[_x, _name] select (_name != "");
|
||||
} else {
|
||||
_x
|
||||
};
|
||||
|
@ -10,16 +10,18 @@ cba_diagnostic_projectileMaxLines = 10;
|
||||
|
||||
// Player pose
|
||||
[{
|
||||
switch (true) do {
|
||||
case (primaryWeapon _this != ""): {
|
||||
_this switchMove "amovpercmstpslowwrfldnon";
|
||||
};
|
||||
case (handgunWeapon _this != ""): {
|
||||
_this switchMove "amovpercmstpslowwpstdnon";
|
||||
};
|
||||
default {
|
||||
switch (currentWeapon _this) do {
|
||||
case (""): {
|
||||
_this switchMove "amovpercmstpsnonwnondnon";
|
||||
};
|
||||
case (primaryWeapon _this): {
|
||||
_this switchMove "amovpercmstpslowwrfldnon";
|
||||
};
|
||||
case (handgunWeapon _this): {
|
||||
_this switchMove "amovpercmstpslowwpstdnon";
|
||||
};
|
||||
case (binocular _this);
|
||||
case (secondaryWeapon _this): {}; // deliberately nothing
|
||||
};
|
||||
}, _player] call CBA_fnc_execNextFrame;
|
||||
|
||||
@ -88,6 +90,7 @@ cba_diagnostic_projectileMaxLines = 10;
|
||||
{
|
||||
_unit = _x;
|
||||
|
||||
removeVest _unit;
|
||||
if (vest _player != "") then { _unit addVest vest _player; };
|
||||
|
||||
removeBackpack _unit;
|
||||
|
@ -613,7 +613,7 @@
|
||||
<French>Le set d'équipement suivant a été supprimé :</French>
|
||||
<German>Folgende Ausrüstung wurde entfernt:</German>
|
||||
<Polish>Następujący zestaw został skasowany:</Polish>
|
||||
<Japanese>次の装備は削除されました:</Japanese>
|
||||
<Japanese>装備を削除しました:</Japanese>
|
||||
<Italian>Il seguente equipaggiamento è stato eliminato:</Italian>
|
||||
<Korean>다음 로드아웃이 삭제됨 :</Korean>
|
||||
<Chinese>以下的裝備已被刪除:</Chinese>
|
||||
@ -629,7 +629,7 @@
|
||||
<French>Le set d'équipement suivant n'est plus public :</French>
|
||||
<German>Folgende Ausrüstung ist nicht mehr öffentlich:</German>
|
||||
<Polish>Następujący zestaw nie jest już publiczny:</Polish>
|
||||
<Japanese>次の装備は非公開になりました:</Japanese>
|
||||
<Japanese>装備を非公開にしました:</Japanese>
|
||||
<Italian>Il seguente equipaggiamento non è più pubblico:</Italian>
|
||||
<Korean>다음 로드아웃이 더이상 공용이 아님:</Korean>
|
||||
<Chinese>以下的裝備已不再被分享:</Chinese>
|
||||
@ -645,7 +645,7 @@
|
||||
<French>Le champ "nom" est vide !</French>
|
||||
<German>Das Feld "Name" ist leer!</German>
|
||||
<Polish>Pole nazwy jest puste!</Polish>
|
||||
<Japanese>名前が空白です!</Japanese>
|
||||
<Japanese>名前が空欄です!</Japanese>
|
||||
<Italian>Il campo del nome è vuoto!</Italian>
|
||||
<Korean>이름칸이 비었습니다!</Korean>
|
||||
<Chinese>名稱欄位為空!</Chinese>
|
||||
@ -677,7 +677,7 @@
|
||||
<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>
|
||||
<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>
|
||||
<Korean>같은 이름의 로드아웃이 공용에 있습니다.</Korean>
|
||||
<Chinese>已有相同名稱的裝備在公用分享區</Chinese>
|
||||
@ -693,7 +693,7 @@
|
||||
<French>Le set d'équipement suivant a été enregistré :</French>
|
||||
<German>Folgende Ausrüstung wurde gespeichert:</German>
|
||||
<Polish>Następujący zestaw został zapisany:</Polish>
|
||||
<Japanese>次の装備は保存されました:</Japanese>
|
||||
<Japanese>装備を保存しました:</Japanese>
|
||||
<Italian>Il seguente equipaggiamento è stato salvato:</Italian>
|
||||
<Korean>다음 로드아웃이 저장됨:</Korean>
|
||||
<Chinese>以下的裝備已被保存:</Chinese>
|
||||
@ -709,7 +709,7 @@
|
||||
<French>Le set d'équipement suivant a été chargé :</French>
|
||||
<German>Folgene Ausrüstung wurde geladen:</German>
|
||||
<Polish>Następujący zestaw został wczytany:</Polish>
|
||||
<Japanese>次の装備が読み込みされました:</Japanese>
|
||||
<Japanese>装備を読み込みました:</Japanese>
|
||||
<Italian>Il seguente equipaggiamento è stato caricato:</Italian>
|
||||
<Korean>다음 로드아웃을 불러옴:</Korean>
|
||||
<Chinese>以下的裝備已被載入:</Chinese>
|
||||
@ -725,7 +725,7 @@
|
||||
<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>
|
||||
<Polish>Zestaw z tą nazwą już istnieje!</Polish>
|
||||
<Japanese>既にその名前は装備に使われています!</Japanese>
|
||||
<Japanese>既に同じ名前の装備が存在しています!</Japanese>
|
||||
<Italian>Un equipaggiamento con lo stesso nome è gia esistente!</Italian>
|
||||
<Korean>같은 이름의 로드아웃이 이미 존재합니다!</Korean>
|
||||
<Chinese>已有相同名稱的裝備!</Chinese>
|
||||
@ -741,7 +741,7 @@
|
||||
<French>a été renommé en</French>
|
||||
<German>wurde umbenannt in</German>
|
||||
<Polish>zmienił nazwę na</Polish>
|
||||
<Japanese>次の名前に変更されました</Japanese>
|
||||
<Japanese>を次の名前に変更しました:</Japanese>
|
||||
<Italian>È stato rinominato in</Italian>
|
||||
<Korean>이름이 다음과 같이 변경됨:</Korean>
|
||||
<Chinese>已被改名為</Chinese>
|
||||
@ -1181,7 +1181,7 @@
|
||||
<English>Nightvision Support</English>
|
||||
<Spanish>Soporte de visión nocturna</Spanish>
|
||||
<German>Nachtsicht Unterstützung</German>
|
||||
<Japanese>暗視装置への対応有無</Japanese>
|
||||
<Japanese>暗視装置への対応</Japanese>
|
||||
<Polish>Wsparcie noktowizyjne</Polish>
|
||||
<Italian>Supporto visore notturno</Italian>
|
||||
<Russian>Поддержка ночного видения</Russian>
|
||||
@ -1223,7 +1223,7 @@
|
||||
<Czech>Vedlejší část hledí podporuje</Czech>
|
||||
<Korean>보조무기 지원여부</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_statVisionMode_IntPrim">
|
||||
<Key ID="STR_ACE_Arsenal_statVisionMode_intPrim">
|
||||
<English>Primary integrated</English>
|
||||
<Spanish>Primaria integrada</Spanish>
|
||||
<German>Primär Integriert</German>
|
||||
@ -1238,6 +1238,14 @@
|
||||
<Czech>Integrováno do hlavní části hledí</Czech>
|
||||
<Korean>주무기 내장여부</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_statVisionMode_ti">
|
||||
<English>Thermal integrated</English>
|
||||
<Japanese>熱画像装置内蔵</Japanese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_statVisionMode_intPrimTi">
|
||||
<English>Thermal & Primary integrated</English>
|
||||
<Japanese>熱画像装置内蔵・プライマリに内蔵</Japanese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_statVisionMode_NoSup">
|
||||
<English>Not Supported</English>
|
||||
<Spanish>No soportada</Spanish>
|
||||
@ -1257,7 +1265,7 @@
|
||||
<Key ID="STR_ACE_Arsenal_statVisionModeGeneric">
|
||||
<English>Vision Mode</English>
|
||||
<German>Sichtmodus</German>
|
||||
<Japanese>ビジョン モード</Japanese>
|
||||
<Japanese>映像モード</Japanese>
|
||||
<Italian>Modalità Visiva</Italian>
|
||||
<Chinese>視覺模式</Chinese>
|
||||
<Chinesesimp>视觉模式</Chinesesimp>
|
||||
@ -1495,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>
|
||||
<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>
|
||||
<Japanese>現在のアイテムリスト内にある全武器に対応する アタッチメントと弾倉(選択したカテゴリに基づく)を自動的に追加します</Japanese>
|
||||
<Japanese>現在のアイテムリスト内の全武器に対応する アタッチメントと弾倉(選択したカテゴリに基づく)を自動的に追加します</Japanese>
|
||||
<Russian>Добавляет совместимые приспособления или магазины (в зависимости от выбранной категории) для всего оружия в текущем списке предметов</Russian>
|
||||
<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>
|
||||
|
@ -450,22 +450,22 @@ class GVAR(display) {
|
||||
h = QUOTE(55 * GRID_H);
|
||||
class controls {
|
||||
class actionsStaticBackground1: ctrlStaticBackground {
|
||||
idc = -1;
|
||||
idc = IDC_actionsBackground1;
|
||||
x = QUOTE(0);
|
||||
y = QUOTE(0);
|
||||
w = QUOTE(47 * GRID_W);
|
||||
h = QUOTE(56 * GRID_H);
|
||||
h = QUOTE(55 * GRID_H);
|
||||
colorBackground[]={0.1,0.1,0.1,0.5};
|
||||
};
|
||||
class actionsStaticBackground2: ctrlStaticBackground {
|
||||
idc = -1;
|
||||
idc = IDC_actionsBackground2;
|
||||
x = QUOTE(0);
|
||||
y = QUOTE(0);
|
||||
w = QUOTE(47 * GRID_W);
|
||||
h = QUOTE(5 * GRID_H);
|
||||
colorBackground[]={0.1,0.1,0.1,0.8};
|
||||
};
|
||||
class actionsText1: RscText {
|
||||
class actionsText1: RscTextMulti {
|
||||
idc = IDC_actionsText1;
|
||||
fade = 1;
|
||||
x = QUOTE(0 * GRID_W);
|
||||
@ -479,6 +479,7 @@ class GVAR(display) {
|
||||
};
|
||||
class actionsButton1: ctrlButton {
|
||||
idc = IDC_actionsButton1;
|
||||
onMouseEnter = QUOTE(ctrlSetFocus (_this select 0));
|
||||
fade = 1;
|
||||
text = "";
|
||||
x = QUOTE(1 * GRID_W);
|
||||
|
@ -65,7 +65,7 @@ GVAR(magModeData) = [];
|
||||
{
|
||||
_x params ["_xDisplayNameShort", "_xDisplayName", "_xInitSpeed", "_xAirFriction"];
|
||||
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]];
|
||||
GVAR(magModeData) pushBack [_xInitSpeed, _xAirFriction];
|
||||
} else {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* 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;
|
||||
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;
|
||||
if (_elevationAbs > 0) then {
|
||||
ctrlSetText [400, format["%1", abs(_elevationAbs)]];
|
||||
ctrlSetText [400, str abs _elevationAbs];
|
||||
} else {
|
||||
if (_elevationAbs < 0) then {
|
||||
ctrlSetText [400, format["%1D", abs(_elevationAbs)]];
|
||||
@ -100,7 +100,7 @@ if (_elevationAbs > 0) then {
|
||||
};
|
||||
_elevationRel = Round(_elevationRel * 100) / 100;
|
||||
if (_elevationRel > 0) then {
|
||||
ctrlSetText [401, format["%1", abs(_elevationRel)]];
|
||||
ctrlSetText [401, str abs _elevationRel];
|
||||
} else {
|
||||
if (_elevationRel < 0) then {
|
||||
ctrlSetText [401, format["%1D", abs(_elevationRel)]];
|
||||
@ -110,7 +110,7 @@ if (_elevationRel > 0) then {
|
||||
};
|
||||
_elevationCur = Round(_elevationCur * 100) / 100;
|
||||
if (_elevationCur > 0) then {
|
||||
ctrlSetText [402, format["%1", abs(_elevationCur)]];
|
||||
ctrlSetText [402, str abs _elevationCur];
|
||||
} else {
|
||||
if (_elevationCur < 0) then {
|
||||
ctrlSetText [402, format["%1D", abs(_elevationCur)]];
|
||||
|
@ -41,7 +41,11 @@ if (_initSpeedCoef > 0) then {
|
||||
};
|
||||
|
||||
private _abAdjustText = "";
|
||||
if (_magIsForCurrentWeapon && {["ace_advanced_ballistics"] call EFUNC(common,isModLoaded)}) then {
|
||||
if (
|
||||
_magIsForCurrentWeapon &&
|
||||
{missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]} &&
|
||||
{missionNamespace getVariable [QEGVAR(advanced_ballistics,barrelLengthInfluenceEnabled), false]} // this can be on while AB is off or vice-versa
|
||||
) then {
|
||||
private _configAmmo = (configFile >> "CfgAmmo" >> (getText (_configMagazine >> "ammo")));
|
||||
private _barrelLength = getNumber (_configWeapon >> "ACE_barrelLength");
|
||||
private _muzzleVelocityTable = getArray (_configAmmo >> "ACE_muzzleVelocities");
|
||||
|
@ -37,7 +37,10 @@ if (_magazine isEqualTo "") then {
|
||||
};
|
||||
|
||||
private _abAdjustText = "";
|
||||
if (["ace_advanced_ballistics"] call EFUNC(common,isModLoaded)) then {
|
||||
if (
|
||||
missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false] &&
|
||||
{missionNamespace getVariable [QEGVAR(advanced_ballistics,barrelLengthInfluenceEnabled), false]} // this can be on while AB is off or vice-versa
|
||||
) then {
|
||||
private _configAmmo = (configFile >> "CfgAmmo" >> (getText (_configMagazine >> "ammo")));
|
||||
private _barrelLength = getNumber (_configWeapon >> "ACE_barrelLength");
|
||||
private _muzzleVelocityTable = getArray (_configAmmo >> "ACE_muzzleVelocities");
|
||||
|
@ -50,9 +50,14 @@ if (_state) then {
|
||||
detach _target;
|
||||
_unit removeAction _actionID;
|
||||
_unit setVariable [QGVAR(escortedUnit), objNull, true];
|
||||
|
||||
// Public event
|
||||
[QGVAR(escortingCaptive), [_target, false, _unit]] call CBA_fnc_localEvent;
|
||||
};
|
||||
}, 0, [_unit, _target, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
// Public event
|
||||
[QGVAR(escortingCaptive), [_target, true, _unit]] call CBA_fnc_localEvent;
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
_unit setVariable [QGVAR(escortedUnit), objNull, true];
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
params ["_vehicle"];
|
||||
TRACE_1("params", _vehicle);
|
||||
TRACE_1("params",_vehicle);
|
||||
|
||||
scopeName "main";
|
||||
|
||||
|
@ -15,3 +15,17 @@ class Extended_PostInit_EventHandlers {
|
||||
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(canLoadItemIn);
|
||||
PREP(canUnloadItem);
|
||||
PREP(deployCancel);
|
||||
PREP(deployConfirm);
|
||||
PREP(getCargoSpaceLeft);
|
||||
PREP(getNameItem);
|
||||
PREP(getSelectedItem);
|
||||
PREP(getSizeItem);
|
||||
PREP(handleDestroyed);
|
||||
PREP(handleDeployInterrupt);
|
||||
PREP(handleScrollWheel);
|
||||
PREP(initObject);
|
||||
PREP(initVehicle);
|
||||
PREP(loadItem);
|
||||
@ -16,6 +21,7 @@ PREP(removeCargoItem);
|
||||
PREP(renameObject);
|
||||
PREP(setSize);
|
||||
PREP(setSpace);
|
||||
PREP(startDeploy);
|
||||
PREP(startLoadIn);
|
||||
PREP(startUnload);
|
||||
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;
|
||||
|
||||
["ace_unloadCargo", {
|
||||
params ["_item", "_vehicle", ["_unloader", objNull]];
|
||||
TRACE_3("UnloadCargo EH",_item,_vehicle,_unloader);
|
||||
params ["_item", "_vehicle", ["_unloader", objNull], ["_place", []]];
|
||||
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
|
||||
private _hint = [LSTRING(unloadingFailed), LSTRING(unloadedItem)] select _unloaded;
|
||||
@ -36,13 +36,25 @@
|
||||
};
|
||||
}] 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), {
|
||||
params ["_item", "_emptyPosAGL"];
|
||||
|
||||
_item hideObjectGlobal false;
|
||||
_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;
|
||||
|
||||
[QGVAR(paradropItem), {
|
||||
@ -166,3 +178,38 @@ if (isServer) then {
|
||||
_bodyBag setVariable [QGVAR(customName), [_target, false, true] call EFUNC(common,getName), true];
|
||||
}] 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 {
|
||||
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);
|
||||
@ -52,7 +52,7 @@ if (_canLoadConfig) then {
|
||||
} else {
|
||||
_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);
|
||||
|
@ -16,17 +16,23 @@
|
||||
*/
|
||||
|
||||
params ["_vehicle"];
|
||||
TRACE_1("params", _vehicle);
|
||||
TRACE_1("params",_vehicle);
|
||||
|
||||
private _type = typeOf _vehicle;
|
||||
private _config = configOf _vehicle;
|
||||
|
||||
// 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;
|
||||
|
||||
// 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)
|
||||
private _addCargoType = GVAR(cargoHolderTypes) findIf {_type isKindOf _x} == -1;
|
||||
@ -68,13 +74,13 @@ if (_type in GVAR(initializedVehicleClasses)) exitWith {};
|
||||
if (_hasCargoConfig) then {
|
||||
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);
|
||||
} else {
|
||||
_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);
|
||||
};
|
||||
|
@ -25,6 +25,9 @@ if (GVAR(interactionParadrop)) then {
|
||||
(_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"];
|
||||
|
||||
@ -33,7 +36,6 @@ if (GVAR(interactionParadrop)) then {
|
||||
private _display = uiNamespace getVariable QGVAR(menuDisplay);
|
||||
|
||||
if (isNil "_display") exitWith {
|
||||
GVAR(interactionVehicle) = nil;
|
||||
GVAR(interactionParadrop) = nil;
|
||||
|
||||
_pfhID call CBA_fnc_removePerFrameHandler;
|
||||
@ -41,18 +43,18 @@ if (GVAR(interactionParadrop)) then {
|
||||
|
||||
// Close menu if in invalid state
|
||||
if (
|
||||
!alive _vehicle ||
|
||||
!alive ACE_player ||
|
||||
{!alive _vehicle} ||
|
||||
{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)
|
||||
{
|
||||
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} &&
|
||||
{(vehicle ACE_player) != _vehicle}
|
||||
}
|
||||
) exitWith {
|
||||
closeDialog 0;
|
||||
|
||||
GVAR(interactionVehicle) = nil;
|
||||
GVAR(interactionParadrop) = nil;
|
||||
|
||||
_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);
|
||||
|
||||
[[LSTRING(loadingFailed), [_item, true] call FUNC(getNameItem)], 3] call EFUNC(common,displayTextStructured);
|
||||
|
||||
// Fix cancelling loading a carried item
|
||||
if (!isNull attachedTo _item) then {
|
||||
detach _item;
|
||||
@ -76,7 +78,7 @@ if ([_item, _vehicle] call FUNC(canLoadItemIn)) then {
|
||||
[QEGVAR(common,fixFloating), _item, _item] call CBA_fnc_targetEvent;
|
||||
};
|
||||
},
|
||||
LLSTRING(loadingItem),
|
||||
format [LLSTRING(loadingItem), [_item, true] call FUNC(getNameItem), getText (configOf _vehicle >> "displayName")],
|
||||
{
|
||||
(_this select 0) call FUNC(canLoadItemIn)
|
||||
},
|
||||
@ -85,6 +87,9 @@ if ([_item, _vehicle] call FUNC(canLoadItemIn)) then {
|
||||
|
||||
true // return
|
||||
} else {
|
||||
// Unlock the object
|
||||
[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
|
||||
|
@ -15,18 +15,8 @@
|
||||
* 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
|
||||
private _item = _loaded param [lbCurSel (_display displayCtrl 100), nil];
|
||||
private _item = call FUNC(getSelectedItem);
|
||||
|
||||
if (isNil "_item") exitWith {};
|
||||
|
||||
@ -58,13 +48,13 @@ if (GVAR(interactionParadrop)) exitWith {
|
||||
[LSTRING(unlevelFlightWarning)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
},
|
||||
LLSTRING(unloadingItem),
|
||||
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 (((getPos _target) select 2) < 25) exitWith {false}; // check height
|
||||
if ((speed _target) < -5) exitWith {false}; // check reverse
|
||||
if ((acos ((vectorUp _vehicle) select 2)) > 30) exitWith {false}; // check flight level
|
||||
if (((getPos _vehicle) select 2) < 25) exitWith {false}; // check height
|
||||
if ((speed _vehicle) < -5) exitWith {false}; // check reverse
|
||||
|
||||
true
|
||||
},
|
||||
@ -74,7 +64,7 @@ if (GVAR(interactionParadrop)) exitWith {
|
||||
};
|
||||
|
||||
// If in zeus
|
||||
if (!isNull findDisplay 312) exitWith {
|
||||
if (!isNull curatorCamera) exitWith {
|
||||
// Do not check distance to unit, but do check for valid position
|
||||
if !([_item, GVAR(interactionVehicle), objNull, true] call FUNC(canUnloadItem)) exitWith {
|
||||
[[LSTRING(unloadingFailed), [_item, true] call FUNC(getNameItem)], 3] call EFUNC(common,displayTextStructured);
|
||||
@ -109,7 +99,7 @@ if ([_item, GVAR(interactionVehicle), _unit] call FUNC(canUnloadItem)) then {
|
||||
{
|
||||
TRACE_1("unload fail",_this);
|
||||
},
|
||||
LLSTRING(unloadingItem),
|
||||
format [LLSTRING(unloadingItem), [_item, true] call FUNC(getNameItem), getText (configOf GVAR(interactionVehicle) >> "displayName")],
|
||||
{
|
||||
(_this select 0) params ["_item", "_vehicle", "_unit"];
|
||||
|
||||
|
@ -7,6 +7,9 @@
|
||||
* 0: Item to be unloaded <STRING> or <OBJECT> (default: "")
|
||||
* 1: Holder object (vehicle) <OBJECT> (default: objNull)
|
||||
* 2: Unloader <OBJECT> (default: objNull)
|
||||
* 3: Deploy parameters <ARRAY> (default: [])
|
||||
* - 0: Position AGL <ARRAY>
|
||||
* - 1: Direction <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* Object unloaded <BOOL>
|
||||
@ -17,8 +20,10 @@
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
params [["_item", "", [objNull, ""]], ["_vehicle", objNull, [objNull]], ["_unloader", objNull, [objNull]]];
|
||||
TRACE_3("params",_item,_vehicle,_unloader);
|
||||
params [["_item", "", [objNull, ""]], ["_vehicle", objNull, [objNull]], ["_unloader", objNull, [objNull]], ["_deploy", []]];
|
||||
_deploy params ["_emptyPosAGL", "_direction"];
|
||||
|
||||
TRACE_4("params",_item,_vehicle,_unloader,_deploy);
|
||||
|
||||
// Get config sensitive case name
|
||||
if (_item isEqualType "") then {
|
||||
@ -41,9 +46,18 @@ if (_itemSize < 0) exitWith {
|
||||
false // return
|
||||
};
|
||||
|
||||
// This covers testing vehicle stability and finding a safe position
|
||||
private _emptyPosAGL = [_vehicle, _item, _unloader] call EFUNC(common,findUnloadPosition);
|
||||
TRACE_1("findUnloadPosition",_emptyPosAGL);
|
||||
private _deployed = _deploy isNotEqualTo [];
|
||||
|
||||
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 {
|
||||
// Display text saying there are no safe places to exit the vehicle
|
||||
@ -67,9 +81,12 @@ private _object = _item;
|
||||
if (_object isEqualType objNull) then {
|
||||
detach _object;
|
||||
|
||||
// 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), [_object, _emptyPosAGL]] call CBA_fnc_serverEvent;
|
||||
// If player unloads via deployment, set direction first, then unload
|
||||
if (_deployed) then {
|
||||
[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 {
|
||||
// Get which curators had this object as editable
|
||||
@ -81,6 +98,12 @@ if (_object isEqualType objNull) then {
|
||||
};
|
||||
} else {
|
||||
_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);
|
||||
|
||||
[QEGVAR(common,fixCollision), _object] call CBA_fnc_localEvent;
|
||||
@ -88,7 +111,9 @@ if (_object isEqualType objNull) then {
|
||||
};
|
||||
|
||||
// Dragging integration
|
||||
[_unloader, _object] call FUNC(unloadCarryItem);
|
||||
if (!_deployed) then {
|
||||
[_unloader, _object] call FUNC(unloadCarryItem);
|
||||
};
|
||||
|
||||
// Invoke listenable event
|
||||
["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)],
|
||||
_category,
|
||||
true,
|
||||
true,
|
||||
1,
|
||||
{[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)}
|
||||
] call CBA_fnc_addSetting;
|
||||
|
||||
@ -16,7 +16,7 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
|
||||
[LSTRING(loadTimeCoefficient), LSTRING(loadTimeCoefficient_description)],
|
||||
_category,
|
||||
[0, 10, 5, 1],
|
||||
true,
|
||||
1,
|
||||
{[QGVAR(loadTimeCoefficient), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
|
||||
] call CBA_fnc_addSetting;
|
||||
|
||||
@ -26,7 +26,7 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
|
||||
[LSTRING(paradropTimeCoefficent), LSTRING(paradropTimeCoefficent_description)],
|
||||
_category,
|
||||
[0, 10, 2.5, 1],
|
||||
true,
|
||||
1,
|
||||
{[QGVAR(paradropTimeCoefficent), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
|
||||
] call CBA_fnc_addSetting;
|
||||
|
||||
@ -36,26 +36,36 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
|
||||
[LSTRING(openAfterUnload), LSTRING(openAfterUnload_description)],
|
||||
_category,
|
||||
[[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)}
|
||||
] 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),
|
||||
"CHECKBOX",
|
||||
[LSTRING(carryAfterUnload), LSTRING(carryAfterUnload_description)],
|
||||
_category,
|
||||
true,
|
||||
false,
|
||||
0,
|
||||
{[QGVAR(carryAfterUnload), _this] call EFUNC(common,cbaSettings_settingChanged)}
|
||||
] 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 {
|
||||
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)";
|
||||
colorText[] = {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;
|
||||
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)";
|
||||
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)";
|
||||
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
|
||||
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
|
||||
@ -96,8 +96,15 @@ class GVAR(menu) {
|
||||
class btnUnload: btnCancel {
|
||||
text = CSTRING(unloadObject);
|
||||
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));
|
||||
};
|
||||
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>
|
||||
<Turkish>Boşalt</Turkish>
|
||||
</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">
|
||||
<English>Renamed to:<br/>%1</English>
|
||||
<Japanese>名前を次に変更:<br/>%1</Japanese>
|
||||
@ -48,7 +82,7 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_clearedCustomName">
|
||||
<English>Custom name has been cleared.</English>
|
||||
<Japanese>カスタムネームが削除されました。</Japanese>
|
||||
<Japanese>カスタム名が削除されました。</Japanese>
|
||||
<French>Le nom personnalisé a été supprimé.</French>
|
||||
<Russian>Пользовательское название удалено.</Russian>
|
||||
<German>Eigener Name wurde gelöscht.</German>
|
||||
@ -108,7 +142,7 @@
|
||||
<Spanish>Carga</Spanish>
|
||||
<Italian>Carico</Italian>
|
||||
<French>Cargaison</French>
|
||||
<Japanese>カーゴ</Japanese>
|
||||
<Japanese>貨物</Japanese>
|
||||
<Korean>화물</Korean>
|
||||
<Chinese>貨物</Chinese>
|
||||
<Chinesesimp>货物</Chinesesimp>
|
||||
@ -124,7 +158,7 @@
|
||||
<Spanish>Menu de carga</Spanish>
|
||||
<Italian>Menù del Carico</Italian>
|
||||
<French>Menu de cargaison</French>
|
||||
<Japanese>カーゴ メニュー</Japanese>
|
||||
<Japanese>貨物メニュー</Japanese>
|
||||
<Korean>화물 메뉴</Korean>
|
||||
<Chinese>貨物選單</Chinese>
|
||||
<Chinesesimp>货物菜单</Chinesesimp>
|
||||
@ -140,7 +174,7 @@
|
||||
<Spanish>Espacio de carga restante: %1</Spanish>
|
||||
<Italian>Spazio di carico rimanente: %1</Italian>
|
||||
<French>Espace de chargement restant : %1</French>
|
||||
<Japanese>カーゴの空き容量: %1</Japanese>
|
||||
<Japanese>貨物室の空き容量: %1</Japanese>
|
||||
<Korean>선적 공간 남음: %1</Korean>
|
||||
<Chinese>貨物剩餘空間: %1</Chinese>
|
||||
<Chinesesimp>货物剩余空间:%1</Chinesesimp>
|
||||
@ -156,7 +190,7 @@
|
||||
<Spanish>Habilitar carga</Spanish>
|
||||
<Italian>Abilita Carico</Italian>
|
||||
<French>Activer la cargaison</French>
|
||||
<Japanese>カーゴを有効化</Japanese>
|
||||
<Japanese>貨物を有効化</Japanese>
|
||||
<Korean>화물 활성화</Korean>
|
||||
<Chinese>啟用貨物裝載</Chinese>
|
||||
<Chinesesimp>启用货物装载</Chinesesimp>
|
||||
@ -172,7 +206,7 @@
|
||||
<Czech>Umožňuje naložit předměty do nákladového prostoru vozidla</Czech>
|
||||
<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>
|
||||
<Japanese>カーゴ モジュールで積み込みを有効化</Japanese>
|
||||
<Japanese>貨物積載モジュールを有効化</Japanese>
|
||||
<Korean>화물 모듈을 활성화합니다</Korean>
|
||||
<Chinese>啟用貨物裝載功能</Chinese>
|
||||
<Chinesesimp>启用货物装载功能</Chinesesimp>
|
||||
@ -187,7 +221,7 @@
|
||||
<Spanish>Ajustes de carga</Spanish>
|
||||
<Italian>Impostazioni Carico</Italian>
|
||||
<French>Paramètres de cargaison</French>
|
||||
<Japanese>カーゴ設定</Japanese>
|
||||
<Japanese>貨物設定</Japanese>
|
||||
<Korean>화물 설정</Korean>
|
||||
<Chinese>貨物設定</Chinese>
|
||||
<Chinesesimp>货物设定</Chinesesimp>
|
||||
@ -203,7 +237,7 @@
|
||||
<Czech>Konfigurace nákladního modulu</Czech>
|
||||
<Italian>Configura le impostazioni del modulo carico</Italian>
|
||||
<French>Configure les paramètres du module de cargaison.</French>
|
||||
<Japanese>カーゴ モジュールの設定を構成</Japanese>
|
||||
<Japanese>貨物モジュールの設定を変更します</Japanese>
|
||||
<Korean>화물 모듈의 환경 설정을 바꿉니다</Korean>
|
||||
<Chinese>配置貨物模塊設定</Chinese>
|
||||
<Chinesesimp>配置货物模块设定</Chinesesimp>
|
||||
@ -219,7 +253,7 @@
|
||||
<Italian>%1<br/>caricato su<br/>%2</Italian>
|
||||
<Hungarian>%1<br/>berakodva ide:<br/>%2</Hungarian>
|
||||
<Russian>%1<br/>загружен в<br/>%2</Russian>
|
||||
<Japanese>%1 は<br/>%2 へ<br/>積み込まれました</Japanese>
|
||||
<Japanese>%1 を<br/>%2 に<br/>積み込みました</Japanese>
|
||||
<Korean>%1은(는)<br/>%2 에 실림</Korean>
|
||||
<Chinese>%1<br/>裝載至<br/>%2</Chinese>
|
||||
<Chinesesimp>%1<br/>装载至<br/>%2</Chinesesimp>
|
||||
@ -235,42 +269,20 @@
|
||||
<Italian>Hai scaricato<br/>%1 da<br/>%2</Italian>
|
||||
<Hungarian>1%<br/>kirakodva ebből:<br/>%2</Hungarian>
|
||||
<Russian>%1<br/>разгружен из<br/>%2</Russian>
|
||||
<Japanese>%1 が<br/>%2 から<br/>降ろされました</Japanese>
|
||||
<Japanese>%1 を<br/>%2 から<br/>降ろしました</Japanese>
|
||||
<Korean>%1은(는)<br/>%2에서 내려짐</Korean>
|
||||
<Chinese>從<br/>%2卸載<br/>%1</Chinese>
|
||||
<Chinesesimp>从<br/>%2卸载<br/>%1</Chinesesimp>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_LoadingItem">
|
||||
<English>Loading Cargo</English>
|
||||
<German>Belade</German>
|
||||
<Portuguese>Carregando carga</Portuguese>
|
||||
<Polish>Ładowanie cargo</Polish>
|
||||
<Czech>Nakládám</Czech>
|
||||
<Russian>Погрузка</Russian>
|
||||
<Italian>Caricando</Italian>
|
||||
<Spanish>Cargando</Spanish>
|
||||
<French>Chargement de la cargaison</French>
|
||||
<Japanese>カーゴへ積み込んでいます</Japanese>
|
||||
<Korean>화물 싣기</Korean>
|
||||
<Chinese>裝載貨物中</Chinese>
|
||||
<Chinesesimp>正在装载货物</Chinesesimp>
|
||||
<Turkish>Kargo Yükleniyor</Turkish>
|
||||
<English>Loading %1 into %2...</English>
|
||||
<Spanish>Cargando %1 en %2...</Spanish>
|
||||
<Japanese>%1 を %2 に積み込んでいます・・・</Japanese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_UnloadingItem">
|
||||
<English>Unloading Cargo</English>
|
||||
<German>Entlade</German>
|
||||
<Portuguese>Descarregando carga</Portuguese>
|
||||
<Polish>Rozładowywanie cargo</Polish>
|
||||
<Czech>Vykládám</Czech>
|
||||
<Russian>Выгрузка</Russian>
|
||||
<Italian>Scaricando</Italian>
|
||||
<Spanish>Descargando</Spanish>
|
||||
<French>Déchargement de la cargaison</French>
|
||||
<Japanese>カーゴから降ろしています</Japanese>
|
||||
<Korean>화물 내리기</Korean>
|
||||
<Chinese>卸載貨物中</Chinese>
|
||||
<Chinesesimp>正在卸载货物</Chinesesimp>
|
||||
<Turkish>Kargo Boşaltılıyor</Turkish>
|
||||
<English>Unloading %1 from %2...</English>
|
||||
<Spanish>Descargando %1 de %2...</Spanish>
|
||||
<Japanese>%1 を %2 から降ろしています・・・</Japanese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_LoadingFailed">
|
||||
<English>%1<br/>could not be loaded</English>
|
||||
@ -309,7 +321,7 @@
|
||||
<German>Kann nicht entladen werden</German>
|
||||
<Italian>Impossibile da scaricare</Italian>
|
||||
<French>Ne peut pas être déchargé</French>
|
||||
<Japanese>降ろせません</Japanese>
|
||||
<Japanese>荷降ろし不可能です</Japanese>
|
||||
<Korean>하역할 수가 없습니다</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_SizeMenu">
|
||||
@ -317,12 +329,12 @@
|
||||
<German>Frachtgröße: %1</German>
|
||||
<Italian>Dimensione Carico: %1</Italian>
|
||||
<French>Encombrement fret: %1</French>
|
||||
<Japanese>カーゴ サイズ: %1</Japanese>
|
||||
<Japanese>貨物のサイズ: %1</Japanese>
|
||||
<Korean>화물 크기: %1</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_customName_edenName">
|
||||
<English>Custom Name</English>
|
||||
<Japanese>カスタムネーム</Japanese>
|
||||
<Japanese>カスタム名</Japanese>
|
||||
<French>Nom personnalisé</French>
|
||||
<German>Eigener Name</German>
|
||||
<Italian>Nome Personalizzato</Italian>
|
||||
@ -335,7 +347,7 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_customName_edenDesc">
|
||||
<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>
|
||||
<Russian>Установить пользовательское имя груза, используемое в интерфейсе погрузки.</Russian>
|
||||
<German>Definiere eigenen Frachtnamen, welcher im Frachtraum genutzt wird.</German>
|
||||
@ -350,7 +362,7 @@
|
||||
<English>Cargo Space</English>
|
||||
<German>Frachtraum</German>
|
||||
<Italian>Spazio di Carico</Italian>
|
||||
<Japanese>カーゴ スペース</Japanese>
|
||||
<Japanese>貨物室の容量</Japanese>
|
||||
<Chinese>貨物空間</Chinese>
|
||||
<Chinesesimp>货物空间</Chinesesimp>
|
||||
<Polish>Przestrzeń ładunkowa</Polish>
|
||||
@ -366,7 +378,7 @@
|
||||
<English>The cargo space available in this vehicle/container</English>
|
||||
<German>Verfügbarer Frachtraum in diesem Fahrzeug/Container</German>
|
||||
<Italian>Lo spazio disponibile in questo veicolo/container</Italian>
|
||||
<Japanese>この車両/コンテナでカーゴ スペースを使えるようにします</Japanese>
|
||||
<Japanese>この車両/コンテナで使用可能な貨物室の容量</Japanese>
|
||||
<Chinese>設定此載具/集裝箱可裝載多少貨物</Chinese>
|
||||
<Chinesesimp>设定此载具/集装箱可装载多少货物</Chinesesimp>
|
||||
<Polish>Dostępna przestrzeń ładunkowa w tym pojeździe/kontenerze</Polish>
|
||||
@ -381,7 +393,7 @@
|
||||
<English>Cargo Size</English>
|
||||
<German>Frachtgröße</German>
|
||||
<Italian>Dimensioni nel Carico</Italian>
|
||||
<Japanese>カーゴ サイズ</Japanese>
|
||||
<Japanese>貨物のサイズ</Japanese>
|
||||
<Chinese>貨物的大小</Chinese>
|
||||
<Chinesesimp>货物的大小</Chinesesimp>
|
||||
<Polish>Wielkość ładunku</Polish>
|
||||
@ -397,7 +409,7 @@
|
||||
<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>
|
||||
<Italian>Lo spazio di carico necessario per contenere questo oggetto (-1 per non caricabile)</Italian>
|
||||
<Japanese>オブジェクトを積載するのに必要なカーゴ スペース (-1 で積載不可にします)</Japanese>
|
||||
<Japanese>このオブジェクトの積載に必要な貨物室の容量 (-1 で積載不可に)</Japanese>
|
||||
<Chinese>此貨物會佔掉多少空間(設定-1的話此貨物就不能被裝載)</Chinese>
|
||||
<Chinesesimp>此货物会占掉多少空间(设定 -1 的话此货物就不能被装载)</Chinesesimp>
|
||||
<Polish>Wymagana przestrzeń ładunkowa dla tego obiektu (-1 dla niemożliwych do załadowania)</Polish>
|
||||
@ -456,7 +468,7 @@
|
||||
<Key ID="STR_ACE_Cargo_paradropTimeCoefficent_description">
|
||||
<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>
|
||||
<Japanese>カーゴ アイテムを空中投下するまでの時間を変更します。</Japanese>
|
||||
<Japanese>貨物の空中投下に掛かる時間を変更します。</Japanese>
|
||||
<Italian>Modifica quanto tempo viene impiegato per paracadutare oggetti dal carico.</Italian>
|
||||
<French>Modifie le temps nécessaire au paralargage d'une cargaison.</French>
|
||||
<Chinese>設定空投所需消耗的時間</Chinese>
|
||||
@ -471,7 +483,7 @@
|
||||
<Key ID="STR_ACE_Cargo_loadTimeCoefficient">
|
||||
<English>Load Time Coefficient</English>
|
||||
<German>Ladezeitmultiplikator</German>
|
||||
<Japanese>積載所要時間係数</Japanese>
|
||||
<Japanese>積載の所要時間係数</Japanese>
|
||||
<Polish>Współczynnik czasu załadowania</Polish>
|
||||
<Italian>Coefficente Tempo Caricamento</Italian>
|
||||
<Russian>Коэф. времени погрузки</Russian>
|
||||
@ -486,7 +498,7 @@
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
@ -501,7 +513,7 @@
|
||||
<Key ID="STR_ACE_Cargo_openAfterUnload">
|
||||
<English>Reopen Cargo Menu</English>
|
||||
<Turkish>Kargo Menüsünü Tekrar Aç</Turkish>
|
||||
<Japanese>カーゴ メニューを再度開く</Japanese>
|
||||
<Japanese>貨物メニューを再度開く</Japanese>
|
||||
<French>Rouvrir le menu de cargaison</French>
|
||||
<Russian>Переоткрыть меню погрузки</Russian>
|
||||
<German>Frachtmenü erneut öffnen</German>
|
||||
@ -515,7 +527,7 @@
|
||||
<Key ID="STR_ACE_Cargo_openAfterUnload_description">
|
||||
<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>
|
||||
<Japanese>カーゴを降ろした後に再びカーゴ メニューを開きます。</Japanese>
|
||||
<Japanese>貨物を降ろした後に再び貨物メニューを開きます。</Japanese>
|
||||
<French>Réouvre le menu de cargaison après un déchargement réussi.</French>
|
||||
<Russian>Переоткрыть меню погрузки после успешной выгрузки.</Russian>
|
||||
<German>Frachtmenü erneut öffnen, nach erfolgreichen Entladen.</German>
|
||||
@ -531,7 +543,7 @@
|
||||
<Korean>화물 내린 후 운반</Korean>
|
||||
<Russian>Нести после выгрузки</Russian>
|
||||
<Spanish>Llevar encima tras la descarga</Spanish>
|
||||
<Japanese>荷降ろし後の運搬</Japanese>
|
||||
<Japanese>荷降ろし後に持ち運ぶ</Japanese>
|
||||
<Polish>Niesienie Po Rozładowaniu</Polish>
|
||||
<German>Nach dem Entladen tragen</German>
|
||||
<Italian>Trasporta dopo aver Scaricato</Italian>
|
||||
@ -543,12 +555,18 @@
|
||||
<Korean>화물 아이템을 내린 후 들거나 끌지 여부를 결정합니다.</Korean>
|
||||
<Russian>Нужно ли переносить или тащить предметы после их выгрузки.</Russian>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
</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>
|
||||
</Project>
|
||||
|
14
addons/common/CfgGesturesMale.hpp
Normal file
14
addons/common/CfgGesturesMale.hpp
Normal file
@ -0,0 +1,14 @@
|
||||
// From ACRE
|
||||
class CfgGesturesMale {
|
||||
skeletonName = "OFP2_ManSkeleton";
|
||||
class States {
|
||||
class GestureNod;
|
||||
class GVAR(stop): GestureNod {
|
||||
file = "a3\anims_f\data\anim\sdr\gst\gestureEmpty.rtm";
|
||||
disableWeapons = 0;
|
||||
disableWeaponsLong = 0;
|
||||
enableOptics = 1;
|
||||
mask = "empty";
|
||||
};
|
||||
};
|
||||
};
|
@ -1,9 +1,15 @@
|
||||
|
||||
class CfgMovesBasic {
|
||||
class Default;
|
||||
// From ACRE
|
||||
class ManActions {
|
||||
GVAR(stop) = QGVAR(stop);
|
||||
};
|
||||
class Actions {
|
||||
class NoActions: ManActions {
|
||||
GVAR(stop)[] = {QGVAR(stop), "Gesture"};
|
||||
};
|
||||
|
||||
// fixes grab animation with equipped pistol
|
||||
class NoActions;
|
||||
class PistolStandActions: NoActions {
|
||||
grabDrag = "AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2";
|
||||
};
|
||||
@ -62,8 +68,12 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
||||
|
||||
// fix falling back to unconsciousness animation and disable rotating in that state
|
||||
class Unconscious: Default {
|
||||
ConnectTo[] = {};
|
||||
// Prevents AI from moving torso and head when unconscious
|
||||
aiming = "aimingNo";
|
||||
aimingBody = "aimingUpNo";
|
||||
head = "headNo";
|
||||
|
||||
ConnectTo[] = {};
|
||||
forceAim = 1;
|
||||
static = 1;
|
||||
};
|
||||
|
@ -181,6 +181,7 @@ PREP(statusEffect_resetVariables);
|
||||
PREP(statusEffect_respawnEH);
|
||||
PREP(statusEffect_sendEffects);
|
||||
PREP(statusEffect_set);
|
||||
PREP(stopGesture);
|
||||
PREP(stringCompare);
|
||||
PREP(stringToColoredText);
|
||||
PREP(swayLoop);
|
||||
|
@ -29,7 +29,7 @@
|
||||
["blockRadio", false, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), "ace_unconscious"]] call FUNC(statusEffect_addType);
|
||||
["blockSpeaking", false, ["ace_unconscious"]] call FUNC(statusEffect_addType);
|
||||
["disableWeaponAssembly", false, ["ace_common", "ace_common_lockVehicle", "ace_csw"]] call FUNC(statusEffect_addType);
|
||||
["lockInventory", true, []] call FUNC(statusEffect_addType);
|
||||
["lockInventory", true, [], true] call FUNC(statusEffect_addType);
|
||||
|
||||
[QGVAR(forceWalk), {
|
||||
params ["_object", "_set"];
|
||||
@ -96,7 +96,7 @@
|
||||
_object setVariable ["acre_sys_core_isDisabled", _set > 0, true];
|
||||
};
|
||||
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;
|
||||
|
||||
@ -142,7 +142,7 @@ if (isServer) then {
|
||||
if ((!isNil "_zeusLogic") && {!isNull _zeusLogic}) then {
|
||||
{
|
||||
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];
|
||||
};
|
||||
nil
|
||||
|
@ -32,6 +32,7 @@ ACE_COUNTERS = [];
|
||||
|
||||
GVAR(statusEffect_Names) = [];
|
||||
GVAR(statusEffect_isGlobal) = [];
|
||||
GVAR(statusEffect_sendJIP) = [];
|
||||
|
||||
GVAR(setHearingCapabilityMap) = [];
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
if (isFilePatchingEnabled) then {
|
||||
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;
|
||||
};
|
||||
|
||||
|
@ -4,7 +4,7 @@ class CfgPatches {
|
||||
class ADDON {
|
||||
name = COMPONENT_NAME;
|
||||
units[] = {"ACE_Box_Misc", "ACE_bananaItem", "ACE_Flag_Black", "ACE_Flag_White"};
|
||||
weapons[] = {"ACE_ItemCore","ACE_FakePrimaryWeapon", "ACE_Banana"};
|
||||
weapons[] = {"ACE_ItemCore", "ACE_FakePrimaryWeapon", "ACE_Banana"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_main","ace_modules"};
|
||||
author = CSTRING(ACETeam);
|
||||
@ -17,6 +17,7 @@ class CfgPatches {
|
||||
#include "CfgEden.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgLocationTypes.hpp"
|
||||
#include "CfgGesturesMale.hpp"
|
||||
#include "CfgMagazines.hpp"
|
||||
#include "CfgMoves.hpp"
|
||||
#include "CfgSounds.hpp"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -18,11 +18,11 @@ private _allUnits = [];
|
||||
{
|
||||
private _class = configFile >> "CfgVehicles" >> _x;
|
||||
if (isNull _class) then {
|
||||
WARNING_1("in units[] but null - %1", _x);
|
||||
WARNING_1("in units[] but null - %1",_x);
|
||||
_testPass = false;
|
||||
} else {
|
||||
// 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;
|
||||
// };
|
||||
};
|
||||
@ -36,11 +36,11 @@ private _allWeapons = [];
|
||||
{
|
||||
private _class = configFile >> "CfgWeapons" >> _x;
|
||||
if (isNull _class) then {
|
||||
WARNING_1("in weapons[] but null - %1", _x);
|
||||
WARNING_1("in weapons[] but null - %1",_x);
|
||||
_testPass = false;
|
||||
} else {
|
||||
// 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;
|
||||
// };
|
||||
};
|
||||
@ -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 (!((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;
|
||||
};
|
||||
};
|
||||
@ -63,7 +63,7 @@ private _weapons = "(configName _x) select [0,3] == 'ace'" configClasses (config
|
||||
private _type = toLower configName _x;
|
||||
if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) 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;
|
||||
};
|
||||
};
|
||||
|
@ -27,7 +27,7 @@ if (isServer) then {
|
||||
params ["_eventName", "_client"];
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
params ["_name", "_args", "_ttl"];
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
|
@ -22,7 +22,7 @@ private _output = [format ["// CBA Settings [ADDON: %1]:", _addon]];
|
||||
|
||||
private _addonSearch = _addon + "_";
|
||||
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}"];
|
||||
|
||||
|
@ -34,7 +34,7 @@ private _aceSettings = configProperties [configFile >> "ACE_Settings", "isClass
|
||||
if (_isClientSettable && {_currentValue isNotEqualTo _profileVar}) then {
|
||||
// CBA_settings_fnc_set will do type checking for the old profile var
|
||||
private _ret = [_settingName, _profileVar, 0, "client", true] call CBA_settings_fnc_set;
|
||||
INFO_3("Transfering setting [%1: %2] returned %3", _settingName, _profileVar, _ret);
|
||||
INFO_3("Transfering setting [%1: %2] returned %3",_settingName,_profileVar,_ret);
|
||||
};
|
||||
};
|
||||
} forEach _aceSettings;
|
||||
|
@ -80,7 +80,7 @@ if (_oldCompats isNotEqualTo []) then {
|
||||
_oldCompats = _oldCompats apply {format ["%1 (%2)", _x select 0, _x select 1]};
|
||||
[{
|
||||
// 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;
|
||||
};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "..\script_component.hpp"
|
||||
/*
|
||||
* Author: commy2, PabstMirror
|
||||
* Unit claims the ownership over an object. This is used to prevent multiple players from draging the same ammo box or using up the same wheel when repairing etc.
|
||||
* Unit claims the ownership over an object. This is used to prevent multiple players from dragging the same ammo box or using up the same wheel when repairing etc.
|
||||
* This function only runs on the server and handles the "ace_common_claimSafe" event. It provides a network safe way claiming objects as all claims are run on server.
|
||||
* Return event is passed [_unit, _target, _success] for new claims, no event on claim release
|
||||
*
|
||||
|
@ -1,7 +1,8 @@
|
||||
#include "..\script_component.hpp"
|
||||
#include "\a3\ui_f_curator\ui\defineResinclDesign.inc"
|
||||
#include "\a3\ui_f\hpp\defineDIKCodes.inc"
|
||||
/*
|
||||
* Author: commy2
|
||||
* Author: commy2, johnb43
|
||||
* Disables key input. ESC can still be pressed to open the menu.
|
||||
*
|
||||
* Arguments:
|
||||
@ -27,7 +28,7 @@ if (_state) then {
|
||||
if (!isNull (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull])) exitWith {};
|
||||
if (!isNil QGVAR(disableInputPFH)) exitWith {};
|
||||
|
||||
// end TFAR and ACRE2 radio transmissions
|
||||
// End TFAR and ACRE2 radio transmissions
|
||||
call FUNC(endRadioTransmission);
|
||||
|
||||
// Close map
|
||||
@ -45,38 +46,120 @@ if (_state) then {
|
||||
private _map = _display displayCtrl 101;
|
||||
_map ctrlMapCursor ["", QGVAR(blank)];
|
||||
|
||||
GVAR(keyboardInputMain) = createHashMap;
|
||||
GVAR(keyboardInputCombo) = createHashMap;
|
||||
|
||||
_display displayAddEventHandler ["KeyDown", {
|
||||
// If input is enabled again, ignore
|
||||
if (isNil QGVAR(keyboardInputMain)) exitWith {};
|
||||
|
||||
params ["", "_key"];
|
||||
|
||||
if (_key == 1 && {alive player}) then {
|
||||
createDialog (["RscDisplayInterrupt", "RscDisplayMPInterrupt"] select isMultiplayer);
|
||||
// Get key info; Stored as [isPressed, pressedCount]
|
||||
private _keyPressedInfo = GVAR(keyboardInputMain) getOrDefault [_key, [false, 0], true];
|
||||
_keyPressedInfo params ["_keyPressed", "_keyPressedCount"];
|
||||
|
||||
// For regular keys: If pressed, set to release and remove one key press
|
||||
if (!_keyPressed) then {
|
||||
_keyPressedInfo set [0, true];
|
||||
_keyPressedInfo set [1, _keyPressedCount + 1];
|
||||
};
|
||||
|
||||
// For combo keys, register only if pushed or released (no keypress count)
|
||||
if !(GVAR(keyboardInputCombo) getOrDefault [_key, false]) then {
|
||||
GVAR(keyboardInputCombo) set [_key, true];
|
||||
};
|
||||
|
||||
// Look if keybinds of various actions have been pressed
|
||||
private _action = "";
|
||||
private _comboDikPressed = false;
|
||||
private _return = false;
|
||||
|
||||
// This technique has a limitation: It can't process the Escape key properly (KeyUp EH does not fire)
|
||||
(["TeamSwitch", "CuratorInterface", "ShowMap", "DefaultAction", "Throw", "Chat", "PrevChannel", "NextChannel"] apply {
|
||||
_action = _x;
|
||||
|
||||
{
|
||||
_x params ["_mainKeyArray", "_comboKeyArray", "_isDoubleTap"];
|
||||
_mainKeyArray params ["_mainDik", "_mainDevice"];
|
||||
|
||||
// If keybind doesn't contain key combo, it returns empty array; Therefore, return true
|
||||
_comboDikPressed = if (_comboKeyArray isEqualTo []) then {
|
||||
true
|
||||
} else {
|
||||
_comboKeyArray params ["_comboDik", "_comboDevice"];
|
||||
|
||||
_comboDevice == "KEYBOARD" && {GVAR(keyboardInputCombo) getOrDefault [_comboDik, false]}
|
||||
};
|
||||
|
||||
// Check if the necessary keys were pressed for a keybind
|
||||
_return = _comboDikPressed &&
|
||||
{_mainDevice == "KEYBOARD"} &&
|
||||
{((GVAR(keyboardInputMain) getOrDefault [_mainDik, [false, 0]]) select 1) > ([0, 1] select _isDoubleTap)}; // check how many times the main key was pressed
|
||||
|
||||
// Keybind was detected
|
||||
if (_return) exitWith {
|
||||
TRACE_1("Action triggered: ",_action);
|
||||
};
|
||||
} forEach (actionKeysEx _action);
|
||||
|
||||
_return
|
||||
}) params ["_teamSwitch", "_curatorInterface", "_showMap", "_defaultAction", "_throw", "_chat", "_prevChannel", "_nextChannel"];
|
||||
|
||||
// Handle Escape separately because of limitation mentioned above
|
||||
if (_key == DIK_ESCAPE && {alive player}) then {
|
||||
disableSerialization;
|
||||
|
||||
private _isMultiplayer = isMultiplayer;
|
||||
private _is3DENPreview = is3DENPreview;
|
||||
|
||||
createDialog (["RscDisplayInterrupt", "RscDisplayMPInterrupt"] select _isMultiplayer);
|
||||
|
||||
private _dlg = findDisplay 49;
|
||||
|
||||
for "_index" from 100 to 2000 do {
|
||||
(_dlg displayCtrl _index) ctrlEnable false;
|
||||
};
|
||||
|
||||
private _ctrl = _dlg displayctrl 103;
|
||||
_ctrl ctrlSetEventHandler ["buttonClick", QUOTE(while {!isNull (uiNamespace getVariable [ARR_2(QUOTE(QGVAR(dlgDisableMouse)),displayNull)])} do {closeDialog 0}; failMission 'LOSER'; [false] call DFUNC(disableUserInput))];
|
||||
_ctrl ctrlEnable true;
|
||||
_ctrl ctrlSetText "ABORT";
|
||||
_ctrl ctrlSetTooltip "Abort.";
|
||||
private _ctrl = _dlg displayCtrl 103;
|
||||
_ctrl ctrlSetEventHandler ["ButtonClick", toString {
|
||||
while {!isNull (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull])} do {
|
||||
closeDialog 0
|
||||
};
|
||||
|
||||
_ctrl = _dlg displayctrl ([104, 1010] select isMultiplayer);
|
||||
if (["ace_medical"] call FUNC(isModLoaded)) then {
|
||||
_ctrl ctrlSetEventHandler ["buttonClick", 'closeDialog 0; [player, "respawn_button"] call EFUNC(medical_status,setDead); [false] call DFUNC(disableUserInput);'];
|
||||
} else {
|
||||
_ctrl ctrlSetEventHandler ["buttonClick", QUOTE(closeDialog 0; player setDamage 1; [false] call DFUNC(disableUserInput))];
|
||||
};
|
||||
_ctrl ctrlEnable ((getMissionConfigValue ["respawnButton", -1]) != 0); // handles 3den attribute or description.ext
|
||||
_ctrl ctrlSetText localize "$str_3den_multiplayer_attributecategory_respawn_displayname";
|
||||
_ctrl ctrlSetTooltip "Respawn.";
|
||||
failMission "LOSER";
|
||||
|
||||
[false] call FUNC(disableUserInput);
|
||||
}];
|
||||
_ctrl ctrlEnable true;
|
||||
_ctrl ctrlSetText localize (["str_disp_int_abort", "STR_3DEN_RscDisplayInterrupt_ButtonAbort_3DEN_text"] select (_is3DENPreview && !_isMultiplayer));
|
||||
_ctrl ctrlSetTooltip localize ([
|
||||
"STR_TOOLTIP_MAIN_ABORT_CAMPAIGN",
|
||||
"STR_3DEN_RscDisplayInterrupt_ButtonAbort_3DEN_tooltip",
|
||||
"STR_TOOLTIP_MAIN_ABORT"
|
||||
] select (([_is3DENPreview, _isMultiplayer] call FUNC(toBitmask)) min 2));
|
||||
|
||||
_ctrl = _dlg displayCtrl ([104, 1010] select _isMultiplayer);
|
||||
_ctrl ctrlSetEventHandler ["ButtonClick", toString {
|
||||
closeDialog 0;
|
||||
|
||||
if (["ace_medical"] call FUNC(isModLoaded)) then {
|
||||
[player, "respawn_button"] call EFUNC(medical_status,setDead);
|
||||
} else {
|
||||
player setDamage 1;
|
||||
};
|
||||
|
||||
[false] call FUNC(disableUserInput);
|
||||
}];
|
||||
|
||||
private _respawnEnabled = (getMissionConfigValue ["respawnButton", -1]) != 0;
|
||||
|
||||
_ctrl ctrlEnable _respawnEnabled; // handles 3den attribute or description.ext
|
||||
_ctrl ctrlSetText localize "str_disp_int_respawn";
|
||||
_ctrl ctrlSetTooltip localize (["str_3den_attributes_respawn_none_tooltip", "str_disp_int_respawn"] select _respawnEnabled);
|
||||
};
|
||||
|
||||
if (_key in actionKeys "TeamSwitch" && {teamSwitchEnabled}) then {
|
||||
if (_teamSwitch && teamSwitchEnabled) then {
|
||||
(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0;
|
||||
|
||||
private _acc = accTime;
|
||||
@ -84,18 +167,20 @@ if (_state) then {
|
||||
setAccTime _acc;
|
||||
};
|
||||
|
||||
if (_key in actionKeys "CuratorInterface" && {getAssignedCuratorLogic player in allCurators}) then {
|
||||
if (_curatorInterface && {!isNull getAssignedCuratorLogic player}) then {
|
||||
(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0;
|
||||
|
||||
openCuratorInterface;
|
||||
};
|
||||
|
||||
if (_key in actionKeys "ShowMap" && {player getVariable ["ACE_canSwitchUnits", false]}) then {
|
||||
if (_showMap && {player getVariable ["ACE_canSwitchUnits", false]}) then {
|
||||
(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0;
|
||||
|
||||
openMap true;
|
||||
};
|
||||
|
||||
if (isServer || {serverCommandAvailable "#kick"}) then {
|
||||
if (!(_key in (actionKeys "DefaultAction" + actionKeys "Throw")) && {_key in (actionKeys "Chat" + actionKeys "PrevChannel" + actionKeys "NextChannel")}) then {
|
||||
if (isMultiplayer && {isServer || {serverCommandAvailable "#kick"}}) then {
|
||||
if (!(_defaultAction || _throw) && {_chat || _prevChannel || _nextChannel}) then {
|
||||
_key = 0;
|
||||
};
|
||||
};
|
||||
@ -103,7 +188,41 @@ if (_state) then {
|
||||
_key > 0
|
||||
}];
|
||||
|
||||
_display displayAddEventHandler ["KeyUp", {true}];
|
||||
_display displayAddEventHandler ["KeyUp", {
|
||||
// If input is enabled again, ignore
|
||||
if (isNil QGVAR(keyboardInputMain)) exitWith {};
|
||||
|
||||
params ["", "_key"];
|
||||
|
||||
// For combo keys: If pressed, release
|
||||
if (GVAR(keyboardInputCombo) getOrDefault [_key, false]) then {
|
||||
GVAR(keyboardInputCombo) deleteAt _key;
|
||||
};
|
||||
|
||||
private _keyPressedInfo = GVAR(keyboardInputMain) getOrDefault [_key, [false, 0]];
|
||||
|
||||
// If pressed, release it
|
||||
if (_keyPressedInfo select 0) then {
|
||||
_keyPressedInfo set [0, false];
|
||||
};
|
||||
|
||||
// Cache keystrokes of regular keys for a small amount of time
|
||||
[{
|
||||
// If input is enabled again, ignore
|
||||
if (isNil QGVAR(keyboardInputMain)) exitWith {};
|
||||
|
||||
params ["_key"];
|
||||
|
||||
private _keyPressedInfo = GVAR(keyboardInputMain) getOrDefault [_key, [false, 0]];
|
||||
|
||||
// Release it
|
||||
_keyPressedInfo set [1, ((_keyPressedInfo select 1) - 1) max 0];
|
||||
|
||||
if (_keyPressedInfo isEqualTo [false, 0]) then {
|
||||
GVAR(keyboardInputMain) deleteAt _key;
|
||||
};
|
||||
}, _key, 0.5] call CBA_fnc_waitAndExecute;
|
||||
}];
|
||||
};
|
||||
|
||||
GVAR(disableInputPFH) = [{
|
||||
@ -133,4 +252,7 @@ if (_state) then {
|
||||
};
|
||||
|
||||
(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0;
|
||||
|
||||
GVAR(keyboardInputMain) = nil;
|
||||
GVAR(keyboardInputCombo) = nil;
|
||||
};
|
||||
|
@ -24,7 +24,7 @@
|
||||
BEGIN_COUNTER(firedEH);
|
||||
|
||||
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 {
|
||||
// The unit it on foot
|
||||
|
@ -27,7 +27,7 @@ if (getNumber (_unitAnimationCfg >> "terminal") == 1) exitWith {_animationState}
|
||||
|
||||
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 {
|
||||
private _interpolateArray = getArray (_unitAnimationCfg >> "interpolateTo");
|
||||
|
@ -25,7 +25,7 @@ private _pov = getText (_turret >> "memoryPointGunnerOptics");
|
||||
private _gunBeg = getText (_turret >> "gunBeg");
|
||||
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
|
||||
private _povPos = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition _pov);
|
||||
|
@ -17,4 +17,4 @@
|
||||
|
||||
params [["_vehicle", objNull, [objNull]]];
|
||||
|
||||
crew _vehicle select {getText (configOf _x >> "simulation") == "UAVPilot"} // return
|
||||
(crew _vehicle) select {unitIsUAV _x} // return
|
||||
|
@ -5,10 +5,10 @@
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Unit (usually the player) <OBJECT>
|
||||
* 1: Force a return type <SCALAR, BOOLEAN>
|
||||
* 1: Return imperial units <NUMBER, BOOLEAN>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <NUMBER>
|
||||
* Weight string <STRING>
|
||||
*
|
||||
* Example:
|
||||
* [player] call ace_common_fnc_getWeight
|
||||
|
@ -4,24 +4,17 @@
|
||||
* Check in CfgPatches if modification is loaded
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Mod Name or Classname of the mod in CfgPatches <STRING>
|
||||
* 0: Classname of the mod in CfgPatches <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* if modification is loaded <BOOL>
|
||||
* If modification is loaded <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* ["class"] call ace_common_fnc_isModLoaded
|
||||
* "class" call ace_common_fnc_isModLoaded
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
params [["_modName", "", [""]]];
|
||||
|
||||
private _return = GVAR(isModLoadedCache) get _modName;
|
||||
|
||||
if (isNil "_return") then {
|
||||
_return = isClass (configFile >> "CfgPatches" >> _modName);
|
||||
GVAR(isModLoadedCache) set [_modName, _return];
|
||||
};
|
||||
|
||||
_return
|
||||
GVAR(isModLoadedCache) getOrDefaultCall [toLowerANSI _modName, {isClass (configFile >> "CfgPatches" >> _modName)}, true]
|
||||
|
@ -22,7 +22,7 @@ params ["_soundClass", "_posASL", "_volume", "_distance"];
|
||||
|
||||
private _sound = getArray (configFile >> "CfgSounds" >> _soundClass >> "sound");
|
||||
if (_sound isEqualTo []) exitWith {
|
||||
ERROR_1("CfgSounds class [%1] does not exist or contains empty sound array", _soundClass);
|
||||
ERROR_1("CfgSounds class [%1] does not exist or contains empty sound array",_soundClass);
|
||||
};
|
||||
TRACE_2("sound",_soundClass,_sound);
|
||||
|
||||
|
@ -23,7 +23,7 @@ params ["_logic", "_settingName", "_moduleVariable"];
|
||||
|
||||
// Check if the variable is already defined
|
||||
if (isNil _settingName) exitWith {
|
||||
ERROR_1("readSettingFromModule - param [%1] is not an ace_setting", _settingName);
|
||||
ERROR_1("readSettingFromModule - param [%1] is not an ace_setting",_settingName);
|
||||
};
|
||||
|
||||
// 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
|
||||
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
|
||||
@ -52,7 +52,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray);
|
||||
};
|
||||
|
||||
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 {
|
||||
|
@ -31,7 +31,7 @@ if (isLocalized _requestMessage) then {
|
||||
_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 {
|
||||
terminate GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user