mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into spectatorUpdates
This commit is contained in:
commit
49c814ccb3
11
.travis.yml
11
.travis.yml
@ -1,6 +1,7 @@
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- master
|
||||
- release
|
||||
language: python
|
||||
python:
|
||||
- '3.4'
|
||||
@ -19,12 +20,10 @@ env:
|
||||
- secure: KcJQbknBOdC5lA4nFGKPXVRVIGLDXDRzC8XkHuXJCE9pIR/wbxbkvx8fHKcC6SC9eHgzneC3+o4m4+CjIbVvIwDgslRbJ8Y59i90ncONmdoRx1HUYHwuYWVZm9HJFjCsIbrEqhSyyKS+PB3WZVOLbErtNHsgS8f43PTh5Ujg7Vg=
|
||||
notifications:
|
||||
slack:
|
||||
secure: aWYF/YX7vxEdXJ5w1jhYJQ2TtTP2NRdnXzJDMYXTv2dlXYhO9qp2qjxDGW3dezuPY7B1mPBgebfSKRx3Robkt1rAfEwPWivOiEztL30rwzOy+5Q1wpORv1JkvTC/q2wqQzxQCU/FPVjD2GkF1wtq1Rnx3ESWD8gbvzYoMNdIw1g=
|
||||
on_success: change
|
||||
on_failure: always
|
||||
on_start: never
|
||||
rooms:
|
||||
secure: MvxmqL1NGwiGTVv6uIVTM7jeNLQH95KYtTgSWlXaSw4jdjnf4cmrb/ofHQ3FHhhNVdhRN6W8n0cJfTC3DBZ90bionVh+528qw2mDnDbKljVdIwmoFSexBcH7H1uTLF3gsEz0tbrHtLcnAyTMxdjsdIXDLZ5hwxABNmW5/03jOgs=
|
||||
- secure: byZMNBl8PMlgjT9NA1WmhgCdGfX4b3g1kA0vEiwfm+IFNlx7BiM4J/5rp6zV/jV470xl/epAejx2tsa5SdTyFbO87NH63ILJSt5QnjUZjRuGKSutFs9WE671DtZkPRSJXHS4N6x802PRkyBz/84/lsc34FWvHvjwOuYAtOcJRFk=
|
||||
- secure: V22TNaLWV+yUNWqR7c6HVvIxkRDz7Dyz9xqa43FY8iFgvNL4Q/X69h5DYHU/ILNFM00tx8OBjtPRbcjWQ+F6eY8Sje/A2axJAU+qNurAvoyiTahXUprdUUpPdkgXWuSRTZ9kALxOq5e11RC8XUietghoMcl8zPcqdrZCOOKgoEM=
|
||||
on_success: change
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: change
|
||||
|
@ -1,4 +1,4 @@
|
||||
# ACE3 CONTRIBUTOR LIST
|
||||
# ACE3 CONTRIBUTOR LIST
|
||||
# If you contributed, but are not listed here, contact me:
|
||||
# koffeinflummi@gmail.com
|
||||
#
|
||||
@ -37,6 +37,7 @@ alef <alefor@gmail.com>
|
||||
Aleksey EpMAK Yermakov <epmak777@gmail.com>
|
||||
Alganthe <alganthe@live.fr>
|
||||
Anthariel <Contact@storm-simulation.com>
|
||||
Arkhir <wonsz666@gmail.com >
|
||||
Asgar Serran <piechottaf@web.de>
|
||||
Bamse <bamsis@gmail.com>
|
||||
Bla1337
|
||||
@ -53,7 +54,7 @@ Crusty
|
||||
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
|
||||
Dimaslg <dimaslg@telecable.es>
|
||||
Drill <drill87@gmail.com>
|
||||
Dudakov <dudakov.s@gmail.com>
|
||||
Dudakov aka [OMCB]Kaban <dudakov.s@gmail.com>
|
||||
Dslyecxi <dslyecxi@gmail.com>
|
||||
eRazeri
|
||||
evromalarkey <evromalarkey@gmail.com>
|
||||
@ -108,6 +109,7 @@ Toaster <jonathan.pereira@gmail.com>
|
||||
Tonic
|
||||
Tourorist <tourorist@gmail.com>
|
||||
Valentin Torikian <valentin.torikian@gmail.com>
|
||||
voiper
|
||||
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
|
||||
Winter <simon@agius-muscat.net>
|
||||
zGuba
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/acemod/ACE3/releases">
|
||||
<img src="https://img.shields.io/badge/Version-3.3.2-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
<img src="https://img.shields.io/badge/Version-3.4.2-blue.svg?style=flat-square" alt="ACE3 Version">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/releases/download/v3.3.2/ace3_3.3.2.zip">
|
||||
<img src="https://img.shields.io/badge/Download-65.7_MB-green.svg?style=flat-square" alt="ACE3 Download">
|
||||
<a href="https://github.com/acemod/ACE3/releases/download/v3.4.2/ace3_3.4.2.zip">
|
||||
<img src="https://img.shields.io/badge/Download-72.6_MB-green.svg?style=flat-square" alt="ACE3 Download">
|
||||
</a>
|
||||
<a href="https://github.com/acemod/ACE3/issues">
|
||||
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
|
||||
|
Binary file not shown.
@ -36,7 +36,7 @@ GVAR(Protractor) = true;
|
||||
if !(GVAR(Protractor) && !(weaponLowered ACE_player) && currentWeapon ACE_player == primaryWeapon ACE_player) exitWith {
|
||||
GVAR(Protractor) = false;
|
||||
1 cutText ["", "PLAIN"];
|
||||
[_idPFH] call cba_fnc_removePerFrameHandler;
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
1 cutRsc ["RscProtractor", "PLAIN", 1, false];
|
||||
|
@ -12,11 +12,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_deleted";
|
||||
|
||||
_deleted = 0;
|
||||
|
||||
_aceTimeSecond = floor ACE_time;
|
||||
private _aceTimeSecond = floor ACE_time;
|
||||
|
||||
{
|
||||
private ["_bulletVelocity", "_bulletPosition", "_bulletSpeed"];
|
||||
@ -26,19 +22,19 @@ _aceTimeSecond = floor ACE_time;
|
||||
|
||||
_bulletSpeed = vectorMagnitude _bulletVelocity;
|
||||
|
||||
if (!alive _bullet || _bulletSpeed < 100) exitWith {
|
||||
GVAR(allBullets) deleteAt (_forEachIndex - _deleted);
|
||||
_deleted = _deleted + 1;
|
||||
if (!alive _bullet || _bulletSpeed < 100) then {
|
||||
GVAR(allBullets) deleteAt (GVAR(allBullets) find _x);
|
||||
} else {
|
||||
_bulletPosition = getPosASL _bullet;
|
||||
|
||||
if (_bulletTraceVisible && _bulletSpeed > 500) then {
|
||||
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""];
|
||||
};
|
||||
|
||||
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, _aceTimeSecond, ACE_time - _aceTimeSecond]);
|
||||
};
|
||||
|
||||
_bulletPosition = getPosASL _bullet;
|
||||
|
||||
if (_bulletTraceVisible && _bulletSpeed > 500) then {
|
||||
drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""];
|
||||
};
|
||||
|
||||
call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, _aceTimeSecond, ACE_time - _aceTimeSecond]);
|
||||
} forEach GVAR(allBullets);
|
||||
nil
|
||||
} count +GVAR(allBullets);
|
||||
|
||||
if (GVAR(allBullets) isEqualTo []) then {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
|
@ -54,7 +54,7 @@ if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _wea
|
||||
|
||||
if (_abort || !(GVAR(extensionAvailable))) exitWith {
|
||||
if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then {
|
||||
EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")];
|
||||
EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -40,7 +40,7 @@ GVAR(currentGrid) = 0;
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(ACE_time - _initStartTime)];
|
||||
#endif
|
||||
[_idPFH] call cba_fnc_removePerFrameHandler;
|
||||
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
for "_i" from 1 to 50 do {
|
||||
|
@ -54,7 +54,7 @@ GVAR(active) = true;
|
||||
|
||||
GVAR(DialogPFH) = [{
|
||||
if (!GVAR(active)) exitWith {
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
__ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))];
|
||||
}, 60, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
uiNamespace setVariable ['ATragMX_Display', nil];
|
||||
GVAR(active) = false;
|
||||
[GVAR(DialogPFH)] call cba_fnc_removePerFrameHandler;
|
||||
[GVAR(DialogPFH)] call CBA_fnc_removePerFrameHandler;
|
@ -37,7 +37,7 @@ if !(ctrlVisible 9000) then {
|
||||
false call FUNC(show_target_speed_assist_timer);
|
||||
true call FUNC(show_target_speed_assist);
|
||||
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
ctrlSetText [9001, Str(Round((ACE_time - _startTime) * 10) / 10)];
|
||||
|
@ -61,7 +61,6 @@ class CfgVehicles {
|
||||
showDisabled = 0;
|
||||
priority = 5;
|
||||
icon = PATHTOF(UI\attach_ca.paa);
|
||||
// hotkey = "T";
|
||||
};
|
||||
class GVAR(Detach) {
|
||||
displayName = CSTRING(Detach);
|
||||
@ -71,7 +70,6 @@ class CfgVehicles {
|
||||
showDisabled = 0;
|
||||
priority = 5;
|
||||
icon = PATHTOF(UI\detach_ca.paa);
|
||||
hotkey = "T";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Arguments:
|
||||
* 0: Unit (player) <OBJECT>
|
||||
* 1: attachToVehicle <OBJECT>
|
||||
* 2: Item Classname (cfgWeapon/cfgMagazine) <STRING>
|
||||
* 2: Item Classname (CfgWeapon/CfgMagazine) <STRING>
|
||||
* 3: Light Vehicle Classname <STRING>
|
||||
* 4: On Attach Text <STRING>
|
||||
* 5: Starting Pos of dummy item <ARRAY>
|
||||
|
@ -17,24 +17,17 @@
|
||||
params ["_target", "_backpack"];
|
||||
|
||||
// do cam shake if the target is the player
|
||||
if ([_target] call EFUNC(common,isPlayer)) then {
|
||||
if (_target call EFUNC(common,isPlayer)) then {
|
||||
addCamShake [4, 0.5, 5];
|
||||
};
|
||||
|
||||
// play a zipper sound effect
|
||||
private ["_sounds", "_position"];
|
||||
|
||||
_sounds = [
|
||||
/*"a3\sounds_f\characters\ingame\AinvPknlMstpSlayWpstDnon_medic.wss",
|
||||
"a3\sounds_f\characters\ingame\AinvPknlMstpSlayWrflDnon_medic.wss",
|
||||
"a3\sounds_f\characters\ingame\AinvPpneMstpSlayWpstDnon_medic.wss",
|
||||
"a3\sounds_f\characters\ingame\AinvPpneMstpSlayWrflDnon_medic.wss"*/
|
||||
|
||||
private _sounds = [
|
||||
QUOTE(PATHTO_R(sounds\zip_in.wav)),
|
||||
QUOTE(PATHTO_R(sounds\zip_out.wav))
|
||||
];
|
||||
|
||||
_position = AGLToASL (_target modelToWorldVisual (_target selectionPosition "Spine3"));
|
||||
private _position = AGLToASL (_target modelToWorldVisual (_target selectionPosition "Spine3"));
|
||||
|
||||
playSound3D [
|
||||
_sounds select floor random count _sounds,
|
||||
|
@ -12,13 +12,12 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_backpack"];
|
||||
params [["_backpack", objNull, [objNull]]];
|
||||
|
||||
if (typeName _backpack == "OBJECT") then {
|
||||
if (_backpack isEqualType objNull) then {
|
||||
_backpack = typeOf _backpack;
|
||||
};
|
||||
|
||||
private "_config";
|
||||
_config = configFile >> "CfgVehicles" >> _backpack;
|
||||
private _config = configFile >> "CfgVehicles" >> _backpack;
|
||||
|
||||
getText (_config >> "vehicleClass") == "backpacks" && {getNumber (_config >> "maximumLoad") > 0} // return
|
||||
|
@ -16,11 +16,10 @@
|
||||
params ["_unit", "_backpack"];
|
||||
|
||||
// exit if the target is not a real backpack, i.e. parachute, static weapon bag etc.
|
||||
if !([_backpack] call FUNC(isBackpack)) exitWith {false};
|
||||
if !(_backpack call FUNC(isBackpack)) exitWith {false};
|
||||
|
||||
// get the unit that wears the backpack object
|
||||
private "_target";
|
||||
_target = objectParent _backpack;
|
||||
private _target = objectParent _backpack;
|
||||
|
||||
if (isNull _target) exitWith {false};
|
||||
|
||||
|
@ -32,7 +32,6 @@ class CfgVehicles {
|
||||
showDisabled = 0;
|
||||
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
||||
priority = 2.3;
|
||||
hotkey = "E";
|
||||
};
|
||||
class ACE_StopEscorting {
|
||||
displayName = CSTRING(StopEscorting);
|
||||
@ -43,7 +42,6 @@ class CfgVehicles {
|
||||
showDisabled = 0;
|
||||
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
||||
priority = 2.3;
|
||||
hotkey = "E";
|
||||
};
|
||||
class ACE_LoadCaptive {
|
||||
displayName = CSTRING(LoadCaptive);
|
||||
@ -54,7 +52,6 @@ class CfgVehicles {
|
||||
showDisabled = 0;
|
||||
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
|
||||
priority = 2.2;
|
||||
hotkey = "L";
|
||||
};
|
||||
class GVAR(UnloadCaptive) {
|
||||
displayName = CSTRING(UnloadCaptive);
|
||||
@ -74,7 +71,6 @@ class CfgVehicles {
|
||||
exceptions[] = {"isNotEscorting"};
|
||||
showDisabled = 0;
|
||||
priority = 2.3;
|
||||
hotkey = "C";
|
||||
};
|
||||
class ACE_StartSurrenderingSelf {
|
||||
displayName = CSTRING(StartSurrendering);
|
||||
|
@ -45,7 +45,7 @@ if (_state) then {
|
||||
};
|
||||
|
||||
if (!(_unit getVariable [QGVAR(isEscorting), false])) then {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||
[objNull, _target, false] call EFUNC(common,claim);
|
||||
detach _target;
|
||||
_unit removeAction _actionID;
|
||||
|
@ -21,10 +21,10 @@ params ["_newUnit","_oldUnit"];
|
||||
//set showHUD based on new unit status:
|
||||
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {
|
||||
TRACE_1("Player Change (showHUD false)",_newUnit);
|
||||
showHUD false;
|
||||
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
||||
} else {
|
||||
TRACE_1("Player Change (showHUD true)",_newUnit);
|
||||
showHUD true;
|
||||
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
||||
};
|
||||
|
||||
//If old player was escorting, stop
|
||||
|
@ -23,9 +23,9 @@ params ["_unit","_zeusIsOpen"];
|
||||
if (!_zeusIsOpen) then {
|
||||
if ((_unit getVariable [QGVAR(isHandcuffed), false]) || {_unit getVariable [QGVAR(isSurrendering), false]}) then {
|
||||
TRACE_1("Player Change (showHUD false)",_unit);
|
||||
showHUD false;
|
||||
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
||||
} else {
|
||||
TRACE_1("Player Change (showHUD true)",_unit);
|
||||
showHUD true;
|
||||
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
||||
};
|
||||
};
|
||||
|
@ -19,7 +19,7 @@
|
||||
params ["_unit","_state"];
|
||||
TRACE_2("params",_unit,_state);
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
if (!local _unit) exitWith {
|
||||
ERROR("running setHandcuffed on remote unit");
|
||||
};
|
||||
if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith {
|
||||
@ -38,7 +38,7 @@ if (_state) then {
|
||||
_unit setVariable [QGVAR(CargoIndex), ((vehicle _unit) getCargoIndex _unit), true];
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
showHUD false;
|
||||
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
||||
};
|
||||
|
||||
// fix anim on mission start (should work on dedicated servers)
|
||||
@ -107,7 +107,7 @@ if (_state) then {
|
||||
};
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
showHUD true;
|
||||
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
params ["_unit","_state"];
|
||||
TRACE_2("params",_unit,_state);
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
if (!local _unit) exitWith {
|
||||
ERROR("running surrender on remote unit");
|
||||
};
|
||||
|
||||
@ -36,7 +36,7 @@ if (_state) then {
|
||||
[_unit, QGVAR(Surrendered), true] call EFUNC(common,setCaptivityStatus);
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
showHUD false;
|
||||
["captive", [false, false, false, false, false, false, false, false]] call EFUNC(common,showHud);
|
||||
};
|
||||
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
@ -75,7 +75,7 @@ if (_state) then {
|
||||
if (_unit == ACE_player) then {
|
||||
//only re-enable HUD if not handcuffed
|
||||
if (!(_unit getVariable [QGVAR(isHandcuffed), false])) then {
|
||||
showHUD true;
|
||||
["captive", []] call EFUNC(common,showHud); //same as showHud true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -181,13 +181,17 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleHandcuffed_DisplayName">
|
||||
<English>Make Unit Handcuffed</English>
|
||||
<Polish>Skuj jednostkę</Polish>
|
||||
<Portuguese>Fazer unidade algemada</Portuguese>
|
||||
<Russian>Связать юнита</Russian>
|
||||
<Czech>Spoutat jednotku</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleHandcuffed_Description">
|
||||
<English>Sync a unit to make them handcuffed.<br />Source: ace_captives</English>
|
||||
<Polish>Zsynchronizuj z jednostką, aby została skuta.<br />Źródło: ace_captives</Polish>
|
||||
<Portuguese>Sincronizar uma unidade para deixá-la algemada.<br/>Source: ace_captives</Portuguese>
|
||||
<Russian>Синхронизируйте с юнитами, чтобы сделать их связанными.<br />Источник: ace_captives</Russian>
|
||||
<Czech>Synchronizovat s jednotkou, která má být v poutech.<br />Zdroj: ace_captives</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_DisplayName">
|
||||
<English>Captives Settings</English>
|
||||
@ -262,6 +266,7 @@
|
||||
<Portuguese>Requer rendição</Portuguese>
|
||||
<Russian>Требовать пленения</Russian>
|
||||
<Spanish>Requiere rendición</Spanish>
|
||||
<Czech>Vzdávání vyžadováno</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrender_description">
|
||||
<English>Require Players to surrender before they can be arrested</English>
|
||||
@ -270,6 +275,7 @@
|
||||
<Portuguese>Requer que jogadores se rendam antes de poderem ser presos</Portuguese>
|
||||
<Russian>Требуется, чтобы игрок сдался в плен прежде, чем его можно будет связать</Russian>
|
||||
<Spanish>Requiere que los Jugadores se rindan antes de arrestarlos</Spanish>
|
||||
<Czech>Vyžaduje, aby se hráč nejdříve vzdal, poté může být spoután</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_SurrenderOnly">
|
||||
<English>Surrendering only</English>
|
||||
@ -278,6 +284,7 @@
|
||||
<Portuguese>Somente rendição </Portuguese>
|
||||
<Russian>Только сдавшийся в плен</Russian>
|
||||
<Spanish>Solo rendición</Spanish>
|
||||
<Czech>Pouze vzdávání</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_SurrenderOrNoWeapon">
|
||||
<English>Surrendering or No weapon</English>
|
||||
@ -286,6 +293,7 @@
|
||||
<Portuguese>Rendição ou desarmado</Portuguese>
|
||||
<Russian>Сдавшийся или безоружный</Russian>
|
||||
<Spanish>Rendición o desarme</Spanish>
|
||||
<Czech>Vzdávání nebo beze zbraně</Czech>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -48,6 +48,11 @@ class Extended_InitPost_EventHandlers {
|
||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
class RoadCone_F {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle));
|
||||
};
|
||||
};
|
||||
class Car {
|
||||
class ADDON {
|
||||
init = QUOTE(_this call DFUNC(initVehicle));
|
||||
|
@ -237,6 +237,14 @@ class CfgVehicles {
|
||||
GVAR(size) = 6;
|
||||
};
|
||||
|
||||
// objects
|
||||
class RoadCone_F: ThingX {
|
||||
GVAR(size) = 1;
|
||||
GVAR(canLoad) = 1;
|
||||
};
|
||||
class RoadBarrier_F: RoadCone_F {
|
||||
GVAR(size) = 2;
|
||||
};
|
||||
|
||||
|
||||
class Scrapyard_base_F;
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
_unloaded = [_item, _vehicle] call FUNC(unloadItem);
|
||||
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
_itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||
|
||||
// Show hint as feedback
|
||||
_hint = [LSTRING(UnloadingFailed), LSTRING(UnloadedItem)] select _unloaded;
|
||||
|
@ -23,7 +23,7 @@ if (speed _vehicle > 1 || (((getPos _vehicle) select 2) > 3)) exitWith {false};
|
||||
private ["_itemSize", "_validItem"];
|
||||
_itemSize = [_item] call FUNC(getSizeItem);
|
||||
|
||||
if (typeName _item == "STRING") then {
|
||||
if (_item isEqualType "") then {
|
||||
_validItem =
|
||||
isClass (configFile >> "CfgVehicles" >> _item) &&
|
||||
{getNumber (configFile >> "CfgVehicles" >> _item >> QGVAR(canLoad)) == 1};
|
||||
|
@ -22,7 +22,7 @@ private ["_loaded", "_itemClass", "_validVehiclestate", "_emptyPos"];
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
if !(_item in _loaded) exitWith {false};
|
||||
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
_itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||
|
||||
_validVehiclestate = true;
|
||||
_emptyPos = [];
|
||||
|
@ -17,4 +17,4 @@
|
||||
|
||||
params ["_object"];
|
||||
|
||||
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _object >> QGVAR(space))]
|
||||
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))]
|
||||
|
@ -19,7 +19,7 @@ params ["_item"];
|
||||
private ["_isVirtual","_itemClass","_config"];
|
||||
scopeName "return";
|
||||
|
||||
_isVirtual = (typeName _item == "STRING");
|
||||
_isVirtual = (_item isEqualType "");
|
||||
_itemClass = if (_isVirtual) then {_item} else {typeOf _item};
|
||||
_config = (configFile >> "CfgVehicles" >> _itemClass >> QGVAR(size));
|
||||
|
||||
|
@ -24,7 +24,7 @@ if (_loaded isEqualTo []) exitWith {};
|
||||
|
||||
{
|
||||
// TODO Do we want to be able to recover destroyed equipment?
|
||||
if (typeName _x == "OBJECT") then {
|
||||
if (_x isEqualType objNull) then {
|
||||
deleteVehicle _x;
|
||||
};
|
||||
} count _loaded;
|
||||
|
@ -24,7 +24,7 @@ private ["_loaded", "_space", "_itemSize"];
|
||||
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {false};
|
||||
|
||||
_loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
_loaded pushback _item;
|
||||
_loaded pushBack _item;
|
||||
_vehicle setVariable [QGVAR(loaded), _loaded, true];
|
||||
|
||||
TRACE_1("added to loaded array",_loaded);
|
||||
@ -33,7 +33,7 @@ _space = [_vehicle] call FUNC(getCargoSpaceLeft);
|
||||
_itemSize = [_item] call FUNC(getSizeItem);
|
||||
_vehicle setVariable [QGVAR(space), _space - _itemSize, true];
|
||||
|
||||
if (typeName _item == "OBJECT") then {
|
||||
if (_item isEqualType objNull) then {
|
||||
detach _item;
|
||||
_item attachTo [_vehicle,[0,0,-100]];
|
||||
["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent);
|
||||
|
@ -40,7 +40,7 @@ uiNamespace setVariable [QGVAR(menuDisplay), _display];
|
||||
|
||||
lbClear _ctrl;
|
||||
{
|
||||
_class = if (typeName _x == "STRING") then {_x} else {typeOf _x};
|
||||
_class = if (_x isEqualType "") then {_x} else {typeOf _x};
|
||||
_ctrl lbAdd (getText(configfile >> "CfgVehicles" >> _class >> "displayName"));
|
||||
true
|
||||
} count _loaded;
|
||||
|
@ -23,7 +23,7 @@ _vehicle = [_player] call FUNC(findNearestVehicle);
|
||||
if (isNull _vehicle || _vehicle isKindOf "Cargo_Base_F") then {
|
||||
{
|
||||
if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_vehicle = _x};
|
||||
} foreach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
|
||||
} forEach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
|
||||
};
|
||||
|
||||
if (isNull _vehicle) exitWith {false};
|
||||
|
@ -41,7 +41,7 @@ if ([_item, GVAR(interactionVehicle)] call FUNC(canUnloadItem)) then {
|
||||
|
||||
[5 * _size, [_item, GVAR(interactionVehicle)], "UnloadCargo", {}, localize LSTRING(UnloadingItem)] call EFUNC(common,progressBar);
|
||||
} else {
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
_itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||
_displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
|
||||
|
||||
["displayTextStructured", [[LSTRING(UnloadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent);
|
||||
|
@ -23,7 +23,7 @@ if !([_item, _vehicle] call FUNC(canUnloadItem)) exitWith {
|
||||
false
|
||||
};
|
||||
|
||||
_itemClass = if (typeName _item == "STRING") then {_item} else {typeOf _item};
|
||||
_itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
|
||||
|
||||
_validVehiclestate = true;
|
||||
_emptyPos = [];
|
||||
@ -57,7 +57,7 @@ _space = [_vehicle] call FUNC(getCargoSpaceLeft);
|
||||
_itemSize = [_item] call FUNC(getSizeItem);
|
||||
_vehicle setVariable [QGVAR(space), (_space + _itemSize), true];
|
||||
|
||||
if (typeName _item == "OBJECT") then {
|
||||
if (_item isEqualType objNull) then {
|
||||
detach _item;
|
||||
_item setPosASL (_emptyPos call EFUNC(common,PositiontoASL));
|
||||
["hideObjectGlobal", [_item, false]] call EFUNC(common,serverEvent);
|
||||
|
@ -24,7 +24,7 @@ _loaded = _vehicle getVariable [QGVAR(loaded), []];
|
||||
_newLoaded = [];
|
||||
_totalSpaceOccupied = 0;
|
||||
{
|
||||
if ((typeName _x == "STRING") || {!isNull _x}) then {
|
||||
if ((_x isEqualType "") || {!isNull _x}) then {
|
||||
_newLoaded pushback _x;
|
||||
_totalSpaceOccupied = _totalSpaceOccupied + ([_x] call FUNC(getSizeItem));
|
||||
};
|
||||
|
@ -3,6 +3,7 @@
|
||||
<Package name="Cargo">
|
||||
<Key ID="STR_ACE_Cargo_loadObject">
|
||||
<English>Load</English>
|
||||
<German>Beladen</German>
|
||||
<Polish>Załaduj</Polish>
|
||||
<Portuguese>Carregar</Portuguese>
|
||||
<Russian>Загрузить</Russian>
|
||||
@ -11,6 +12,7 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_unloadObject">
|
||||
<English>Unload</English>
|
||||
<German>Entladen</German>
|
||||
<Polish>Wyładuj</Polish>
|
||||
<Portuguese>Descarregar</Portuguese>
|
||||
<Russian>Выгрузить</Russian>
|
||||
@ -19,6 +21,7 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_openMenu">
|
||||
<English>Cargo</English>
|
||||
<German>Fracht</German>
|
||||
<Polish>Ładunek</Polish>
|
||||
<Portuguese>Carga</Portuguese>
|
||||
<Russian>Грузовой отсек</Russian>
|
||||
@ -27,6 +30,7 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_cargoMenu">
|
||||
<English>Cargo Menu</English>
|
||||
<German>Frachtmenü</German>
|
||||
<Polish>Menu ładunku</Polish>
|
||||
<Portuguese>Menu de carga</Portuguese>
|
||||
<Russian>Грузовой отсек</Russian>
|
||||
@ -35,6 +39,7 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_labelSpace">
|
||||
<English>Cargo space left: %1</English>
|
||||
<German>Frachtplätze frei: %1</German>
|
||||
<Polish>Pozostałe miejsce: %1</Polish>
|
||||
<Portuguese>Espaço de carga restante: %1</Portuguese>
|
||||
<Russian>Осталось мест: %1</Russian>
|
||||
@ -43,6 +48,7 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_ModuleSettings_enable">
|
||||
<English>Enable Cargo</English>
|
||||
<German>Aktiviere Fracht</German>
|
||||
<Polish>Aktywuj cargo</Polish>
|
||||
<Portuguese>Ativar carga</Portuguese>
|
||||
<Russian>Включить модуль перевозки грузов</Russian>
|
||||
@ -51,6 +57,7 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_ModuleSettings_enable_Description">
|
||||
<English>Enable the load in cargo module</English>
|
||||
<German>Aktiviere das Frachtmodul</German>
|
||||
<Polish>Aktywuj możliwość załadunku skrzyń i przedmiotów do pojazdów.</Polish>
|
||||
<Portuguese>Ativar o módulo de carregamento de carga</Portuguese>
|
||||
<Russian>Включает модуль погрузки и перевозки грузов</Russian>
|
||||
@ -58,6 +65,7 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_SettingsModule_DisplayName">
|
||||
<English>Cargo Settings</English>
|
||||
<German>Frachteinstellungen</German>
|
||||
<Polish>Ustawienia cargo</Polish>
|
||||
<Portuguese>Preferências de carregamento</Portuguese>
|
||||
<Russian>Перевозка грузов</Russian>
|
||||
@ -66,10 +74,12 @@
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_SettingsModule_Description">
|
||||
<English>Configure the cargo module settings</English>
|
||||
<German>Konfiguriere das Frachtmodul</German>
|
||||
<Polish>Skonfiguruj ustawienia modułu cargo.</Polish>
|
||||
<Portuguese>Configura as preferências do módulo de carga</Portuguese>
|
||||
<Russian>Конфигурирует настройки модуля перевозки грузов</Russian>
|
||||
<Spanish>Configure los ajustes del módulo de carga</Spanish>
|
||||
<Czech>Konfigurace nákladního modulu</Czech>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_LoadedItem">
|
||||
<English>%1<br/>loaded into<br/>%2</English>
|
||||
@ -89,7 +99,7 @@
|
||||
<Spanish>Descargado/a<br/>%1 de<br/>%2</Spanish>
|
||||
<French>Déchargé<br/>%1 de<br/>%2</French>
|
||||
<Polish>%1<br/>rozładowano z<br/>%2</Polish>
|
||||
<Czech>Nezatížený<br/>%1 do<br/>%2</Czech>
|
||||
<Czech>%1<br/>vyloženo z<br/>%2</Czech>
|
||||
<Portuguese>%1<br/>descarregado de<br/>%2</Portuguese>
|
||||
<Italian>Hai scaricato<br/>%1 da<br/>%2</Italian>
|
||||
<Hungarian>1%<br/>kirakodva ebből:<br/>%2</Hungarian>
|
||||
@ -98,18 +108,30 @@
|
||||
<Key ID="STR_ACE_Cargo_LoadingItem">
|
||||
<English>Loading Cargo</English>
|
||||
<Portuguese>Carregando carga</Portuguese>
|
||||
<Polish>Ładowanie cargo</Polish>
|
||||
<Czech>Nakládám</Czech>
|
||||
<Russian>Погрузка</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_UnloadingItem">
|
||||
<English>Unloading Cargo</English>
|
||||
<Portuguese>Descarregando carga</Portuguese>
|
||||
<Polish>Rozładowywanie cargo</Polish>
|
||||
<Czech>Vykládám</Czech>
|
||||
<Russian>Выгрузка</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_LoadingFailed">
|
||||
<English>%1<br/>could not be loaded</English>
|
||||
<Portuguese>%1<br/>não pode ser carregado</Portuguese>
|
||||
<Polish>%1<br/>nie mógł zostać załadowany</Polish>
|
||||
<Czech>%1<br/>nemůže být naloženo</Czech>
|
||||
<Russian>%1<br/>не может быть погружен</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Cargo_UnloadingFailed">
|
||||
<English>%1<br/>could not be unloaded</English>
|
||||
<Portuguese>%1<br/>não pode ser descarregado</Portuguese>
|
||||
<Polish>%1<br/>nie mógł zostać rozładowany</Polish>
|
||||
<Czech>%1<br/>nemůže být vyloženo</Czech>
|
||||
<Russian>%1<br/>не может быть выгружен</Russian>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -41,7 +41,7 @@ class GVAR(ProgressBar_Dialog) {
|
||||
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorFrame[] = {1,1,1,0.5};
|
||||
colorBar[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])"};
|
||||
colorBar[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.08])","(profilenamespace getVariable ['GUI_BCG_RGB_A',0.8])"};
|
||||
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
|
||||
};
|
||||
class TitleText: TitleBackground {
|
||||
|
@ -107,6 +107,10 @@ class RscInGameUI {
|
||||
class RscOptics_LaserDesignator_02 {
|
||||
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call FUNC(localEvent););
|
||||
};
|
||||
|
||||
class RscStaminaBar {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStaminaBar"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2(QUOTE(QGVAR(dlgStaminaBar)),_this select 0)]);
|
||||
};
|
||||
};
|
||||
|
||||
class RscDisplayInventory {
|
||||
@ -115,18 +119,18 @@ class RscDisplayInventory {
|
||||
|
||||
// map
|
||||
class RscDisplayMainMap {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Ingame')])] call FUNC(localEvent););
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Ingame')])] call FUNC(localEvent););
|
||||
};
|
||||
|
||||
class RscDisplayGetReady: RscDisplayMainMap {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Briefing')])] call FUNC(localEvent););
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'Briefing')])] call FUNC(localEvent););
|
||||
};
|
||||
|
||||
class RscDisplayServerGetReady: RscDisplayGetReady {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ServerBriefing')])] call FUNC(localEvent););
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ServerBriefing')])] call FUNC(localEvent););
|
||||
};
|
||||
|
||||
|
||||
class RscDisplayClientGetReady: RscDisplayGetReady {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ClientBriefing')])] call FUNC(localEvent););
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDiary"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgMap', _this select 0)]; [ARR_2('mapDisplayLoaded', [ARR_2(_this select 0, 'ClientBriefing')])] call FUNC(localEvent););
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
// ACE - Common
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
#include "script_component.hpp"
|
||||
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// PFHs
|
||||
@ -29,16 +29,15 @@
|
||||
GVAR(nextFrameNo) = diag_frameno + 1;
|
||||
|
||||
//Handle the waitUntilAndExec array:
|
||||
private _deleted = 0;
|
||||
{
|
||||
// if condition is satisifed call statement
|
||||
if ((_x select 2) call (_x select 0)) then {
|
||||
// make sure to delete the correct handle when multiple conditions are met in one frame
|
||||
GVAR(waitUntilAndExecArray) deleteAt (_forEachIndex - _deleted);
|
||||
_deleted = _deleted + 1;
|
||||
GVAR(waitUntilAndExecArray) deleteAt (GVAR(waitUntilAndExecArray) find _x);
|
||||
(_x select 2) call (_x select 1);
|
||||
};
|
||||
} forEach GVAR(waitUntilAndExecArray);
|
||||
nil
|
||||
} count +GVAR(waitUntilAndExecArray);
|
||||
|
||||
END_COUNTER(waitAndExec);
|
||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
@ -58,13 +57,30 @@
|
||||
// Eventhandlers
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
//Add a fix for BIS's zeus remoteControl module not reseting variables on DC when RC a unit
|
||||
//This variable is used for isPlayer checks
|
||||
if (isServer) then {
|
||||
addMissionEventHandler ["HandleDisconnect", {
|
||||
params ["_dcPlayer"];
|
||||
private _zeusLogic = getAssignedCuratorLogic _dcPlayer;
|
||||
if ((!isNil "_zeusLogic") && {!isNull _zeusLogic}) then {
|
||||
{
|
||||
if ((_x getvariable ["bis_fnc_moduleRemoteControl_owner", objnull]) isEqualTo _dcPlayer) exitWith {
|
||||
ACE_LOGINFO_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
|
||||
} count (curatorEditableObjects _zeusLogic);
|
||||
};
|
||||
}];
|
||||
};
|
||||
|
||||
// Listens for global "SettingChanged" events, to update the force status locally
|
||||
["SettingChanged", {
|
||||
params ["_name", "_value", "_force"];
|
||||
|
||||
if (_force) then {
|
||||
private "_settingData";
|
||||
_settingData = [_name] call FUNC(getSettingData);
|
||||
private _settingData = [_name] call FUNC(getSettingData);
|
||||
|
||||
if (_settingData isEqualTo []) exitWith {};
|
||||
|
||||
@ -98,7 +114,6 @@
|
||||
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
|
||||
["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler);
|
||||
["selectLeader", {(_this select 0) selectLeader (_this select 1)}] call FUNC(addEventHandler);
|
||||
["assignTeam", {(_this select 0) assignTeam (_this select 1)}] call FUNC(addEventHandler);
|
||||
["setVelocity", {(_this select 0) setVelocity (_this select 1)}] call FUNC(addEventHandler);
|
||||
|
||||
if (isServer) then {
|
||||
@ -146,10 +161,8 @@ QGVAR(remoteFnc) addPublicVariableEventHandler {
|
||||
// Check files, previous installed version etc.
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
private ["_currentVersion", "_previousVersion"];
|
||||
|
||||
_currentVersion = getText (configFile >> "CfgPatches" >> QUOTE(ADDON) >> "version");
|
||||
_previousVersion = profileNamespace getVariable ["ACE_VersionNumberString", ""];
|
||||
private _currentVersion = getText (configFile >> "CfgPatches" >> QUOTE(ADDON) >> "version");
|
||||
private _previousVersion = profileNamespace getVariable ["ACE_VersionNumberString", ""];
|
||||
|
||||
// check previous version number from profile
|
||||
if (_currentVersion != _previousVersion) then {
|
||||
@ -169,7 +182,7 @@ call FUNC(checkFiles);
|
||||
[
|
||||
GVAR(checkPBOsAction),
|
||||
GVAR(checkPBOsCheckAll),
|
||||
call compile GVAR(checkPBOsWhitelist)
|
||||
GVAR(checkPBOsWhitelist)
|
||||
] call FUNC(checkPBOs)
|
||||
}] call FUNC(addEventHandler);
|
||||
|
||||
@ -253,8 +266,7 @@ GVAR(ScrollWheelFrame) = diag_frameno;
|
||||
}] call FUNC(addEventHandler);
|
||||
|
||||
// add PFH to execute event that fires when the main display (46) is created
|
||||
private "_fnc_initMainDisplayCheck";
|
||||
_fnc_initMainDisplayCheck = {
|
||||
private _fnc_initMainDisplayCheck = {
|
||||
[{
|
||||
if !(isNull findDisplay 46) then {
|
||||
// Raise ACE event locally
|
||||
@ -295,6 +307,17 @@ enableCamShake true;
|
||||
// Set up numerous eventhanders for player controlled units
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
//CBA has events for zeus's display onLoad and onUnload (Need to delay a frame for display to be ready)
|
||||
private _zeusDisplayChangedFNC = {
|
||||
[{
|
||||
private _data = !(isNull findDisplay 312);
|
||||
["zeusDisplayChanged", [ACE_player, _data]] call FUNC(localEvent);
|
||||
}, []] call FUNC(execNextFrame);
|
||||
};
|
||||
["CBA_curatorOpened", _zeusDisplayChangedFNC] call CBA_fnc_addEventHandler;
|
||||
["CBA_curatorClosed", _zeusDisplayChangedFNC] call CBA_fnc_addEventHandler;
|
||||
|
||||
|
||||
// default variables
|
||||
GVAR(OldPlayerVehicle) = vehicle objNull;
|
||||
GVAR(OldPlayerTurret) = [objNull] call FUNC(getTurretIndex);
|
||||
@ -304,7 +327,6 @@ GVAR(OldPlayerVisionMode) = currentVisionMode objNull;
|
||||
GVAR(OldCameraView) = "";
|
||||
GVAR(OldVisibleMap) = false;
|
||||
GVAR(OldInventoryDisplayIsOpen) = nil; //@todo check this
|
||||
GVAR(OldZeusDisplayIsOpen) = false;
|
||||
GVAR(OldIsCamera) = false;
|
||||
|
||||
// clean up playerChanged eventhandler from preinit and put it in the same PFH as the other events to reduce overhead and guarantee advantageous execution order
|
||||
@ -316,13 +338,11 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
|
||||
// PFH to raise varios events
|
||||
[{
|
||||
BEGIN_COUNTER(stateChecker);
|
||||
private "_data"; // reuse one variable to reduce number of variables that have to be set to private each frame
|
||||
|
||||
// "playerChanged" event
|
||||
_data = call FUNC(player);
|
||||
private _data = call FUNC(player);
|
||||
if !(_data isEqualTo ACE_player) then {
|
||||
private "_oldPlayer";
|
||||
_oldPlayer = ACE_player;
|
||||
private _oldPlayer = ACE_player;
|
||||
|
||||
ACE_player = _data;
|
||||
uiNamespace setVariable ["ACE_player", _data];
|
||||
@ -395,14 +415,6 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
|
||||
["inventoryDisplayChanged", [ACE_player, _data]] call FUNC(localEvent);
|
||||
};
|
||||
|
||||
// "zeusDisplayChanged" event
|
||||
_data = !(isNull findDisplay 312);
|
||||
if !(_data isEqualTo GVAR(OldZeusDisplayIsOpen)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldZeusDisplayIsOpen) = _data;
|
||||
["zeusDisplayChanged", [ACE_player, _data]] call FUNC(localEvent);
|
||||
};
|
||||
|
||||
// "activeCameraChanged" event
|
||||
_data = call FUNC(isfeatureCameraActive);
|
||||
if !(_data isEqualTo GVAR(OldIsCamera)) then {
|
||||
@ -451,6 +463,7 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
|
||||
{_unit != _target && {vehicle _unit == vehicle _target}}
|
||||
}] call FUNC(addCanInteractWithCondition);
|
||||
|
||||
["isNotInZeus", {isNull curatorCamera}] call FUNC(addCanInteractWithCondition);
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
// Set up PlayerJIP eventhandler
|
||||
|
@ -74,6 +74,7 @@ PREP(getNumberFromMissionSQM);
|
||||
PREP(getNumberMagazinesIn);
|
||||
PREP(getPitchBankYaw);
|
||||
PREP(getSettingData);
|
||||
PREP(getStaminaBarControl);
|
||||
PREP(getStringFromMissionSQM);
|
||||
PREP(getTargetAzimuthAndInclination);
|
||||
PREP(getTargetDistance);
|
||||
@ -168,6 +169,7 @@ PREP(setVariableJIP);
|
||||
PREP(setVariablePublic);
|
||||
PREP(setVolume);
|
||||
PREP(sortAlphabeticallyBy);
|
||||
PREP(showHud);
|
||||
PREP(stringCompare);
|
||||
PREP(stringToColoredText);
|
||||
PREP(stringRemoveWhiteSpace);
|
||||
@ -292,6 +294,7 @@ PREP(hashListSet);
|
||||
PREP(hashListPush);
|
||||
|
||||
GVAR(syncedEvents) = HASH_CREATE;
|
||||
GVAR(showHudHash) = [] call FUNC(hashCreate);
|
||||
|
||||
//GVARS for execNextFrame and waitAndExec and waitUntilAndExecute
|
||||
GVAR(waitAndExecArray) = [];
|
||||
@ -326,8 +329,7 @@ if (hasInterface) then {
|
||||
// PFH to update the ACE_player variable
|
||||
GVAR(PreInit_playerChanged_PFHID) = [{
|
||||
if !(ACE_player isEqualTo (call FUNC(player))) then {
|
||||
private ["_oldPlayer"];
|
||||
_oldPlayer = ACE_player;
|
||||
private _oldPlayer = ACE_player;
|
||||
|
||||
ACE_player = call FUNC(player);
|
||||
uiNamespace setVariable ["ACE_player", ACE_player];
|
||||
|
@ -88,7 +88,7 @@ class CfgUIGrids {
|
||||
// check dll
|
||||
class RscStandardDisplay;
|
||||
class RscDisplayMain: RscStandardDisplay {
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayMain"",'GUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_5('header','tail',{0},{},_this select 0)] call COMPILE_FILE(functions\fnc_errorMessage));
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscDisplayMain"",'GUI')] call (uinamespace getVariable 'BIS_fnc_initDisplay'); [ARR_5('header','tail',{0},{},_this select 0)] call COMPILE_FILE(functions\fnc_errorMessage));
|
||||
};
|
||||
*/
|
||||
|
||||
|
@ -116,9 +116,9 @@ class ACE_gui_editBase
|
||||
};
|
||||
colorSelection[] =
|
||||
{
|
||||
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])",
|
||||
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])",
|
||||
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",
|
||||
"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.3843])",
|
||||
"(profilenamespace getVariable ['GUI_BCG_RGB_G',0.7019])",
|
||||
"(profilenamespace getVariable ['GUI_BCG_RGB_B',0.8862])",
|
||||
1
|
||||
};
|
||||
autocomplete = "";
|
||||
@ -249,7 +249,7 @@ class ACE_gui_listBoxBase : RscListBox{
|
||||
colorSelect2[] = {0.95, 0.95, 0.95, 1};
|
||||
colorSelectBackground[] = {0, 0, 0, 1};
|
||||
colorSelectBackground2[] = {0.543, 0.5742, 0.4102, 1.0};
|
||||
colorDisabled[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", 0.25};
|
||||
colorDisabled[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", 0.25};
|
||||
period = 1.2;
|
||||
rowHeight = 0.03;
|
||||
colorBackground[] = {0, 0, 0, 1};
|
||||
@ -505,7 +505,7 @@ onMouseButtonDblClick = "";
|
||||
iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa";
|
||||
iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa";
|
||||
iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_CA.paa";
|
||||
color[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])"};
|
||||
color[] = {"(profilenamespace getVariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getVariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getVariable ['IGUI_TEXT_RGB_A',0.8])"};
|
||||
colorCreated[] = {1,1,1,1};
|
||||
colorCanceled[] = {0.7,0.7,0.7,1};
|
||||
colorDone[] = {0.7,1,0.3,1};
|
||||
|
@ -16,15 +16,12 @@ params ["_eventType", "_event"];
|
||||
|
||||
if (_eventType == "ACEg") then {
|
||||
_event params ["_eventName", "_eventArgs"];
|
||||
GVAR(events) params ["_eventNames"];
|
||||
|
||||
private ["_eventNames", "_eventIndex"];
|
||||
|
||||
_eventNames = GVAR(events) select 0;
|
||||
_eventIndex = _eventNames find _eventName;
|
||||
private _eventIndex = _eventNames find _eventName;
|
||||
|
||||
if (_eventIndex != -1) then {
|
||||
private "_events";
|
||||
_events = (GVAR(events) select 1) select _eventIndex;
|
||||
private _events = (GVAR(events) select 1) select _eventIndex;
|
||||
|
||||
#ifdef DEBUG_EVENTS
|
||||
ACE_LOGINFO_1("* Net Event %1",_eventName);
|
||||
@ -46,9 +43,8 @@ if (_eventType == "ACEc") then {
|
||||
if (isServer) then {
|
||||
_event params ["_eventName", "_eventTargets", "_eventArgs"];
|
||||
|
||||
private ["_sentEvents", "_owner", "_serverFlagged"];
|
||||
private _sentEvents = [];
|
||||
|
||||
_sentEvents = [];
|
||||
if (!IS_ARRAY(_eventTargets)) then {
|
||||
_eventTargets = [_eventTargets];
|
||||
};
|
||||
@ -59,9 +55,11 @@ if (_eventType == "ACEc") then {
|
||||
["ACEg", ACEg] call FUNC(_handleNetEvent);
|
||||
};
|
||||
|
||||
_serverFlagged = false;
|
||||
private _serverFlagged = false;
|
||||
|
||||
{
|
||||
_owner = _x;
|
||||
private _owner = _x;
|
||||
|
||||
if (IS_OBJECT(_x)) then {
|
||||
_owner = owner _x;
|
||||
};
|
||||
|
@ -15,10 +15,8 @@
|
||||
params ["_client"];
|
||||
|
||||
{
|
||||
private ["_eventEntry", "_eventLog"];
|
||||
|
||||
_eventEntry = HASH_GET(GVAR(syncedEvents),_x);
|
||||
_eventLog = _eventEntry select 1;
|
||||
private _eventEntry = HASH_GET(GVAR(syncedEvents),_x);
|
||||
_eventEntry params ["", "_eventLog"];
|
||||
|
||||
["SEH_s", _client, [_x, _eventLog]] call FUNC(targetEvent);
|
||||
false
|
||||
|
@ -27,10 +27,8 @@ if (isServer) then {
|
||||
false
|
||||
};
|
||||
|
||||
private ["_eventEntry", "_eventLog"];
|
||||
|
||||
_eventEntry = HASH_GET(GVAR(syncedEvents),_eventName);
|
||||
_eventLog = _eventEntry select 1;
|
||||
private _eventEntry = HASH_GET(GVAR(syncedEvents),_eventName);
|
||||
_eventEntry params ["", "_eventLog"];
|
||||
|
||||
["SEH_s", _client, [_eventName, _eventLog]] call FUNC(targetEvent);
|
||||
} else {
|
||||
|
@ -21,20 +21,17 @@ if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
false
|
||||
};
|
||||
|
||||
private ["_internalData", "_eventCode"];
|
||||
|
||||
_internalData = HASH_GET(GVAR(syncedEvents),_name);
|
||||
private _internalData = HASH_GET(GVAR(syncedEvents),_name);
|
||||
|
||||
if (isServer) then {
|
||||
// Server needs to internally log it for synchronization
|
||||
if (_ttl > -1) then {
|
||||
_internalData = HASH_GET(GVAR(syncedEvents),_name);
|
||||
|
||||
private "_eventLog";
|
||||
_eventLog = _internalData select 1;
|
||||
_eventLog pushback [ACE_diagTime, _args, _ttl];
|
||||
_internalData params ["", "_eventLog"];
|
||||
_eventLog pushBack [ACE_diagTime, _args, _ttl];
|
||||
};
|
||||
};
|
||||
|
||||
_eventCode = _internalData select 0;
|
||||
_internalData params ["_eventCode"];
|
||||
_args call _eventCode;
|
||||
|
@ -17,18 +17,16 @@
|
||||
|
||||
params ["_unit", "_action", "_condition", "_statement"];
|
||||
|
||||
if (typeName _condition == "STRING") then {
|
||||
if (_condition isEqualType "") then {
|
||||
_condition = compile _condition;
|
||||
};
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
if (_statement isEqualType "") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
private ["_name", "_actionsVar"];
|
||||
|
||||
_name = format ["ACE_Action_%1", _action];
|
||||
_actionsVar = _unit getVariable [_name, [-1, [-1, [], []], objNull]];
|
||||
private _name = format ["ACE_Action_%1", _action];
|
||||
private _actionsVar = _unit getVariable [_name, [-1, [-1, [], []], objNull]];
|
||||
|
||||
if (_unit != _actionsVar select 2) then { // check if the unit is still valid, fixes respawn issues
|
||||
_actionsVar = [-1, [-1, [], []], objNull];
|
||||
@ -44,8 +42,7 @@ _actions pushBack [_condition, _statement];
|
||||
|
||||
// first action to add, unit needs addAction command
|
||||
if (_actionID == -1) then {
|
||||
private "_addAction";
|
||||
_addAction = call compile format [
|
||||
private _addAction = call compile format [
|
||||
"[
|
||||
'',
|
||||
{if (inputAction '%1' == 0) exitWith {}; {if (_this call (_x select 0)) then {_this call (_x select 1)}} forEach (((_this select 0) getVariable '%2') select 1 select 2)},
|
||||
|
@ -21,39 +21,35 @@
|
||||
|
||||
params ["_unit", "_displayName", "_action", "_condition", "_statement", "_condition2", "_statement2", ["_priority", 0]];
|
||||
|
||||
if (typeName _condition == "STRING") then {
|
||||
if (_condition isEqualType "") then {
|
||||
_condition = compile _condition;
|
||||
};
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
if (_statement isEqualType "") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
if (typeName _condition2 == "STRING") then {
|
||||
if (_condition2 isEqualType "") then {
|
||||
_condition2 = compile _condition2;
|
||||
};
|
||||
|
||||
if (typeName _statement2 == "STRING") then {
|
||||
if (_statement2 isEqualType "") then {
|
||||
_statement2 = compile _statement2;
|
||||
};
|
||||
|
||||
private ["_name", "_actionsVar"];
|
||||
|
||||
_name = format ["ACE_ActionMenu_%1", _action];
|
||||
_actionsVar = _unit getVariable [_name, [-1, [], []]];
|
||||
private _name = format ["ACE_ActionMenu_%1", _action];
|
||||
private _actionsVar = _unit getVariable [_name, [-1, [], []]];
|
||||
|
||||
_actionsVar params ["_id", "_actionIDs", "_actions"];
|
||||
|
||||
_id = _id + 1;
|
||||
|
||||
private ["_nameVar", "_addAction", "_actionID"];
|
||||
|
||||
_nameVar = format ["%1_ID%2", _name, _id];
|
||||
private _nameVar = format ["%1_ID%2", _name, _id];
|
||||
missionNamespace setVariable [_nameVar, [_condition, _statement, _condition2, _statement2]];
|
||||
|
||||
_actionIDs pushBack _id;
|
||||
|
||||
_addAction = call compile format [
|
||||
private _addAction = call compile format [
|
||||
"[
|
||||
'%2',
|
||||
{if (inputAction '%1' == 0) then {if (_this call (%3 select 2)) then {_this call (%3 select 3)}} else {_this call (%3 select 1)}},
|
||||
@ -70,7 +66,7 @@ _addAction = call compile format [
|
||||
_priority
|
||||
];
|
||||
|
||||
_actionID = _unit addAction _addAction;
|
||||
private _actionID = _unit addAction _addAction;
|
||||
|
||||
_actions pushBack [_actionID, _nameVar];
|
||||
|
||||
|
@ -17,12 +17,10 @@ params ["_conditionName", "_conditionFunc"];
|
||||
|
||||
_conditionName = toLower _conditionName;
|
||||
|
||||
private ["_conditions", "_index"];
|
||||
|
||||
_conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]];
|
||||
private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]];
|
||||
_conditions params ["_conditionNames", "_conditionFuncs"];
|
||||
|
||||
_index = _conditionNames find _conditionName;
|
||||
private _index = _conditionNames find _conditionName;
|
||||
|
||||
if (_index == -1) then {
|
||||
_index = count _conditionNames;
|
||||
|
@ -13,11 +13,10 @@
|
||||
|
||||
disableSerialization;
|
||||
|
||||
private "_dlg";
|
||||
_dlg = ctrlParent _this;
|
||||
private _dlg = ctrlParent _this;
|
||||
|
||||
_dlg displayAddEventHandler ["unload", {
|
||||
if (_this select 1 == 1) then {
|
||||
[missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call FUNC(fixCrateContent);
|
||||
[missionnamespace getVariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call FUNC(fixCrateContent);
|
||||
};
|
||||
}];
|
||||
|
@ -15,17 +15,15 @@
|
||||
|
||||
params ["_eventName", "_eventCode"];
|
||||
|
||||
private ["_eventNames", "_eventFunctions", "_eventIndex"];
|
||||
GVAR(events) params ["_eventNames"];
|
||||
|
||||
_eventNames = GVAR(events) select 0;
|
||||
_eventFunctions = [];
|
||||
_eventIndex = _eventNames find _eventName;
|
||||
private _eventFunctions = [];
|
||||
private _eventIndex = _eventNames find _eventName;
|
||||
|
||||
if (_eventIndex != -1) then {
|
||||
_eventFunctions = (GVAR(events) select 1) select _eventIndex;
|
||||
} else {
|
||||
private "_eventNameCount";
|
||||
_eventNameCount = count _eventNames;
|
||||
private _eventNameCount = count _eventNames;
|
||||
|
||||
_eventNames set [_eventNameCount, _eventName];
|
||||
(GVAR(events) select 1) set [_eventNameCount, _eventFunctions];
|
||||
|
@ -14,12 +14,11 @@
|
||||
|
||||
params ["_statement"];
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
if (_statement isEqualType "") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
private "_actionsVar";
|
||||
_actionsVar = missionNamespace getVariable ["ACE_EventHandler_MapMarker", [-1, [], []]];
|
||||
private _actionsVar = missionNamespace getVariable ["ACE_EventHandler_MapMarker", [-1, [], []]];
|
||||
|
||||
_actionsVar params ["_id", "_actionIDs", "_actions"];
|
||||
|
||||
|
@ -15,12 +15,11 @@
|
||||
|
||||
params ["_statement"];
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
if (_statement isEqualType "") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
private "_actionsVar";
|
||||
_actionsVar = missionNamespace getVariable ["ACE_EventHandler_ScrollWheel", [-1, [], []]];
|
||||
private _actionsVar = missionNamespace getVariable ["ACE_EventHandler_ScrollWheel", [-1, [], []]];
|
||||
|
||||
_actionsVar params ["_id", "_actionIDs", "_actions"];
|
||||
|
||||
|
@ -22,8 +22,7 @@
|
||||
|
||||
params ["_name", "", "", "", "", "", "", "_value"]; //["_name", "_typeName", "_isClientSetable", "_localizedName", "_localizedDescription", "_possibleValues", "_isForced", "_value"];
|
||||
|
||||
private "_settingData";
|
||||
_settingData = [_name] call FUNC(getSettingData);
|
||||
private _settingData = [_name] call FUNC(getSettingData);
|
||||
|
||||
// Exit if the setting already exists
|
||||
if (count _settingData > 0) exitWith {};
|
||||
|
@ -21,9 +21,7 @@ if (HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
false
|
||||
};
|
||||
|
||||
private ["_eventId", "_data"];
|
||||
|
||||
_eventId = [_name, FUNC(_handleSyncedEvent)] call FUNC(addEventHandler);
|
||||
_data = [_handler, [], _ttl, _eventId];
|
||||
private _eventId = [_name, FUNC(_handleSyncedEvent)] call FUNC(addEventHandler);
|
||||
private _data = [_handler, [], _ttl, _eventId];
|
||||
|
||||
HASH_SET(GVAR(syncedEvents),_name,_data);
|
||||
|
@ -18,9 +18,9 @@
|
||||
|
||||
params ["_unit", "_classname", ["_container", ""], ["_ammoCount", -1]];
|
||||
|
||||
private ["_type", "_canAdd", "_addedToUnit"];
|
||||
private _type = _classname call FUNC(getItemType);
|
||||
|
||||
_type = [_classname] call FUNC(getItemType);
|
||||
private ["_canAdd", "_addedToUnit"];
|
||||
|
||||
switch (_container) do {
|
||||
case "vest": {
|
||||
@ -59,8 +59,7 @@ switch (_type select 0) do {
|
||||
} else {
|
||||
_addedToUnit = false;
|
||||
|
||||
private "_pos";
|
||||
_pos = _unit modelToWorldVisual [0,1,0.05];
|
||||
private _pos = _unit modelToWorldVisual [0,1,0.05];
|
||||
|
||||
_unit = createVehicle ["WeaponHolder_Single_F", _pos, [], 0, "NONE"];
|
||||
_unit addWeaponCargoGlobal [_classname, 1];
|
||||
@ -93,8 +92,7 @@ switch (_type select 0) do {
|
||||
} else {
|
||||
_addedToUnit = false;
|
||||
|
||||
private "_pos";
|
||||
_pos = _unit modelToWorldVisual [0,1,0.05];
|
||||
private _pos = _unit modelToWorldVisual [0,1,0.05];
|
||||
|
||||
_unit = createVehicle ["WeaponHolder_Single_F", _pos, [], 0, "NONE"];
|
||||
_unit addMagazineCargoGlobal [_classname, 1/*_ammoCount*/]; //@todo Bug! This isn't really the ammo, but magazine count. No such command.
|
||||
@ -123,8 +121,7 @@ switch (_type select 0) do {
|
||||
} else {
|
||||
_addedToUnit = false;
|
||||
|
||||
private "_pos";
|
||||
_pos = _unit modelToWorldVisual [0,1,0.05];
|
||||
private _pos = _unit modelToWorldVisual [0,1,0.05];
|
||||
|
||||
_unit = createVehicle ["WeaponHolder_Single_F", _pos, [], 0, "NONE"];
|
||||
_unit addItemCargoGlobal [_classname, 1];
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private "_forceWalkNumber";
|
||||
_forceWalkNumber = _unit getVariable ["ACE_forceWalkStatusNumber", 0];
|
||||
private _forceWalkNumber = _unit getVariable ["ACE_forceWalkStatusNumber", 0];
|
||||
|
||||
_unit forceWalk (_forceWalkNumber > 0);
|
||||
|
@ -22,14 +22,14 @@
|
||||
|
||||
params ["_list", "_variable", "_setting", "_global", ["_vehicle", false]];
|
||||
|
||||
if (typeName _list == "STRING") then {
|
||||
if (_list isEqualType "") then {
|
||||
_list = [_list, true, true] call FUNC(parseList);
|
||||
TRACE_1("Parsed",_list)
|
||||
};
|
||||
|
||||
{
|
||||
if (!isNil "_x") then {
|
||||
if (typeName _x == typeName objNull) then {
|
||||
if (_x isEqualType objNull) then {
|
||||
if (local _x) then {
|
||||
if (_vehicle) then {
|
||||
(vehicle _x) setVariable [_variable, _setting, _global];
|
||||
@ -41,4 +41,5 @@ if (typeName _list == "STRING") then {
|
||||
};
|
||||
};
|
||||
};
|
||||
false
|
||||
} count _list;
|
||||
|
@ -12,13 +12,11 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_config";
|
||||
|
||||
ACE_isMapEnabled = call {_config = missionConfigFile >> "showMap"; !isNumber _config || {getNumber _config == 1}}; // default value is 1, so do isNumber check first
|
||||
ACE_isCompassEnabled = call {_config = missionConfigFile >> "showCompass"; !isNumber _config || {getNumber _config == 1}};
|
||||
ACE_isWatchEnabled = call {_config = missionConfigFile >> "showWatch"; !isNumber _config || {getNumber _config == 1}};
|
||||
ACE_isRadioEnabled = call {_config = missionConfigFile >> "showRadio"; !isNumber _config || {getNumber _config == 1}};
|
||||
ACE_isGPSEnabled = call {_config = missionConfigFile >> "showGPS"; !isNumber _config || {getNumber _config == 1}};
|
||||
ACE_isMapEnabled = call {private _config = missionConfigFile >> "showMap"; !isNumber _config || {getNumber _config == 1}}; // default value is 1, so do isNumber check first
|
||||
ACE_isCompassEnabled = call {private _config = missionConfigFile >> "showCompass"; !isNumber _config || {getNumber _config == 1}};
|
||||
ACE_isWatchEnabled = call {private _config = missionConfigFile >> "showWatch"; !isNumber _config || {getNumber _config == 1}};
|
||||
ACE_isRadioEnabled = call {private _config = missionConfigFile >> "showRadio"; !isNumber _config || {getNumber _config == 1}};
|
||||
ACE_isGPSEnabled = call {private _config = missionConfigFile >> "showGPS"; !isNumber _config || {getNumber _config == 1}};
|
||||
|
||||
GVAR(AssignedItems) = [];
|
||||
GVAR(AssignedItemsInfo) = [];
|
||||
|
@ -17,19 +17,17 @@ params ["_number", ["_minLength", 8]];
|
||||
|
||||
_number = round _number;
|
||||
|
||||
private ["_array", "_index", "_rest"];
|
||||
|
||||
_array = [];
|
||||
private _array = [];
|
||||
_array resize _minLength;
|
||||
|
||||
for "_index" from 0 to (_minLength - 1) do {
|
||||
_array set [_index, false];
|
||||
};
|
||||
|
||||
_index = 0;
|
||||
private _index = 0;
|
||||
|
||||
while {_number > 0} do {
|
||||
_rest = _number mod 2;
|
||||
private _rest = _number mod 2;
|
||||
_number = floor (_number / 2);
|
||||
|
||||
_array set [_index, _rest == 1];
|
||||
|
@ -9,32 +9,24 @@
|
||||
* Magazine of the units binocular <STRING>
|
||||
*
|
||||
* Example:
|
||||
* [player] call ace_common_fnc_binocularMagazine
|
||||
* player call ace_common_fnc_binocularMagazine
|
||||
*
|
||||
* Public: Yes
|
||||
*
|
||||
* Note: Doesn't work on dead units
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
params [["_unit", objNull, [objNull]]];
|
||||
|
||||
private ["_binocular", "_muzzle", "_mode", "_magazine"];
|
||||
private _binocular = binocular _unit;
|
||||
|
||||
_binocular = binocular _unit;
|
||||
scopeName "main";
|
||||
|
||||
if (_binocular == "") exitWith {""};
|
||||
{
|
||||
if ((_x select 0) isEqualTo _binocular) then {
|
||||
// note: if there is no magazine, _x(4,0) will be nil, which skips the breakOut.
|
||||
(_x select 4 select 0) breakOut "main";
|
||||
};
|
||||
false
|
||||
} count weaponsitems _unit;
|
||||
|
||||
_muzzle = currentMuzzle _unit;
|
||||
_mode = currentWeaponMode _unit;
|
||||
|
||||
_unit selectWeapon _binocular;
|
||||
|
||||
// didn't select the binocular (unit probably dead or not local). function won't work. quit with empty string
|
||||
if (currentWeapon _unit != _binocular) exitWith {""};
|
||||
|
||||
_magazine = currentMagazine _unit;
|
||||
|
||||
[_unit, _muzzle, _mode] call FUNC(selectWeaponMode);
|
||||
|
||||
_magazine
|
||||
""
|
||||
|
@ -16,7 +16,7 @@ if (!hasInterface) exitWith {};
|
||||
|
||||
params ["_id", ["_show", false]];
|
||||
|
||||
if (typeName _show == "SCALAR") then {
|
||||
if (_show isEqualType 0) then {
|
||||
_show = _show == 1;
|
||||
};
|
||||
|
||||
@ -28,7 +28,7 @@ if (_show) then {
|
||||
GVAR(SHOW_BLUR_SCREEN_COLLECTION) pushBack _id;
|
||||
|
||||
// show blur
|
||||
if (isnil QGVAR(MENU_ppHandle_GUI_BLUR_SCREEN)) then {
|
||||
if (isNil QGVAR(MENU_ppHandle_GUI_BLUR_SCREEN)) then {
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) = ppEffectCreate ["DynamicBlur", 102];
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectAdjust [0.9];
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectEnable true;
|
||||
|
@ -24,10 +24,8 @@ if ((_namespace getVariable [_uid, [-99999]]) select 0 < ACE_diagTime) then {
|
||||
|
||||
// Does the cache needs to be cleared on an event?
|
||||
if (!isNil "_event") then {
|
||||
private ["_varName", "_cacheList"];
|
||||
|
||||
_varName = format [QGVAR(clearCache_%1), _event];
|
||||
_cacheList = missionNamespace getVariable _varName;
|
||||
private _varName = format [QGVAR(clearCache_%1), _event];
|
||||
private _cacheList = missionNamespace getVariable _varName;
|
||||
|
||||
// If there was no EH to clear these caches, add one
|
||||
if (isNil "_cacheList") then {
|
||||
@ -35,14 +33,13 @@ if ((_namespace getVariable [_uid, [-99999]]) select 0 < ACE_diagTime) then {
|
||||
missionNamespace setVariable [_varName, _cacheList];
|
||||
|
||||
[_event, {
|
||||
private ["_varName", "_cacheList"];
|
||||
// _eventName is defined on the function that calls the event
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
ACE_LOGINFO_1("Clear cached variables on event: %1",_eventName);
|
||||
#endif
|
||||
// Get the list of caches to clear
|
||||
_varName = format [QGVAR(clearCache_%1), _eventName];
|
||||
_cacheList = missionNamespace getVariable [_varName, []];
|
||||
private _varName = format [QGVAR(clearCache_%1), _eventName];
|
||||
private _cacheList = missionNamespace getVariable [_varName, []];
|
||||
// Erase all the cached results
|
||||
{
|
||||
_x call FUNC(eraseCache);
|
||||
|
@ -27,19 +27,19 @@ _position = toLower _position;
|
||||
// general
|
||||
if (!alive _vehicle || {locked _vehicle > 1}) exitWith {false};
|
||||
|
||||
private ["_config", "_turret", "_radius", "_selectionPosition", "_selectionPosition2", "_enemiesInVehicle", "_return"];
|
||||
private ["_selectionPosition", "_selectionPosition2"];
|
||||
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
_turret = [];
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _turret = [];
|
||||
|
||||
_radius = 0;
|
||||
private _radius = 0;
|
||||
|
||||
_enemiesInVehicle = false; //Possible Side Restriction
|
||||
private _enemiesInVehicle = false; //Possible Side Restriction
|
||||
{
|
||||
if (side _unit getFriend side _x < 0.6) exitWith {_enemiesInVehicle = true};
|
||||
} forEach crew _vehicle;
|
||||
|
||||
_return = false;
|
||||
private _return = false;
|
||||
switch (_position) do {
|
||||
case "driver" : {
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
@ -60,11 +60,10 @@ switch (_position) do {
|
||||
};
|
||||
|
||||
case "gunner" : {
|
||||
private "_turretConfig";
|
||||
_turret = [_vehicle] call FUNC(getTurretGunner);
|
||||
if (_turret isEqualTo []) exitWith {false};
|
||||
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
private _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
@ -73,11 +72,10 @@ switch (_position) do {
|
||||
};
|
||||
|
||||
case "commander" : {
|
||||
private "_turretConfig";
|
||||
_turret = [_vehicle] call FUNC(getTurretCommander);
|
||||
if (_turret isEqualTo []) exitWith {false};
|
||||
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
private _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
@ -86,11 +84,10 @@ switch (_position) do {
|
||||
};
|
||||
|
||||
case "copilot" : {
|
||||
private "_turretConfig";
|
||||
_turret = [_vehicle] call FUNC(getTurretCopilot);
|
||||
if (_turret isEqualTo []) exitWith {false};
|
||||
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
private _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
@ -99,13 +96,12 @@ switch (_position) do {
|
||||
};
|
||||
|
||||
case "turret" : {
|
||||
private ["_turrets", "_turretConfig"];
|
||||
_turrets = [_vehicle] call FUNC(getTurretsOther);
|
||||
private _turrets = [_vehicle] call FUNC(getTurretsOther);
|
||||
|
||||
if (_index != -1 && {_turret = _turrets select _index;
|
||||
CANGETINTURRETINDEX
|
||||
}) then {
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
private _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
@ -115,7 +111,7 @@ switch (_position) do {
|
||||
for "_index" from 0 to (count _turrets - 1) do {
|
||||
_turret = _turrets select _index;
|
||||
if (CANGETINTURRETINDEX) exitWith {
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
private _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
@ -127,13 +123,12 @@ switch (_position) do {
|
||||
};
|
||||
|
||||
case "ffv" : {
|
||||
private ["_turrets", "_turretConfig"];
|
||||
_turrets = [_vehicle] call FUNC(getTurretsFFV);
|
||||
private _turrets = [_vehicle] call FUNC(getTurretsFFV);
|
||||
|
||||
if (_index != -1 && {_turret = _turrets select _index;
|
||||
CANGETINTURRETINDEX
|
||||
}) then {
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
private _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
@ -143,7 +138,7 @@ switch (_position) do {
|
||||
for "_index" from 0 to (count _turrets - 1) do {
|
||||
_turret = _turrets select _index;
|
||||
if (CANGETINTURRETINDEX) exitWith {
|
||||
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
private _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
_radius = getNumber (_config >> "getInRadius");
|
||||
_selectionPosition = _vehicle selectionPosition (getText (_turretConfig >> "memoryPointsGetInGunner"));
|
||||
@ -155,8 +150,7 @@ switch (_position) do {
|
||||
};
|
||||
|
||||
case "codriver" : {
|
||||
private "_positions";
|
||||
_positions = [typeOf _vehicle] call FUNC(getVehicleCodriver);
|
||||
private _positions = [typeOf _vehicle] call FUNC(getVehicleCodriver);
|
||||
|
||||
{
|
||||
if (alive _x) then {_positions deleteAt (_positions find (_vehicle getCargoIndex _x))};
|
||||
@ -189,8 +183,7 @@ switch (_position) do {
|
||||
};
|
||||
|
||||
case "cargo" : {
|
||||
private "_positions";
|
||||
_positions = [typeOf _vehicle] call FUNC(getVehicleCargo);
|
||||
private _positions = [typeOf _vehicle] call FUNC(getVehicleCargo);
|
||||
|
||||
{
|
||||
if (alive _x) then {_positions deleteAt (_positions find (_vehicle getCargoIndex _x))};
|
||||
@ -226,14 +219,11 @@ switch (_position) do {
|
||||
default {};
|
||||
};
|
||||
|
||||
private "_fnc_isInRange";
|
||||
_fnc_isInRange = {
|
||||
private _fnc_isInRange = {
|
||||
if (_radius == 0) exitWith {true};
|
||||
|
||||
private ["_unitPosition", "_distance"];
|
||||
_unitPosition = getPos _unit;
|
||||
|
||||
_distance = _unitPosition distance (_vehicle modelToWorldVisual _selectionPosition);
|
||||
private _unitPosition = getPos _unit;
|
||||
private _distance = _unitPosition distance (_vehicle modelToWorldVisual _selectionPosition);
|
||||
|
||||
if (!isNil "_selectionPosition2") then {
|
||||
_distance = _distance min (_unitPosition distance (_vehicle modelToWorldVisual _selectionPosition2));
|
||||
|
@ -18,20 +18,17 @@ params ["_unit", "_target", ["_exceptions", []]];
|
||||
|
||||
_exceptions = [_exceptions, {toLower _this}] call FUNC(map);
|
||||
|
||||
private "_owner";
|
||||
_owner = _target getVariable [QGVAR(owner), objNull];
|
||||
private _owner = _target getVariable [QGVAR(owner), objNull];
|
||||
|
||||
// exit if the target is not free to interact
|
||||
if (!isNull _owner && {_unit != _owner}) exitWith {false};
|
||||
|
||||
// check general conditions
|
||||
private ["_conditions", "_canInteract"];
|
||||
|
||||
_conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]];
|
||||
|
||||
private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]];
|
||||
_conditions params ["_conditionNames", "_conditionFuncs"];
|
||||
|
||||
_canInteract = true;
|
||||
private _canInteract = true;
|
||||
|
||||
{
|
||||
if (!(_x in _exceptions) && {!([_unit, _target] call (_conditionFuncs select _forEachIndex))}) exitWith {
|
||||
_canInteract = false;
|
||||
|
@ -13,12 +13,11 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
params [["_unit", objNull, [objNull]]];
|
||||
|
||||
if (_unit == vehicle _unit) exitWith {true};
|
||||
|
||||
private "_config";
|
||||
_config = configFile >> "CfgMovesMaleSdr" >> "States" >> animationState _unit;
|
||||
private _config = configFile >> "CfgMovesMaleSdr" >> "States" >> animationState _unit;
|
||||
|
||||
isClass _config
|
||||
&& {getNumber (_config >> "canPullTrigger") == 1}
|
||||
|
@ -17,14 +17,12 @@
|
||||
|
||||
params ["_projectile", "_adjustDir", "_adjustUp", ["_adjustSpeed",0]];
|
||||
|
||||
private ["_vdir", "_dir", "_up", "_vlat", "_vup", "_vel"];
|
||||
|
||||
// get old direction vector
|
||||
_vdir = vectorNormalized velocity _projectile;
|
||||
private _vdir = vectorNormalized velocity _projectile;
|
||||
|
||||
// get azimuth and inclination and apply corrections
|
||||
_dir = (_vdir select 0) atan2 (_vdir select 1) + _adjustDir;
|
||||
_up = asin (_vdir select 2) + _adjustUp;
|
||||
private _dir = (_vdir select 0) atan2 (_vdir select 1) + _adjustDir;
|
||||
private _up = asin (_vdir select 2) + _adjustUp;
|
||||
|
||||
// get new direction vector (this is a unit vector)
|
||||
_vdir = [
|
||||
@ -34,11 +32,11 @@ _vdir = [
|
||||
];
|
||||
|
||||
// get best up vector
|
||||
_vlat = vectorNormalized (_vdir vectorCrossProduct [0,0,1]);
|
||||
_vup = _vlat vectorCrossProduct _vdir;
|
||||
private _vlat = vectorNormalized (_vdir vectorCrossProduct [0,0,1]);
|
||||
private _vup = _vlat vectorCrossProduct _vdir;
|
||||
|
||||
// get new speed vector. Keep total speed, but change to new direction. Yay for vector commands.
|
||||
_vel = _vdir vectorMultiply (_adjustSpeed + vectorMagnitude velocity _projectile);
|
||||
private _vel = _vdir vectorMultiply (_adjustSpeed + vectorMagnitude velocity _projectile);
|
||||
|
||||
// set projectile direction dir and up. Projectiles are long objects, especially with tracers, so it would look dumb otherwise.
|
||||
_projectile setVectorDirAndUp [_vdir, _vup];
|
||||
|
@ -15,21 +15,18 @@
|
||||
///////////////
|
||||
// check addons
|
||||
///////////////
|
||||
private "_version";
|
||||
_version = getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr");
|
||||
private _version = getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr");
|
||||
|
||||
ACE_LOGINFO_1("ACE is version %1.",_version);
|
||||
|
||||
private "_addons";
|
||||
//_addons = activatedAddons; // broken with High-Command module, see #2134
|
||||
_addons = "true" configClasses (configFile >> "CfgPatches");//
|
||||
//private _addons = activatedAddons; // broken with High-Command module, see #2134
|
||||
private _addons = "true" configClasses (configFile >> "CfgPatches");//
|
||||
_addons = [_addons, {toLower configName _this}] call FUNC(map);//
|
||||
_addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
|
||||
|
||||
{
|
||||
if (getText (configFile >> "CfgPatches" >> _x >> "versionStr") != _version) then {
|
||||
private "_errorMsg";
|
||||
_errorMsg = format ["File %1.pbo is outdated.", _x];
|
||||
private _errorMsg = format ["File %1.pbo is outdated.", _x];
|
||||
|
||||
ACE_LOGERROR(_errorMsg);
|
||||
|
||||
@ -44,12 +41,10 @@ _addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
|
||||
// check dlls
|
||||
///////////////
|
||||
{
|
||||
private "_versionEx";
|
||||
_versionEx = _x callExtension "version";
|
||||
private _versionEx = _x callExtension "version";
|
||||
|
||||
if (_versionEx == "") then {
|
||||
private "_errorMsg";
|
||||
_errorMsg = format ["Extension %1.dll not installed.", _x];
|
||||
private _errorMsg = format ["Extension %1.dll not installed.", _x];
|
||||
|
||||
ACE_LOGERROR(_errorMsg);
|
||||
|
||||
@ -84,8 +79,7 @@ if (isMultiplayer) then {
|
||||
(_this select 0) params ["_version", "_addons"];
|
||||
|
||||
if (_version != GVAR(ServerVersion)) then {
|
||||
private "_errorMsg";
|
||||
_errorMsg = format ["Client/Server Version Mismatch. Server: %1, Client: %2.", GVAR(ServerVersion), _version];
|
||||
private _errorMsg = format ["Client/Server Version Mismatch. Server: %1, Client: %2.", GVAR(ServerVersion), _version];
|
||||
|
||||
ACE_LOGERROR(_errorMsg);
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
* 1 = Warn permanently
|
||||
* 2 = Kick
|
||||
* 1: Check all PBOs? (default: false) <BOOL>
|
||||
* 2: Whitelist (default: "[]") <STRING>
|
||||
* 2: Whitelist (default: "") <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
@ -18,9 +18,13 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_mode", ["_checkAll", false], ["_whitelist", "[]"]];
|
||||
params ["_mode", ["_checkAll", false], ["_whitelist", "", [""]]];
|
||||
TRACE_3("params",_mode,_checkAll,_whitelist);
|
||||
|
||||
_whitelist = [_whitelist, {toLower _this}] call FUNC(map);
|
||||
//lowercase and convert whiteList String into array of strings:
|
||||
_whitelist = toLower _whitelist;
|
||||
_whitelist = _whitelist splitString "[,""']";
|
||||
TRACE_1("Array",_whitelist);
|
||||
|
||||
ACE_Version_CheckAll = _checkAll;
|
||||
ACE_Version_Whitelist = _whitelist;
|
||||
@ -37,10 +41,8 @@ if (!isServer) then {
|
||||
|
||||
// Display error message.
|
||||
if (_missingAddon || {_missingAddonServer} || {_oldVersionClient} || {_oldVersionServer}) then {
|
||||
private ["_text", "_error"];
|
||||
|
||||
_text = "[ACE] Version mismatch:<br/><br/>";
|
||||
_error = format ["ACE version mismatch: %1: ", profileName];
|
||||
private _text = "[ACE] Version mismatch:<br/><br/>";
|
||||
private _error = format ["ACE version mismatch: %1: ", profileName];
|
||||
|
||||
if (_missingAddon) then {
|
||||
_text = _text + "Detected missing addon on client<br/>";
|
||||
@ -65,25 +67,29 @@ if (!isServer) then {
|
||||
if (_mode < 2) then {
|
||||
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
||||
|
||||
private ["_rscLayer", "_ctrlHint"];
|
||||
|
||||
_rscLayer = "ACE_RscErrorHint" call BIS_fnc_rscLayer;
|
||||
private _rscLayer = "ACE_RscErrorHint" call BIS_fnc_rscLayer;
|
||||
_rscLayer cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true];
|
||||
|
||||
disableSerialization;
|
||||
_ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint";
|
||||
private _ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint";
|
||||
_ctrlHint ctrlSetStructuredText _text;
|
||||
|
||||
if (_mode == 0) then {
|
||||
sleep 10;
|
||||
_rscLayer cutFadeOut 0.2;
|
||||
[{
|
||||
params ["_rscLayer"];
|
||||
TRACE_2("Hiding Error message after 10 seconds",time,_rscLayer);
|
||||
_rscLayer cutFadeOut 0.2;
|
||||
}, [_rscLayer], 10] call FUNC(waitAndExecute);
|
||||
};
|
||||
};
|
||||
|
||||
if (_mode == 2) then {
|
||||
waitUntil {alive player}; // To be able to show list if using checkAll
|
||||
_text = composeText [parseText format ["<t align='center'>%1</t>", _text]];
|
||||
["[ACE] ERROR", _text, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||
[{alive player}, { // To be able to show list if using checkAll
|
||||
params ["_text"];
|
||||
TRACE_2("Player is alive, showing msg and exiting",time,_text);
|
||||
_text = composeText [parseText format ["<t align='center'>%1</t>", _text]];
|
||||
["[ACE] ERROR", _text, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||
}, [_text]] call FUNC(waitUntilAndExecute);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -16,8 +16,7 @@
|
||||
|
||||
params ["_unit", "_target", ["_lockTarget", false]];
|
||||
|
||||
private "_owner";
|
||||
_owner = _target getVariable [QGVAR(owner), objNull];
|
||||
private _owner = _target getVariable [QGVAR(owner), objNull];
|
||||
|
||||
if (!isNull _owner && {!isNull _unit} && {_unit != _owner}) then {
|
||||
ACE_LOGERROR("Claiming already owned object.");
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
params ["_function"];
|
||||
|
||||
if (typeName _function == "STRING") exitWith {_function};
|
||||
if (_function isEqualType "") exitWith {_function};
|
||||
|
||||
_function = toArray str _function;
|
||||
_function deleteAt 0;
|
||||
|
@ -14,10 +14,10 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_v1", "_v2", "_v3"];
|
||||
[_this] params [["_vector", [0,0,1], [[]], 3]];
|
||||
|
||||
_v1 = vectorNormalized _this;
|
||||
_v2 = vectorNormalized (_v1 vectorCrossProduct [0,0,1]);
|
||||
_v3 = _v2 vectorCrossProduct _v1;
|
||||
private _v1 = vectorNormalized _this;
|
||||
private _v2 = vectorNormalized (_v1 vectorCrossProduct [0,0,1]);
|
||||
private _v3 = _v2 vectorCrossProduct _v1;
|
||||
|
||||
[_v1,_v2,_v3]
|
||||
[_v1, _v2, _v3]
|
||||
|
@ -15,8 +15,7 @@
|
||||
#define CHANNELS ["global", "side", "command", "group", "vehicle", "direct"]
|
||||
#define CHANNELS_LOCALIZED [localize "str_channel_global", localize "str_channel_side", localize "str_channel_command", localize "str_channel_group", localize "str_channel_vehicle", localize "str_channel_direct"]
|
||||
|
||||
private "_currentChannel";
|
||||
_currentChannel = currentChannel;
|
||||
private _currentChannel = currentChannel;
|
||||
|
||||
if (_currentChannel < count CHANNELS) then {
|
||||
_currentChannel = CHANNELS select _currentChannel;
|
||||
|
@ -18,20 +18,15 @@
|
||||
|
||||
params ["_msg", ["_level", 2, [0]]];
|
||||
|
||||
private ["_defaultLoglevel", "_defaultLogDisplayLevel"];
|
||||
private _defaultLoglevel = missionNamespace getVariable [QGVAR(LOGLEVEL), DEFAULT_LOGGING_LEVEL];
|
||||
|
||||
_defaultLoglevel = [GVAR(LOGLEVEL), DEFAULT_LOGGING_LEVEL] select isNil QGVAR(LOGLEVEL);
|
||||
if (_defaultLoglevel < 0) exitWith {false};
|
||||
|
||||
if (_defaultLoglevel < 0) exitwith {false};
|
||||
|
||||
_defaultLogDisplayLevel = [GVAR(LOGDISPLAY_LEVEL), DEFAULT_TEXT_DISPLAY] select isNil QGVAR(LOGDISPLAY_LEVEL);
|
||||
private _defaultLogDisplayLevel = [GVAR(LOGDISPLAY_LEVEL), DEFAULT_TEXT_DISPLAY] select isNil QGVAR(LOGDISPLAY_LEVEL);
|
||||
|
||||
if (_level <= _defaultLoglevel) then {
|
||||
private ["_prefix", "_message"];
|
||||
|
||||
_prefix = ["Unknown", "Error", "Warn", "Debug", "Info"] select ([0, 1, 2, 3] find _level + 1);
|
||||
|
||||
_message = format ["[ACE %1] %2", _prefix, _msg];
|
||||
private _prefix = ["Unknown", "Error", "Warn", "Debug", "Info"] select ([0, 1, 2, 3] find _level + 1);
|
||||
private _message = format ["[ACE %1] %2", _prefix, _msg];
|
||||
|
||||
if (_level <= _defaultLogDisplayLevel) then {
|
||||
systemChat _message;
|
||||
|
@ -14,5 +14,5 @@
|
||||
|
||||
params ["_entity"];
|
||||
|
||||
GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getvariable ["logDisplayLevel","4"]);
|
||||
GVAR(LOGLEVEL) = call compile (_entity getvariable ["logLevel","4"]);
|
||||
GVAR(LOGDISPLAY_LEVEL) = call compile (_entity getVariable ["logDisplayLevel","4"]);
|
||||
GVAR(LOGLEVEL) = call compile (_entity getVariable ["logLevel","4"]);
|
||||
|
@ -21,7 +21,7 @@ params ["_name", "_value", "_defaultGlobal", "_category", ["_code", 0], ["_persi
|
||||
|
||||
if (isNil "_defaultGlobal") exitWith {};
|
||||
|
||||
if (typeName _name != "STRING") exitwith {
|
||||
if (!(_name isEqualType "")) exitwith {
|
||||
[format ["Tried to the deinfe a variable with an invalid name: %1 Arguments: %2", _name, _this]] call FUNC(debug);
|
||||
};
|
||||
|
||||
|
@ -18,11 +18,9 @@
|
||||
|
||||
params [["_searchOffsetOrName", 0]];
|
||||
|
||||
private ["_validIndex", "_realIndex"];
|
||||
private _validIndex = -1;
|
||||
|
||||
_validIndex = -1;
|
||||
|
||||
if (typeName _searchOffsetOrName == "STRING") then {
|
||||
if (_searchOffsetOrName isEqualType "") then {
|
||||
{
|
||||
if (_x select 0 == _searchOffsetOrName) exitWith {
|
||||
_validIndex = _forEachIndex;
|
||||
@ -33,7 +31,7 @@ if (typeName _searchOffsetOrName == "STRING") then {
|
||||
_baseIndex = [GVAR(deviceKeyCurrentIndex) + _searchOffsetOrName, 0] select (GVAR(deviceKeyCurrentIndex) == -1);
|
||||
|
||||
for "_offset" from _baseIndex to (count GVAR(deviceKeyHandlingArray) - 1 + _baseIndex) do {
|
||||
_realIndex = _offset % (count GVAR(deviceKeyHandlingArray));
|
||||
private _realIndex = _offset % (count GVAR(deviceKeyHandlingArray));
|
||||
|
||||
if ([] call ((GVAR(deviceKeyHandlingArray) select _realIndex) select 2)) exitWith {
|
||||
_validIndex = _realIndex;
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", "_disable"];
|
||||
params [["_unit", objNull, [objNull]], ["_disable", true, [false]]];
|
||||
|
||||
if (!local _unit) exitWith {};
|
||||
|
||||
|
@ -31,8 +31,7 @@ if (_state) then {
|
||||
closeDialog 0;
|
||||
createDialog QGVAR(DisableMouse_Dialog);
|
||||
|
||||
private "_dlg";
|
||||
_dlg = uiNamespace getVariable QGVAR(dlgDisableMouse);
|
||||
private _dlg = uiNamespace getVariable QGVAR(dlgDisableMouse);
|
||||
|
||||
_dlg displayAddEventHandler ["KeyDown", {
|
||||
params ["", "_key"];
|
||||
@ -42,15 +41,13 @@ if (_state) then {
|
||||
|
||||
disableSerialization;
|
||||
|
||||
private ["_dlg", "_ctrl"];
|
||||
|
||||
_dlg = findDisplay 49;
|
||||
private _dlg = findDisplay 49;
|
||||
|
||||
for "_index" from 100 to 2000 do {
|
||||
(_dlg displayCtrl _index) ctrlEnable false;
|
||||
};
|
||||
|
||||
_ctrl = _dlg displayctrl 103;
|
||||
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";
|
||||
@ -58,7 +55,7 @@ if (_state) then {
|
||||
|
||||
_ctrl = _dlg displayctrl ([104, 1010] select isMultiplayer);
|
||||
_ctrl ctrlSetEventHandler ["buttonClick", QUOTE(closeDialog 0; player setDamage 1; [false] call DFUNC(disableUserInput);)];
|
||||
_ctrl ctrlEnable (call {private "_config"; _config = missionConfigFile >> "respawnButton"; !isNumber _config || {getNumber _config == 1}});
|
||||
_ctrl ctrlEnable (call {private _config = missionConfigFile >> "respawnButton"; !isNumber _config || {getNumber _config == 1}});
|
||||
_ctrl ctrlSetText "RESPAWN";
|
||||
_ctrl ctrlSetTooltip "Respawn.";
|
||||
};
|
||||
@ -66,8 +63,7 @@ if (_state) then {
|
||||
if (_key in actionKeys "TeamSwitch" && {teamSwitchEnabled}) then {
|
||||
(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0;
|
||||
|
||||
private "_acc";
|
||||
_acc = accTime;
|
||||
private _acc = accTime;
|
||||
teamSwitch;
|
||||
setAccTime _acc;
|
||||
};
|
||||
|
@ -45,14 +45,11 @@ disableSerialization;
|
||||
|
||||
params ["_iconId", "_show", "_icon", "_color", ["_timeAlive", DEFAULT_TIME]];
|
||||
|
||||
private ["_list", "_refresh"];
|
||||
private _list = missionNamespace getVariable [QGVAR(displayIconList), []];
|
||||
|
||||
_list = missionNamespace getVariable [QGVAR(displayIconList), []];
|
||||
|
||||
_refresh = {
|
||||
private _refresh = {
|
||||
// Refreshing of all icons..
|
||||
private "_allControls";
|
||||
_allControls = missionNamespace getVariable [QGVAR(displayIconListControls), []];
|
||||
private _allControls = missionNamespace getVariable [QGVAR(displayIconListControls), []];
|
||||
|
||||
{
|
||||
ctrlDelete _x;
|
||||
@ -61,23 +58,21 @@ _refresh = {
|
||||
|
||||
_allControls = [];
|
||||
|
||||
private ["_setting", "_ctrl", "_position"];
|
||||
|
||||
_setting = missionNamespace getVariable [QGVAR(settingFeedbackIcons), 0];
|
||||
private _setting = missionNamespace getVariable [QGVAR(settingFeedbackIcons), 0];
|
||||
|
||||
if (_setting > 0) then {
|
||||
{
|
||||
_x params ["", "_xicon", "_xcolor"];
|
||||
|
||||
// +19000 because we want to make certain we are using free IDCs..
|
||||
_ctrl = (findDisplay 46) ctrlCreate ["RscPicture", _forEachIndex + 19000];
|
||||
private _ctrl = (findDisplay 46) ctrlCreate ["RscPicture", _forEachIndex + 19000];
|
||||
|
||||
_position = switch (_setting) do {
|
||||
case TOP_RIGHT_DOWN: {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_RIGHT_LEFT: {[X_POS_ICONS_SECOND - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND - (ICON_WIDTH / 2), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_LEFT_DOWN: {[LEFT_SIDE + (0.5 * ICON_WIDTH), Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_LEFT_RIGHT: {[LEFT_SIDE + (0.5 * ICON_WIDTH) - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND, ICON_WIDTH, ICON_WIDTH]};
|
||||
default {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
private _position = switch (_setting) do {
|
||||
case TOP_RIGHT_DOWN: {[X_POS_ICONS, Y_POS_ICONS + (_forEachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_RIGHT_LEFT: {[X_POS_ICONS_SECOND - ((_forEachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND - (ICON_WIDTH / 2), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_LEFT_DOWN: {[LEFT_SIDE + (0.5 * ICON_WIDTH), Y_POS_ICONS + (_forEachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_LEFT_RIGHT: {[LEFT_SIDE + (0.5 * ICON_WIDTH) - ((_forEachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND, ICON_WIDTH, ICON_WIDTH]};
|
||||
default {[X_POS_ICONS, Y_POS_ICONS + (_forEachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
};
|
||||
|
||||
_ctrl ctrlSetPosition _position;
|
||||
@ -97,7 +92,7 @@ if (_show) then {
|
||||
_list pushBack [_iconId, _icon, _color, ACE_time];
|
||||
} else {
|
||||
{
|
||||
if (_x select 0 == _iconId) exitwith {
|
||||
if (_x select 0 == _iconId) exitWith {
|
||||
_list set [_forEachIndex, [_iconId, _icon, _color, ACE_time]];
|
||||
};
|
||||
} forEach _list;
|
||||
@ -115,8 +110,7 @@ if (_show) then {
|
||||
} else {
|
||||
|
||||
if ({_x select 0 == _iconId} count _list == 1) then {
|
||||
private "_newList";
|
||||
_newList = [];
|
||||
private _newList = [];
|
||||
|
||||
{
|
||||
if (_x select 0 != _iconId) then {
|
||||
|
@ -23,12 +23,9 @@ if (isNil QGVAR(lastHint)) then {
|
||||
|
||||
if !(typeName _text in ["STRING", "TEXT"]) then {_text = str _text};
|
||||
|
||||
private ["_lastHintTime", "_lastHintPriority", "_time"];
|
||||
GVAR(lastHint) params ["_lastHintTime", "_lastHintPriority"];
|
||||
|
||||
_lastHintTime = GVAR(lastHint) select 0;
|
||||
_lastHintPriority = GVAR(lastHint) select 1;
|
||||
|
||||
_time = ACE_time;
|
||||
private _time = ACE_time;
|
||||
|
||||
if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then {
|
||||
hintSilent _text;
|
||||
|
@ -20,10 +20,10 @@ params ["_text", "_image", ["_imageColor", [1,1,1]], ["_target", ACE_player]];
|
||||
if (_target != ACE_player) exitWith {};
|
||||
|
||||
if (typeName _text != "TEXT") then {
|
||||
if (typeName _text == "ARRAY") then {
|
||||
if (_text isEqualType []) then {
|
||||
if (count _text > 0) then {
|
||||
{
|
||||
if (typeName _x == "STRING" && {isLocalized _x}) then {
|
||||
if (_x isEqualType "" && {isLocalized _x}) then {
|
||||
_text set [_forEachIndex, localize _x];
|
||||
};
|
||||
} forEach _text;
|
||||
@ -32,7 +32,7 @@ if (typeName _text != "TEXT") then {
|
||||
};
|
||||
};
|
||||
|
||||
if (typeName _text == "STRING" && {isLocalized _text}) then {
|
||||
if (_text isEqualType "" && {isLocalized _text}) then {
|
||||
_text = localize _text;
|
||||
};
|
||||
|
||||
|
@ -19,52 +19,50 @@ params ["_text", ["_size", 1.5], ["_target", ACE_player]];
|
||||
if (_target != ACE_player) exitWith {};
|
||||
|
||||
if (typeName _text != "TEXT") then {
|
||||
if (typeName _text == "ARRAY") then {
|
||||
if (_text isEqualType []) then {
|
||||
if (count _text > 0) then {
|
||||
{
|
||||
if (typeName _x == "STRING" && {isLocalized _x}) then {
|
||||
if (_x isEqualType "" && {isLocalized _x}) then {
|
||||
_text set [_foreachIndex, localize _x];
|
||||
};
|
||||
}foreach _text;
|
||||
_text = format _text;
|
||||
};
|
||||
};
|
||||
if (typeName _text == "STRING" && {isLocalized _text}) then {
|
||||
if (_text isEqualType "" && {isLocalized _text}) then {
|
||||
_text = localize _text;
|
||||
};
|
||||
_text = composeText [lineBreak, parseText format ["<t align='center'>%1</t>", _text]];
|
||||
};
|
||||
|
||||
private ["_isShown", "_ctrlHint", "_xPos", "_yPos", "_wPos", "_hPos", "_position"];
|
||||
|
||||
_isShown = ctrlShown (uiNamespace getVariable ["ACE_ctrlHint", controlNull]);
|
||||
private _isShown = ctrlShown (uiNamespace getVariable ["ACE_ctrlHint", controlNull]);
|
||||
|
||||
("ACE_RscHint" call BIS_fnc_rscLayer) cutRsc ["ACE_RscHint", "PLAIN", 0, true];
|
||||
|
||||
disableSerialization;
|
||||
_ctrlHint = uiNamespace getVariable "ACE_ctrlHint";
|
||||
private _ctrlHint = uiNamespace getVariable "ACE_ctrlHint";
|
||||
|
||||
_ctrlHint ctrlSetBackgroundColor GVAR(displayTextColor);
|
||||
_ctrlHint ctrlSetTextColor GVAR(displayTextFontColor);
|
||||
/*
|
||||
// This does not function at the moment. Has been disabled until it fixed.
|
||||
_xPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
_yPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH];
|
||||
_wPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
_hPos = profilenamespace getvariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))];
|
||||
private _xPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_X", ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
private _yPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_Y", safeZoneY + 0.175 * safezoneH];
|
||||
private _wPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_W", (10 *(((safezoneW / safezoneH) min 1.2) / 40))];
|
||||
private _hPos = profilenamespace getVariable ["IGUI_GRID_ACE_displayText_H", (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))];
|
||||
*/
|
||||
|
||||
_xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||
_yPos = safeZoneY + 0.175 * safezoneH;
|
||||
_wPos = (10 *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||
_hPos = (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
|
||||
private _xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||
private _yPos = safeZoneY + 0.175 * safezoneH;
|
||||
private _wPos = (10 *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||
private _hPos = (2 *((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
|
||||
|
||||
// Zeus Interface Open and Display would be under the "CREATE" list
|
||||
if (!isNull curatorCamera) then {
|
||||
_xPos = _xPos min ((safezoneX + safezoneW - 12.5 * (((safezoneW / safezoneH) min 1.2) / 40)) - _wPos);
|
||||
};
|
||||
|
||||
_position = [_xPos, _yPos, _wPos, _size * _hPos];
|
||||
private _position = [_xPos, _yPos, _wPos, _size * _hPos];
|
||||
|
||||
_ctrlHint ctrlSetPosition _position;
|
||||
_ctrlHint ctrlCommit 0;
|
||||
|
@ -12,11 +12,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
params [["_unit", objNull, [objNull]]];
|
||||
|
||||
private ["_backpackObject", "_holder"];
|
||||
|
||||
_backpackObject = backpackContainer _unit;
|
||||
private _backpackObject = backpackContainer _unit;
|
||||
|
||||
_unit addBackpack "ACE_FakeBackpack";
|
||||
removeBackpack _unit;
|
||||
|
@ -19,8 +19,7 @@ if (!isNil "ACE_PFH_COUNTER") then {
|
||||
{
|
||||
_x params ["_pfh", "_parameters"];
|
||||
|
||||
private "_isActive";
|
||||
_isActive = ["ACTIVE", "REMOVED"] select isNil {CBA_common_PFHhandles select (_pfh select 0)};
|
||||
private _isActive = ["ACTIVE", "REMOVED"] select isNil {CBA_common_PFHhandles select (_pfh select 0)};
|
||||
|
||||
diag_log text format ["Registered PFH: id=%1 [%2, delay %3], %4:%5", _pfh select 0, _isActive, _parameters select 1, _pfh select 1, _pfh select 2];
|
||||
false
|
||||
@ -31,20 +30,18 @@ diag_log text format ["ACE COUNTER RESULTS"];
|
||||
diag_log text format ["-------------------------------------------"];
|
||||
|
||||
{
|
||||
private ["_counterEntry", "_iter", "_total", "_count", "_averageResult", "_delta"];
|
||||
|
||||
_counterEntry = _x;
|
||||
_iter = 0;
|
||||
_total = 0;
|
||||
_count = 0;
|
||||
_averageResult = 0;
|
||||
private _counterEntry = _x;
|
||||
private _iter = 0;
|
||||
private _total = 0;
|
||||
private _count = 0;
|
||||
private _averageResult = 0;
|
||||
|
||||
if (count _counterEntry > 3) then {
|
||||
// calc
|
||||
{
|
||||
if (_iter > 2) then {
|
||||
_count = _count + 1;
|
||||
_delta = (_x select 1) - (_x select 0);
|
||||
private _delta = (_x select 1) - (_x select 0);
|
||||
|
||||
_total = _total + _delta;
|
||||
};
|
||||
@ -69,8 +66,7 @@ diag_log text format ["-------------------------------------------"];
|
||||
diag_log text format["ACE_PERFORMANCE_EXCESSIVE_STEP_TRACKER"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
{
|
||||
private["_delay"];
|
||||
_delay = _x select 2;
|
||||
private _delay = _x select 2;
|
||||
//if(_delay > 0) then { _delay = _delay / 1000; };
|
||||
|
||||
diag_log text format["%1: %2s, delay=%3, handle=%4",(_x select 0), _delay, (_x select 3), (_x select 4)];
|
||||
@ -80,8 +76,7 @@ diag_log text format["-------------------------------------------"];
|
||||
diag_log text format["ACE_PERFORMANCE_EXCESSIVE_FRAME_TRACKER"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
{
|
||||
private["_delta"];
|
||||
_delta = _x select 1;
|
||||
private _delta = _x select 1;
|
||||
//if(_delta > 0) then { _delta = _delta / 1000; };
|
||||
diag_log text format[" DELTA: %1s", _delta];
|
||||
} forEach ACE_PERFORMANCE_EXCESSIVE_FRAME_TRACKER;
|
||||
|
@ -31,41 +31,35 @@ if (isNull (call BIS_fnc_displayMission)) exitWith {
|
||||
|
||||
params ["_textHeader", "_textMessage", ["_onOK", {}], ["_onCancel", {}]];
|
||||
|
||||
if (typeName _textMessage == "STRING") then {
|
||||
if (_textMessage isEqualType "") then {
|
||||
_textMessage = parseText _textMessage;
|
||||
};
|
||||
|
||||
(ARR_SELECT(_this,4,call BIS_fnc_displayMission)) createDisplay "RscDisplayCommonMessagePause";
|
||||
|
||||
private ["_display", "_ctrlRscMessageBox", "_ctrlBcgCommonTop", "_ctrlBcgCommon", "_ctrlText", "_ctrlBackgroundButtonOK", "_ctrlBackgroundButtonMiddle", "_ctrlBackgroundButtonCancel", "_ctrlButtonOK", "_ctrlButtonCancel"];
|
||||
|
||||
_display = uiNamespace getVariable "RscDisplayCommonMessage_display";
|
||||
_ctrlRscMessageBox = _display displayCtrl 2351;
|
||||
_ctrlBcgCommonTop = _display displayCtrl 235100;
|
||||
_ctrlBcgCommon = _display displayCtrl 235101;
|
||||
_ctrlText = _display displayCtrl 235102;
|
||||
_ctrlBackgroundButtonOK = _display displayCtrl 235103;
|
||||
_ctrlBackgroundButtonMiddle = _display displayCtrl 235104;
|
||||
_ctrlBackgroundButtonCancel = _display displayCtrl 235105;
|
||||
_ctrlButtonOK = _display displayCtrl 235106;
|
||||
_ctrlButtonCancel = _display displayCtrl 235107;
|
||||
private _display = uiNamespace getVariable "RscDisplayCommonMessage_display";
|
||||
private _ctrlRscMessageBox = _display displayCtrl 2351;
|
||||
private _ctrlBcgCommonTop = _display displayCtrl 235100;
|
||||
private _ctrlBcgCommon = _display displayCtrl 235101;
|
||||
private _ctrlText = _display displayCtrl 235102;
|
||||
private _ctrlBackgroundButtonOK = _display displayCtrl 235103;
|
||||
private _ctrlBackgroundButtonMiddle = _display displayCtrl 235104;
|
||||
private _ctrlBackgroundButtonCancel = _display displayCtrl 235105;
|
||||
private _ctrlButtonOK = _display displayCtrl 235106;
|
||||
private _ctrlButtonCancel = _display displayCtrl 235107;
|
||||
|
||||
_ctrlBcgCommonTop ctrlSetText _textHeader;
|
||||
|
||||
private ["_ctrlButtonOKPos", "_ctrlBcgCommonPos", "_bottomSpaceY", "_ctrlTextPos", "_marginX", "_marginY"];
|
||||
private _ctrlButtonOKPos = ctrlPosition _ctrlButtonOK;
|
||||
private _ctrlBcgCommonPos = ctrlPosition _ctrlBcgCommon;
|
||||
private _bottomSpaceY = (_ctrlButtonOKPos select 1) - ((_ctrlBcgCommonPos select 1) + (_ctrlBcgCommonPos select 3));
|
||||
|
||||
_ctrlButtonOKPos = ctrlPosition _ctrlButtonOK;
|
||||
_ctrlBcgCommonPos = ctrlPosition _ctrlBcgCommon;
|
||||
_bottomSpaceY = (_ctrlButtonOKPos select 1) - ((_ctrlBcgCommonPos select 1) + (_ctrlBcgCommonPos select 3));
|
||||
|
||||
_ctrlTextPos = ctrlPosition _ctrlText;
|
||||
_marginX = (_ctrlTextPos select 0) - (_ctrlBcgCommonPos select 0);
|
||||
_marginY = (_ctrlTextPos select 1) - (_ctrlBcgCommonPos select 1);
|
||||
|
||||
private ["_ctrlTextPosH", "_bottomPosY"];
|
||||
private _ctrlTextPos = ctrlPosition _ctrlText;
|
||||
private _marginX = (_ctrlTextPos select 0) - (_ctrlBcgCommonPos select 0);
|
||||
private _marginY = (_ctrlTextPos select 1) - (_ctrlBcgCommonPos select 1);
|
||||
|
||||
_ctrlText ctrlSetStructuredText _textMessage;
|
||||
_ctrlTextPosH = ctrlTextHeight _ctrlText;
|
||||
private _ctrlTextPosH = ctrlTextHeight _ctrlText;
|
||||
|
||||
_ctrlBcgCommon ctrlSetPosition [
|
||||
_ctrlBcgCommonPos select 0,
|
||||
@ -83,16 +77,15 @@ _ctrlText ctrlSetPosition [
|
||||
];
|
||||
_ctrlText ctrlCommit 0;
|
||||
|
||||
_bottomPosY = (_ctrlBcgCommonPos select 1) + _ctrlTextPosH + (_marginY * 2) + _bottomSpaceY;
|
||||
private _bottomPosY = (_ctrlBcgCommonPos select 1) + _ctrlTextPosH + (_marginY * 2) + _bottomSpaceY;
|
||||
|
||||
{
|
||||
private "_xPos";
|
||||
_xPos = ctrlPosition _x;
|
||||
private _xPos = ctrlPosition _x;
|
||||
|
||||
_xPos set [1, _bottomPosY];
|
||||
_x ctrlSetPosition _xPos;
|
||||
_x ctrlCommit 0;
|
||||
} foreach [
|
||||
} forEach [
|
||||
_ctrlBackgroundButtonOK,
|
||||
_ctrlBackgroundButtonMiddle,
|
||||
_ctrlBackgroundButtonCancel,
|
||||
@ -100,10 +93,8 @@ _bottomPosY = (_ctrlBcgCommonPos select 1) + _ctrlTextPosH + (_marginY * 2) + _b
|
||||
_ctrlButtonCancel
|
||||
];
|
||||
|
||||
private ["_ctrlRscMessageBoxPos", "_ctrlRscMessageBoxPosH"];
|
||||
|
||||
_ctrlRscMessageBoxPos = ctrlPosition _ctrlRscMessageBox;
|
||||
_ctrlRscMessageBoxPosH = _bottomPosY + (_ctrlButtonOKPos select 3);
|
||||
private _ctrlRscMessageBoxPos = ctrlPosition _ctrlRscMessageBox;
|
||||
private _ctrlRscMessageBoxPosH = _bottomPosY + (_ctrlButtonOKPos select 3);
|
||||
|
||||
_ctrlRscMessageBox ctrlSetPosition [
|
||||
0.5 - (_ctrlBcgCommonPos select 2) / 2,
|
||||
|
@ -28,12 +28,11 @@ _function = call compile _function;
|
||||
[[_arguments, _unit], _this select 1, 2] call FUNC(execRemoteFnc);
|
||||
|
||||
// save persistent function for JIP
|
||||
private ["_persistentFunctions", "_index"];
|
||||
|
||||
_persistentFunctions = _unit getVariable ["ACE_PersistentFunctions", []];
|
||||
private _persistentFunctions = _unit getVariable ["ACE_PersistentFunctions", []];
|
||||
|
||||
// find index to overwrite function with the same name, add to end otherwise
|
||||
_index = count _persistentFunctions;
|
||||
private _index = count _persistentFunctions;
|
||||
|
||||
{
|
||||
if (_x select 2 == _name) exitWith {
|
||||
_index = _forEachIndex;
|
||||
|
@ -27,7 +27,7 @@ TRACE_3("params", _arguments, _function, _unit);
|
||||
|
||||
_function = call compile _function;
|
||||
|
||||
if (typeName _unit == "SCALAR") exitWith {
|
||||
if (_unit isEqualType 0) exitWith {
|
||||
switch (_unit) do {
|
||||
case 0 : {
|
||||
_arguments call _function;
|
||||
|
@ -18,7 +18,7 @@ params ["_target"];
|
||||
if (isNil "_x") then {
|
||||
ACE_LOGERROR_1("No arguments and function for remote function. ID: %1",_forEachIndex);
|
||||
} else {
|
||||
if (typeName _x == "ARRAY") then {
|
||||
if (_x isEqualType []) then {
|
||||
[_x select 0, _target] call (_x select 1);
|
||||
};
|
||||
};
|
||||
|
@ -15,34 +15,30 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_fnc_logEntries";
|
||||
_fnc_logEntries = {
|
||||
private _fnc_logEntries = {
|
||||
params ["_c", "_d"];
|
||||
|
||||
private ["_p", "_t", "_e", "_a", "_i"];
|
||||
private _p = inheritsFrom _c;
|
||||
|
||||
_p = inheritsFrom _c;
|
||||
|
||||
_t = format [["class %1: %2 {", "class %1 {"] select (configName _p == ""), configName _c, configName _p];
|
||||
private _t = format [["class %1: %2 {", "class %1 {"] select (configName _p == ""), configName _c, configName _p];
|
||||
for "_a" from 1 to _d do {
|
||||
_t = " " + _t;
|
||||
};
|
||||
diag_log text _t;
|
||||
|
||||
_e = [];
|
||||
private _e = [];
|
||||
for "_i" from 0 to (count _c - 1) do {
|
||||
private ["_e1, _e2"];
|
||||
_e1 = _c select _i;
|
||||
private _e1 = _c select _i;
|
||||
|
||||
_e2 = switch (true) do {
|
||||
private _e2 = switch (true) do {
|
||||
case (isNumber _e1): {getNumber _e1};
|
||||
case (isText _e1): {getText _e1};
|
||||
case (isArray _e1): {getArray _e1};
|
||||
case (isClass _e1): {[_e1, _d + 1] call _fnc_logEntries; false};
|
||||
};
|
||||
|
||||
if (typeName _e2 != "BOOL") then {
|
||||
if (typeName _e2 == "ARRAY") then {
|
||||
if (!(_e2 isEqualType false)) then {
|
||||
if (_e2 isEqualType []) then {
|
||||
_e2 = toArray str _e2;
|
||||
{
|
||||
if (_x == toArray "[" select 0) then {
|
||||
|
@ -16,10 +16,9 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_array", "_code"];
|
||||
params [["_array", [], [[]]], ["_code", {}, [{}]]];
|
||||
|
||||
private "_result";
|
||||
_result = [];
|
||||
private _result = [];
|
||||
|
||||
{
|
||||
if (_x call _code) then {
|
||||
|
@ -14,11 +14,9 @@
|
||||
|
||||
params ["_crate"];
|
||||
|
||||
private ["_weapons", "_items"];
|
||||
|
||||
// get all weapons inside the crate
|
||||
_weapons = weaponCargo _crate;
|
||||
_items = [];
|
||||
private _weapons = weaponCargo _crate;
|
||||
private _items = [];
|
||||
|
||||
// if the "weapon" is supposed to be an item, move those from the weapon array to the item array
|
||||
{
|
||||
|
@ -12,19 +12,17 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_object";
|
||||
_object = _this;
|
||||
params ["_object"];
|
||||
|
||||
// setHitPointDamage requires local object
|
||||
if (!local _object) exitWith {};
|
||||
|
||||
// save and restore hitpoints, see below why
|
||||
private "_hitPointDamages";
|
||||
_hitPointDamages = getAllHitPointsDamage _object;
|
||||
private _hitPointDamages = getAllHitPointsDamage _object;
|
||||
|
||||
// get correct format for objects without hitpoints
|
||||
if (_hitPointDamages isEqualTo []) then {
|
||||
_hitPointDamages = [[],[],[]];
|
||||
_hitPointDamages = [[],[],[]];
|
||||
};
|
||||
|
||||
// this prevents physx objects from floating when near other physx objects with allowDamage false
|
||||
|
@ -16,8 +16,7 @@
|
||||
// setVectorUp requires local object
|
||||
if (!local _this) exitWith {};
|
||||
|
||||
private "_position";
|
||||
_position = getPos _this;
|
||||
private _position = getPos _this;
|
||||
|
||||
// don't place the object below the ground
|
||||
if (_position select 2 < -0.1) then {
|
||||
|
@ -20,14 +20,12 @@
|
||||
|
||||
params ["_object", ["_category", ""]];
|
||||
|
||||
if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitwith {[]};
|
||||
if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitWith {[]};
|
||||
|
||||
private ["_return", "_val"];
|
||||
|
||||
_return = [];
|
||||
private _return = [];
|
||||
|
||||
{
|
||||
_val = _object getvariable (_x select 0);
|
||||
private _val = _object getVariable (_x select 0);
|
||||
|
||||
if (!isNil "_val") then {
|
||||
if (_category == "" || _category == _x select 3) then {
|
||||
|
@ -14,13 +14,10 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private ["_captivityReasons", "_unitCaptivityStatus", "_unitCaptivityReasons"];
|
||||
private _captivityReasons = missionNamespace getVariable ["ACE_captivityReasons", []];
|
||||
private _unitCaptivityStatus = [captiveNum _unit, count _captivityReasons] call FUNC(binarizeNumber);
|
||||
|
||||
_captivityReasons = missionNamespace getVariable ["ACE_captivityReasons", []];
|
||||
|
||||
_unitCaptivityStatus = [captiveNum _unit, count _captivityReasons] call FUNC(binarizeNumber);
|
||||
|
||||
_unitCaptivityReasons = [];
|
||||
private _unitCaptivityReasons = [];
|
||||
|
||||
{
|
||||
if (_unitCaptivityStatus select _forEachIndex) then {
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
params ["_name", "_cfgClass"];
|
||||
|
||||
private "_classes";
|
||||
_classes = format ["configName inheritsFrom _x == '%1'", _name] configClasses (configFile >> _cfgClass);
|
||||
private _classes = format ["configName inheritsFrom _x == '%1'", _name] configClasses (configFile >> _cfgClass);
|
||||
|
||||
[_classes, {configName _this}] call FUNC(map) // return
|
||||
|
@ -14,9 +14,7 @@
|
||||
|
||||
params ["_vehicle"];
|
||||
|
||||
private ["_config", "_turret"];
|
||||
|
||||
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
_turret = [_vehicle] call FUNC(getTurretCommander);
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _turret = _vehicle call FUNC(getTurretCommander);
|
||||
|
||||
[_config, _turret] call FUNC(getTurretConfigPath) // return
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user