Merge branch 'acemod/master' into interactions_lamps

This commit is contained in:
SzwedzikPL 2016-02-05 01:43:06 +01:00
commit 7b8be590b4
1324 changed files with 20417 additions and 11137 deletions

View File

@ -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

View File

@ -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
@ -44,6 +45,7 @@ BlackPixxel <blackpixxel96@gmail.com>
BlackQwar
Brakoviejo
Brisse <brisse@outlook.com>
Brostrom.A | Evul <andreas.brostrom.ce@gmail.com>
BullHorn <bullhorn7@gmail.com>
Clon1998 <ps.patti1998@gmail.com>
Codingboy
@ -52,7 +54,8 @@ 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>
F3 Project <alanr@ferstaberinde.com>
@ -60,6 +63,7 @@ Falke75
Ferenczi
Ferenzi
Filip Basara <filip.basara93@googlemail.com>
fr89k <kaschitoku@web.de>
FreeZbe <freeseb@gmail.com>
geraldbolso1899
Ghost
@ -100,12 +104,14 @@ Robert Boklahánics <bokirobi@gmail.com>
ruPaladin <happyworm24@rambler.ru>
simon84 <badguy360th@gmail.com>
Sniperwolf572 <tenga6@gmail.com>
System98
SzwedzikPL <szwedzikpl@gmail.com>
Tachi <zaveruha007@gmail.com>
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

View File

