mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge remote-tracking branch 'refs/remotes/acemod/master'
This commit is contained in:
commit
ef12439ca8
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
|
||||
@ -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.1-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.1/ace3_3.4.1.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">
|
||||
|
@ -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];
|
||||
|
@ -26,19 +26,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 {
|
||||
|
@ -20,9 +20,11 @@ _weaponConfig = (configFile >> "CfgWeapons" >> _this);
|
||||
|
||||
_barrelTwist = getNumber(_weaponConfig >> "ACE_barrelTwist");
|
||||
_twistDirection = 1;
|
||||
_twistDirection = getNumber(_weaponConfig >> "ACE_twistDirection");
|
||||
if !(_twistDirection in [-1, 0, 1]) then {
|
||||
_twistDirection = 1;
|
||||
if (isNumber (_weaponConfig >> "ACE_twistDirection")) then {
|
||||
_twistDirection = getNumber (_weaponConfig >> "ACE_twistDirection");
|
||||
if !(_twistDirection in [-1, 0, 1]) then {
|
||||
_twistDirection = 1;
|
||||
};
|
||||
};
|
||||
|
||||
_barrelLength = getNumber(_weaponConfig >> "ACE_barrelLength");
|
||||
|
@ -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)];
|
||||
|
@ -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>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
params ["_backpack"];
|
||||
|
||||
if (typeName _backpack == "OBJECT") then {
|
||||
if (_backpack isEqualType objNull) then {
|
||||
_backpack = typeOf _backpack;
|
||||
};
|
||||
|
||||
|
@ -192,6 +192,7 @@ class CfgVehicles {
|
||||
scope = 2;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_settings_ca.paa));
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
class Arguments {
|
||||
class allowHandcuffOwnSide {
|
||||
displayName = CSTRING(ModuleSettings_handcuffSide_name);
|
||||
|
@ -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)
|
||||
@ -56,7 +56,7 @@ if (_state) then {
|
||||
|
||||
//Adds an animation changed eh
|
||||
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
|
||||
local _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
if (_animChangedEHID != -1) then {
|
||||
TRACE_1("removing animChanged EH",_animChangedEHID);
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
@ -92,7 +92,7 @@ if (_state) then {
|
||||
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
|
||||
|
||||
//remove AnimChanged EH
|
||||
local _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
TRACE_1("removing animChanged EH",_animChangedEHID);
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
_unit setVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
@ -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);
|
||||
@ -48,7 +48,7 @@ if (_state) then {
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false] && {(vehicle _unit) == _unit}) then {
|
||||
//Adds an animation changed eh
|
||||
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
|
||||
local _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
|
||||
private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
|
||||
if (_animChangedEHID != -1) then {
|
||||
TRACE_1("removing animChanged EH",_animChangedEHID);
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
@ -68,14 +68,14 @@ if (_state) then {
|
||||
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
|
||||
|
||||
//remove AnimChanged EH
|
||||
local _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
|
||||
private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
_unit setVariable [QGVAR(surrenderAnimEHID), -1];
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -166,7 +166,7 @@
|
||||
<Portuguese>Fazer unidade se render</Portuguese>
|
||||
<French>Faire capituler l'unité</French>
|
||||
<Hungarian>Egység kapitulálása</Hungarian>
|
||||
<Russian>Сделать юнита пленным</Russian>
|
||||
<Russian>Заставить юнита сдаться</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Captives_ModuleSurrender_Description">
|
||||
<English>Sync a unit to make them surrender.<br />Source: ace_captives</English>
|
||||
@ -177,15 +177,21 @@
|
||||
<Portuguese>Sincroniza uma unidade para fazer com que ela se renda. <br/>Fonte: ace_captives</Portuguese>
|
||||
<French>Synchronise une unité pour la rendre captive. <br/>Source: ace_captives</French>
|
||||
<Hungarian>Egység szinkronizálása, hogy kapituláljon.<br />Forrás: ace_captives</Hungarian>
|
||||
<Russian>Синхронизируйте с юнитами, чтобы сделать их пленными.<br />Источник: ace_captives</Russian>
|
||||
<Russian>Синхронизируйте с юнитами, чтобы заставить их сдаться в плен.<br />Источник: ace_captives</Russian>
|
||||
</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>
|
||||
@ -260,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>
|
||||
@ -268,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>
|
||||
@ -276,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>
|
||||
@ -284,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>
|
||||
</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));
|
||||
|
@ -8,6 +8,7 @@ class CfgVehicles {
|
||||
function = QFUNC(moduleSettings);
|
||||
functionPriority = 1;
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
isTriggerActivated = 0;
|
||||
author = ECSTRING(common,ACETeam);
|
||||
|
||||
@ -236,7 +237,15 @@ 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;
|
||||
class Land_PaperBox_closed_F: 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;
|
||||
|
@ -18,12 +18,11 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_position", "_item", "_i"];
|
||||
params ["_itemClass", "_vehicle", ["_amount", 1], ["_showHint", false, [false]] ];
|
||||
TRACE_3("params",_itemClass,_vehicle,_amount);
|
||||
|
||||
for "_i" from 1 to _amount do {
|
||||
[_item, _vehicle] call FUNC(loadItem);
|
||||
[_itemClass, _vehicle] call FUNC(loadItem);
|
||||
};
|
||||
|
||||
// Invoke listenable event
|
||||
|
@ -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,26 @@
|
||||
<Key ID="STR_ACE_Cargo_LoadingItem">
|
||||
<English>Loading Cargo</English>
|
||||
<Portuguese>Carregando carga</Portuguese>
|
||||
<Polish>Ładowanie cargo</Polish>
|
||||
<Czech>Nakládám</Czech>
|
||||
</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>
|
||||
</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>
|
||||
</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>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -35,6 +35,7 @@ class CfgVehicles {
|
||||
function = QFUNC(moduleCheckPBOs);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
isSingular = 1;
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa));
|
||||
class Arguments {
|
||||
class Action {
|
||||
|
@ -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););
|
||||
};
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
//Handle the waitAndExec array:
|
||||
while {!(GVAR(waitAndExecArray) isEqualTo []) && {GVAR(waitAndExecArray) select 0 select 0 <= ACE_Time}} do {
|
||||
local _entry = GVAR(waitAndExecArray) deleteAt 0;
|
||||
private _entry = GVAR(waitAndExecArray) deleteAt 0;
|
||||
(_entry select 2) call (_entry select 1);
|
||||
};
|
||||
|
||||
@ -29,17 +29,16 @@
|
||||
GVAR(nextFrameNo) = diag_frameno + 1;
|
||||
|
||||
//Handle the waitUntilAndExec array:
|
||||
local _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;
|
||||
|
||||
@ -98,7 +97,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 {
|
||||
@ -169,7 +167,7 @@ call FUNC(checkFiles);
|
||||
[
|
||||
GVAR(checkPBOsAction),
|
||||
GVAR(checkPBOsCheckAll),
|
||||
call compile GVAR(checkPBOsWhitelist)
|
||||
GVAR(checkPBOsWhitelist)
|
||||
] call FUNC(checkPBOs)
|
||||
}] call FUNC(addEventHandler);
|
||||
|
||||
@ -194,9 +192,17 @@ call FUNC(checkFiles);
|
||||
|
||||
ACE_LOGINFO("Settings received from server.");
|
||||
|
||||
if (isServer) then { //read settings from paramsArray
|
||||
[] call FUNC(readSettingsFromParamsArray);
|
||||
};
|
||||
// Event so that ACE_Modules have their settings loaded:
|
||||
["InitSettingsFromModules", []] call FUNC(localEvent);
|
||||
|
||||
if (isServer) then {
|
||||
// Publish all settings data after all configs and modules are read
|
||||
publicVariable QGVAR(settings);
|
||||
};
|
||||
|
||||
// Load user settings from profile
|
||||
if (hasInterface) then {
|
||||
call FUNC(loadSettingsFromProfile);
|
||||
|
@ -74,6 +74,7 @@ PREP(getNumberFromMissionSQM);
|
||||
PREP(getNumberMagazinesIn);
|
||||
PREP(getPitchBankYaw);
|
||||
PREP(getSettingData);
|
||||
PREP(getStaminaBarControl);
|
||||
PREP(getStringFromMissionSQM);
|
||||
PREP(getTargetAzimuthAndInclination);
|
||||
PREP(getTargetDistance);
|
||||
@ -115,6 +116,7 @@ PREP(isInBuilding);
|
||||
PREP(isModLoaded);
|
||||
PREP(isPlayer);
|
||||
PREP(isTurnedOut);
|
||||
PREP(isUnderwater);
|
||||
PREP(letterToCode);
|
||||
PREP(lightIntensityFromObject);
|
||||
PREP(loadPerson);
|
||||
@ -139,6 +141,7 @@ PREP(playerSide);
|
||||
PREP(positionToASL);
|
||||
PREP(progressBar);
|
||||
PREP(readSettingFromModule);
|
||||
PREP(readSettingsFromParamsArray);
|
||||
PREP(receiveRequest);
|
||||
PREP(removeCanInteractWithCondition);
|
||||
PREP(removeSpecificMagazine);
|
||||
@ -166,6 +169,7 @@ PREP(setVariableJIP);
|
||||
PREP(setVariablePublic);
|
||||
PREP(setVolume);
|
||||
PREP(sortAlphabeticallyBy);
|
||||
PREP(showHud);
|
||||
PREP(stringCompare);
|
||||
PREP(stringToColoredText);
|
||||
PREP(stringRemoveWhiteSpace);
|
||||
@ -290,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) = [];
|
||||
|
@ -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};
|
||||
|
@ -32,7 +32,7 @@ if (isServer) then {
|
||||
|
||||
private "_eventLog";
|
||||
_eventLog = _internalData select 1;
|
||||
_eventLog pushback [ACE_diagTime, _args, _ttl];
|
||||
_eventLog pushBack [ACE_diagTime, _args, _ttl];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -17,11 +17,11 @@
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
@ -21,19 +21,19 @@
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
@ -18,6 +18,6 @@ _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);
|
||||
};
|
||||
}];
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
params ["_statement"];
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
if (_statement isEqualType "") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
params ["_statement"];
|
||||
|
||||
if (typeName _statement == "STRING") then {
|
||||
if (_statement isEqualType "") then {
|
||||
_statement = compile _statement;
|
||||
};
|
||||
|
||||
|
@ -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];
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
@ -75,15 +79,21 @@ if (!isServer) then {
|
||||
_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);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
params ["_function"];
|
||||
|
||||
if (typeName _function == "STRING") exitWith {_function};
|
||||
if (_function isEqualType "") exitWith {_function};
|
||||
|
||||
_function = toArray str _function;
|
||||
_function deleteAt 0;
|
||||
|
@ -22,7 +22,7 @@ private ["_defaultLoglevel", "_defaultLogDisplayLevel"];
|
||||
|
||||
_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);
|
||||
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
|
@ -22,7 +22,7 @@ private ["_validIndex", "_realIndex"];
|
||||
|
||||
_validIndex = -1;
|
||||
|
||||
if (typeName _searchOffsetOrName == "STRING") then {
|
||||
if (_searchOffsetOrName isEqualType "") then {
|
||||
{
|
||||
if (_x select 0 == _searchOffsetOrName) exitWith {
|
||||
_validIndex = _forEachIndex;
|
||||
|
@ -73,11 +73,11 @@ _refresh = {
|
||||
_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]};
|
||||
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 +97,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;
|
||||
|
@ -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,17 +19,17 @@ 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]];
|
||||
@ -48,10 +48,10 @@ _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))];
|
||||
_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))];
|
||||
*/
|
||||
|
||||
_xPos = ((safezoneX + safezoneW) - (10 *(((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 *(((safezoneW / safezoneH) min 1.2) / 40));
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
params ["_var", ["_depth", 0, [0]]];
|
||||
|
||||
local _pad = "";
|
||||
private _pad = "";
|
||||
|
||||
for "_i" from 0 to _depth do {
|
||||
_pad = _pad + toString [9];
|
||||
|
@ -31,7 +31,7 @@ if (isNull (call BIS_fnc_displayMission)) exitWith {
|
||||
|
||||
params ["_textHeader", "_textMessage", ["_onOK", {}], ["_onCancel", {}]];
|
||||
|
||||
if (typeName _textMessage == "STRING") then {
|
||||
if (_textMessage isEqualType "") then {
|
||||
_textMessage = parseText _textMessage;
|
||||
};
|
||||
|
||||
@ -92,7 +92,7 @@ _bottomPosY = (_ctrlBcgCommonPos select 1) + _ctrlTextPosH + (_marginY * 2) + _b
|
||||
_xPos set [1, _bottomPosY];
|
||||
_x ctrlSetPosition _xPos;
|
||||
_x ctrlCommit 0;
|
||||
} foreach [
|
||||
} forEach [
|
||||
_ctrlBackgroundButtonOK,
|
||||
_ctrlBackgroundButtonMiddle,
|
||||
_ctrlBackgroundButtonCancel,
|
||||
|
@ -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);
|
||||
};
|
||||
};
|
||||
|
@ -41,8 +41,8 @@ _fnc_logEntries = {
|
||||
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 {
|
||||
|
@ -20,14 +20,14 @@
|
||||
|
||||
params ["_object", ["_category", ""]];
|
||||
|
||||
if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitwith {[]};
|
||||
if (isNil QGVAR(OBJECT_VARIABLES_STORAGE)) exitWith {[]};
|
||||
|
||||
private ["_return", "_val"];
|
||||
|
||||
_return = [];
|
||||
|
||||
{
|
||||
_val = _object getvariable (_x select 0);
|
||||
_val = _object getVariable (_x select 0);
|
||||
|
||||
if (!isNil "_val") then {
|
||||
if (_category == "" || _category == _x select 3) then {
|
||||
|
@ -16,7 +16,7 @@
|
||||
params ["_unit", "_variable", "_defaultValue"];
|
||||
|
||||
private "_value";
|
||||
_value = _unit getvariable _variable;
|
||||
_value = _unit getVariable _variable;
|
||||
|
||||
if (isNil "_value") then {
|
||||
if (!isNil "_defaultValue") then {
|
||||
|
@ -17,7 +17,7 @@ params ["_varName"];
|
||||
private "_variableDefinition";
|
||||
_variableDefinition = [_varName] call FUNC(getDefinedVariableInfo);
|
||||
|
||||
if !(_variableDefinition isEqualTo []) exitwith {
|
||||
if !(_variableDefinition isEqualTo []) exitWith {
|
||||
_variableDefinition select 1;
|
||||
};
|
||||
|
||||
|
@ -24,7 +24,7 @@ _hitPointsWithSelections = getAllHitPointsDamage _vehicle;
|
||||
|
||||
// get correct format on vehicles without any hitpoints
|
||||
if (_hitPointsWithSelections isEqualTo []) then {
|
||||
_hitPointsWithSelections = [[],[],[]];
|
||||
_hitPointsWithSelections = [[],[],[]];
|
||||
};
|
||||
|
||||
_hitPointsWithSelections resize 2;
|
||||
|
15
addons/common/functions/fnc_getStaminaBarControl.sqf
Normal file
15
addons/common/functions/fnc_getStaminaBarControl.sqf
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Returns the control of the Stamina Bar from Arma 1.54.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* Stamina Bar control <CONTROL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
(uiNamespace getVariable [QGVAR(dlgStaminaBar), displayNull]) displayCtrl IDC_STAMINA_BAR
|
@ -17,7 +17,7 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
local _vehicle = vehicle _unit;
|
||||
private _vehicle = vehicle _unit;
|
||||
if (_unit == _vehicle) exitWith {[]};
|
||||
|
||||
scopeName "main";
|
||||
|
@ -14,11 +14,11 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
local _vehicle = vehicle _unit;
|
||||
private _vehicle = vehicle _unit;
|
||||
|
||||
if (_unit == _vehicle) exitWith {false};
|
||||
|
||||
local _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
|
||||
|
||||
if (getNumber (_config >> "hideProxyInCombat") != 1) exitWith {false};
|
||||
|
||||
@ -26,10 +26,10 @@ if (_unit == driver _vehicle) exitWith {
|
||||
getNumber (_config >> "forceHideDriver") == 0; // return
|
||||
};
|
||||
|
||||
local _turret = [_unit] call FUNC(getTurretIndex);
|
||||
private _turret = [_unit] call FUNC(getTurretIndex);
|
||||
|
||||
if (_turret isEqualTo []) exitWith {false};
|
||||
|
||||
local _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
private _turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
|
||||
|
||||
getNumber (_turretConfig >> "forceHideGunner") == 0; // return
|
||||
|
@ -1,29 +1,19 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Check if unit is underwater
|
||||
* Check if unit's head is underwater
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* if unit is in the water (BOOLEAN)
|
||||
* If unit's head is underwater <BOOL>
|
||||
*
|
||||
* Public: Yes
|
||||
*
|
||||
* Deprecated
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
ACE_DEPRECATED("ace_common_fnc_inWater","3.5.0","ace_common_fnc_isUnderwater");
|
||||
|
||||
private "_return";
|
||||
_return = false;
|
||||
|
||||
if (surfaceIsWater getPosASL _unit) then {
|
||||
private "_pos";
|
||||
_pos = _unit modelToWorldVisual (_unit selectionPosition "head");
|
||||
|
||||
if (_pos select 2 < 0) then {
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
|
||||
_return
|
||||
_this call FUNC(isUnderwater)
|
||||
|
@ -14,4 +14,4 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
!(_unit getvariable ["ACE_isUnconscious", false]) && alive _unit && !(_unit getvariable ["ACE_isDead", false]) // return
|
||||
!(_unit getVariable ["ACE_isUnconscious", false]) && alive _unit && !(_unit getVariable ["ACE_isDead", false]) // return
|
||||
|
@ -8,10 +8,17 @@
|
||||
* Return Value:
|
||||
* is the unit an engineer <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player] call ace_common_fnc_isEngineer
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
_unit getVariable ["ACE_isEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer") == 1] // return
|
||||
private _isEngineer = _unit getVariable ["ACE_isEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer") == 1];
|
||||
//Handle ace_repair modules setting this to a number
|
||||
if (_isEngineer isEqualType 0) then {_isEngineer = _isEngineer > 0};
|
||||
|
||||
_isEngineer
|
||||
|
@ -14,4 +14,4 @@
|
||||
|
||||
params ["_modName"];
|
||||
|
||||
isClass (configFile >> "cfgPatches" >> _modName) // return
|
||||
isClass (configFile >> "CfgPatches" >> _modName) // return
|
||||
|
29
addons/common/functions/fnc_isUnderwater.sqf
Normal file
29
addons/common/functions/fnc_isUnderwater.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Check if unit's head is underwater
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* If unit's head is underwater <BOOL>
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private "_return";
|
||||
_return = false;
|
||||
|
||||
if (surfaceIsWater getPosASL _unit) then {
|
||||
private "_pos";
|
||||
_pos = _unit modelToWorldVisual (_unit selectionPosition "head");
|
||||
|
||||
if (_pos select 2 < 0) then {
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
|
||||
_return
|
@ -21,7 +21,7 @@ private ["_vehicle", "_loadcar", "_loadair", "_loadtank", "_loadboat"];
|
||||
|
||||
_vehicle = objNull;
|
||||
|
||||
if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitwith {_vehicle};
|
||||
if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitWith {_vehicle};
|
||||
|
||||
_loadcar = nearestObject [_unit, "Car"];
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
// If the setting is stored on the profile
|
||||
if !(isNil "_profileValue") then {
|
||||
// If the profile variable has the correct type
|
||||
if (typeName _profileValue == typeName (missionNamespace getVariable _name)) then {
|
||||
if (_profileValue isEqualType (missionNamespace getVariable _name)) then {
|
||||
// Load the setting from the profile
|
||||
missionNamespace setVariable [_name, _profileValue];
|
||||
};
|
||||
|
@ -16,7 +16,7 @@ private "_fnc_parseConfigForDisplayNames";
|
||||
_fnc_parseConfigForDisplayNames = {
|
||||
params ["_optionEntry"];
|
||||
|
||||
if !(isClass _optionEntry) exitwith {false};
|
||||
if !(isClass _optionEntry) exitWith {false};
|
||||
|
||||
private "_values";
|
||||
_values = getArray (_optionEntry >> "values");
|
||||
@ -30,17 +30,28 @@ _fnc_parseConfigForDisplayNames = {
|
||||
private "_text";
|
||||
_text = _x;
|
||||
|
||||
if (typeName _text == "STRING" && {count _text > 1} && {_text select [0, 1] == "$"}) then {
|
||||
if (_text isEqualType "" && {count _text > 1} && {_text select [0, 1] == "$"}) then {
|
||||
_text = localize (_text select [1]); //chop off the leading $
|
||||
_values set [_forEachIndex, _text];
|
||||
};
|
||||
} forEach _values;
|
||||
|
||||
if (!(_values isEqualTo [])) then {
|
||||
if (_typeOf != "SCALAR") then {
|
||||
ACE_LOGWARNING_2("Setting [%1] has values[] but is not SCALAR (%2)", _name, _typeOf);
|
||||
} else {
|
||||
private _value = missionNamespace getVariable [_name, -1];
|
||||
if ((_value < 0) || {_value >= (count _values)}) then {
|
||||
ACE_LOGWARNING_3("Setting [%1] out of bounds %2 (values[] count is %3)(", _name, _value, count _values);
|
||||
};
|
||||
};
|
||||
};
|
||||
true
|
||||
};
|
||||
|
||||
// Iterate through settings
|
||||
{
|
||||
_x params ["_name"];
|
||||
_x params ["_name", "_typeOf"];
|
||||
|
||||
if !([configFile >> "ACE_Settings" >> _name] call _fnc_parseConfigForDisplayNames) then {
|
||||
if !([configFile >> "ACE_ServerSettings" >> _name] call _fnc_parseConfigForDisplayNames) then {
|
||||
|
@ -51,8 +51,6 @@ _fnc_parseConfigForSettings = {
|
||||
// mission side settings
|
||||
[missionConfigFile >> "ACE_Settings"] call _fnc_parseConfigForSettings;
|
||||
|
||||
// Publish all settings data
|
||||
publicVariable QGVAR(settings);
|
||||
// Publish all setting values
|
||||
{
|
||||
publicVariable (_x select 0);
|
||||
|
@ -16,9 +16,9 @@ params ["_unit", "_id", "_accepted"];
|
||||
|
||||
private ["_requestID", "_info", "_callBack", "_caller", "_replyParams", "_requestMessage", "_target"];
|
||||
|
||||
_info = _unit getvariable _id;
|
||||
_info = _unit getVariable _id;
|
||||
|
||||
if (!isnil "_info") then {
|
||||
if (!isNil "_info") then {
|
||||
_caller = _info select 0;
|
||||
_target = _info select 1;
|
||||
_requestID = _info select 2;
|
||||
@ -26,16 +26,16 @@ if (!isnil "_info") then {
|
||||
_callBack = _info select 4;
|
||||
_replyParams = [_info, _accepted];
|
||||
[_replyParams, QFUNC(requestCallback), _caller, false] call FUNC(execRemoteFnc);
|
||||
_unit setvariable [_id, nil];
|
||||
_unit setVariable [_id, nil];
|
||||
};
|
||||
|
||||
GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = nil;
|
||||
|
||||
if (!isnil QGVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT)) then {
|
||||
if (!isNil QGVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT)) then {
|
||||
_unit removeAction GVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT);
|
||||
GVAR(RECIEVE_REQUEST_ADD_ACTION_ACCEPT) = nil;
|
||||
};
|
||||
if (!isnil QGVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE)) then {
|
||||
if (!isNil QGVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE)) then {
|
||||
_unit removeAction GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE);
|
||||
GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE) = nil;
|
||||
};
|
||||
|
@ -85,13 +85,13 @@ _fnc_perFrameFunction = {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
|
||||
if (_errorCode == 0) then {
|
||||
if (typeName _onFinish == "STRING") then {
|
||||
if (_onFinish isEqualType "") then {
|
||||
[_onFinish, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
|
||||
} else {
|
||||
[_args, _elapsedTime, _totalTime, _errorCode] call _onFinish;
|
||||
};
|
||||
} else {
|
||||
if (typeName _onFail == "STRING") then {
|
||||
if (_onFail isEqualType "") then {
|
||||
[_onFail, [_args, _elapsedTime, _totalTime, _errorCode]] call FUNC(localEvent);
|
||||
} else {
|
||||
[_args, _elapsedTime, _totalTime, _errorCode] call _onFail;
|
||||
|
63
addons/common/functions/fnc_readSettingsFromParamsArray.sqf
Normal file
63
addons/common/functions/fnc_readSettingsFromParamsArray.sqf
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Read settins from paramsArray that have a ACE_setting = 1.
|
||||
* Happens before modules but after all other configs (for force priority)
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_common_fnc_readSettingsFromParamsArray
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
//paramsArray is a normal variable not a command
|
||||
private _paramsArray = missionnamespace getVariable ["paramsArray", []];
|
||||
|
||||
TRACE_1("Reading missionConfigFile params",_paramsArray);
|
||||
|
||||
{
|
||||
private _config = (missionConfigFile >> "params") select _forEachIndex;
|
||||
if ((getNumber (_config >> "ACE_setting")) > 0) then {
|
||||
private _settingName = configName _config;
|
||||
private _settingValue = _x;
|
||||
private _title = getText (_config >> "title");
|
||||
|
||||
TRACE_3("ace_setting",_title,_settingName,_settingValue);
|
||||
|
||||
// Check if the variable is already defined
|
||||
if (isNil _settingName) exitWith {
|
||||
ACE_LOGERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName);
|
||||
};
|
||||
|
||||
private _settingData = [_settingName] call FUNC(getSettingData);
|
||||
_settingData params ["", "_typeName", "", "", "", "", "_isForced"];
|
||||
|
||||
// Check if it's already forced and quit
|
||||
if (_isForced) exitWith {ACE_LOGWARNING_1("readSettingsFromParamsArray - param [%1] is already set and forced", _settingName);};
|
||||
|
||||
// The setting is not forced, so update the value
|
||||
// Read entry and cast it to the correct type from the existing variable
|
||||
private _validValue = false;
|
||||
switch (true) do {
|
||||
case (_typeName == "SCALAR"): {_validValue = true;};
|
||||
case (_typeName == "BOOL"): {
|
||||
_settingValue = _settingValue > 0;
|
||||
_validValue = true;
|
||||
};
|
||||
//TODO: Handle ARRAY,COLOR,STRING??? (bool/scalar covers most important settings)
|
||||
};
|
||||
|
||||
if (!_validValue) exitWith {
|
||||
ACE_LOGWARNING_3("readSettingsFromParamsArray - param [%1] type not valid [%2] - expected type [%3]", _settingName,_settingValue,_typeName);
|
||||
};
|
||||
|
||||
// Update the variable globaly and Force
|
||||
[_settingName, _settingValue, true, true] call FUNC(setSetting);
|
||||
};
|
||||
} forEach _paramsArray;
|
@ -53,7 +53,7 @@ GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [ACE_time, _target, _requestID] spawn {
|
||||
private "_id";
|
||||
_id = _target getVariable _requestID;
|
||||
|
||||
waituntil {
|
||||
waitUntil {
|
||||
_id = _target getVariable _requestID;
|
||||
|
||||
(ACE_time > _time || isNil "_id")
|
||||
|
@ -14,8 +14,8 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
_unit setvariable ["ACE_isDead", nil, true];
|
||||
_unit setvariable ["ACE_isUnconscious", nil, true];
|
||||
_unit setVariable ["ACE_isDead", nil, true];
|
||||
_unit setVariable ["ACE_isUnconscious", nil, true];
|
||||
|
||||
if (isPlayer _unit) then {
|
||||
[true] call FUNC(setVolume);
|
||||
@ -36,7 +36,7 @@ if (isPlayer _unit) then {
|
||||
|
||||
{
|
||||
if !(_x select 4) then {
|
||||
_unit setvariable [_x select 0, nil, _x select 3];
|
||||
_unit setVariable [_x select 0, nil, _x select 3];
|
||||
};
|
||||
false
|
||||
} count ([_unit] call FUNC(getAllDefinedSetVariables));
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
params ["_unit", "_muzzle", "_mode"];
|
||||
|
||||
local _index = 0;
|
||||
private _index = 0;
|
||||
|
||||
while {
|
||||
_index < 100 && {currentMuzzle _unit != _muzzle || {currentWeaponMode _unit != _mode}}
|
||||
|
@ -148,7 +148,7 @@ if (_backpack != "") then {
|
||||
_unit addBackpack _backpack;
|
||||
|
||||
if (_clearBackpack) then {
|
||||
local _backpackObject = unitBackpack _unit;
|
||||
private _backpackObject = unitBackpack _unit;
|
||||
|
||||
clearMagazineCargoGlobal _backpackObject;
|
||||
clearWeaponCargoGlobal _backpackObject;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Setvariable value
|
||||
* setVariable value
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
@ -23,7 +23,7 @@ if (isNil "_global") then {
|
||||
_definedVariable params ["", "", ["_global", false]];
|
||||
};
|
||||
|
||||
if (!isNil "_value") exitwith {
|
||||
if (!isNil "_value") exitWith {
|
||||
_unit setVariable [_variable, _value, _global];
|
||||
};
|
||||
|
||||
|
@ -19,7 +19,7 @@ params ["_name", "_value"];
|
||||
|
||||
// Hack to keep backward compatibility for the moment
|
||||
if (typeName (missionNamespace getVariable _name) == "BOOL") then {
|
||||
if (typeName _value == "SCALAR") then {
|
||||
if (_value isEqualType 0) then {
|
||||
_value = _value > 0;
|
||||
};
|
||||
};
|
||||
|
@ -13,27 +13,39 @@
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* ["ace_map_gestures_enabled", true, false, true] call ace_common_fnc_setSetting
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_name", "_value", ["_force", false], ["_broadcastChanges", false]];
|
||||
|
||||
private ["_settingData", "_failed"];
|
||||
|
||||
_settingData = [_name] call FUNC(getSettingData);
|
||||
private _settingData = [_name] call FUNC(getSettingData);
|
||||
|
||||
// Exit if the setting does not exist
|
||||
if (count _settingData == 0) exitWith {};
|
||||
if (_settingData isEqualTo []) exitWith {
|
||||
ACE_LOGERROR_1("SetSetting [%1] setting does not exist", _name);
|
||||
};
|
||||
|
||||
_settingData params ["", "_typeName", "_isClientSetable", "", "", "", "_isForced"];
|
||||
|
||||
// Exit if the setting is already forced
|
||||
if (_settingData select 6) exitWith {};
|
||||
if (_isForced) exitWith {
|
||||
ACE_LOGINFO_1("SetSetting [%1] Trying to set forced setting", _name);
|
||||
};
|
||||
|
||||
//This does NOT broadcast changes to GVAR(settings), so clients would not get updated force status
|
||||
if ((missionNamespace getVariable [QEGVAR(modules,serverModulesRead), false]) && {!(_isForced isEqualTo _force)}) then {
|
||||
ACE_LOGWARNING_3("SetSetting [%1] attempting to broadcast a change to force (%2 to %3)", _name, _isForced, _force);
|
||||
};
|
||||
|
||||
// If the type is not equal, try to cast it
|
||||
_failed = false;
|
||||
private _failed = false;
|
||||
if (typeName _value != _settingData select 1) then {
|
||||
_failed = true;
|
||||
if (_settingData select 1 == "BOOL" && typeName _value == "SCALAR") then {
|
||||
if ((_typeName == "BOOL") && {_value isEqualType 0}) then {
|
||||
// If value is not 0 or 1 consider it invalid and don't set anything
|
||||
if (_value isEqualTo 0) then {
|
||||
_value = false;
|
||||
@ -44,12 +56,12 @@ if (typeName _value != _settingData select 1) then {
|
||||
_failed = false;
|
||||
};
|
||||
};
|
||||
if (_settingData select 1 == "COLOR" && typeName _value == "ARRAY") then {
|
||||
if ((_typeName == "COLOR") && {_value isEqualType []}) then {
|
||||
_failed = false;
|
||||
};
|
||||
};
|
||||
|
||||
if (_failed) exitWith {};
|
||||
if (_failed) exitWith {ACE_LOGERROR_3("SetSetting [%1] bad data type expected %2 got %3", _name, _typeName, typeName _value);};
|
||||
|
||||
// Force it if it was required
|
||||
_settingData set [6, _force];
|
||||
|
@ -38,19 +38,16 @@ GVAR(setVariablePublicArray) pushBack [_object, _varName, _syncTime, _idName];
|
||||
if (isNil QGVAR(setVariablePublicPFH)) exitWith {};
|
||||
|
||||
GVAR(setVariablePublicPFH) = [{
|
||||
private "_delete";
|
||||
_delete = 0;
|
||||
|
||||
{
|
||||
_x params ["_object", "_varName", "_syncTime", "_idName"];
|
||||
if (ACE_diagTime > _syncTime) then {
|
||||
// set value public
|
||||
_object setVariable [_varName, _object getVariable _varName, true];
|
||||
GVAR(setVariablePublicArray) deleteAt _forEachIndex - _delete;
|
||||
GVAR(setVariableNames) deleteAt _forEachIndex - _delete;
|
||||
_delete = _delete + 1;
|
||||
GVAR(setVariablePublicArray) deleteAt (GVAR(setVariablePublicArray) find _x);
|
||||
GVAR(setVariableNames) deleteAt (GVAR(setVariableNames) find _x);
|
||||
};
|
||||
} forEach GVAR(setVariablePublicArray);
|
||||
nil
|
||||
} count +GVAR(setVariablePublicArray);
|
||||
|
||||
if (GVAR(setVariablePublicArray) isEqualTo []) then {
|
||||
[GVAR(setVariablePublicPFH)] call CBA_fnc_removePerFrameHandler;
|
||||
|
66
addons/common/functions/fnc_showHud.sqf
Normal file
66
addons/common/functions/fnc_showHud.sqf
Normal file
@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Allows multiple sources to not overwrite showHud command
|
||||
* Bitwise AND Logic (a single false in a mask will make it false)
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Source ID <STRING><OPTIONAL>
|
||||
* 1: Show Hud Bool Array (8 to set, empty to remove) <ARRAY><OPTIONAL>
|
||||
* - [hud, info, radar, compass, direction, menu, group, cursors]
|
||||
* - hud: Boolean - show scripted HUD (same as normal showHUD true/false)
|
||||
* - info: Boolean - show vehicle + soldier info (hides weapon info from the HUD as well)
|
||||
* - radar: Boolean - show vehicle radar
|
||||
* - compass: Boolean - show vehicle compass
|
||||
* - direction: Boolean - show tank direction indicator (not present in vanilla Arma 3)
|
||||
* - menu: Boolean - show commanding menu (hides HC related menus)
|
||||
* - group: Boolean - show group info bar (hides squad leader info bar)
|
||||
* - cursors: Boolean - show HUD weapon cursors (connected with scripted HUD)
|
||||
*
|
||||
* Return Value:
|
||||
* Resulting ShowHud Array <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* ["hideHud", [false, true, true, true, true, true, true, false]] call ace_common_fnc_showHud; //This is equivalent to the old showHud false
|
||||
* [] call ace_common_fnc_showHud; //sets `showHud` and returns the result array used
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {[-1]};
|
||||
|
||||
params [["_reason", "", [""]], ["_mask", [], [[]], [0,8]]];
|
||||
|
||||
if (isArray (missionConfigFile >> "showHUD")) then {
|
||||
//(showHud = 0;) is fine - the array is the problem
|
||||
ACE_LOGWARNING("showHUD[] in Description.ext breaks the showHud command");
|
||||
};
|
||||
|
||||
if (_reason != "") then {
|
||||
_reason = toLower _reason;
|
||||
if (_mask isEqualTo []) then {
|
||||
TRACE_2("Setting", _reason, _mask);
|
||||
[GVAR(showHudHash), _reason] call FUNC(hashRem);
|
||||
} else {
|
||||
TRACE_2("Removing", _reason, _mask);
|
||||
[GVAR(showHudHash), _reason, _mask] call FUNC(hashSet);
|
||||
};
|
||||
};
|
||||
|
||||
GVAR(showHudHash) params ["_reasons", "_masks"];
|
||||
private _resultMask = [];
|
||||
|
||||
for "_index" from 0 to 7 do {
|
||||
private _set = true; //Default to true
|
||||
{
|
||||
if (!(_x select _index)) exitWith {
|
||||
_set = false; //Any false will make it false
|
||||
};
|
||||
} forEach _masks;
|
||||
_resultMask pushBack _set;
|
||||
};
|
||||
|
||||
TRACE_2("showHud", _resultMask, _reasons);
|
||||
showHud _resultMask;
|
||||
|
||||
_resultMask
|
@ -25,8 +25,8 @@ _elements = [];
|
||||
|
||||
{
|
||||
_theElement = toArray (_x select _elementN);
|
||||
_indexes pushback _foreachIndex;
|
||||
_elements pushback _theElement;
|
||||
_indexes pushBack _forEachIndex;
|
||||
_elements pushBack _theElement;
|
||||
} forEach _array;
|
||||
|
||||
for "_i" from 1 to (count _elements) - 1 do {
|
||||
@ -45,7 +45,7 @@ for "_i" from 1 to (count _elements) - 1 do {
|
||||
_returnArray = [];
|
||||
|
||||
{
|
||||
_returnArray pushback (_array select _x);
|
||||
_returnArray pushBack (_array select _x);
|
||||
} forEach _indexes;
|
||||
|
||||
_returnArray
|
||||
|
@ -18,7 +18,7 @@
|
||||
params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", side _unit]];
|
||||
|
||||
private "_previousGroupsList";
|
||||
_previousGroupsList = _unit getvariable [QGVAR(previousGroupSwitchTo), []];
|
||||
_previousGroupsList = _unit getVariable [QGVAR(previousGroupSwitchTo), []];
|
||||
|
||||
if (_switch) then {
|
||||
// go forward
|
||||
@ -27,7 +27,7 @@ if (_switch) then {
|
||||
_previousGroup = group _unit;
|
||||
_originalSide = side group _unit;
|
||||
|
||||
if (count units _previousGroup == 1 && _originalSide == _side) exitwith {
|
||||
if (count units _previousGroup == 1 && _originalSide == _side) exitWith {
|
||||
[format ["Current group has only 1 member and is of same side as switch. Not switching unit %1", _id]] call FUNC(debug);
|
||||
};
|
||||
|
||||
@ -41,7 +41,7 @@ if (_switch) then {
|
||||
private ["_currentGroup", "_newGroup"];
|
||||
|
||||
{
|
||||
if (_id == (_x select 2)) exitwith {
|
||||
if (_id == (_x select 2)) exitWith {
|
||||
_x set [ 3, false];
|
||||
_previousGroupsList set [_forEachIndex, _x];
|
||||
[format["found group with ID: %1", _id]] call FUNC(debug);
|
||||
@ -51,7 +51,7 @@ if (_switch) then {
|
||||
reverse _previousGroupsList;
|
||||
|
||||
{
|
||||
if (_x select 3) exitwith {}; // stop at first id set to true
|
||||
if (_x select 3) exitWith {}; // stop at first id set to true
|
||||
if !(_x select 3) then {
|
||||
_currentGroup = group _unit;
|
||||
if (!isNull (_x select 0)) then {
|
||||
|
@ -35,7 +35,7 @@ if (!isServer) exitWith {false};
|
||||
_eventEntry = _x;
|
||||
_ttlReturn = true;
|
||||
|
||||
if (typeName _globalEventTTL == "CODE") then {
|
||||
if (_globalEventTTL isEqualType {}) then {
|
||||
_ttlReturn = [_eventTime, _eventEntry] call _globalEventTTL;
|
||||
} else {
|
||||
_ttlReturn = call {_globalEventTTL < 1 || {ACE_diagTime < (_eventEntry select 0) + _globalEventTTL}};
|
||||
@ -45,7 +45,7 @@ if (!isServer) exitWith {false};
|
||||
// Do event based TTL check
|
||||
_eventEntry params ["_time", "", "_eventTTL"];
|
||||
|
||||
if (typeName _eventTTL == "CODE") then {
|
||||
if (_eventTTL isEqualType {}) then {
|
||||
_ttlReturn = [_eventTime, _eventEntry] call _eventTTL;
|
||||
} else {
|
||||
_ttlReturn = call {_eventTTL < 1 || {ACE_diagTime < _time + _eventTTL}};
|
||||
|
@ -14,13 +14,13 @@
|
||||
|
||||
BEGIN_COUNTER(timePFH);
|
||||
|
||||
local _lastTickTime = ACE_diagTime;
|
||||
local _lastGameTime = ACE_gameTime;
|
||||
private _lastTickTime = ACE_diagTime;
|
||||
private _lastGameTime = ACE_gameTime;
|
||||
|
||||
ACE_gameTime = time;
|
||||
ACE_diagTime = diag_tickTime;
|
||||
|
||||
local _delta = ACE_diagTime - _lastTickTime;
|
||||
private _delta = ACE_diagTime - _lastTickTime;
|
||||
|
||||
if (ACE_gameTime <= _lastGameTime) then {
|
||||
TRACE_1("paused",_delta);
|
||||
|
@ -17,6 +17,6 @@
|
||||
|
||||
params ["_value"];
|
||||
|
||||
if (typeName _value == "SCALAR") exitWith {_value};
|
||||
if (_value isEqualType 0) exitWith {_value};
|
||||
|
||||
parseNumber _value // return
|
||||
|
@ -24,7 +24,7 @@ if (_vehicle == _unit) exitWith {false};
|
||||
if (speed _vehicle > 1 || getPos _vehicle select 2 > 2) exitWith {false};
|
||||
|
||||
private "_emptyPos";
|
||||
_emptyPos = (getPos _vehicle) findEmptyPosition [0, 10, typeof _unit]; // @todo to small?
|
||||
_emptyPos = (getPos _vehicle) findEmptyPosition [0, 10, typeOf _unit]; // @todo to small?
|
||||
|
||||
if (count _emptyPos == 0) exitWith {false};
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user