@ -14,7 +14,7 @@ Indicate if the issue appears on stable or development version. In case it is th
## Reporting the issue
Head over to the <a href="{{ site.githubUrl }}/issues" target="_blank">ACE3 GitHub issue tracker</a> and press the <a href="{{ site.githubUrl }}/issues/new" target="_blank">"New issue"</a> button in the top right corner. Add a descriptive title and copy the following issue template in to the text area:
Head over to the [ACE3 GitHub issue tracker](https://github.com/acemod/ACE3/issues) and press the [New issue](https://github.com/acemod/ACE3/issues/new) button in the top right corner. Add a descriptive title and copy the following issue template in to the text area:
```
ACE3 Version: 3.x.x
@ -43,8 +43,8 @@ ACE3 Version: 3.x.x
A video of the issue might be helpful in resolving it faster.
GitHub uses [Markdown](http://daringfireball.net/projects/markdown/syntax) to style the output. If you want to know more about it (e.g. how to [turn text bold](https://help.github.com/articles/markdown-basics/#styling-text), how to denote [code blocks](https://help.github.com/articles/markdown-basics/#inline-formats) or [inline code](https://help.github.com/articles/markdown-basics/#multiple-lines)) have a look at the [GitHub Markdown Documentation](https://help.github.com/articles/github-flavored-markdown).
Github uses <a href="http://daringfireball.net/projects/markdown/syntax" target="_blank">"Markdown"</a> to style the output. If you want to know more about it (e.g. how to <a href="https://help.github.com/articles/markdown-basics/#styling-text" target="_blank">turn text bold</a>, how to denote <a href="https://help.github.com/articles/markdown-basics/#inline-formats" target="_blank">code blocks</a> or <a href="https://help.github.com/articles/markdown-basics/#multiple-lines" target="_blank">inline code</a>) have a look at the <a href="https://help.github.com/articles/github-flavored-markdown/" target="_blank">GitHub markdown documentation</a>.
# Feature Requests
@ -54,11 +54,11 @@ ACE2, AGM and CSE had a lot of features implemented or planned. All of them are
Please refrain from making requests for any planned or existing features from either ACE2, AGM or CSE. Most of them are already being or have been considered for porting or a rewrite.
## Requesting a feature
In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for <a href="{{ site.githubUrl }}/issues/414/" target="_blank">ACE 3 Feature requests</a>. Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier.
In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for [ACE3 Feature requests](https://github.com/acemod/ACE3/issues/414). Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier.
Following their approval, feature requests may be moved by moderators to a separate issue for further discussion.
# Regarding Pull Requests (PRs)
- You want to help but don't know where to start ? Check the wiki entry for [setting up the development environment](http://ace3mod.com/wiki/development/setting-up-the-development-environment.html)
- You want to help but don't know where to start? Check the wiki entry for [setting up the development environment](http://ace3mod.com/wiki/development/setting-up-the-development-environment.html)
- [Make sure to respect the file structure](http://ace3mod.com/wiki/development/modularity-and-pbo-structure.html)
- [Make sure to respect the coding guidelines](http://ace3mod.com/wiki/development/coding-guidelines.html)

View File

@ -1,30 +1,35 @@
<p align="center">
<img src="https://github.com/acemod/ACE3/blob/master/extras/assets/logo/black/ACE3-Logo.jpg" width="480">
<img src="https://github.com/acemod/ACE3/raw/master/extras/assets/logo/black/ACE3-Logo.jpg" width="480">
</p>
<p align="center">
<a href="https://github.com/acemod/ACE3/releases">
<img src="https://img.shields.io/badge/Version-3.3.2-blue.svg" 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" 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?label=Issues" alt="ACE3 Issues">
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">
</a>
<a href="https://forums.bistudio.com/topic/181341-ace3-a-collaborative-merger-between-agm-cse-and-ace/?p=2859670">
<img src="https://img.shields.io/badge/BIF-Thread-lightgrey.svg" alt="BIF Thread">
<img src="https://img.shields.io/badge/BIF-Thread-lightgrey.svg?style=flat-square" alt="BIF Thread">
</a>
<a href="https://github.com/acemod/ACE3/blob/master/LICENSE">
<img src="https://img.shields.io/badge/License-GPLv2-red.svg" alt="ACE3 License">
<img src="https://img.shields.io/badge/License-GPLv2-red.svg?style=flat-square" alt="ACE3 License">
</a>
<a href="http://slackin.ace3mod.com/">
<img src="http://slackin.ace3mod.com/badge.svg" alt="ACE3 Slack">
<img src="http://slackin.ace3mod.com/badge.svg?style=flat-square&label=Slack" alt="ACE3 Slack">
</a>
<a href="https://travis-ci.org/acemod/ACE3">
<img src="https://img.shields.io/travis/acemod/ACE3.svg" alt="ACE3 Build Status">
<img src="https://img.shields.io/travis/acemod/ACE3.svg?style=flat-square&label=Build" alt="ACE3 Build Status">
</a>
</p>
<p align="center"><sup><strong>Requires the latest version of <a href="https://github.com/CBATeam/CBA_A3/releases">CBA A3</a>. Visit us on <a href="https://www.facebook.com/ACE3Mod">Facebook</a> | <a href="https://www.youtube.com/c/ACE3Mod">YouTube</a> | <a href="https://twitter.com/ACE3Mod">Twitter</a> | <a href="http://www.reddit.com/r/arma/search?q=ACE&restrict_sr=on&sort=new&t=all">Reddit</a></strong></sup></p>
<p align="center">
<sup><strong>Requires the latest version of <a href="https://github.com/CBATeam/CBA_A3/releases">CBA A3</a>.<br/>
Visit us on <a href="https://twitter.com/ACE3Mod">Twitter</a> | <a href="https://www.facebook.com/ACE3Mod">Facebook</a> | <a href="https://www.youtube.com/c/ACE3Mod">YouTube</a> | <a href="http://www.reddit.com/r/arma/search?q=ACE&restrict_sr=on&sort=new&t=all">Reddit</a></strong></sup>
</p>
**ACE3** is a joint effort by the teams behind **ACE2**, **AGM** and **CSE** to improve the realism and authenticity of Arma 3.
@ -43,6 +48,7 @@ The mod is **built modularly**, so almost any included PBO can be easily removed
- Captivity system
- Explosives system, including different trigger types
- Map screen improvements marker placement and map tools
- Logistics
- Advanced missile guidance and laser designation
#### Additional features

Binary file not shown.

View File

@ -18,7 +18,8 @@ private ["_muzzleVelocityShiftTableUpperLimit", "_temperatureIndexFunction",
"_temperatureIndexA", "_temperatureIndexB", "_interpolationRatio"];
params["_muzzleVelocityShiftTable", "_temperature"];
// Check if muzzleVelocityShiftTable is Larger Than 11 Entrys
// Check if muzzleVelocityShiftTable is Less Than 11 Entrys
if ((count _muzzleVelocityShiftTable) < 11) exitWith {0};
_muzzleVelocityShiftTableUpperLimit = _muzzleVelocityShiftTable select 10;
if (isNil "_muzzleVelocityShiftTableUpperLimit") exitWith { 0 };

View File

@ -28,7 +28,7 @@ if (currentWeapon ACE_player != primaryWeapon ACE_player) exitWith { false };
2 cutText ["", "PLAIN"];
EGVAR(weather,WindInfo) = false;
0 cutText ["", "PLAIN"];
(["RscWindIntuitive"] call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
GVAR(Protractor) = true;
[{
@ -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];

View File

@ -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;

View File

@ -24,12 +24,12 @@ if (!hasInterface) exitWith {};
if (!GVAR(enabled)) exitWith {};
// Parameterization
private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletSpeed", "_bulletLength", "_barrelTwist", "_stabilityFactor"];
private ["_abort", "_AmmoCacheEntry", "_WeaponCacheEntry", "_opticsName", "_opticType", "_bulletTraceVisible", "_temperature", "_barometricPressure", "_bulletMass", "_bulletLength", "_muzzleVelocity", "_muzzleVelocityShift", "_bulletVelocity", "_bulletLength", "_barrelTwist", "_stabilityFactor", "_aceTimeSecond", "_barrelVelocityShift", "_ammoTemperatureVelocityShift"];
params ["_unit", "_weapon", "", "_mode", "_ammo", "_magazine", "_bullet"];
_abort = false;
if (!(_ammo isKindOf "BulletBase")) exitWith {};
if (!alive _bullet) exitWith {};
if (!([_unit] call EFUNC(common,isPlayer))) exitWith {};
@ -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")];
};
};
@ -75,22 +75,22 @@ _WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"];
_bulletVelocity = velocity _bullet;
_muzzleVelocity = vectorMagnitude _bulletVelocity;
_barrelVelocityShift = 0;
if (GVAR(barrelLengthInfluenceEnabled)) then {
_barrelVelocityShift = uiNamespace getVariable [format [QGVAR(%1_muzzleVelocityShift),_weapon],nil];
if (isNil "_barrelVelocityShift") then {
_barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift);
uiNamespace setVariable [format [QGVAR(%1_muzzleVelocityShift),_weapon],_muzzleVelocityShift];
};
_barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _muzzleVelocity] call FUNC(calculateBarrelLengthVelocityShift);
};
_ammoTemperatureVelocityShift = 0;
if (GVAR(ammoTemperatureEnabled)) then {
_temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight);
_temperatureVelocityShift = ([_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift));
_ammoTemperatureVelocityShift = ([_ammoTempMuzzleVelocityShifts, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift));
};
if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then {
_muzzleVelocityShift = _barrelVelocityShift + _ammoTemperatureVelocityShift;
TRACE_4("shift",_muzzleVelocity,_muzzleVelocityShift, _barrelVelocityShift, _ammoTemperatureVelocityShift);
if (_muzzleVelocityShift != 0) then {
_muzzleVelocity = _muzzleVelocity + (_barrelVelocityShift + _ammoTemperatureVelocityShift);
_muzzleVelocity = _muzzleVelocity + _muzzleVelocityShift;
_bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift));
_bullet setVelocity _bulletVelocity;
};

View File

@ -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 {

View File

@ -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");

View File

@ -1,6 +1,11 @@
#define COMPONENT advanced_ballistics
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_ADVANCEDBALLISTICS
#define DEBUG_MODE_FULL
#endif

View File

@ -10,7 +10,7 @@
<Spanish>Mostrar información del viento</Spanish>
<German>Windinformationen anzeigen</German>
<Hungarian>Széladatok mutatása</Hungarian>
<Czech>Zobrazit informace o větru</Czech>
<Czech>Zobrazit údaje o větru</Czech>
<Portuguese>Mostrar Informação do Vento</Portuguese>
</Key>
<Key ID="STR_ACE_Advanced_Ballistics_ProtractorKey">
@ -74,7 +74,7 @@
<Spanish>Activa la balística avanzada para francotiradores no locales (cuando se usa una mira telescópica)</Spanish>
<Polish>Aktywuje zaawansowaną balistykę dla nielokalnych snajperów (kiedy używają optyki)</Polish>
<German>Aktiviert die erweiterte Ballistik für nicht lokale Scharfschützen (bei Benutzung von Optiken mit starker Vergrößerung)</German>
<Czech>Aktivuje pokročilou balistiku pro nelokální odstřelovače (když používá výkonnou optiku)</Czech>
<Czech>Aktivuje pokročilou balistiku pro nelokální odstřelovače (při použití optiky)</Czech>
<Portuguese>Ativa balística avançada para caçadores não locais (quando usando miras telescópicas)</Portuguese>
<French>Active la balistique avancée pour les snipers non locaux (en utilisant les optiques avancées)</French>
<Hungarian>Engedélyezi a fejlett ballisztikát nem-helyi mesterlövészeknek (nagy-teljesítményű optika használatakor)</Hungarian>
@ -118,7 +118,7 @@
<Spanish>Activada la balística avanzada para todos los jugadores no locales (activarlo puede degradar el rendimiento durante grandes tiroteos en multijugador).</Spanish>
<Polish>Aktywuje zaawansowaną balistykę dla wszystkich nielokalnych graczy (aktywacja tej opcji może spodowować spory spadek wydajności podczas ciężkiej wymiany ognia)</Polish>
<German>Aktiviert die erweiterte Ballistik für alle nicht lokalen Spieler (das Aktivieren dieser Funktion kann zur Beeinträchtigung des Spielerlebnisses im Multiplayer führen)</German>
<Czech>Aktivovat pokročilou balistiku pro všechny nelokální hráče (aktivace této možnosti způsobuje pokles snímu za sekundu během těžké přestřelky v multiplayeru)</Czech>
<Czech>Aktivuje pokročilou balistiku pro všechny nelokální hráče (aktivace této možnosti způsobuje pokles FPS během velké přestřelky v multiplayeru)</Czech>
<Portuguese>Ativa balística avançada para todos os jogadores não locais (ativando isso pode degradar a performance durante troca de tiros intensas no multiplayer)</Portuguese>
<French>Active la balistique avancé pour tous les joueurs non locaux (activer cette option peut avoir un impact sur les performance en multi durant les grands échanges de tirs)</French>
<Hungarian>Engedélyezi a fejlett ballisztikát az összes nem-helyi játékosnak (ez a funkció leronthatja a teljesítményt intenzív többjátékos tűzharcok alatt)</Hungarian>

View File

@ -1,6 +1,11 @@
#define COMPONENT ai
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_AI
#define DEBUG_MODE_FULL
#endif

View File

@ -1,6 +1,11 @@
#define COMPONENT aircraft
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_AIRCRAFT
#define DEBUG_MODE_FULL
#endif

View File

@ -1,6 +1,11 @@
#define COMPONENT APL
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_APL
#define DEBUG_MODE_FULL
#endif

View File

@ -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;

View File

@ -2,4 +2,4 @@
uiNamespace setVariable ['ATragMX_Display', nil];
GVAR(active) = false;
[GVAR(DialogPFH)] call cba_fnc_removePerFrameHandler;
[GVAR(DialogPFH)] call CBA_fnc_removePerFrameHandler;

View File

@ -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)];

View File

@ -1,6 +1,11 @@
#define COMPONENT atragmx
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_ATRAGMX
#define DEBUG_MODE_FULL
#endif

View File

@ -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";
};
};
};

View File

@ -49,7 +49,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
} else {
GVAR(placeAction) = PLACE_WAITING;
[_unit, QGVAR(vehAttach), true] call EFUNC(common,setForceWalkStatus);
[_unit, "forceWalk", "ACE_Attach", true] call EFUNC(common,statusEffect_set);
[{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call EFUNC(common,execNextFrame);
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)];
@ -88,7 +88,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment
{!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then {
[_idPFH] call CBA_fnc_removePerFrameHandler;
[_unit, QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus);
[_unit, "forceWalk", "ACE_Attach", false] call EFUNC(common,statusEffect_set);
[] call EFUNC(interaction,hideMouseHint);
[_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler);
_unit removeAction _actionID;

View File

@ -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>

View File

@ -1,6 +1,11 @@
#define COMPONENT attach
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_ATTACH
#define DEBUG_MODE_FULL
#endif

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Attach">
<Key ID="STR_ACE_Attach_AttachDetach">
@ -7,7 +7,7 @@
<Spanish>Acoplar objeto &gt;&gt;</Spanish>
<Polish>Przyczep &gt;&gt;</Polish>
<French>Attacher l'objet &gt;&gt;</French>
<Czech>Připnout předmět &gt;&gt;</Czech>
<Czech>Připnout &gt;&gt;</Czech>
<Portuguese>Fixar item &gt;&gt;</Portuguese>
<Italian>Attacca l'oggetto &gt;&gt;</Italian>
<Hungarian>Tárgy hozzácsatolása &gt;&gt;</Hungarian>
@ -115,7 +115,7 @@
<Spanish>Sin espacio en inventario</Spanish>
<Polish>Brak miejsca w ekwipunku</Polish>
<French>Pas de place dans l'inventaire</French>
<Czech>Není místo v inventáři</Czech>
<Czech>Nedostatek místa v inventáři</Czech>
<Portuguese>Sem espaço no inventário</Portuguese>
<Italian>Non hai più spazio</Italian>
<Hungarian>Nincs több hely</Hungarian>
@ -175,7 +175,7 @@
<German>Befestigen fehlgeschlagen</German>
<Russian>Не удалось присоединить</Russian>
<Spanish>Error al acoplar</Spanish>
<Czech>Připnutí selhalo</Czech>
<Czech>Připnout přesmět se nezdařilo</Czech>
<Portuguese>Erro ao fixar</Portuguese>
<Polish>Przyczepianie nie powiodło się</Polish>
<Hungarian>Hozzácsatolás sikertelen</Hungarian>
@ -187,7 +187,7 @@
<Spanish>%1&lt;br/&gt;acoplada</Spanish>
<Polish>Przyczepiono&lt;br/&gt;%1</Polish>
<French>%1&lt;br/&gt;attachée</French>
<Czech>%1&lt;br/&gt;Připnutý</Czech>
<Czech>%1&lt;br/&gt;Připnuto</Czech>
<Portuguese>%1&lt;br/&gt;Fixada</Portuguese>
<Italian>%1&lt;br/&gt;attaccata</Italian>
<Hungarian>%1&lt;br/&gt;hozzácsatolva</Hungarian>
@ -199,7 +199,7 @@
<Spanish>%1&lt;br/&gt;quitada</Spanish>
<Polish>Odczepiono&lt;br/&gt;%1</Polish>
<French>%1&lt;br/&gt;détachée</French>
<Czech>%1&lt;br/&gt;Odepnutý</Czech>
<Czech>%1&lt;br/&gt;Odepnuto</Czech>
<Portuguese>%1&lt;br/&gt;Separada</Portuguese>
<Italian>%1&lt;br/&gt;staccata</Italian>
<Hungarian>%1&lt;br/&gt;lecsatolva</Hungarian>

View File

@ -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,

View File

@ -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

View File

@ -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};

View File

@ -1,6 +1,11 @@
#define COMPONENT backpacks
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_BACKPACKS
#define DEBUG_MODE_FULL
#endif

View File

@ -1,6 +1,11 @@
#define COMPONENT ballistics
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_BALLISTICS
#define DEBUG_MODE_FULL
#endif

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Ballistics">
<!-- MX -->
@ -33,7 +33,7 @@
<Spanish>Calibre: 6,5x39mm Trazadoras IR-DIM&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: MX/C/M/SW/3GL</Spanish>
<French>Calibre: 6,5x39mm Traçantes IR-DIM&lt;br /&gt;Cartouches: 30&lt;br /&gt;Utilisé avec: MX/C/M/SW/3GL</French>
<Polish>Kaliber: 6,5x39mm Smugacz IR-DIM&lt;br /&gt;Pociski: 30&lt;br /&gt;Używane w: MX/C/M/SW/3GL</Polish>
<Czech>Ráže: 6.5x39mm Svítící IR-DIM&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: MX/C/M/SW/3GL</Czech>
<Czech>Ráže: 6.5x39mm Svítící IR-DIM&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: MX</Czech>
<Portuguese>Calibre: 6,5x39mm Traçante IR-DIM&lt;br /&gt;Projéteis: 30&lt;br /&gt;Usado em: MX/C/M/SW/3GL</Portuguese>
<Italian>Calibro: 6.5x39mm Traccianti IR-DIM &lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: MX/C/M/SW/3GL</Italian>
<Russian>Калибр: 6,5x39 мм ИК-трассирующие&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: MX/C/M/SW/3GL</Russian>
@ -69,7 +69,7 @@
<Spanish>Calibre: 6,5x39mm SD&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: MX/C/M/SW/3GL</Spanish>
<French>Calibre: 6,5x39mm SD&lt;br /&gt;Cartouches: 30&lt;br /&gt;Utilisé avec: MX/C/M/SW/3GL</French>
<Polish>Kaliber: 6,5x39mm SD&lt;br /&gt;Pociski: 30&lt;br /&gt;Używane w: MX/C/M/SW/3GL</Polish>
<Czech>Ráže: 6.5x39mm SD&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: MX/C/M/SW/3GL</Czech>
<Czech>Ráže: 6.5x39mm SD&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: MX</Czech>
<Portuguese>Calibre: 6,5x39mm SD&lt;br /&gt;Projéteis: 30&lt;br /&gt;Usado em: MX/C/M/SW/3GL</Portuguese>
<Italian>Calibro: 6.5x39mm Sil.&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: MX/C/M/SW/3GL </Italian>
<Russian>Калибр: 6,5x39 мм дозвуковые&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: MX/C/M/SW/3GL</Russian>
@ -105,7 +105,7 @@
<Spanish>Calibre: 6,5x39mm AP&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: MX/C/M/SW/3GL</Spanish>
<French>Calibre: 6,5x39mm AP&lt;br /&gt;Cartouches: 30&lt;br /&gt;Utilisé avec: MX/C/M/SW/3GL</French>
<Polish>Kaliber: 6,5x39mm AP&lt;br /&gt;Pociski: 30&lt;br /&gt;Używane w: MX/C/M/SW/3GL</Polish>
<Czech>Ráže: 6.5x39mm AP&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: MX/C/M/SW/3GL</Czech>
<Czech>Ráže: 6.5x39mm AP&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: MX</Czech>
<Portuguese>Calibre: 6,5x39mm AP&lt;br /&gt;Projéteis: 30&lt;br /&gt;Usado em: MX/C/M/SW/3GL</Portuguese>
<Italian>Calibro: 6.5x39mm AP&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: MX/C/M/SW/3GL</Italian>
<Russian>Калибр: 6,5x39 мм бронебойные&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: MX/C/M/SW/3GL</Russian>
@ -142,7 +142,7 @@
<Spanish>Calibre: 6,5x39mm Trazadoras IR-DIM&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: Katiba</Spanish>
<French>Calibre: 6,5x39mm Traçantes IR-DIM&lt;br /&gt;Cartouches: 30&lt;br /&gt;Utilisé avec: Katiba</French>
<Polish>Kaliber: 6,5x39mm Smugacz IR-DIM&lt;br /&gt;Pociski: 30&lt;br /&gt;Używane w: Katiba</Polish>
<Czech>Ráže: 6.5x39mm Svítící IR-DIM&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: Katiba</Czech>
<Czech>Ráže: 6.5x39mm Svítící IR-DIM&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: KH 2002 Sama</Czech>
<Portuguese>Calibre: 6,5x39mm Traçante IR-DIM&lt;br /&gt;Projéteis: 30&lt;br /&gt;Usado em: Katiba</Portuguese>
<Italian>Calibro: 6.5x39mm Tracciant IR-DIM&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: Katiba</Italian>
<Russian>Калибр: 6,5x39 мм ИК-трассирующие&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: Katiba</Russian>
@ -178,7 +178,7 @@
<Spanish>Calibre: 6,5x39mm SD&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: Katiba</Spanish>
<French>Calibre: 6,5x39mm SD&lt;br /&gt;Cartouches: 30&lt;br /&gt;Utilisé avec: Katiba</French>
<Polish>Kaliber: 6,5x39mm SD&lt;br /&gt;Naboje: 30&lt;br /&gt;Używane w: Katiba</Polish>
<Czech>Ráže: 6.5x39mm SD&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: Katiba</Czech>
<Czech>Ráže: 6.5x39mm SD&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: KH 2002 Sama</Czech>
<Portuguese>Calibre: 6,5x39mm SD&lt;br /&gt;Projéteis: 30&lt;br /&gt;Usado em: Katiba</Portuguese>
<Italian>Calibro: 6.5x39mm Sil.&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: Katiba</Italian>
<Russian>Калибр: 6,5x39 мм дозвуковые&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: Katiba</Russian>
@ -214,7 +214,7 @@
<Spanish>Calibre: 6,5x39mm AP&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: Katiba</Spanish>
<French>Calibre: 6,5x39mm AP&lt;br /&gt;Cartouches: 30&lt;br /&gt;Utilisé avec: Katiba</French>
<Polish>Kaliber: 6,5x39mm AP&lt;br /&gt;Pociski: 30&lt;br /&gt;Używane w: Katiba</Polish>
<Czech>Ráže: 6.5x39mm AP&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: Katiba</Czech>
<Czech>Ráže: 6.5x39mm AP&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: KH 2002 Sama</Czech>
<Portuguese>Calibre: 6,5x39mm AP&lt;br /&gt;Projéteis: 30&lt;br /&gt;Usado em: Katiba</Portuguese>
<Italian>Calibro: 6.5x39mm AP&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: Katiba</Italian>
<Russian>Калибр: 6,5x39 мм бронебойные&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: Katiba</Russian>
@ -251,7 +251,7 @@
<Spanish>Calibre: 5,56x45mm Trazadoras IR-DIM&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Spanish>
<French>Calibre: 5,56x45mm Traçantes IR-DIM&lt;br /&gt;Cartouches: 30&lt;br /&gt;Utilisé avec: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</French>
<Polish>Kaliber: 5,56x45mm Smugacz IR-DIM&lt;br /&gt;Pociski: 30&lt;br /&gt;Używane w: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Polish>
<Czech>Ráže: 5.56x45mm Svítící IR-DIM&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Czech>
<Czech>Ráže: 5.56x45mm Svítící IR-DIM&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: CTAR-21, TAR-21, F2000, RFB SDAR</Czech>
<Portuguese>Calibre: 5,56x45mm Traçante IR-DIM&lt;br /&gt;Projéteis: 30&lt;br /&gt;Usado em: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Portuguese>
<Italian>Calibro: 5.56x45mm Traccianti IR-DIM&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Italian>
<Russian>Калибр: 5,56x45 мм ИК-трассирующие&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR</Russian>
@ -288,7 +288,7 @@
<Spanish>Calibre: 7,62x51mm Trazadora&lt;br /&gt;Balas: 20&lt;br /&gt;Se usa en: Mk18 ABR</Spanish>
<French>Calibre: 7,62x51mm Traçantes&lt;br /&gt;Cartouches: 20&lt;br /&gt;Utilisé avec: EBR</French>
<Polish>Kaliber: 7,62x51mm Smugacz&lt;br /&gt;Pociski: 20&lt;br /&gt;Używane w: Mk18 ABR</Polish>
<Czech>Ráže: 7.62x51mm Svítící&lt;br /&gt;Munice: 20&lt;br /&gt;Použití: Mk18 ABR</Czech>
<Czech>Ráže: 7.62x51mm Svítící&lt;br /&gt;Nábojů: 20&lt;br /&gt;Použití u: Mk14 Mod 1 EBR</Czech>
<Portuguese>Calibre: 7,62x51mm Traçante&lt;br /&gt;Projéteis: 20&lt;br /&gt;Usado em: Mk18 ABR</Portuguese>
<Italian>Calibro: 7.62x51mm Traccianti&lt;br /&gt;Munizioni: 20&lt;br /&gt;In uso su: Mk18 ABR</Italian>
<Russian>Калибр: 7,62x51 мм трассирующие&lt;br /&gt;Патронов: 20&lt;br /&gt;Используются с: Mk18 ABR</Russian>
@ -324,7 +324,7 @@
<Spanish>Calibre: 7,62x51mm Trazadoras IR-DIM&lt;br /&gt;Balas: 20&lt;br /&gt;Se usa en: Mk18 ABR</Spanish>
<French>Calibre: 7,62x51mm Traçantes IR-DIM&lt;br /&gt;Cartouches: 20&lt;br /&gt;Utilisé avec: EBR</French>
<Polish>Kaliber: 7,62x51mm Smugacz IR-DIM&lt;br /&gt;Pociski: 20&lt;br /&gt;Używane w: Mk18 ABR</Polish>
<Czech>Ráže: 7.62x51mm Svítící IR-DIM&lt;br /&gt;Munice: 20&lt;br /&gt;Použití: Mk18 ABR</Czech>
<Czech>Ráže: 7.62x51mm Svítící IR-DIM&lt;br /&gt;Nábojů: 20&lt;br /&gt;Použití u: Mk14 Mod 1 EBR</Czech>
<Portuguese>Calibre: 7,62x51mm Traçante IR-DIM&lt;br /&gt;Projéteis: 20&lt;br /&gt;Usado em: Mk18 ABR</Portuguese>
<Italian>Calibro: 7.62x51mm Traccianti IR-DIM&lt;br /&gt;Munizioni: 20&lt;br /&gt;In uso su: Mk18 ABR</Italian>
<Russian>Калибр: 7,62x51 мм ИК-трассирующие&lt;br /&gt;Патронов: 20&lt;br /&gt;Используются с: Mk18 ABR</Russian>
@ -360,7 +360,7 @@
<Spanish>Calibre: 7,62x51mm SD&lt;br /&gt;Balas: 20&lt;br /&gt;Se usa en: Mk18 ABR</Spanish>
<French>Calibre: 7,62x51mm SD&lt;br /&gt;Cartouches: 20&lt;br /&gt;Utilisé avec: EBR</French>
<Polish>Kaliber: 7,62x51mm SD&lt;br /&gt;Pociski: 20&lt;br /&gt;Używane w: Mk18 ABR</Polish>
<Czech>Ráže: 7.62x51mm SD&lt;br /&gt;Munice: 20&lt;br /&gt;Použití: Mk18 ABR</Czech>
<Czech>Ráže: 7.62x51mm SD&lt;br /&gt;Nábojů: 20&lt;br /&gt;Použití u: Mk14 Mod 1 EBR</Czech>
<Portuguese>Calibre: 7,62x51mm SD&lt;br /&gt;Projéteis: 20&lt;br /&gt;Usado em: Mk18 ABR</Portuguese>
<Italian>Calibro: 7.62x51mm Sil.&lt;br /&gt;Munizioni: 20&lt;br /&gt;In uso su: Mk18 ABR</Italian>
<Russian>Калибр: 7,62x51 мм дозвуковые&lt;br /&gt;Патронов: 20&lt;br /&gt;Используются с: Mk18 ABR</Russian>
@ -398,7 +398,7 @@
<Spanish>Calibre: .338 Norma Magnum trazadora&lt;br /&gt;Balas: 130&lt;br /&gt;Se usa en: SPMG</Spanish>
<Russian>Калибр: .338 Norma Magnum трассирующие&lt;br /&gt;Патронов: 130&lt;br /&gt;Используются в: SPMG</Russian>
<Italian>Calibro: .338 Norma Magnum Tracciante&lt;br /&gt;Munizioni: 130&lt;br /&gt;In uso su: SPMG</Italian>
<Czech>Ráže: .338 Noma Magnum Svítící&lt;br /&gt;Munice: 130&lt;br /&gt;Použití: SPMG</Czech>
<Czech>Ráže: .338 Noma Magnum Svítící&lt;br /&gt;Nábojů: 130&lt;br /&gt;Použití u: LWMMG</Czech>
<Portuguese>Calibre: .338 Norma Magnum Traçante&lt;br /&gt;Cartuchos: 130&lt;br /&gt;Usado em: SPMG</Portuguese>
<Hungarian>Kaliber: .338 Norma Magnum nyomkövető&lt;br /&gt;Lövedékek: 130&lt;br /&gt;Használható: SPMG</Hungarian>
</Key>
@ -434,7 +434,7 @@
<Spanish>Calibre: .338 Norma Magnum trazadora IR-DIM&lt;br /&gt;Balas: 130&lt;br /&gt;Se usa en: SPMG</Spanish>
<Russian>Калибр: .338 Norma Magnum ИК-трассирующие&lt;br /&gt;Патронов: 130&lt;br /&gt;Используются с: SPMG</Russian>
<Italian>Calibro: .338 Norma Magnum Tracciante IR-DIM&lt;br /&gt;Munizioni: 130&lt;br /&gt;In uso su: SPMG</Italian>
<Czech>Ráže: .338 Noma Magnum Svítící IR-DIM&lt;br /&gt;Munice: 130&lt;br /&gt;Použití: SPMG</Czech>
<Czech>Ráže: .338 Noma Magnum Svítící IR-DIM&lt;br /&gt;Nábojů: 130&lt;br /&gt;Použití u: LWMMG</Czech>
<Portuguese>Calibre: .338 Norma Magnum Traçante IR-DIM&lt;br /&gt;Cartuchos: 130&lt;br /&gt;Usado em: SPMG</Portuguese>
<Hungarian>Kaliber: .338 Norma Magnum infravörös nyomkövető&lt;br /&gt;Lövedékek: 130&lt;br /&gt;Használható: SPMG</Hungarian>
</Key>
@ -470,7 +470,7 @@
<Spanish>Calibre: .338 Norma Magnum AP&lt;br /&gt;Balas: 130&lt;br /&gt;Se usa en: SPMG</Spanish>
<Russian>Калибр: .338 Norma Magnum бронебойные&lt;br /&gt;Патронов: 130&lt;br /&gt;Используются с: SPMG</Russian>
<Italian>Calibro: .338 Norma Magnum AP&lt;br /&gt;Munizioni: 130&lt;br /&gt;In uso su: SPMG</Italian>
<Czech>Ráže: .338 Noma Magnum AP&lt;br /&gt;Munice: 130&lt;br /&gt;Použití: SPMG</Czech>
<Czech>Ráže: .338 Noma Magnum AP&lt;br /&gt;Nábojů: 130&lt;br /&gt;Použití u: LWMMG</Czech>
<Portuguese>Calibre: .338 Norma Magnum AP&lt;br /&gt;Cartuchos: 130&lt;br /&gt;Usado em: SPMG</Portuguese>
<Hungarian>Kaliber: .338 Norma Magnum páncéltörő&lt;br /&gt;Lövedékek: 130&lt;br /&gt;Használható: SPMG</Hungarian>
</Key>
@ -507,7 +507,7 @@
<Spanish>Calibre: 9.3x64mm trazadora&lt;br /&gt;Balas: 10&lt;br /&gt;Se usa en: Cyrus</Spanish>
<Russian>Калибр: 9,3x64 мм трассирующие&lt;br /&gt;Патронов: 10&lt;br /&gt;Используются с: Cyrus</Russian>
<Italian>Calibro: 9.3x64mm Tracer&lt;br /&gt;Munizioni: 10&lt;br /&gt;In uso su: Cyrus</Italian>
<Czech>Ráže: 9.3x64mm Svítící&lt;br /&gt;Munice: 10&lt;br /&gt;Použití: Cyrus</Czech>
<Czech>Ráže: 9.3x64mm Svítící&lt;br /&gt;Nábojů: 10&lt;br /&gt;Použití u: Cyrus</Czech>
<Portuguese>Calibre: 9.3x64mm Traçante&lt;br /&gt;Cartuchos: 10&lt;br /&gt;Usado em: Cyrus</Portuguese>
<Hungarian>Kaliber: 9,3x64mm nyomkövető&lt;br /&gt;Lövedékek: 10&lt;br /&gt;Használható: Cyrus</Hungarian>
</Key>
@ -543,7 +543,7 @@
<Spanish>Calibre: 9.3x64mm trazadora IR-DIM&lt;br /&gt;Balas: 10&lt;br /&gt;Se usa en: Cyrus</Spanish>
<Russian>Калибр: 9,3x64 мм ИК-трассирующие&lt;br /&gt;Патронов: 10&lt;br /&gt;Используются с: Cyrus</Russian>
<Italian>Calibro: 9.3x64mm Tracciante IR-DIM&lt;br /&gt;Munizioni: 10&lt;br /&gt;In uso su: Cyrus</Italian>
<Czech>Ráže: 9.3x64mm Svítící IR-DIM&lt;br /&gt;Munice: 10&lt;br /&gt;Použití: Cyrus</Czech>
<Czech>Ráže: 9.3x64mm Svítící IR-DIM&lt;br /&gt;Nábojů: 10&lt;br /&gt;Použití u: Cyrus</Czech>
<Portuguese>Calibre: 9.3x64mm Traçante IR-DIM&lt;br /&gt;Cartuchos: 10&lt;br /&gt;Usado em: Cyrus</Portuguese>
<Hungarian>Kaliber: 9,3x64mm infravörös nyomkövető&lt;br /&gt;Lövedékek: 10&lt;br /&gt; Használható: Cyrus</Hungarian>
</Key>
@ -580,7 +580,7 @@
<Spanish>Calibre: 9.3x64mm trazadora&lt;br /&gt;Balas: 150&lt;br /&gt;Se usa en: Navid</Spanish>
<Russian>Калибр: 9,3x64 мм трассирующие&lt;br /&gt;Патронов: 150&lt;br /&gt;Используются с: Навид</Russian>
<Italian>Calibro: 9.3x64mm Tracciante&lt;br /&gt;Munizioni: 150&lt;br /&gt;In uso su: Navid</Italian>
<Czech>Ráže: 9.3x64mm Svítící&lt;br /&gt;Munice: 150&lt;br /&gt;Použití: Navid</Czech>
<Czech>Ráže: 9.3x64mm Svítící&lt;br /&gt;Nábojů: 150&lt;br /&gt;Použití u: HK121</Czech>
<Portuguese>Calibre: 9.3x64mm Traçante&lt;br /&gt;Cartuchos: 150&lt;br /&gt;Usado em: Navid</Portuguese>
<Hungarian>Kaliber: 9,3x64mm nyomkövető&lt;br /&gt;Lövedékek: 150&lt;br /&gt;Használható: Navid</Hungarian>
</Key>
@ -616,7 +616,7 @@
<Spanish>Calibre: 9.3x64mm trazadora IR-DIM&lt;br /&gt;Balas: 150&lt;br /&gt;Se usa en: Navid</Spanish>
<Russian>Калибр: 9,3x64 мм ИК-трассирующие&lt;br /&gt;Патронов: 150&lt;br /&gt;Используются с: Навид</Russian>
<Italian>Calibro: 9.3x64mm Tracciante IR-DIM&lt;br /&gt;Munizioni: 150&lt;br /&gt;In uso su: Navid</Italian>
<Czech>Ráže: 9.3x64mm Svítící IR-DIM&lt;br /&gt;Munice: 150&lt;br /&gt;Použití: Navid</Czech>
<Czech>Ráže: 9.3x64mm Svítící IR-DIM&lt;br /&gt;Nábojů: 150&lt;br /&gt;Použití u: HK121</Czech>
<Portuguese>Calibre: 9.3x64mm Traçante IR-DIM&lt;br /&gt;Cartuchos: 150&lt;br /&gt;Usado em: Navid</Portuguese>
<Hungarian>Kaliber: 9,3x64mm infravörös nyomkövető&lt;br /&gt;Lövedékek: 150&lt;br /&gt;Használható: Navid</Hungarian>
</Key>
@ -652,7 +652,7 @@
<Spanish>Calibre: 9.3x64mm AP&lt;br /&gt;Balas: 150&lt;br /&gt;Se usa en: Navid</Spanish>
<Russian>Калибр: 9,3x64 мм бронебойные&lt;br /&gt;Патронов: 150&lt;br /&gt;Используются с: Навид</Russian>
<Italian>Calibro: 9.3x64mm AP&lt;br /&gt;Munizioni: 150&lt;br /&gt;In uso su: Navid</Italian>
<Czech>Ráže: 9.3x64mm AP&lt;br /&gt;Munice: 150&lt;br /&gt;Použití: Navid</Czech>
<Czech>Ráže: 9.3x64mm AP&lt;br /&gt;Nábojů: 150&lt;br /&gt;Použití u: HK121</Czech>
<Portuguese>Calibre: 9.3x64mm AP&lt;br /&gt;Cartuchos: 150&lt;br /&gt;Usado em: Navid</Portuguese>
<Hungarian>Kaliber: 9,3x64mm páncéltörő&lt;br /&gt;Lövedékek: 150&lt;br /&gt;Használható: Navid</Hungarian>
</Key>
@ -796,7 +796,7 @@
<Russian>Магазин из 100 6,5 мм ИК-трассирующих</Russian>
<German>6,5mm 100-Patronen-Magazin IR-DIM Leuchtspur&lt;br /&gt;Patronen: 100&lt;br /&gt;Eingesetzt von: MXLSW</German>
<Italian>6.5mm 100Rnd Tracer IR-DIM Mag&lt;br /&gt;Munizioni: 100&lt;br /&gt;In uso su: MX LSW</Italian>
<Czech>6.5mm 100náb. Svítící IR-DIM Zásobník&lt;br /&gt;Munice: 100&lt;br /&gt;Použití: MX LSW</Czech>
<Czech>6.5mm 100náb. Svítící IR-DIM Zásobník&lt;br /&gt;Nábojů: 100&lt;br /&gt;Použití u: MX LSW</Czech>
<Portuguese>Carregador 6.5mm 100 Cartuchos Traçantes IR-DIM&lt;br /&gt;Cartuchos: 100&lt;br /&gt;Usado em: MX LSW</Portuguese>
<Hungarian>6.5mm 100-lövedékes infravörös nyomkövető tár&lt;br /&gt;Lövedékek: 100&lt;br /&gt;Használható: MX LSW</Hungarian>
</Key>
@ -832,7 +832,7 @@
<Russian>Магазин из 200-т 6,5 мм ИК-трассирующих</Russian>
<German>6,5mm 200-Patronen-Gurt IR-DIM Leuchtspur&lt;br /&gt;Patronen: 200&lt;br /&gt;Eingesetzt von: Stoner 99 LMG</German>
<Italian>6.5mm 200Rnd Tracer IR-DIM Belt&lt;br /&gt;Munizioni: 200&lt;br /&gt;In uso su: Stoner 99 LMG</Italian>
<Czech>6.5mm 200náb. Svítící IR-DIM Pás&lt;br /&gt;Munice: 200&lt;br /&gt;Použití: Stoner 99 LMG</Czech>
<Czech>6.5mm 200náb. Svítící IR-DIM Pás&lt;br /&gt;Nábojů: 200&lt;br /&gt;Použití u: Stoner 99 LMG</Czech>
<Portuguese>Cinto de munição traçante 6.5mm IR-DIM com 200 cartuchos&lt;br /&gt;Cartuchos: 200&lt;br /&gt;Usado em: Stoner 99 LMG</Portuguese>
<Hungarian>6.5mm 200-lövedékes infravörös nyomkövető heveder&lt;br /&gt;Lövedékek: 200&lt;br /&gt;Használható: Stoner 99 LMG</Hungarian>
</Key>
@ -868,7 +868,7 @@
<Russian>Калибр: 5,56x45 мм NATO (Mk262)&lt;br /&gt;Патронов: 30</Russian>
<German>Kaliber: 5,56x45mm NATO (Mk262)&lt;br /&gt;Patronen: 30</German>
<Italian>Calibro: 5.56x45 mm NATO (Mk262)&lt;br /&gt;Munizioni: 30</Italian>
<Czech>Ráže: 5.56x45mm NATO (Mk262)&lt;br /&gt;Munice: 30</Czech>
<Czech>Ráže: 5.56x45mm NATO (Mk262)&lt;br /&gt;Nábojů: 30</Czech>
<Portuguese>Calibre: 5.56x45mm NATO (Mk262)&lt;br/&gt;Cartuchos: 30</Portuguese>
<Hungarian>Kaliber: 5,56x45mm NATO (Mk262)&lt;br /&gt;Lövedékek: 30</Hungarian>
</Key>
@ -904,7 +904,7 @@
<Russian>Калибр: 5,56x45 мм NATO (Mk318)&lt;br /&gt;Патронов: 30</Russian>
<German>Kaliber: 5,56x45mm NATO (Mk318)&lt;br /&gt;Patronen: 30</German>
<Italian>Calibro: 5.56x45 mm NATO (Mk318)&lt;br /&gt;Munizioni: 30</Italian>
<Czech>Ráže: 5.56x45mm NATO (Mk318)&lt;br /&gt;Munice: 30</Czech>
<Czech>Ráže: 5.56x45mm NATO (Mk318)&lt;br /&gt;Nábojů: 30</Czech>
<Portuguese>Calibre: 5.56x45mm NATO (Mk318)&lt;br/&gt;Cartuchos: 30</Portuguese>
<Hungarian>Kaliber: 5,56x45mm NATO (Mk318)&lt;br /&gt;Lövedékek: 30</Hungarian>
</Key>
@ -940,7 +940,7 @@
<Russian>Калибр: 5,56x45 мм NATO (M995 бронебойные)&lt;br /&gt;Патронов: 30</Russian>
<German>Kaliber: 5,56x45mm NATO (M995 AP)&lt;br /&gt;Patronen: 30</German>
<Italian>Calibro: 5.56x45 mm NATO (M995 AP)&lt;br /&gt;Munizioni: 30</Italian>
<Czech>Ráže: 5.56x45mm NATO (M995 AP)&lt;br /&gt;Munice: 30</Czech>
<Czech>Ráže: 5.56x45mm NATO (M995 AP)&lt;br /&gt;Nábojů: 30</Czech>
<Portuguese>Calibre: 5.56x45mm NATO (M995 AP)&lt;br/&gt;Cartuchos: 30</Portuguese>
<Hungarian>Kaliber: 5,56x45mm NATO (M995 páncéltörő)&lt;br /&gt;Lövedékek: 30</Hungarian>
</Key>
@ -976,7 +976,7 @@
<Russian>Калибр: 7,62x51 мм NATO (M118LR)&lt;br /&gt;Патронов: 10</Russian>
<German>Kaliber: 7,62x51mm NATO (M118LR)&lt;br /&gt;Patronen: 10</German>
<Italian>Calibro: 7.62x51 mm NATO (M118LR)&lt;br /&gt;Munizioni: 10</Italian>
<Czech>Ráže: 7.62x51mm NATO (M118LR)&lt;br /&gt;Munice: 10</Czech>
<Czech>Ráže: 7.62x51mm NATO (M118LR)&lt;br /&gt;Nábojů: 10</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (M118LR)&lt;br/&gt;Cartuchos: 10</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (M118LR)&lt;br /&gt;Lövedékek: 10</Hungarian>
</Key>
@ -1012,7 +1012,7 @@
<Russian>Калибр: 7,62x51 мм NATO (M118LR)&lt;br /&gt;Патронов: 20</Russian>
<German>Kaliber: 7,62x51mm NATO (M118LR)&lt;br /&gt;Patronen: 20</German>
<Italian>Calibro: 7.62x51 mm NATO (M118LR)&lt;br /&gt;Munizioni: 20</Italian>
<Czech>Ráže: 7.62x51mm NATO (M118LR)&lt;br /&gt;Munice: 20</Czech>
<Czech>Ráže: 7.62x51mm NATO (M118LR)&lt;br /&gt;Nábojů: 20</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (M118LR)&lt;br/&gt;Cartuchos: 20</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (M118LR)&lt;br /&gt;Lövedékek: 20</Hungarian>
</Key>
@ -1048,7 +1048,7 @@
<Russian>Калибр: 7,62x51 мм NATO (Mk316 Mod 0)&lt;br /&gt;Патронов: 10</Russian>
<German>Kaliber: 7,62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Patronen: 10</German>
<Italian>Calibro: 7.62x51 mm NATO (Mk316 Mod 0)&lt;br /&gt;Munizioni: 10</Italian>
<Czech>Ráže: 7.62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Munice: 10</Czech>
<Czech>Ráže: 7.62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Nábojů: 10</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (Mk316 Mod 0)&lt;br/&gt;Cartuchos: 10</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Lövedékek: 10</Hungarian>
</Key>
@ -1084,7 +1084,7 @@
<Russian>Калибр: 7,62x51 мм NATO (Mk316 Mod 0)&lt;br /&gt;Патронов: 20</Russian>
<German>Kaliber: 7,62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Patronen: 20</German>
<Italian>Calibro: 7.62x51 mm NATO (Mk316 Mod 0)&lt;br /&gt;Munizioni: 20</Italian>
<Czech>Ráže: 7.62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Munice: 20</Czech>
<Czech>Ráže: 7.62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Nábojů: 20</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (Mk316 Mod 0)&lt;br/&gt;Cartuchos: 20</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (Mk316 Mod 0)&lt;br /&gt;Lövedékek: 20</Hungarian>
</Key>
@ -1120,7 +1120,7 @@
<Russian>Калибр: 7,62x51 мм NATO (Mk319 Mod 0)&lt;br /&gt;Патронов: 10</Russian>
<German>Kaliber: 7,62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Patronen: 10</German>
<Italian>Calibro: 7.62x51 mm NATO (Mk319 Mod 0)&lt;br /&gt;Munizioni: 10</Italian>
<Czech>Ráže: 7.62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Munice: 10</Czech>
<Czech>Ráže: 7.62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Nábojů: 10</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (Mk319 Mod 0)&lt;br/&gt;Cartuchos: 10</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Lövedékek: 10</Hungarian>
</Key>
@ -1156,7 +1156,7 @@
<Russian>Калибр: 7,62x51 мм NATO (Mk319 Mod 0)&lt;br /&gt;Патронов: 20</Russian>
<German>Kaliber: 7,62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Patronen: 20</German>
<Italian>Calibro: 7.62x51 mm NATO (Mk319 Mod 0)&lt;br /&gt;Munizioni: 20</Italian>
<Czech>Ráže: 7.62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Munice: 20</Czech>
<Czech>Ráže: 7.62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Nábojů: 20</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (Mk319 Mod 0)&lt;br/&gt;Cartuchos: 20</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (Mk319 Mod 0)&lt;br /&gt;Lövedékek: 20</Hungarian>
</Key>
@ -1192,7 +1192,7 @@
<Russian>Калибр: 7,62x51 мм NATO (M993 бронебойные)&lt;br /&gt;Патронов: 10</Russian>
<German>Kaliber: 7,62x51mm NATO (M993 AP)&lt;br /&gt;Patronen: 10</German>
<Italian>Calibro: 7.62x51 mm NATO (M993 AP)&lt;br /&gt;Munizioni: 10</Italian>
<Czech>Ráže: 7.62x51mm NATO (M993 AP)&lt;br /&gt;Munice: 10</Czech>
<Czech>Ráže: 7.62x51mm NATO (M993 AP)&lt;br /&gt;Nábojů: 10</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (M993 AP)&lt;br/&gt;Cartuchos: 10</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (M993 páncéltörő)&lt;br /&gt;Lövedékek: 10</Hungarian>
</Key>
@ -1228,7 +1228,7 @@
<German>Kaliber: 7,62x51mm NATO (M993 AP)&lt;br /&gt;Patronen: 20</German>
<Italian>Calibro: 7.62x51 mm NATO (M993 AP)&lt;br /&gt;Munizioni: 20</Italian>
<Spanish>Calibre: 7.62x51 mm NATO (M993 AP)&lt;br /&gt;Balas: 20</Spanish>
<Czech>Ráže: 7.62x51mm NATO (M993 AP)&lt;br /&gt;Munice: 20</Czech>
<Czech>Ráže: 7.62x51mm NATO (M993 AP)&lt;br /&gt;Nábojů: 20</Czech>
<Portuguese>Calibre: 7.26x51mm NATO (M993 AP)&lt;br/&gt;Cartuchos: 20</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (M993 páncéltörő)&lt;br /&gt;Lövedékek: 20</Hungarian>
</Key>
@ -1264,7 +1264,7 @@
<Russian>Калибр: 7,62x67 мм NATO (Mk248 Mod 0)&lt;br /&gt;Патронов: 20</Russian>
<German>Kaliber: 7,62x51mm NATO (Mk248 Mod 0)&lt;br /&gt;Patronen: 20</German>
<Italian>Calibro: 7.62x67 mm NATO (Mk248 Mod 0)&lt;br /&gt;Munizioni: 20</Italian>
<Czech>Ráže: 7.62x67mm NATO (Mk248 Mod 0)&lt;br /&gt;Munice: 20</Czech>
<Czech>Ráže: 7.62x67mm NATO (Mk248 Mod 0)&lt;br /&gt;Nábojů: 20</Czech>
<Portuguese>Calibre: 7.26x67mm NATO (Mk248 Mod 0)&lt;br/&gt;Cartuchos: 20</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (Mk248 Mod 0)&lt;br /&gt;Lövedékek: 20</Hungarian>
</Key>
@ -1300,7 +1300,7 @@
<Russian>Калибр: 7,62x67 мм NATO (Mk248 Mod 1)&lt;br /&gt;Патронов: 20</Russian>
<German>Kaliber: 7,62x51mm NATO (Mk248 Mod 1)&lt;br /&gt;Patronen: 20</German>
<Italian>Calibro: 7.62x67 mm NATO (Mk248 Mod 1)&lt;br /&gt;Munizioni: 20</Italian>
<Czech>Ráže: 7.62x67mm NATO (Mk248 Mod 1)&lt;br /&gt;Munice: 20</Czech>
<Czech>Ráže: 7.62x67mm NATO (Mk248 Mod 1)&lt;br /&gt;Nábojů: 20</Czech>
<Portuguese>Calibre: 7.26x67mm NATO (Mk248 Mod 1)&lt;br/&gt;Cartuchos: 20</Portuguese>
<Hungarian>Kaliber: 7,62x51mm NATO (Mk248 Mod 1)&lt;br /&gt;Lövedékek: 20</Hungarian>
</Key>
@ -1336,7 +1336,7 @@
<Russian>Калибр: 7,62x67 мм NATO (Berger Hybrid OTM)&lt;br /&gt;Патронов: 20</Russian>
<German>Kaliber: 7,62x67mm NATO (Berger Hybrid OTM)&lt;br /&gt;Patronen: 20</German>
<Italian>Calibro: 7.62x67 mm NATO (Berger Hybrid OTM)&lt;br /&gt;Munizioni: 20</Italian>
<Czech>Ráže: 7.62x67mm NATO (Berger Hybrid OTM)&lt;br /&gt;Munice: 20</Czech>
<Czech>Ráže: 7.62x67mm NATO (Berger Hybrid OTM)&lt;br /&gt;Nábojů: 20</Czech>
<Portuguese>Calibre: 7.26x67mm NATO (Berger Hybrid OTM)&lt;br/&gt;Cartuchos: 20</Portuguese>
<Hungarian>Kaliber: 7,62x67mm NATO (Berger Hybrid OTM)&lt;br /&gt;Lövedékek: 20</Hungarian>
</Key>
@ -1372,7 +1372,7 @@
<Russian>Калибр: 6,5x47 мм (экспансивные Scenar)&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются с: MXM</Russian>
<German>Kaliber: 6,5x47mm (HPBT Scenar)&lt;br /&gt;Patronen: 30&lt;br /&gt;Eingesetzt von: MXM</German>
<Italian>Calibro: 6.5x47mm (HPBT Scenar)&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: MXM</Italian>
<Czech>Ráže: 6.5x47mm (HPBT Scenar)&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: MXM</Czech>
<Czech>Ráže: 6.5x47mm (HPBT Scenar)&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: MXM</Czech>
<Portuguese>Calibre: 6.5x47mm (HPBT Scenar)&lt;br/&gt;Cartuchos: 30&lt;br/&gt;Usado em: MXM</Portuguese>
<Hungarian>Kaliber: 6,5x47mm (HPBT Scenar)&lt;br /&gt;Lövedékek: 30&lt;br /&gt;Használható: MXM</Hungarian>
</Key>
@ -1408,7 +1408,7 @@
<Italian>Calibro: 6.5mm Creedmor&lt;br /&gt;Munizioni: 30&lt;br /&gt;In uso su: MXM</Italian>
<Spanish>Calibre: 6.5mm Creedmor&lt;br /&gt;Balas: 30&lt;br /&gt;Se usa en: MXM</Spanish>
<Russian>Калибр: 6,5x47мм Creedmor&lt;br /&gt;Патронов: 30&lt;br /&gt;Используются c: MXM</Russian>
<Czech>Ráže: 6.5x47mm Creedmor&lt;br /&gt;Munice: 30&lt;br /&gt;Použití: MXM</Czech>
<Czech>Ráže: 6.5x47mm Creedmor&lt;br /&gt;Nábojů: 30&lt;br /&gt;Použití u: MXM</Czech>
<Portuguese>Calibre: 6.5x47mm Creedmor&lt;br/&gt;Cartuchos: 30&lt;br/&gt;Usado em: MXM</Portuguese>
<Hungarian>Kaliber: 6,5x47mm Creedmor&lt;br /&gt;Lövedékek: 30&lt;br /&gt;Használható: MXM</Hungarian>
</Key>
@ -1444,7 +1444,7 @@
<Russian>Калибр: 8,6x70mm (300 гран Sierra MatchKing экспансивные)&lt;br /&gt;Патронов: 10</Russian>
<German>Kaliber: 8,6x70mm (300gr Sierra MatchKing HPBT)&lt;br /&gt;Patronen: 10</German>
<Italian>Calibro: 8.6x70mm (300gr Sierra MatchKing HPBT)&lt;br /&gt;Munizioni: 10</Italian>
<Czech>Ráže: 8.6x70mm (300gr Sierra MatchKing HPBT)&lt;br /&gt;Munice: 10</Czech>
<Czech>Ráže: 8.6x70mm (300gr Sierra MatchKing HPBT)&lt;br /&gt;Nábojů: 10</Czech>
<Portuguese>Calibre: 8.6x70mm (300gr Sierra MatchKing HPBT)&lt;br/&gt;Cartuchos: 10</Portuguese>
<Hungarian>Kaliber: 8,6x70mm (300gr Sierra MatchKing HPBT)&lt;br /&gt;Lövedékek: 10</Hungarian>
</Key>
@ -1480,7 +1480,7 @@
<Russian>Калибр: 8,6x70 мм (API526)&lt;br /&gt;Патронов: 10</Russian>
<German>Kaliber: 8,6x70mm (API526)&lt;br /&gt;Patronen: 10</German>
<Italian>Calibro: 8.6x70mm (API526)&lt;br /&gt;Munizioni: 10</Italian>
<Czech>Ráže: 8.6x70mm (API526)&lt;br /&gt;Munice: 10</Czech>
<Czech>Ráže: 8.6x70mm (API526)&lt;br /&gt;Nábojů: 10</Czech>
<Portuguese>Calibre: 8.6x70mm (API526)&lt;br/&gt;Cartuchos: 10</Portuguese>
<Hungarian>Kaliber: 8,6x70mm (API526)&lt;br /&gt;Lövedékek: 10</Hungarian>
</Key>
@ -1516,7 +1516,7 @@
<Russian>Калибр: 12,7x99 мм&lt;br /&gt;Патронов: 5</Russian>
<German>Kaliber: 12,7x99mm&lt;br /&gt;Patronen: 5</German>
<Italian>Calibro: 12.7x99mm&lt;br /&gt;Munizioni: 5</Italian>
<Czech>Ráže: 12.7x99mm&lt;br /&gt;Munice: 5</Czech>
<Czech>Ráže: 12.7x99mm&lt;br /&gt;Nábojů: 5</Czech>
<Portuguese>Calibre: 12.7x99mm&lt;br/&gt;Cartuchos: 5</Portuguese>
<Hungarian>Kaliber: 12,7x99mm&lt;br /&gt;Lövedékek: 5</Hungarian>
</Key>
@ -1552,7 +1552,7 @@
<Russian>Калибр: 12,7x99 мм бронебойно-зажигательные&lt;br /&gt;Патронов: 5</Russian>
<German>Kaliber:12,7x99mm API&lt;br /&gt;Patronen: 5</German>
<Italian>Calibro: 12.7x99mm API&lt;br /&gt;Munizioni: 5</Italian>
<Czech>Ráže: 12.7x99mm API&lt;br /&gt;Munice: 5</Czech>
<Czech>Ráže: 12.7x99mm API&lt;br /&gt;Nábojů: 5</Czech>
<Portuguese>Calibre: 12.7x99mm API&lt;br/&gt;Cartuchos: 5</Portuguese>
<Hungarian>Kaliber: 12,7x99mm API&lt;br /&gt;Lövedékek: 5</Hungarian>
</Key>
@ -1588,7 +1588,7 @@
<Russian>Калибр: 12,7x99 мм (A-MAX)&lt;br /&gt;Патронов: 5</Russian>
<Italian>Calibro: 12.7x99mm (AMAX)&lt;br /&gt;Munizioni: 5</Italian>
<German>Kaliber:12,7x99mm (AMAX)&lt;br /&gt;Patronen: 5</German>
<Czech>Ráže: 12.7x99mm (AMAX)&lt;br /&gt;Munice: 5</Czech>
<Czech>Ráže: 12.7x99mm (AMAX)&lt;br /&gt;Nábojů: 5</Czech>
<Portuguese>Calibre: 12.7x99mm (AMAX)&lt;br/&gt;Cartuchos: 5</Portuguese>
<Hungarian>Kaliber: 12,7x99mm (AMAX)&lt;br /&gt;Lövedékek: 5</Hungarian>
</Key>

View File

@ -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);
@ -153,16 +149,32 @@ class CfgVehicles {
class GVAR(ModuleSurrender): Module_F {
author = ECSTRING(common,ACETeam);
category = "ACE";
displayName = CSTRING(ModuleSurrender_DisplayName); //Make Unit Surrender
displayName = CSTRING(ModuleSurrender_DisplayName);
function = QFUNC(moduleSurrender);
scope = 2; //show in editor
isGlobal = 1; //run global
isGlobal = 0; //run on server
isTriggerActivated = 1; //Wait for triggers
icon = QUOTE(PATHTOF(UI\Icon_Module_Make_Unit_Surrender_ca.paa));
functionPriority = 0;
class Arguments {};
class ModuleDescription: ModuleDescription {
description = CSTRING(ModuleSurrender_Description); //Sync a unit to make them surrender.<br/>Source: ace_captives
description = CSTRING(ModuleSurrender_Description);
sync[] = {"AnyAI"};
};
};
class GVAR(ModuleHandcuffed): Module_F {
author = ECSTRING(common,ACETeam);
category = "ACE";
displayName = CSTRING(ModuleHandcuffed_DisplayName);
function = QFUNC(moduleHandcuffed);
scope = 2; //show in editor
isGlobal = 0; //run on server
isTriggerActivated = 1; //Wait for triggers
icon = QUOTE(PATHTOF(UI\Icon_Module_Make_Unit_Handcuffed_ca.paa));
functionPriority = 0;
class Arguments {};
class ModuleDescription: ModuleDescription {
description = CSTRING(ModuleHandcuffed_Description);
sync[] = {"AnyAI"};
};
};
@ -176,6 +188,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);

View File

@ -24,6 +24,7 @@ PREP(handlePlayerChanged);
PREP(handleRespawn);
PREP(handleUnitInitPost);
PREP(handleZeusDisplayChanged);
PREP(moduleHandcuffed);
PREP(moduleSettings);
PREP(moduleSurrender);
PREP(setHandcuffed);

View File

@ -2,7 +2,7 @@
class CfgPatches {
class ADDON {
units[] = {QGVAR(ModuleSettings), QGVAR(ModuleSurrender)};
units[] = {QGVAR(ModuleSettings), QGVAR(ModuleSurrender), QGVAR(ModuleHandcuffed)};
weapons[] = {"ACE_CableTie"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ACE_Interaction"};

View File

@ -20,11 +20,12 @@ params ["_unit", "_target"];
//Check sides, Player has cableTie, target is alive and not already handcuffed
(GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) &&
("ACE_CableTie" in (items _unit)) &&
{"ACE_CableTie" in (items _unit)} &&
{alive _target} &&
{!(_target getVariable [QGVAR(isHandcuffed), false])} &&
{
(_target getVariable ["ACE_isUnconscious", false]) || //isUnconscious
{!([_target] call EFUNC(common,isPlayer))} || //is an AI (not a player)
{GVAR(requireSurrender) == 0} || //or don't require surrendering
{_target getVariable [QGVAR(isSurrendering), false]} || //or is surrendering
{(GVAR(requireSurrender) == 2) && {(currentWeapon _target) == ""}} //or "SurrenderOrNoWeapon" and no weapon

View File

@ -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;

View File

@ -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

View File

@ -40,12 +40,12 @@ if (_respawn > 3) then {
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {
[_unit, false] call FUNC(setHandcuffed);
};
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
[_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set);
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
[_unit, false] call FUNC(setSurrendered);
};
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
[_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set);
if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {
_oldUnit setVariable [QGVAR(isEscorting), false, true];

View File

@ -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;
};
};

View File

@ -0,0 +1,35 @@
/*
* Author: PabstMirror
* Module Function to make a unit handcuffed (can be called from editor)
*
* Arguments:
* 0: The Module Logic <OBJECT>
* 1: synced objects <ARRAY>
* 2: Activated <BOOL>
*
* Return Value:
* Nothing
*
* Example:
* Called from module
*
* Public: No
*/
#include "script_component.hpp"
params ["_logic", "_units", "_activated"];
TRACE_3("params",_logic,_units,_activated);
if (!_activated) exitWith {};
if (!isServer) exitWith {};
//Modules run before postInit can instal the event handler, so we need to wait a little bit
[{
params ["_units"];
{
["SetHandcuffed", [_x], [_x, true]] call EFUNC(common,targetEvent);
} forEach _units;
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
deleteVehicle _logic;

View File

@ -1,9 +1,9 @@
/*
* Author: PabstMirror
* Module Function to make a unit surrender (can be called from editor, or placed with zeus)
* Module Function to make a unit surrender (can be called from editor)
*
* Arguments:
* 0: The Module Logic Object <OBJECT>
* 0: The Module Logic <OBJECT>
* 1: synced objects <ARRAY>
* 2: Activated <BOOL>
*
@ -17,20 +17,19 @@
*/
#include "script_component.hpp"
private ["_bisMouseOver", "_mouseOverObject"];
params ["_logic", "_units", "_activated"];
TRACE_3("params",_logic,_units,_activated);
if (!_activated) exitWith {};
if (!isServer) exitWith {};
if (local _logic) then {
//Modules run before postInit can instal the event handler, so we need to wait a little bit
[{
params ["_units"];
{
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
} forEach _units;
}, [_units], 0.05]call EFUNC(common,waitAndExecute);
//Modules run before postInit can instal the event handler, so we need to wait a little bit
[{
params ["_units"];
{
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
} forEach _units;
}, [_units], 0.05] call EFUNC(common,waitAndExecute);
deleteVehicle _logic;
};
deleteVehicle _logic;

View File

@ -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 {
@ -28,7 +28,7 @@ if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith
if (_state) then {
_unit setVariable [QGVAR(isHandcuffed), true, true];
[_unit, QGVAR(Handcuffed), true] call EFUNC(common,setCaptivityStatus);
[_unit, "setCaptive", QGVAR(Handcuffed), true] call EFUNC(common,statusEffect_set);
if (_unit getVariable [QGVAR(isSurrendering), false]) then { //If surrendering, stop
[_unit, false] call FUNC(setSurrendered);
@ -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,8 +56,11 @@ 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)
private "_animChangedEHID";
private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
if (_animChangedEHID != -1) then {
TRACE_1("removing animChanged EH",_animChangedEHID);
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
};
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
params ["_unit", "_newAnimation"];
TRACE_2("AnimChanged",_unit,_newAnimation);
@ -67,7 +70,6 @@ if (_state) then {
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
};
} else {
_turretPath = [];
{
_x params ["_xUnit", "", "", "_xTurretPath"];
@ -87,11 +89,10 @@ if (_state) then {
}, [_unit], 0.01] call EFUNC(common,waitAndExecute);
} else {
_unit setVariable [QGVAR(isHandcuffed), false, true];
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
[_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set);
//remove AnimChanged EH
private "_animChangedEHID";
_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];
@ -106,7 +107,7 @@ if (_state) then {
};
if (_unit == ACE_player) then {
showHUD true;
["captive", []] call EFUNC(common,showHud); //same as showHud true;
};
};

View File

@ -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");
};
@ -33,10 +33,10 @@ if (_state) then {
_unit setVariable [QGVAR(isSurrendering), true, true];
[_unit, QGVAR(Surrendered), true] call EFUNC(common,setCaptivityStatus);
[_unit, "setCaptive", QGVAR(Surrendered), true] call EFUNC(common,statusEffect_set);
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,11 @@ 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)
private "_animChangedEHID";
private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
if (_animChangedEHID != -1) then {
TRACE_1("removing animChanged EH",_animChangedEHID);
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
};
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
params ["_unit", "_newAnimation"];
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
@ -61,18 +65,17 @@ if (_state) then {
}, [_unit], 0.01] call EFUNC(common,waitAndExecute);
} else {
_unit setVariable [QGVAR(isSurrendering), false, true];
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
[_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set);
//remove AnimChanged EH
private "_animChangedEHID";
_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;
};
};

View File

@ -2,6 +2,9 @@
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_CAPTIVES
#define DEBUG_MODE_FULL

View File

@ -7,7 +7,7 @@
<Spanish>Tomar prisionero</Spanish>
<French>Capturer le prisonnier</French>
<Polish>Aresztuj</Polish>
<Czech>Zajmout Osobu</Czech>
<Czech>Zajmout osobu</Czech>
<Italian>Arresta il prigioniero</Italian>
<Portuguese>Tomar Prisioneiro</Portuguese>
<Hungarian>Foglyul ejtés</Hungarian>
@ -19,7 +19,7 @@
<Spanish>Liberar prisionero</Spanish>
<Polish>Wypuść więźnia</Polish>
<French>Libérer le prisonnier</French>
<Czech>Osvobodit Zajatce</Czech>
<Czech>Osvobodit zajatce</Czech>
<Italian>Libera il prigioniero</Italian>
<Portuguese>Libertar Prisioneiro</Portuguese>
<Hungarian>Fogoly szabadon engedése</Hungarian>
@ -31,7 +31,7 @@
<Spanish>Escoltar prisionero</Spanish>
<Polish>Eskortuj więźnia</Polish>
<French>Escorter le prisonnier</French>
<Czech>Eskortovat Zajatce</Czech>
<Czech>Eskortovat zajatce</Czech>
<Italian>Scorta il Prigioniero</Italian>
<Portuguese>Escoltar Prisioneiro</Portuguese>
<Hungarian>Fogoly kísérése</Hungarian>
@ -43,7 +43,7 @@
<Spanish>Soltar prisionero</Spanish>
<Polish>Anuluj eskortowanie</Polish>
<French>Relâcher le prisonnier</French>
<Czech>Uvolnit Zajatce</Czech>
<Czech>Uvolnit zajatce</Czech>
<Italian>Rilascia il Prigioniero</Italian>
<Portuguese>Largar Prisioneiro</Portuguese>
<Hungarian>Fogoly elengedése</Hungarian>
@ -91,7 +91,7 @@
<Polish>Opaska zaciskowa</Polish>
<Spanish>Precinto</Spanish>
<French>Serflex</French>
<Czech>Stahovací Pásek</Czech>
<Czech>Stahovací pásek</Czech>
<Portuguese>Algema Plástica</Portuguese>
<Italian>Fascietta</Italian>
<Hungarian>Gyorskötöző</Hungarian>
@ -99,7 +99,7 @@
</Key>
<Key ID="STR_ACE_Captives_CableTieDescription">
<English>Cable ties that allow you to restrain prisoners.</English>
<German>Kabelbinder ermöglichen es, Gefangene zu fesseln.</German>
<German>Mit Kabelbindern können Gefangene gefesselt werden.</German>
<Polish>Opaska zaciskowa pozwala na skrępowanie dłoni u więźnia.</Polish>
<Spanish>Los precintos permiten maniatar prisioneros</Spanish>
<French>Les Serflex permettent de menotter les prisonniers.</French>
@ -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.&lt;br /&gt;Source: ace_captives</English>
@ -177,7 +177,21 @@
<Portuguese>Sincroniza uma unidade para fazer com que ela se renda. &lt;br/&gt;Fonte: ace_captives</Portuguese>
<French>Synchronise une unité pour la rendre captive. &lt;br/&gt;Source: ace_captives</French>
<Hungarian>Egység szinkronizálása, hogy kapituláljon.&lt;br /&gt;Forrás: ace_captives</Hungarian>
<Russian>Синхронизируйте с юнитами, чтобы сделать их пленными.&lt;br /&gt;Источник: ace_captives</Russian>
<Russian>Синхронизируйте с юнитами, чтобы заставить их сдаться в плен.&lt;br /&gt;Источник: 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.&lt;br /&gt;Source: ace_captives</English>
<Polish>Zsynchronizuj z jednostką, aby została skuta.&lt;br /&gt;Źródło: ace_captives</Polish>
<Portuguese>Sincronizar uma unidade para deixá-la algemada.&lt;br/&gt;Source: ace_captives</Portuguese>
<Russian>Синхронизируйте с юнитами, чтобы сделать их связанными.&lt;br /&gt;Источник: ace_captives</Russian>
<Czech>Synchronizovat s jednotkou, která má být v poutech.&lt;br /&gt;Zdroj: ace_captives</Czech>
</Key>
<Key ID="STR_ACE_Captives_ModuleSettings_DisplayName">
<English>Captives Settings</English>
@ -206,7 +220,7 @@
<Polish>Skuwanie sojuszników</Polish>
<Spanish>Se puede esposar el bando propio</Spanish>
<Czech>Může spoutat spolubojovníky</Czech>
<German>Kann Teamkollegen fesseln</German>
<German>Kann Kameraden fesseln</German>
<Portuguese>Pode algemar o próprio lado</Portuguese>
<French>Peut libérer sa propre faction</French>
<Hungarian>Saját oldal megbilincselhető</Hungarian>
@ -217,7 +231,7 @@
<Polish>Czy gracze mogą skuwać sojuszników?</Polish>
<Spanish>Pueden los jugadores esposar unidades en su propio bando</Spanish>
<Czech>Mohou hráči spoutat jednotky na své straně</Czech>
<German>Können Spieler eigene Einheiten fesseln</German>
<German>Spieler können eigene Einheiten fesseln. </German>
<Portuguese>Os jogadores podem algemar unidades do seu lado</Portuguese>
<French>Les joueurs peuvent utiliser les Serflex sur leur propre camp</French>
<Hungarian>A játékosok megkötözhetik-e a saját oldalukon lévő egységeket</Hungarian>
@ -239,7 +253,7 @@
<Polish>Gracze mogą skapitulować po schowaniu swojej broni do kabury</Polish>
<Spanish>Los jugadores pueden rendirse después de enfundar su arma</Spanish>
<Czech>Hráč se může vzdát poté, co si skryje zbraň</Czech>
<German>Spieler können kapitulieren, nachdem sie ihre Waffe geholstert haben</German>
<German>Spieler können kapitulieren, nachdem sie ihre Waffe geholstert haben.</German>
<Portuguese>Jogadores podem se render depois de guardar sua arma</Portuguese>
<French>Les joueurs peuvent se rendre après avoir rangé leur arme</French>
<Hungarian>A játékosok megadhatják magukat a fegyverük elrakása után</Hungarian>
@ -247,31 +261,39 @@
</Key>
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrender_name">
<English>Require surrendering</English>
<German>Benötigt Kapitulation</German>
<Polish>Wymagaj kapitulacji</Polish>
<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>
<German>Spieler müssen sich erst ergeben, bevor sie gefangen genommen werden können</German>
<Polish>Wymagaj od graczy kapitulacji zanim będzie można ich zaaresztować</Polish>
<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>
<German>Nur Ergeben</German>
<Polish>Tylko kapitulacja</Polish>
<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>
<German>Ergeben oder keine Waffe</German>
<Polish>Kapitulacja lub brak broni</Polish>
<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>

View File

@ -12,7 +12,9 @@ class Extended_PostInit_EventHandlers {
class Extended_Killed_EventHandlers {
class All {
init = QUOTE(call FUNC(handleDestroyed));
class ADDON {
serverKilled = QUOTE(call FUNC(handleDestroyed));
};
};
};
@ -48,6 +50,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));

View File

@ -1,5 +1,9 @@
class CfgVehicles {
class ACE_Module;
class Logic;
class Module_F: Logic {
class ModuleDescription;
};
class ACE_Module: Module_F {};
class ACE_moduleCargoSettings: ACE_Module {
scope = 2;
displayName = CSTRING(SettingsModule_DisplayName);
@ -8,6 +12,7 @@ class CfgVehicles {
function = QFUNC(moduleSettings);
functionPriority = 1;
isGlobal = 1;
isSingular = 1;
isTriggerActivated = 0;
author = ECSTRING(common,ACETeam);
@ -25,6 +30,33 @@ class CfgVehicles {
sync[] = {};
};
};
class GVAR(makeLoadable): ACE_Module {
scope = 2;
displayName = CSTRING(makeLoadable_displayName);
icon = QUOTE(PATHTOF(UI\Icon_Module_makeLoadable_ca.paa));
category = "ACE_Logistics";
function = QFUNC(moduleMakeLoadable);
isGlobal = 1;
isTriggerActivated = 0;
author = ECSTRING(common,ACETeam);
class Arguments {
class canLoad {
displayName = CSTRING(makeLoadable_displayName);
description = CSTRING(MakeLoadable_description);
typeName = "BOOL";
defaultValue = 1;
};
class setSize {
displayName = CSTRING(makeLoadable_setSize_displayName);
typeName = "NUMBER";
defaultValue = 1;
};
};
class ModuleDescription: ModuleDescription {
description = CSTRING(module_MakeLoadable_description);
sync[] = {"AnyStaticObject"};
};
};
class LandVehicle;
class Car: LandVehicle {
@ -171,6 +203,13 @@ class CfgVehicles {
GVAR(hasCargo) = 0;
};
// autonomus
class Helicopter_Base_F;
class UAV_01_base_F: Helicopter_Base_F {
GVAR(space) = 0;
GVAR(hasCargo) = 0;
};
// boats
class Ship;
class Ship_F: Ship {
@ -229,6 +268,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;

Binary file not shown.

View File

@ -1,5 +1,45 @@
#include "script_component.hpp"
["LoadCargo", {_this call FUNC(loadItem)}] call EFUNC(common,addEventHandler);
["UnloadCargo", {_this call FUNC(unloadItem)}] call EFUNC(common,addEventHandler);
["AddCargoByClass", {_this call FUNC(addCargoItem)}] call EFUNC(common,addEventHandler);
["LoadCargo", {
(_this select 0) params ["_item","_vehicle"];
TRACE_2("LoadCargo EH",_item,_vehicle);
private _loaded = [_item, _vehicle] call FUNC(loadItem);
// Show hint as feedback
private _hint = [LSTRING(LoadingFailed), LSTRING(LoadedItem)] select _loaded;
private _itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName");
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent);
if (_loaded) then {
// Invoke listenable event
["cargoLoaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
};
}] call EFUNC(common,addEventHandler);
["UnloadCargo", {
(_this select 0) params ["_item","_vehicle", ["_unloader", objNull]];
TRACE_3("UnloadCargo EH",_item,_vehicle,_unloader);
private _unloaded = [_item, _vehicle, _unloader] call FUNC(unloadItem); //returns true if sucessful
private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
// Show hint as feedback
private _hint = [LSTRING(UnloadingFailed), LSTRING(UnloadedItem)] select _unloaded;
private _itemName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
["displayTextStructured", [[_hint, _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent);
if (_unloaded) then {
// Invoke listenable event
["cargoUnloaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
};
// TOOO maybe drag/carry the unloaded item?
}] call EFUNC(common,addEventHandler);

View File

@ -13,6 +13,8 @@ PREP(handleDestroyed);
PREP(initObject);
PREP(initVehicle);
PREP(loadItem);
PREP(makeLoadable);
PREP(moduleMakeLoadable);
PREP(moduleSettings);
PREP(onMenuOpen);
PREP(startLoadIn);
@ -21,5 +23,6 @@ PREP(unloadItem);
PREP(validateCargoSpace);
GVAR(initializedItemClasses) = [];
GVAR(initializedVehicleClasses) = [];
ADDON = true;

View File

@ -18,24 +18,12 @@
*/
#include "script_component.hpp"
private ["_position", "_item", "_i"];
params ["_itemClass", "_vehicle", ["_amount", 1], ["_showHint", false, [false]] ];
params ["_itemClass", "_vehicle", ["_amount", 1], ["_showHint", false, [false]]];
TRACE_3("params",_itemClass,_vehicle,_amount);
_position = getPos _vehicle;
_position set [1, (_position select 1) + 1];
_position set [2, (_position select 2) + 7.5];
for "_i" from 1 to _amount do {
_item = createVehicle [_itemClass, _position, [], 0, "CAN_COLLIDE"];
// Load item or delete it if no space left
if !([_item, _vehicle, _showHint] call FUNC(loadItem)) exitWith {
TRACE_1("no room to load item - deleting",_item);
deleteVehicle _item;
};
TRACE_1("Item Loaded",_item);
// Invoke listenable event
["cargoAddedByClass", [_itemClass, _vehicle, _amount]] call EFUNC(common,globalEvent);
[_itemClass, _vehicle] call FUNC(loadItem);
};
// Invoke listenable event
["cargoAddedByClass", [_itemClass, _vehicle, _amount]] call EFUNC(common,globalEvent);

View File

@ -17,11 +17,11 @@
#include "script_component.hpp"
params ["_player", "_object"];
TRACE_2("params",_player,_object);
if (!([_player, _object, []] call EFUNC(common,canInteractWith))) exitWith {false};
private ["_nearestVehicle"];
_nearestVehicle = [_player] call FUNC(findNearestVehicle);
private _nearestVehicle = [_player] call FUNC(findNearestVehicle);
if (_nearestVehicle isKindOf "Cargo_Base_F" || isNull _nearestVehicle) then {
{

View File

@ -3,7 +3,7 @@
* Check if item can be loaded into other Object.
*
* Arguments:
* 0: Item Object <OBJECT>
* 0: Item <OBJECT or STRING>
* 1: Holder Object (Vehicle) <OBJECT>
*
* Return value:
@ -16,14 +16,23 @@
*/
#include "script_component.hpp"
params ["_item", "_vehicle"];
params [["_item", "", [objNull,""]], "_vehicle"];
if (speed _vehicle > 1 || (((getPos _vehicle) select 2) > 3)) exitWith {false};
if (speed _vehicle > 1 || {((getPos _vehicle) select 2) > 3}) exitWith {TRACE_1("vehicle not stable",_vehicle); false};
private "_itemSize";
_itemSize = ([_item] call FUNC(getSizeItem));
private _itemSize = [_item] call FUNC(getSizeItem);
private _validItem = false;
if (_item isEqualType "") then {
_validItem =
isClass (configFile >> "CfgVehicles" >> _item) &&
{getNumber (configFile >> "CfgVehicles" >> _item >> QGVAR(canLoad)) == 1};
} else {
_validItem =
(alive _item) &&
{(_item distance _vehicle) <= MAX_LOAD_DISTANCE};
};
(_itemSize > 0) &&
{alive _item && alive _vehicle} &&
{(_item distance _vehicle <= MAX_LOAD_DISTANCE)} &&
_validItem &&
{_itemSize > 0} &&
{alive _vehicle} &&
{_itemSize <= ([_vehicle] call FUNC(getCargoSpaceLeft))}

View File

@ -5,6 +5,7 @@
* Arguments:
* 0: loaded Object <OBJECT>
* 1: Object <OBJECT>
* 2: Unloader (player) <OPTIONAL><OBJECT>
*
* Return value:
* Can be unloaded <BOOL>
@ -16,29 +17,14 @@
*/
#include "script_component.hpp"
private ["_loaded", "_validVehiclestate", "_emptyPos"];
params ["_item", "_vehicle", ["_unloader", objNull]];
TRACE_2("params",_item,_vehicle);
params ["_item", "_vehicle"];
_loaded = _vehicle getVariable [QGVAR(loaded), []];
private _loaded = _vehicle getVariable [QGVAR(loaded), []];
if !(_item in _loaded) exitWith {false};
_validVehiclestate = true;
_emptyPos = [];
if (_vehicle isKindOf "Ship" ) then {
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]); // TODO: if spot is underwater pick another spot.
} else {
if (_vehicle isKindOf "Air" ) then {
if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false};
_emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition);
_emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ];
} else {
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]);
};
};
private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
if (!_validVehiclestate) exitWith {false};
private _emptyPos = [_vehicle, _itemClass, _unloader] call EFUNC(common,findUnloadPosition);
(count _emptyPos != 0)
(count _emptyPos) == 3

View File

@ -15,23 +15,21 @@
*/
#include "script_component.hpp"
private ["_loadCar", "_loadHelicopter", "_loadTank", "_loadShip", "_loadContainer"];
params ["_unit"];
_loadCar = nearestObject [_unit, "car"];
private _loadCar = nearestObject [_unit, "car"];
if (_unit distance _loadCar <= MAX_LOAD_DISTANCE) exitWith {_loadCar};
_loadHelicopter = nearestObject [_unit, "air"];
private _loadHelicopter = nearestObject [_unit, "air"];
if (_unit distance _loadHelicopter <= MAX_LOAD_DISTANCE) exitWith {_loadHelicopter};
_loadTank = nearestObject [_unit, "tank"];
private _loadTank = nearestObject [_unit, "tank"];
if (_unit distance _loadTank <= MAX_LOAD_DISTANCE) exitWith {_loadTank};
_loadShip = nearestObject [_unit, "ship"];
private _loadShip = nearestObject [_unit, "ship"];
if (_unit distance _loadShip <= MAX_LOAD_DISTANCE) exitWith {_loadShip};
_loadContainer = nearestObject [_unit,"Cargo_base_F"];
private _loadContainer = nearestObject [_unit,"Cargo_base_F"];
if (_unit distance _loadContainer <= MAX_LOAD_DISTANCE) exitWith {_loadContainer};
objNull

View File

@ -16,5 +16,6 @@
#include "script_component.hpp"
params ["_object"];
// TRACE_1("params",_object);
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _object >> QGVAR(space))]
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))]

View File

@ -3,7 +3,7 @@
* Get the cargo size of an object.
*
* Arguments:
* 0: Object <OBJECT>
* 0: Item <OBJECT or STRING>
*
* Return value:
* Cargo size <NUMBER> (default: -1)
@ -15,14 +15,25 @@
*/
#include "script_component.hpp"
private "_config";
params ["_item"];
_config = (configFile >> "CfgVehicles" >> typeOf _item >> QGVAR(size));
scopeName "return";
if (isNumber (_config)) exitWith {
_item getVariable [QGVAR(size), getNumber (_config)]
private _isVirtual = (_item isEqualType "");
private _itemClass = if (_isVirtual) then {_item} else {typeOf _item};
private _config = (configFile >> "CfgVehicles" >> _itemClass >> QGVAR(size));
if (_isVirtual) then {
if (isNumber _config) then {
(getNumber _config) breakOut "return";
};
} else {
if (!isNil {_item getVariable QGVAR(size)}) then {
(_item getVariable QGVAR(size)) breakOut "return";
};
if (isNumber _config) then {
(getNumber _config) breakOut "return";
};
};
-1

View File

@ -1,6 +1,6 @@
/*
* Author: Glowbal
* Handle object being destroyed.
* Handle object being destroyed. Only runs on server.
*
* Arguments:
* 0: Object <OBJECT>
@ -16,16 +16,17 @@
#include "script_component.hpp"
params ["_vehicle"];
TRACE_1("params",_vehicle);
private["_loaded"];
_loaded = _vehicle getVariable [QGVAR(loaded), []];
if (count _loaded == 0) exitWith {};
private _loaded = _vehicle getVariable [QGVAR(loaded), []];
if (_loaded isEqualTo []) exitWith {};
{
// TODO deleteVehicle or just delete vehicle? Do we want to be able to recover destroyed equipment?
deleteVehicle _x;
//_x setDamage 1;
// TODO Do we want to be able to recover destroyed equipment?
if (_x isEqualType objNull) then {
deleteVehicle _x;
};
nil
} count _loaded;
[_vehicle] call FUNC(validateCargoSpace);

View File

@ -16,15 +16,31 @@
#include "script_component.hpp"
params ["_object"];
private _type = typeOf _object;
TRACE_2("params",_object,_type);
if (getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(canLoad)) != 1) exitWith {};
private ["_type", "_action"];
_type = typeOf _object;
if ((_object getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad))]) != 1) exitWith {};
// do nothing if the class is already initialized
if (_type in GVAR(initializedItemClasses)) exitWith {};
GVAR(initializedItemClasses) pushBack _type;
_action = [QGVAR(load), localize LSTRING(loadObject), QUOTE(PATHTOF(UI\Icon_load.paa)), {[_player, _target] call FUNC(startLoadIn)}, {GVAR(enable) && {[_player, _target] call FUNC(canLoad)}}] call EFUNC(interact_menu,createAction);
TRACE_1("Adding load cargo action to class", _type);
private _condition = {
GVAR(enable) &&
{(_target getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(canLoad))]) == 1} &&
{locked _target < 2} &&
{alive _target} &&
{[_player, _target, []] call EFUNC(common,canInteractWith)}
};
private _statement = {
params ["_target", "_player"];
[_player, _target] call FUNC(startLoadIn);
};
private _text = localize LSTRING(loadObject);
private _icon = QUOTE(PATHTOF(UI\Icon_load.paa));
private _action = [QGVAR(load), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction);
[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass);

View File

@ -18,9 +18,7 @@
params ["_vehicle"];
TRACE_1("params", _vehicle);
private ["_type", "_initializedClasses"];
_type = typeOf _vehicle;
_initializedClasses = GETMVAR(GVAR(initializedClasses),[]);
private _type = typeOf _vehicle;
if (isServer) then {
{
@ -35,21 +33,24 @@ if (isServer) then {
};
// do nothing if the class is already initialized
if (_type in _initializedClasses) exitWith {};
if (_type in GVAR(initializedVehicleClasses)) exitWith {};
// set class as initialized
_initializedClasses pushBack _type;
SETMVAR(GVAR(initializedClasses),_initializedClasses);
GVAR(initializedVehicleClasses) pushBack _type;
if (!hasInterface) exitWith {};
if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {};
private ["_text", "_condition", "_statement", "_icon", "_action"];
_condition = {
params ["_target", "_player"];
GVAR(enable) && {locked _target < 2} && {alive _target} && {[_player, _target, []] call EFUNC(common,canInteractWith)}
};
_text = localize LSTRING(openMenu);
_statement = {GVAR(interactionVehicle) = _target; createDialog QGVAR(menu);};
_icon = "";
TRACE_1("Adding unload cargo action to class", _type);
_action = [QGVAR(openMenu), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction);
private _condition = {
GVAR(enable) && {locked _target < 2} && {alive _target} && {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)}
};
private _statement = {
GVAR(interactionVehicle) = _target;
createDialog QGVAR(menu);
};
private _text = localize LSTRING(openMenu);
private _icon = "";
private _action = [QGVAR(openMenu), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction);
[_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass);

View File

@ -1,11 +1,11 @@
/*
* Author: Glowbal
* Load object into vehicle.
* Objects loaded via classname remain virtual until unloaded.
*
* Arguments:
* 0: Object <OBJECT>
* 0: Item <OBJECT or STRING>
* 1: Vehicle <OBJECT>
* 2: Show Hint <BOOL> (default: true)
*
* Return value:
* Object loaded <BOOL>
@ -17,41 +17,25 @@
*/
#include "script_component.hpp"
private ["_loaded", "_space", "_itemSize"];
params ["_item", "_vehicle", ["_showHint", true, [true]] ];
params [["_item","",[objNull,""]], ["_vehicle",objNull,[objNull]]];
TRACE_2("params",_item,_vehicle);
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {
TRACE_2("canLoadItemIn failed",_item,_vehicle);
false
};
if !([_item, _vehicle] call FUNC(canLoadItemIn)) exitWith {TRACE_2("cannot load",_item,_vehicle); false};
_loaded = _vehicle getVariable [QGVAR(loaded), []];
_loaded pushback _item;
private _loaded = _vehicle getVariable [QGVAR(loaded), []];
_loaded pushBack _item;
_vehicle setVariable [QGVAR(loaded), _loaded, true];
TRACE_1("added to loaded array",_loaded);
_space = [_vehicle] call FUNC(getCargoSpaceLeft);
_itemSize = [_item] call FUNC(getSizeItem);
private _space = [_vehicle] call FUNC(getCargoSpaceLeft);
private _itemSize = [_item] call FUNC(getSizeItem);
_vehicle setVariable [QGVAR(space), _space - _itemSize, true];
detach _item;
_item attachTo [_vehicle,[0,0,100]];
["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent);
// show hint
private ["_itemName", "_vehicleName"];
_itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName");
_vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
if (_showHint) then {
["displayTextStructured", [[localize LSTRING(LoadedItem), _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent);
if (_item isEqualType objNull) then {
detach _item;
_item attachTo [_vehicle,[0,0,-100]];
["hideObjectGlobal", [_item, true]] call EFUNC(common,serverEvent);
};
// Invoke listenable event
["cargoLoaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
true

View File

@ -0,0 +1,47 @@
/*
* Author: PabstMirror
* Makes any object loadable. Needs to be called on all machines.
*
* Arguments:
* 0: Object <OBJECT>
* 1: Set as loadable (default: true) <BOOL><SCALAR>
* 2: Size. (default: 1) <NUMBER>
*
* Return value:
* None
*
* Example:
* [cursorTarget, true, 1] call ace_cargo_fnc_makeLoadable
*
* Public: Yes
*/
#include "script_component.hpp"
params [["_object", objNull, [objNull]], ["_canLoad", true, [false, 0]], ["_setSize", 1, [0]]];
TRACE_3("params",_object,_canLoad,_setSize);
if (isNull _object) exitWith {TRACE_1("null",_object);};
private _type = typeOf _object;
private _cfgCanLoad = getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(canLoad));
private _curSize = [_object] call FUNC(getSizeItem);
_canLoad = [0, 1] select _canLoad; //convert true/false to scalar
if ((_canLoad == 1) && {_setSize <= 0}) exitWith {
ACE_LOGERROR("ace_cargo_fnc_makeLoadable (size <= 0) when making loadable");
};
TRACE_2("setVar if different from config",_canLoad,_cfgCanLoad);
if (_canLoad != _cfgCanLoad) then {
_object setVariable [QGVAR(canLoad), _canLoad];
};
TRACE_2("setVar if different from config",_setSize,_curSize);
if (_setSize != _curSize) then {
_object setVariable [QGVAR(size), _setSize];
};
//Add the load actions to the object class if not already added
[_object] call FUNC(initObject);
nil

View File

@ -0,0 +1,34 @@
/*
* Author: PabstMirror
* Module to make an object loadable.
*
* Arguments:
* 0: The module logic <OBJECT>
* 1: Synchronized units <ARRAY>
* 2: Activated <BOOL>
*
* Return Value:
* None
*
* Example:
* [logic, [box], true] call ace_cargo_fnc_moduleMakeLoadable
*
* Public: No
*/
#include "script_component.hpp"
params ["_logic", "_objects", "_activated"];
TRACE_3("params",_logic,_objects,_activated);
if ((isNull _logic) || {!_activated}) exitWith {};
if (_objects isEqualTo []) exitWith {
ACE_LOGWARNING_1("ace_cargo_fnc_moduleMakeLoadable has no synced objects [%1]", _logic);
};
private _canLoad = _logic getVariable ["canLoad", true];
private _setSize = _logic getVariable ["setSize", 1];
TRACE_2("settings",_canLoad,_setSize);
{
[_x, _canLoad, _setSize] call FUNC(makeLoadable);
} forEach _objects;

View File

@ -19,7 +19,7 @@
if (!isServer) exitWith {};
params ["_logic", "_units", "_activated"];
params ["_logic", "", "_activated"];
if (!_activated) exitWith {};

View File

@ -22,25 +22,25 @@ params ["_display"];
uiNamespace setVariable [QGVAR(menuDisplay), _display];
[{
private ["_display","_loaded", "_ctrl", "_label"];
disableSerialization;
_display = uiNamespace getVariable QGVAR(menuDisplay);
private _display = uiNamespace getVariable QGVAR(menuDisplay);
if (isnil "_display") exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
if (isNull GVAR(interactionVehicle) || ACE_player distance GVAR(interactionVehicle) >= 10) exitWith {
if (isNull GVAR(interactionVehicle) || {ACE_player distance GVAR(interactionVehicle) >= 10}) exitWith {
closeDialog 0;
[_this select 1] call CBA_fnc_removePerFrameHandler;
};
_loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []];
_ctrl = _display displayCtrl 100;
_label = _display displayCtrl 2;
private _loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []];
private _ctrl = _display displayCtrl 100;
private _label = _display displayCtrl 2;
lbClear _ctrl;
{
_ctrl lbAdd (getText(configfile >> "CfgVehicles" >> typeOf _x >> "displayName"));
private _class = if (_x isEqualType "") then {_x} else {typeOf _x};
_ctrl lbAdd (getText(configfile >> "CfgVehicles" >> _class >> "displayName"));
true
} count _loaded;

View File

@ -3,29 +3,46 @@
* Start load item.
*
* Arguments:
* 0: Object <OBJECT>
* 0: Player <OBJECT>
* 1: Object <OBJECT>
*
* Return value:
* Object loaded <BOOL>
* Load ProgressBar Started <BOOL>
*
* Example:
* [object] call ace_cargo_fnc_starLoadIn
* [player, cursorTarget] call ace_cargo_fnc_startLoadIn
*
* Public: No
*/
#include "script_component.hpp"
params ["_player", "_object"];
TRACE_2("params",_player,_object);
private ["_nearestVehicle"];
_nearestVehicle = [_player] call FUNC(findNearestVehicle);
private _vehicle = [_player] call FUNC(findNearestVehicle);
if (isNull _nearestVehicle || _nearestVehicle isKindOf "Cargo_Base_F") then {
if ((isNull _vehicle) || {_vehicle isKindOf "Cargo_Base_F"}) then {
{
if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_nearestVehicle = _x};
} foreach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
if ([_object, _x] call FUNC(canLoadItemIn)) exitWith {_vehicle = _x};
} forEach (nearestObjects [_player, ["Cargo_base_F", "Land_PaperBox_closed_F"], MAX_LOAD_DISTANCE]);
};
if (isNull _nearestVehicle) exitWith {false};
if (isNull _vehicle) exitWith {
TRACE_3("Could not find vehicle",_player,_object,_vehicle);
false
};
[_object, _nearestVehicle] call FUNC(loadItem)
private _return = false;
// Start progress bar
if ([_object, _vehicle] call FUNC(canLoadItemIn)) then {
private _size = [_object] call FUNC(getSizeItem);
[5 * _size, [_object,_vehicle], "LoadCargo", {}, localize LSTRING(LoadingItem)] call EFUNC(common,progressBar);
_return = true;
} else {
private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName");
["displayTextStructured", [[LSTRING(LoadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent);
};
_return

View File

@ -15,21 +15,29 @@
*/
#include "script_component.hpp"
private ["_display", "_loaded", "_ctrl", "_selected", "_item"];
disableSerialization;
_display = uiNamespace getVariable QGVAR(menuDisplay);
if (isnil "_display") exitWith {};
private _display = uiNamespace getVariable QGVAR(menuDisplay);
if (isNil "_display") exitWith {};
_loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []];
if (count _loaded == 0) exitWith {};
private _loaded = GVAR(interactionVehicle) getVariable [QGVAR(loaded), []];
if (_loaded isEqualTo []) exitWith {};
_ctrl = _display displayCtrl 100;
private _ctrl = _display displayCtrl 100;
_selected = (lbCurSel _ctrl) max 0;
private _selected = (lbCurSel _ctrl) max 0;
if (count _loaded <= _selected) exitWith {};
_item = _loaded select _selected;
private _item = _loaded select _selected; //This can be an object or a classname string
[_item, GVAR(interactionVehicle)] call FUNC(unloadItem);
// Start progress bar
if ([_item, GVAR(interactionVehicle), ACE_player] call FUNC(canUnloadItem)) then {
private _size = [_item] call FUNC(getSizeItem);
[5 * _size, [_item, GVAR(interactionVehicle), ACE_player], "UnloadCargo", {}, localize LSTRING(UnloadingItem), {true}, ["isNotSwimming"]] call EFUNC(common,progressBar);
} else {
private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
private _displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName");
["displayTextStructured", [[LSTRING(UnloadingFailed), _displayName], 3.0]] call EFUNC(common,localEvent);
};

View File

@ -3,7 +3,7 @@
* Unload object from vehicle.
*
* Arguments:
* 0: Object <OBJECT>
* 0: Item <OBJECT or STRING>
* 1: Vehicle <OBJECT>
*
* Return value:
@ -16,61 +16,45 @@
*/
#include "script_component.hpp"
private ["_loaded", "_space", "_itemSize", "_emptyPos", "_validVehiclestate"];
params ["_item", "_vehicle", ["_unloader", objNull]];
TRACE_3("params",_item,_vehicle,_unloader);
params ["_item", "_vehicle"];
private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item};
if !([_item, _vehicle] call FUNC(canUnloadItem)) exitWith {
//This covers testing vehicle stability and finding a safe position
private _emptyPosAGL = [_vehicle, _itemClass, _unloader] call EFUNC(common,findUnloadPosition);
TRACE_1("findUnloadPosition",_emptyPosAGL);
if ((count _emptyPosAGL) != 3) exitWith {
TRACE_4("Could not find unload pos",_vehicle,getPosASL _vehicle,isTouchingGround _vehicle,speed _vehicle);
if ((!isNull _unloader) && {_unloader == ACE_player}) then {
//display text saying there are no safe places to exit the vehicle
["displayTextStructured", [localize ELSTRING(common,NoRoomToUnload)]] call EFUNC(common,localEvent);
};
false
};
_validVehiclestate = true;
_emptyPos = [];
if (_vehicle isKindOf "Ship" ) then {
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
TRACE_1("SHIP Ground Check", getPosATL _vehicle );
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 15, typeOf _item]); // TODO: if spot is underwater pick another spot.
} else {
if (_vehicle isKindOf "Air" ) then {
if !(speed _vehicle <1 && {isTouchingGround _vehicle}) then {_validVehiclestate = false};
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
_emptyPos = (getPosASL _vehicle) call EFUNC(common,ASLtoPosition);
_emptyPos = [(_emptyPos select 0) + random(5), (_emptyPos select 1) + random(5), _emptyPos select 2 ];
} else {
if !(speed _vehicle <1 && {(((getPosATL _vehicle) select 2) < 2)}) then {_validVehiclestate = false};
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
_emptyPos = ((getPosASL _vehicle) call EFUNC(common,ASLtoPosition) findEmptyPosition [0, 13, typeOf _item]);
};
private _loaded = _vehicle getVariable [QGVAR(loaded), []];
if !(_item in _loaded) exitWith {
ACE_LOGERROR_3("Tried to unload item [%1] not in vehicle[%2] cargo[%3]", _item, _vehicle, _loaded);
false
};
TRACE_1("getPosASL Vehicle Check", getPosASL _vehicle);
if (!_validVehiclestate) exitWith {false};
if (count _emptyPos == 0) exitWith {false}; //consider displaying text saying there are no safe places to exit the vehicle
_loaded = _vehicle getVariable [QGVAR(loaded), []];
_loaded = _loaded - [_item];
_loaded deleteAt (_loaded find _item);
_vehicle setVariable [QGVAR(loaded), _loaded, true];
_space = [_vehicle] call FUNC(getCargoSpaceLeft);
_itemSize = [_item] call FUNC(getSizeItem);
private _space = [_vehicle] call FUNC(getCargoSpaceLeft);
private _itemSize = [_item] call FUNC(getSizeItem);
_vehicle setVariable [QGVAR(space), (_space + _itemSize), true];
detach _item;
_item setPosASL (_emptyPos call EFUNC(common,PositiontoASL));
["hideObjectGlobal", [_item, false]] call EFUNC(common,serverEvent);
// show hint
private ["_itemName", "_vehicleName"];
_itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName");
_vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName");
["displayTextStructured", [[localize LSTRING(UnloadedItem), _itemName, _vehicleName], 3.0]] call EFUNC(common,localEvent);
// TOOO maybe drag/carry the unloaded item?
// Invoke listenable event
["cargoUnloaded", [_item, _vehicle]] call EFUNC(common,globalEvent);
if (_item isEqualType objNull) then {
detach _item;
_item setPosASL (AGLtoASL _emptyPosAGL);
["hideObjectGlobal", [_item, false]] call EFUNC(common,serverEvent);
} else {
private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, ""];
_newItem setPosASL (AGLtoASL _emptyPosAGL);
};
true

View File

@ -15,16 +15,15 @@
*/
#include "script_component.hpp"
private ["_loaded", "_newLoaded", "_totalSpaceOccupied"];
params ["_vehicle"];
TRACE_1("params",_vehicle);
_loaded = _vehicle getVariable [QGVAR(loaded), []];
private _loaded = _vehicle getVariable [QGVAR(loaded), []];
_newLoaded = [];
_totalSpaceOccupied = 0;
private _newLoaded = [];
private _totalSpaceOccupied = 0;
{
if !(isNull _x) then {
if ((_x isEqualType "") || {!isNull _x}) then {
_newLoaded pushback _x;
_totalSpaceOccupied = _totalSpaceOccupied + ([_x] call FUNC(getSizeItem));
};
@ -35,4 +34,4 @@ if (count _loaded != count _newLoaded) then {
_vehicle setVariable [QGVAR(loaded), _newLoaded, true];
};
_vehicle setVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true];
_vehicle setVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true];

View File

@ -2,6 +2,9 @@
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_CARGO
#define DEBUG_MODE_FULL

View File

@ -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,14 +39,16 @@
</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>
<Czech>Volný prostor: %1</Czech>
<Czech>Zbývající prostor: %1</Czech>
<Spanish>Espacio de carga restante: %1</Spanish>
</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,13 +57,16 @@
</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>
<Spanish>Habilitar la carga en el módulo de carga</Spanish>
<Czech>Umožňuje naložit předměty do nákladového prostoru vozidla</Czech>
</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 +75,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&lt;br/&gt;loaded into&lt;br/&gt;%2</English>
@ -89,11 +100,48 @@
<Spanish>Descargado/a&lt;br/&gt;%1 de&lt;br/&gt;%2</Spanish>
<French>Déchargé&lt;br/&gt;%1 de&lt;br/&gt;%2</French>
<Polish>%1&lt;br/&gt;rozładowano z&lt;br/&gt;%2</Polish>
<Czech>Nezatížený&lt;br/&gt;%1 do&lt;br/&gt;%2</Czech>
<Czech>%1&lt;br/&gt;vyloženo z&lt;br/&gt;%2</Czech>
<Portuguese>%1&lt;br/&gt;descarregado de&lt;br/&gt;%2</Portuguese>
<Italian>Hai scaricato&lt;br/&gt;%1 da&lt;br/&gt;%2</Italian>
<Hungarian>1%&lt;br/&gt;kirakodva ebből:&lt;br/&gt;%2</Hungarian>
<Russian>%1&lt;br/&gt;разгружен из&lt;br/&gt;%2</Russian>
</Key>
<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&lt;br/&gt;could not be loaded</English>
<Portuguese>%1&lt;br/&gt;não pode ser carregado</Portuguese>
<Polish>%1&lt;br/&gt;nie mógł zostać załadowany</Polish>
<Czech>%1&lt;br/&gt;nemůže být naloženo</Czech>
<Russian>%1&lt;br/&gt;не может быть погружен</Russian>
</Key>
<Key ID="STR_ACE_Cargo_UnloadingFailed">
<English>%1&lt;br/&gt;could not be unloaded</English>
<Portuguese>%1&lt;br/&gt;não pode ser descarregado</Portuguese>
<Polish>%1&lt;br/&gt;nie mógł zostać rozładowany</Polish>
<Czech>%1&lt;br/&gt;nemůže být vyloženo</Czech>
<Russian>%1&lt;br/&gt;не может быть выгружен</Russian>
</Key>
<Key ID="STR_ACE_Cargo_makeLoadable_displayName">
<English>Make Object Loadable</English>
</Key>
<Key ID="STR_ACE_Cargo_makeLoadable_description">
<English>Sets the synced object as loadable by the cargo system.</English>
</Key>
<Key ID="STR_ACE_Cargo_makeLoadable_setSize_displayName">
<English>Object's Size</English>
</Key>
</Package>
</Project>

View File

@ -23,9 +23,6 @@ class Extended_InitPost_EventHandlers {
class GVAR(setName) {
init = QUOTE(if (local (_this select 0)) then {_this call FUNC(setName)};);
};
class GVAR(forceWalk) {
init = QUOTE(_this call FUNC(applyForceWalkStatus));
};
class GVAR(muteUnit) {
init = QUOTE(_this call FUNC(muteUnitHandleInitPost));
};
@ -43,6 +40,9 @@ class Extended_Respawn_EventHandlers {
class GVAR(RESETDefaults) {
respawn = QUOTE(_this call FUNC(resetAllDefaults));
};
class GVAR(statusEffect) {
respawn = QUOTE(_this call FUNC(statusEffect_respawnEH));
};
};
class CAManBase {
class GVAR(muteUnit) {
@ -50,3 +50,12 @@ class Extended_Respawn_EventHandlers {
};
};
};
class Extended_Local_EventHandlers {
class All {
class GVAR(statusEffect) {
local = QUOTE(_this call FUNC(statusEffect_localEH));
};
};
};

View File

@ -0,0 +1,16 @@
//Create a location type that won't be drawn on the map
//Ref: https://community.bistudio.com/wiki/Location
class CfgLocationTypes {
class ACE_HashLocation {
color[] = {0,0,0,0};
drawStyle = "bananas";
font = "PuristaMedium";
importance = 5;
name = "HashLocation";
shadow = 0;
size = 0;
textSize = 0.0;
texture = "";
};
};

View File

@ -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 {

View File

@ -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 {

View File

@ -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););
};

View File

@ -1,7 +1,8 @@
// ACE - Common
// #define ENABLE_PERFORMANCE_COUNTERS
// #define DEBUG_MODE_FULL
#include "script_component.hpp"
// #define ENABLE_PERFORMANCE_COUNTERS
//////////////////////////////////////////////////
// PFHs
@ -13,7 +14,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,16 +30,15 @@
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;
@ -58,13 +58,63 @@
// Eventhandlers
//////////////////////////////////////////////////
//Status Effect EHs:
["setStatusEffect", {_this call FUNC(statusEffect_set)}] call FUNC(addEventHandler);
["forceWalk", false, ["ACE_SwitchUnits", "ACE_Attach", "ACE_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_dragging"]] call FUNC(statusEffect_addType);
["blockSprint", false, []] call FUNC(statusEffect_addType);
["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), QEGVAR(medical,unconscious)]] call FUNC(statusEffect_addType);
["blockDamage", false, ["fixCollision"]] call FUNC(statusEffect_addType);
["forceWalk", {
params ["_object", "_set"];
TRACE_2("forceWalk EH",_object,_set);
_object forceWalk (_set > 0);
}] call FUNC(addEventHandler);
["blockSprint", { //Name reversed from `allowSprint` because we want NOR logic
params ["_object", "_set"];
TRACE_2("blockSprint EH",_object,_set);
_object allowSprint (_set == 0);
}] call FUNC(addEventHandler);
["setCaptive", {
params ["_object", "_set"];
TRACE_2("setCaptive EH",_object,_set);
_object setCaptive (_set > 0);
}] call FUNC(addEventHandler);
["blockDamage", { //Name reversed from `allowDamage` because we want NOR logic
params ["_object", "_set"];
if ((_object isKindOf "CAManBase") && {(["ace_medical"] call FUNC(isModLoaded))}) then {
TRACE_2("blockDamage EH (using medical)",_object,_set);
_object setvariable [QEGVAR(medical,allowDamage), (_set == 0), true];
} else {
TRACE_2("blockDamage EH (using allowDamage)",_object,_set);
_object allowDamage (_set == 0);
};
}] call FUNC(addEventHandler);
//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 +148,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 +195,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 +216,7 @@ call FUNC(checkFiles);
[
GVAR(checkPBOsAction),
GVAR(checkPBOsCheckAll),
call compile GVAR(checkPBOsWhitelist)
GVAR(checkPBOsWhitelist)
] call FUNC(checkPBOs)
}] call FUNC(addEventHandler);
@ -194,9 +241,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);
@ -245,8 +300,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
@ -287,6 +341,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);
@ -296,7 +361,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
@ -308,13 +372,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];
@ -387,14 +449,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 {
@ -411,9 +465,6 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
// Eventhandlers for player controlled machines
//////////////////////////////////////////////////
// @todo still needed?
[QGVAR(StateArrested), false, true, QUOTE(ADDON)] call FUNC(defineVariable);
["displayTextStructured", {_this call FUNC(displayTextStructured)}] call FUNC(addEventhandler);
["displayTextPicture", {_this call FUNC(displayTextPicture)}] call FUNC(addEventhandler);
@ -443,6 +494,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

View File

@ -10,7 +10,6 @@ PREP(addToInventory);
PREP(assignedItemFix);
PREP(assignObjectsInList);
PREP(ambientBrightness);
PREP(applyForceWalkStatus);
PREP(ASLToPosition);
PREP(binarizeNumber);
PREP(blurScreen);
@ -47,14 +46,15 @@ PREP(execPersistentFnc);
PREP(execRemoteFnc);
PREP(executePersistent);
PREP(filter);
PREP(findUnloadPosition);
PREP(fixCollision);
PREP(fixFloating);
PREP(fixLoweredRifleAnimation);
PREP(fixPosition);
PREP(getAllDefinedSetVariables);
PREP(getAllGear);
PREP(getCaptivityStatus);
PREP(getDeathAnim);
PREP(getCaptivityStatus);
PREP(getDefaultAnim);
PREP(getDefinedVariable);
PREP(getDefinedVariableDefault);
@ -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);
@ -133,11 +135,13 @@ PREP(numberToDigitsString);
PREP(numberToString);
PREP(onAnswerRequest);
PREP(owned);
PREP(parseList);
PREP(player);
PREP(playerSide);
PREP(positionToASL);
PREP(progressBar);
PREP(readSettingFromModule);
PREP(readSettingsFromParamsArray);
PREP(receiveRequest);
PREP(removeCanInteractWithCondition);
PREP(removeSpecificMagazine);
@ -150,6 +154,7 @@ PREP(selectWeaponMode);
PREP(sendRequest);
PREP(serverLog);
PREP(setAllGear);
PREP(setApproximateVariablePublic);
PREP(setCaptivityStatus);
PREP(setDefinedVariable);
PREP(setDisableUserInputStatus);
@ -165,6 +170,14 @@ PREP(setVariableJIP);
PREP(setVariablePublic);
PREP(setVolume);
PREP(sortAlphabeticallyBy);
PREP(showHud);
PREP(statusEffect_addType);
PREP(statusEffect_get);
PREP(statusEffect_localEH);
PREP(statusEffect_resetVariables);
PREP(statusEffect_respawnEH);
PREP(statusEffect_sendEffects);
PREP(statusEffect_set);
PREP(stringCompare);
PREP(stringToColoredText);
PREP(stringRemoveWhiteSpace);
@ -222,6 +235,7 @@ PREP(getTurretCopilot);
PREP(getDoorTurrets);
PREP(getTurretsFFV);
PREP(getTurretsOther);
PREP(hasHatch);
// missing inventory commands
PREP(binocularMagazine);
@ -288,6 +302,7 @@ PREP(hashListSet);
PREP(hashListPush);
GVAR(syncedEvents) = HASH_CREATE;
GVAR(showHudHash) = [] call FUNC(hashCreate);
//GVARS for execNextFrame and waitAndExec and waitUntilAndExecute
GVAR(waitAndExecArray) = [];
@ -309,6 +324,8 @@ if (isServer) then {
call FUNC(loadSettingsOnServer);
};
GVAR(statusEffect_Names) = [];
GVAR(statusEffect_isGlobal) = [];
//////////////////////////////////////////////////
// Set up PlayerChanged eventhandler for pre init
@ -322,8 +339,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];

View File

@ -14,6 +14,7 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgLocationTypes.hpp"
#include "CfgSounds.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
@ -88,7 +89,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));
};
*/

View File

@ -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};

View File

@ -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;
};

View File

@ -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

View File

@ -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 {

View File

@ -5,7 +5,7 @@
* Arguments [Client] :
* 0: eventName <STRING>
* 1: arguments <ARRAY>
* 2: ttl <SCALAR>
* 2: ttl <NUMBER>
*
* Return Value:
* Boolean of success <BOOL>
@ -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;

View File

@ -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)},

View File

@ -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];

View File

@ -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;

View File

@ -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);
};
}];

View File

@ -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];

View File

@ -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"];

View File

@ -1,6 +1,6 @@
/*
* Author: commy2
* Add an event handler that executes every ACE_time the scroll wheel is used. This is needed, because adding a MouseZ display event handler to display 46 will break in save games.
* Add an event handler that executes every time the scroll wheel is used. This is needed, because adding a MouseZ display event handler to display 46 will break in save games.
* _this will be [Interval] where 'Interval' is a number.
*
* Arguments:
@ -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"];

View File

@ -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 {};

View File

@ -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);

View File

@ -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];

View File

@ -1,23 +0,0 @@
/*
* Author: Pabst Mirror
* Applys the forceWalk status of an unit. Called from Extended_InitPost_EventHandlers.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [ACE_Player] call ace_common_fnc_applyForceWalkStatus
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
private "_forceWalkNumber";
_forceWalkNumber = _unit getVariable ["ACE_forceWalkStatusNumber", 0];
_unit forceWalk (_forceWalkNumber > 0);

View File

@ -4,50 +4,42 @@
* Used by moduleAssign* within various parts of the ACE3 project.
*
* Arguments:
* 0: list <STRING>
* 1: variableName <STRING>
* 2: value <ANY>
* 0: List <STRING>
* 1: Variable Name <STRING>
* 2: Value <ANY>
* 3: Global <BOOL>
* 4: Vehicle <BOOL> (default: false)
*
* Return Value:
* None <NIL>
* None
*
* Example:
* ["text", "variable", value, true] call ace_common_fnc_assignObjectsInList
*
* Public: No
*/
#include "script_component.hpp"
params ["_list", "_variable", "_setting", "_global"];
params ["_list", "_variable", "_setting", "_global", ["_vehicle", false]];
if (typeName _list == "STRING") then {
private ["_splittedList", "_nilCheckPassedList"];
_splittedList = [_list, ","] call BIS_fnc_splitString;
_nilCheckPassedList = "";
{
_x = [_x] call FUNC(stringRemoveWhiteSpace);
if !(isNil _x) then {
if (_nilCheckPassedList == "") then {
_nilCheckPassedList = _x;
} else {
_nilCheckPassedList = _nilCheckPassedList + ","+ _x;
};
};
false
} count _splittedList;
_list = [] call compile format["[%1]",_nilCheckPassedList];
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 {
_x setvariable [_variable, _setting, _global];
if (_vehicle) then {
(vehicle _x) setVariable [_variable, _setting, _global];
TRACE_6("Set variable vehicle",_x,vehicle _x,typeOf (vehicle _x),_variable,_setting,_global);
} else {
_x setVariable [_variable, _setting, _global];
TRACE_5("Set variable",_x,typeOf _x,_variable,_setting,_global);
};
};
};
};
false
} count _list;
true

View File

@ -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) = [];

View File

@ -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];

View File

@ -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
""

Some files were not shown because too many files have changed in this diff Show More