Merge remote-tracking branch 'refs/remotes/acemod/master'

This commit is contained in:
nomisum 2016-04-02 15:39:44 +02:00
commit 02e3e1c7ec
203 changed files with 1564 additions and 656 deletions

View File

@ -24,6 +24,6 @@ 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 [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.
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/3594). 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.

View File

@ -75,6 +75,7 @@ Gianmarco Varriale (TeamNuke) <admin@forhost.org>
GieNkoV <gienkov.grzegorz@gmail.com>
GitHawk <githawk@gmx.net>
gpgpgpgp
Grey-Soldierman <gungamer101@hotmail.com>
Grzegorz
Hamburger SV
Harakhti <shadowdragonphd@gmail.com>
@ -119,4 +120,3 @@ voiper
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
Winter <simon@agius-muscat.net>
zGuba
Grey-Soldierman <gungamer101@hotmail.com>

View File

@ -4,7 +4,7 @@
<p align="center">
<a href="https://github.com/acemod/ACE3/releases">
<img src="https://img.shields.io/badge/Version-3.5.0-blue.svg?style=flat-square" alt="ACE3 Version">
<img src="https://img.shields.io/badge/Version-3.5.1-blue.svg?style=flat-square" alt="ACE3 Version">
</a>
<a href="https://github.com/acemod/ACE3/issues">
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">

View File

@ -1,29 +1,34 @@
class ACE_Settings {
class GVAR(enabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(enabled_DisplayName);
description = CSTRING(enabled_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(simulateForSnipers) {
category = CSTRING(DisplayName);
displayName = CSTRING(simulateForSnipers_DisplayName);
description = CSTRING(simulateForSnipers_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(simulateForGroupMembers) {
category = CSTRING(DisplayName);
displayName = CSTRING(simulateForGroupMembers_DisplayName);
description = CSTRING(simulateForGroupMembers_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(simulateForEveryone) {
category = CSTRING(DisplayName);
displayName = CSTRING(simulateForEveryone_DisplayName);
description = CSTRING(simulateForEveryone_Description);
typeName = "BOOL";
value = 0;
};
class GVAR(disabledInFullAutoMode) {
category = CSTRING(DisplayName);
displayName = CSTRING(disabledInFullAutoMod_DisplayName);
description = CSTRING(disabledInFullAutoMod_Description);
typeName = "BOOL";
@ -31,6 +36,7 @@ class ACE_Settings {
};
/* // TODO: We currently do not have firedEHs on vehicles
class GVAR(vehicleGunnerEnabled) {
category = CSTRING(DisplayName);
displayName = "Enabled For Vehicle Gunners";
description = "Enables advanced ballistics for vehicle gunners";
typeName = "BOOL";
@ -38,30 +44,35 @@ class ACE_Settings {
};
*/
class GVAR(ammoTemperatureEnabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(ammoTemperatureEnabled_DisplayName);
description = CSTRING(ammoTemperatureEnabled_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(barrelLengthInfluenceEnabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(barrelLengthInfluenceEnabled_DisplayName);
description = CSTRING(barrelLengthInfluenceEnabled_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(bulletTraceEnabled) {
category = CSTRING(DisplayName);
displayName = CSTRING(bulletTraceEnabled_DisplayName);
description = CSTRING(bulletTraceEnabled_Description);
typeName = "BOOL";
value = 1;
};
class GVAR(simulationInterval) {
category = CSTRING(DisplayName);
displayName = CSTRING(simulationInterval_DisplayName);
description = CSTRING(simulationInterval_Description);
typeName = "SCALAR";
value = 0.0;
};
class GVAR(simulationRadius) {
category = CSTRING(DisplayName);
displayName = CSTRING(simulationRadius_DisplayName);
description = CSTRING(simulationRadius_Description);
typeName = "SCALAR";

View File

@ -21,7 +21,6 @@ if (!GVAR(extensionAvailable)) exitWith {
};
};
*/
[] call FUNC(initializeTerrainExtension);
if (!hasInterface) exitWith {};
@ -29,10 +28,28 @@ if (!hasInterface) exitWith {};
//If not enabled, dont't add PFEH
if (!GVAR(enabled)) exitWith {};
//Run the terrain processor
[] call FUNC(initializeTerrainExtension);
// Register fire event handler
["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler);
//Add warnings for missing compat PBOs (only if AB is on)
{
_x params ["_modPBO", "_compatPBO"];
if ((isClass (configFile >> "CfgPatches" >> _modPBO)) && {!isClass (configFile >> "CfgPatches" >> _compatPBO)}) then {
ACE_LOGWARNING_2("Weapon Mod [%1] missing ace compat pbo [%2] (from @ace\optionals)",_modPBO,_compatPBO);
};
} forEach [
["RH_acc","ace_compat_rh_acc"],
["RH_de_cfg","ace_compat_rh_de"],
["RH_m4_cfg","ace_compat_rh_m4"],
["RH_PDW","ace_compat_rh_pdw"],
["RKSL_PMII","ace_compat_rksl_pm_ii"],
["iansky_opt","ace_compat_sma3_iansky"],
["R3F_Armes","ace_compat_r3f"]
];
}] call EFUNC(common,addEventHandler);
#ifdef DEBUG_MODE_FULL

View File

@ -47,7 +47,7 @@ GVAR(Protractor) = true;
__ctrl1 ctrlSetTextColor [1, 1, 1, 1];
__ctrl2 ctrlSetScale 1;
__ctrl2 ctrlSetPosition [SafeZoneX + 0.001, SafeZoneY + 0.001 - 0.0012 * (-58 max (asin((ACE_player weaponDirection currentWeapon ACE_player) select 2)) min 58), 0.2, 0.2 * 4/3];
__ctrl2 ctrlSetPosition [SafeZoneX + 0.001, SafeZoneY - 0.001 - 0.1074 * (-0.86 max ((ACE_player weaponDirection currentWeapon ACE_player) select 2) min 0.86), 0.2, 0.2 * 4/3];
__ctrl2 ctrlCommit 0;
__ctrl2 ctrlSetText QUOTE(PATHTOF(UI\protractor_marker.paa));
__ctrl2 ctrlSetTextColor [1, 1, 1, 1];

View File

@ -24,7 +24,7 @@ _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize");
if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith {
#ifdef DEBUG_MODE_FULL
systemChat "AdvancedBallistics: Terrain already initialized";
#endIf
#endif
};
_mapGrids = ceil(_mapSize / 50) + 1;

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="ATragMX">
<Key ID="STR_ACE_ATragMX_Name">

View File

@ -12,7 +12,7 @@
*/
#include "script_component.hpp"
params [["_backpack", objNull, [objNull]]];
params [["_backpack", objNull, [objNull, ""]]];
if (_backpack isEqualType objNull) then {
_backpack = typeOf _backpack;

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

View File

@ -1,5 +1,11 @@
#include "script_component.hpp"
["SettingsInitialized", {
// Hold on a little bit longer to ensure anims will work
[{
GVAR(captivityEnabled) = true;
}, [], 0.05] call EFUNC(common,waitAndExecute);
}] call EFUNC(common,addEventHandler);
//Handles when someone starts escorting and then disconnects, leaving the captive attached
//This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC
@ -33,10 +39,3 @@ if (!hasInterface) exitWith {};
["isNotEscorting", {!(GETVAR(_this select 0,GVAR(isEscorting),false))}] call EFUNC(common,addCanInteractWithCondition);
["isNotHandcuffed", {!(GETVAR(_this select 0,GVAR(isHandcuffed),false))}] call EFUNC(common,addCanInteractWithCondition);
["isNotSurrendering", {!(GETVAR(_this select 0,GVAR(isSurrendering),false))}] call EFUNC(common,addCanInteractWithCondition);
["SettingsInitialized", {
// Hold on a little bit longer to ensure anims will work
[{
GVAR(captivityEnabled) = true;
}, [], 0.05] call EFUNC(common,waitAndExecute);
}] call EFUNC(common,addEventHandler);

View File

@ -194,12 +194,69 @@ class CfgVehicles {
GVAR(hasCargo) = 1;
};
class Heli_Transport_02_base_F;
class I_Heli_Transport_02_F: Heli_Transport_02_base_F {
class Helicopter_Base_H;
class Heli_Light_01_base_F: Helicopter_Base_H {
GVAR(space) = 0;
GVAR(hasCargo) = 0;
};
class Heli_Light_02_base_F: Helicopter_Base_H {
GVAR(space) = 4;
};
class Helicopter_Base_F;
class Heli_light_03_base_F: Helicopter_Base_F {
GVAR(space) = 4;
};
class Heli_Transport_01_base_F: Helicopter_Base_H {
GVAR(space) = 8;
};
class Heli_Transport_02_base_F: Helicopter_Base_H {
GVAR(space) = 20;
};
class Heli_Transport_03_base_F: Helicopter_Base_H {
GVAR(space) = 40;
};
class Heli_Transport_04_base_F: Helicopter_Base_H {
GVAR(space) = 0;
GVAR(hasCargo) = 0;
};
class O_Heli_Transport_04_box_F: Heli_Transport_04_base_F {
GVAR(space) = 20;
GVAR(hasCargo) = 1;
};
class O_Heli_Transport_04_repair_F: Heli_Transport_04_base_F {
GVAR(space) = 12;
GVAR(hasCargo) = 1;
};
class O_Heli_Transport_04_ammo_F: Heli_Transport_04_base_F {
GVAR(space) = 8;
GVAR(hasCargo) = 1;
};
class O_Heli_Transport_04_fuel_F: Heli_Transport_04_base_F {};
class O_Heli_Transport_04_medevac_F: Heli_Transport_04_base_F {
GVAR(space) = 8;
GVAR(hasCargo) = 1;
};
class Heli_Attack_01_base_F: Helicopter_Base_F {
GVAR(space) = 0;
GVAR(hasCargo) = 0;
};
class Heli_Attack_02_base_F: Helicopter_Base_F {
GVAR(space) = 4;
};
// jets
class Plane: Air {
GVAR(space) = 0;
@ -207,7 +264,6 @@ class CfgVehicles {
};
// autonomus
class Helicopter_Base_F;
class UAV_01_base_F: Helicopter_Base_F {
GVAR(space) = 0;
GVAR(hasCargo) = 0;

View File

@ -33,7 +33,7 @@ class Extended_InitPost_EventHandlers {
};
class CAManBase {
class GVAR(setName) {
init = QUOTE(if (local (_this select 0)) then {_this call FUNC(setName)};);
init = QUOTE(if (local (_this select 0)) then {[ARR_2(FUNC(setName),_this)] call FUNC(execNextFrame)};);
};
class GVAR(muteUnit) {
init = QUOTE(_this call FUNC(muteUnitHandleInitPost));

View File

@ -152,6 +152,8 @@ if (isServer) then {
["playMove", {(_this select 0) playMove (_this select 1)}] call FUNC(addEventHandler);
["playMoveNow", {(_this select 0) playMoveNow (_this select 1)}] call FUNC(addEventHandler);
["switchMove", {(_this select 0) switchMove (_this select 1)}] call FUNC(addEventHandler);
["setVectorDirAndUp", {(_this select 0) setVectorDirAndUp (_this select 1)}] call FUNC(addEventHandler);
["setVanillaHitPointDamage", {(_this select 0) setHitPointDamage (_this select 1)}] call FUNC(addEventHandler);
if (isServer) then {
["hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call FUNC(addEventHandler);
@ -442,6 +444,11 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
// Add various canInteractWith conditions
//////////////////////////////////////////////////
["isNotDead", {
params ["_unit", "_target"];
alive _unit
}] call FUNC(addCanInteractWithCondition);
["notOnMap", {!visibleMap}] call FUNC(addCanInteractWithCondition);
["isNotInside", {

View File

@ -45,7 +45,7 @@ if (_actionID == -1) then {
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)},
{[{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)}, _this] call CBA_fnc_directCall},
nil,
-1,
false,

View File

@ -52,7 +52,7 @@ _actionIDs pushBack _id;
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)}},
{[{if (inputAction '%1' == 0) then {if (_this call (%3 select 2)) then {_this call (%3 select 3)}} else {_this call (%3 select 1)}}, _this] call CBA_fnc_directCall},
nil,
%4,
false,

View File

@ -19,6 +19,18 @@ private _version = getText (configFile >> "CfgPatches" >> "ace_main" >> "version
ACE_LOGINFO_1("ACE is version %1.",_version);
//CBA Versioning check - close main display if using incompatible version
private _cbaVersionAr = getArray (configFile >> "CfgPatches" >> "cba_main" >> "versionAr");
private _cbaRequiredAr = (getArray (configFile >> "CfgSettings" >> "CBA" >> "Versioning" >> "ACE" >> "dependencies" >> "CBA")) select 1;
ACE_LOGINFO_2("CBA is version %1 [min required %2]",_cbaVersionAr,_cbaRequiredAr);
if ([_cbaRequiredAr, _cbaVersionAr] call cba_versioning_fnc_version_compare) then {
private _errorMsg = format ["CBA Version [%1] is outdated [required %2]", _cbaVersionAr, _cbaRequiredAr];
ACE_LOGERROR(_errorMsg);
if (hasInterface) then {
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
};
};
//private _addons = activatedAddons; // broken with High-Command module, see #2134
private _addons = "true" configClasses (configFile >> "CfgPatches");//
_addons = _addons apply {toLower configName _x};//

View File

@ -12,12 +12,11 @@
*/
#include "script_component.hpp"
params ["_function"];
params ["_code"];
if (_code isEqualType "") exitWith {_code};
if (_function isEqualType "") exitWith {_function};
_code = str(_code);
_code = _code select [1, count _code - 2];
_function = toArray str _function;
_function deleteAt 0;
_function deleteAt (count _function - 1);
_code
toString _function // return

View File

@ -16,6 +16,16 @@
// setVectorUp requires local object
if (!local _this) exitWith {};
if ((getText (configFile >> "CfgVehicles" >> (typeOf _this) >> "simulation")) == "house") then {
//Houses don't have gravity/physics, so make sure they are not floating
private _posAbove = (getPos _this) select 2;
TRACE_2("house",_this,_posAbove);
if (_posAbove > 0.1) then {
private _newPosASL = (getPosASL _this) vectorDiff [0,0,_posAbove];
_this setPosASL _newPosASL;
};
};
private _position = getPos _this;
// don't place the object below the ground

View File

@ -22,27 +22,39 @@ private _long = getNumber (configFile >> "CfgWorlds" >> _map >> "longitude");
private _lat = getNumber (configFile >> "CfgWorlds" >> _map >> "latitude");
private _altitude = getNumber (configFile >> "CfgWorlds" >> _map >> "elevationOffset");
if (_map in ["Chernarus", "Bootcamp_ACR", "Woodland_ACR", "utes"]) then { _lat = 50; _altitude = 0; };
if (_map in ["Altis", "Stratis"]) then { _lat = 40; _altitude = 0; };
if (_map in ["Takistan", "Zargabad", "Mountains_ACR"]) then { _lat = 35; _altitude = 2000; };
if (_map in ["Shapur_BAF", "ProvingGrounds_PMC"]) then { _lat = 35; _altitude = 100; };
_map = toLower _map;
if (_map in ["chernarus", "chernarus_summer", "chernarus_winter", "bootcamp_acr", "woodland_acr", "utes"]) then { _lat = 50; _altitude = 0; };
if (_map in ["altis", "stratis"]) then { _lat = 40; _altitude = 0; };
if (_map in ["takistan", "zargabad", "mountains_acr"]) then { _lat = 35; _altitude = 2000; };
if (_map in ["shapur_baf", "provingGrounds_pmc"]) then { _lat = 35; _altitude = 100; };
if (_map in ["fallujah"]) then { _lat = 33; _altitude = 0; };
if (_map in ["fata", "Abbottabad"]) then { _lat = 30; _altitude = 1000; };
if (_map in ["fata"]) then { _lat = 33; _altitude = 1347; };
if (_map in ["abbottabad"]) then { _lat = 34; _altitude = 1256; };
if (_map in ["sfp_wamako"]) then { _lat = 14; _altitude = 0; };
if (_map in ["sfp_sturko"]) then { _lat = 56; _altitude = 0; };
if (_map in ["Bornholm"]) then { _lat = 55; _altitude = 0; };
if (_map in ["Imrali"]) then { _lat = 40; _altitude = 0; };
if (_map in ["Caribou"]) then { _lat = 68; _altitude = 0; };
if (_map in ["Namalsk"]) then { _lat = 65; _altitude = 0; };
if (_map in ["MCN_Aliabad"]) then { _lat = 36; _altitude = 0; };
if (_map in ["Clafghan"]) then { _lat = 34; _altitude = 640; };
if (_map in ["Sangin", "hellskitchen"]) then { _lat = 32; _altitude = 0; };
if (_map in ["Sara"]) then { _lat = 40; _altitude = 0; };
if (_map in ["bornholm"]) then { _lat = 55; _altitude = 0; };
if (_map in ["bozcaada", "imrali", "imralispring"]) then { _lat = 40; _altitude = 0; };
if (_map in ["caribou"]) then { _lat = 68; _altitude = 0; };
if (_map in ["namalsk"]) then { _lat = 65; _altitude = 0; };
if (_map in ["mcn_aliabad"]) then { _lat = 36; _altitude = 0; };
if (_map in ["clafghan"]) then { _lat = 34; _altitude = 640; };
if (_map in ["sangin", "hellskitchen"]) then { _lat = 32; _altitude = 0; };
if (_map in ["sara", "sara_dbe1", "saralite", "intro", "desert_e", "porto"]) then { _lat = 40; _altitude = 0; };
if (_map in ["reshmaan"]) then { _lat = 35; _altitude = 2000; };
if (_map in ["Thirsk"]) then { _lat = 65; _altitude = 0; };
if (_map in ["lingor"]) then { _lat = -4; _altitude = 0; };
if (_map in ["Panthera3"]) then { _lat = 46; _altitude = 0; };
if (_map in ["Kunduz"]) then { _lat = 37; _altitude = 400; };
if (_map in ["thirsk"]) then { _lat = 65; _altitude = 0; };
if (_map in ["lingor", "lingor3"]) then { _lat = -4; _altitude = 0; };
if (_map in ["panthera3"]) then { _lat = 46; _altitude = 0; };
if (_map in ["kunduz"]) then { _lat = 37; _altitude = 0; };
if (_map in ["angel"]) then { _lat = 38; _altitude = 0; };
if (_map in ["porquerolles"]) then { _lat = 43; _altitude = 0; };
if (_map in ["napf"]) then { _lat = 47; _altitude = 0; };
if (_map in ["mef_alaska"]) then { _lat = 60; _altitude = 5; };
if (_map in ["australia"]) then { _lat = -25; _altitude = 0; };
if (_map in ["pja301"]) then { _lat = 42; _altitude = 0; };
if (_map in ["pja305"]) then { _lat = 0; _altitude = 0; };
if (_map in ["pja306"]) then { _lat = 35; _altitude = 300; };
if (_map in ["pja307"]) then { _lat = 17; _altitude = 0; };
if (_map in ["pja308", "pja310"]) then { _lat = 36; _altitude = 0; };
private _UTM = [_long,_lat] call BIS_fnc_posDegToUTM;
private _easting = _UTM select 0;

View File

@ -19,13 +19,7 @@ if (isNull _unit || {!alive _unit}) exitWith {};
if (_unit isKindOf "CAManBase") then {
private _sanitizedName = [name _unit, true] call FUNC(sanitizeString);
private _rawName = [name _unit, false] call FUNC(sanitizeString);
//Debug Testing Code (with html tags):
// private _sanitizedName = ["<TAG>Name", true] call FUNC(sanitizeString);
// private _rawName = ["<TAG>Name", false] call FUNC(sanitizeString);
//if (_name != _unit getVariable ["ACE_Name", ""]) then {
_unit setVariable ["ACE_Name", _sanitizedName, true];
_unit setVariable ["ACE_NameRaw", _rawName, true];
//};
};

View File

@ -119,7 +119,7 @@ class CfgVehicles {
accuracy = 1000;
autocenter = 0;
EGVAR(dragging,canDrag) = 1;
EGVAR(dragging,dragPosition[]) = {0,0.5,0.5};
EGVAR(dragging,dragPosition)[] = {0,0.5,0.5};
EGVAR(dragging,dragDirection) = 0;
EGVAR(cargo,size) = 1;
EGVAR(cargo,canLoad) = 1;

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="Disarming">
<Key ID="STR_ACE_Disarming_OpenInventory">

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="Disposable">
<Key ID="STR_ACE_Disposable_UsedTube">

View File

@ -6,14 +6,19 @@ class CfgVehicles {
class LandVehicle;
class StaticWeapon: LandVehicle {
GVAR(canCarry) = 1;
GVAR(carryPosition[]) = {0,1.2,0};
GVAR(carryPosition)[] = {0,1.2,0};
GVAR(carryDirection) = 0;
GVAR(canDrag) = 1;
GVAR(dragPosition[]) = {0,1.2,0};
GVAR(dragPosition)[] = {0,1.2,0};
GVAR(dragDirection) = 0;
};
class StaticCannon: StaticWeapon {
GVAR(canCarry) = 0;
GVAR(canDrag) = 0;
};
//remove actions from Taru Pods
class Pod_Heli_Transport_04_base_F: StaticWeapon {
GVAR(canCarry) = 0;
@ -23,11 +28,11 @@ class CfgVehicles {
class StaticMortar;
class Mortar_01_base_F: StaticMortar {
GVAR(canCarry) = 1;
GVAR(carryPosition[]) = {0,1.2,0};
GVAR(carryPosition)[] = {0,1.2,0};
GVAR(carryDirection) = 0;
GVAR(canDrag) = 1;
GVAR(dragPosition[]) = {0,1.2,0};
GVAR(dragPosition)[] = {0,1.2,0};
GVAR(dragDirection) = 0;
};
@ -35,11 +40,11 @@ class CfgVehicles {
class ThingX;
class ReammoBox_F: ThingX {
GVAR(canCarry) = 0;
GVAR(carryPosition[]) = {0,1,1};
GVAR(carryPosition)[] = {0,1,1};
GVAR(carryDirection) = 0;
GVAR(canDrag) = 0;
GVAR(dragPosition[]) = {0,1.2,0};
GVAR(dragPosition)[] = {0,1.2,0};
GVAR(dragDirection) = 0;
};
@ -92,40 +97,40 @@ class CfgVehicles {
};
GVAR(canCarry) = 1;
GVAR(carryPosition[]) = {0,1,1};
GVAR(carryPosition)[] = {0,1,1};
GVAR(carryDirection) = 0;
GVAR(canDrag) = 1;
GVAR(dragPosition[]) = {0,1.2,0};
GVAR(dragPosition)[] = {0,1.2,0};
GVAR(dragDirection) = 0;
};
class RoadBarrier_F: RoadCone_F {
GVAR(carryPosition[]) = {0,1,0.300671};
GVAR(carryPosition)[] = {0,1,0.300671};
};
class ACE_RepairItem_Base: ThingX {};
class ACE_Track: ACE_RepairItem_Base {
GVAR(canCarry) = 1;
GVAR(carryPosition[]) = {0,1,1};
GVAR(carryPosition)[] = {0,1,1};
GVAR(carryDirection) = 0;
};
class ACE_Wheel: ACE_RepairItem_Base {
GVAR(canCarry) = 1;
GVAR(carryPosition[]) = {0,1,1};
GVAR(carryPosition)[] = {0,1,1};
GVAR(carryDirection) = 0;
};
class Lamps_base_F;
class Land_PortableLight_single_F: Lamps_base_F {
GVAR(canCarry) = 1;
GVAR(carryPosition[]) = {0,1.2,0};
GVAR(carryPosition)[] = {0,1.2,0};
GVAR(carryDirection) = 180;
GVAR(canDrag) = 1;
GVAR(dragPosition[]) = {0,1.2,0};
GVAR(dragPosition)[] = {0,1.2,0};
GVAR(dragDirection) = 180;
};
};

View File

@ -40,4 +40,8 @@ detach _carriedItem;
_carriedItem setPosATL _position;
_carriedItem attachTo [_unit];
//reset the carry direction
private _direction = _carriedItem getVariable [QGVAR(carryDirection), 0];
["setDir", _carriedItem, [_carriedItem, _direction]] call EFUNC(common,targetEvent);
true

View File

@ -1,9 +1,13 @@
class ACE_Settings {
class GVAR(RequireSpecialist) {
displayName = CSTRING(RequireSpecialist_DisplayName);
description = CSTRING(RequireSpecialist_Description);
value = 0;
typeName = "BOOL";
};
class GVAR(PunishNonSpecialists) {
displayName = CSTRING(PunishNonSpecialists_DisplayName);
description = CSTRING(PunishNonSpecialists_Description);
value = 1;
typeName = "BOOL";
};

View File

@ -31,14 +31,14 @@ class CfgAmmo {
class ClaymoreDirectionalMine_Remote_Ammo: DirectionalBombBase {
GVAR(magazine) = "ClaymoreDirectionalMine_Remote_Mag";
GVAR(Explosive) = "ClaymoreDirectionalMine_Remote_Ammo_Scripted";
GVAR(defuseObjectPosition[]) = {0, 0, 0.038};
GVAR(defuseObjectPosition)[] = {0, 0, 0.038};
soundActivation[] = {"", 0, 0, 0};
soundDeactivation[] = {"", 0, 0, 0};
};
// class ClaymoreDirectionalMine_Remote_Ammo_Scripted: ClaymoreDirectionalMine_Remote_Ammo {};
class APERSTripMine_Wire_Ammo: DirectionalBombBase {
GVAR(defuseObjectPosition[]) = {-1.415, 0, 0.12};
GVAR(defuseObjectPosition)[] = {-1.415, 0, 0.12};
};
class SLAMDirectionalMine_Wire_Ammo: DirectionalBombBase {
@ -66,7 +66,7 @@ class CfgAmmo {
class DemoCharge_Remote_Ammo: PipeBombBase {
GVAR(magazine) = "DemoCharge_Remote_Mag";
GVAR(Explosive) = "DemoCharge_Remote_Ammo_Scripted";
GVAR(defuseObjectPosition[]) = {0.07, 0, 0.055};
GVAR(defuseObjectPosition)[] = {0.07, 0, 0.055};
soundActivation[] = {"", 0, 0, 0};
soundDeactivation[] = {"", 0, 0, 0};
hit = 500;
@ -76,7 +76,7 @@ class CfgAmmo {
class SatchelCharge_Remote_Ammo: PipeBombBase {
GVAR(magazine) = "SatchelCharge_Remote_Mag";
GVAR(Explosive) = "SatchelCharge_Remote_Ammo_Scripted";
GVAR(defuseObjectPosition[]) = {0.1, 0.1, 0.05};
GVAR(defuseObjectPosition)[] = {0.1, 0.1, 0.05};
soundActivation[] = {"", 0, 0, 0};
soundDeactivation[] = {"", 0, 0, 0};
};

View File

@ -66,7 +66,6 @@ class CfgVehicles {
showDisabled = 0;
icon = PATHTOF(UI\Defuse_ca.paa);
priority = 0.8;
distance = 1;
};
};
};
@ -88,12 +87,11 @@ class CfgVehicles {
class ACE_Actions {
class ACE_MainActions {
selection = "";
distance = 1;
distance = 1.5;
condition = "true";
class ACE_SetTrigger {
selection = "";
displayName = CSTRING(TriggerMenu);
distance = 1;
condition = "true";
statement = "";
insertChildren = QUOTE([ARR_3(_target getVariable QUOTE(QGVAR(class)),_target,_player)] call FUNC(addTriggerActions););
@ -105,7 +103,6 @@ class CfgVehicles {
class ACE_PickUp {
selection = "";
displayName = CSTRING(Pickup);
distance = 1;
condition = "true";
statement = QUOTE([ARR_2(_player,_target getVariable QUOTE(QGVAR(class)))] call EFUNC(common,addToInventory);deleteVehicle _target;);
showDisabled = 0;

View File

@ -6,6 +6,7 @@ PREP(addExplosiveActions);
PREP(addToSpeedDial);
PREP(addTransmitterActions);
PREP(addTriggerActions);
PREP(cancelPlacement);
PREP(canDefuse);
PREP(canDetonate);
PREP(connectExplosive);

View File

@ -3,3 +3,4 @@
params ["_display"];
_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}];
_display displayAddEventHandler ["MouseButtonDown", {[ACE_player, _this select 1] call FUNC(cancelPlacement)}];

View File

@ -0,0 +1,23 @@
/*
* Author: Garth 'L-H' de Wet
* Cancels explosives placement.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Key <NUMBER>
*
* Return Value:
* None
*
* Example:
* [unit, 1] call ace_explosives_fnc_cancelPlacement
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", "_key"];
if (_key != 1 || {!GVAR(pfeh_running)}) exitWith {};
GVAR(placeAction) = PLACE_CANCEL;

View File

@ -15,7 +15,7 @@
*/
#include "script_component.hpp"
if ((!GVAR(pfeh_running)) || {ACE_Modifier == 0}) exitWith {false};
if (!GVAR(pfeh_running)) exitWith {false};
GVAR(TweakedAngle) = ((GVAR(TweakedAngle) + 7.2 * _this) + 360) % 360;

View File

@ -4,7 +4,7 @@
* detonate editor-placed explosives.
*
* Arguments:
* 0: Explosives objects to detonate <ARRAY>
* 0: Explosives objects to detonate <OBJECT or ARRAY>
* 1: Fuze delay (for each explosive; use negative number for random time up to value) <NUMBER> <OPTIONAL>
*
* Return Value:
@ -18,10 +18,13 @@
*/
#include "script_component.hpp"
params ["_explosiveArr",["_fuzeTime",0]];
params [["_explosiveArr", [], [[], objNull]], ["_fuzeTime", 0, [0]]];
if (_explosiveArr isEqualType objNull) then {
_explosiveArr = [_explosiveArr];
};
private _detTime;
{
_detTime = if (_fuzeTime < 0) then {random abs _fuzeTime} else {_fuzeTime};
private _detTime = if (_fuzeTime < 0) then {random abs _fuzeTime} else {_fuzeTime};
[objNull, -1, [_x, _detTime]] call FUNC(detonateExplosive);
} forEach _explosiveArr;

View File

@ -141,10 +141,10 @@ GVAR(TweakedAngle) = 0;
//Don't allow placing in a bad position:
if (_badPosition && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;};
if (((inputAction "zoomTemp") > 0) || //Cancel on RMB, For some reason this works (when held) but AddActionEventHandler doesn't
{_unit != ACE_player} ||
{!([_unit, objNull, ["isNotSwimming"]] call EFUNC(common,canInteractWith))} ||
{!(_magClassname in (magazines _unit))}) then {
if (_unit != ACE_player ||
{!([_unit, objNull, ["isNotSwimming"]] call EFUNC(common,canInteractWith))} ||
{!(_magClassname in (magazines _unit))}
) then {
GVAR(placeAction) = PLACE_CANCEL;
};

View File

@ -107,16 +107,16 @@
<Russian>Отмена</Russian>
</Key>
<Key ID="STR_ACE_Explosives_ScrollAction">
<English>+Ctrl rotate</English>
<German>+Strg drehen</German>
<Spanish>+Ctrl girar</Spanish>
<French>+Ctrl tourner</French>
<Italian>+Ctrl rotazione</Italian>
<Czech>+Ctrl otočit</Czech>
<Hungarian>+Ctrl forgatás</Hungarian>
<Polish>+Ctrl obrót</Polish>
<Portuguese>+Ctrl rotaciona</Portuguese>
<Russian>+Ctrl Bращать</Russian>
<English>Rotate</English>
<German>Drehen</German>
<Spanish>Girar</Spanish>
<French>Tourner</French>
<Italian>Rotazione</Italian>
<Czech>Otočit</Czech>
<Hungarian>Forgatás</Hungarian>
<Polish>Obrót</Polish>
<Portuguese>Rotaciona</Portuguese>
<Russian>Bращать</Russian>
</Key>
<Key ID="STR_ACE_Explosives_Jammer_TurnOn">
<English>Turn On Thor III</English>
@ -647,6 +647,7 @@
<Polish>Mina M6 SLAM (atak od dołu)</Polish>
<Spanish>Mina M6 SLAM (Ataque Inferior)</Spanish>
<French>Mine M6 SLAM (par le bas)</French>
<Italian>Mina M6 SLAM (base)</Italian>
</Key>
<Key ID="STR_ACE_Explosives_Module_SLAMSideAttack_DisplayName">
<English>M6 SLAM Mine (Side Attack)</English>
@ -661,6 +662,7 @@
<Polish>Mina M6 SLAM (atak od boku)</Polish>
<Spanish>Mina M6 SLAM (Ataque Lateral)</Spanish>
<French>Mine M6 SLAM (de flanc)</French>
<Italian> STR_ACE_Explosives_Module_SLAMBottomAttack_DisplayName M6 SLAM Mine (Bottom Attack) Mine M6 SLAM (par le bas) M6-SLAM-Mine (Bodenangriff) Mina M6 SLAM (base) Mina M6 SLAM (atak od dołu) Mina M6 SLAM (Laterale)</Italian>
</Key>
<Key ID="STR_ACE_Explosives_Module_IEDUrbanBig_Range_DisplayName">
<English>Large IED (Urban, Pressure Plate)</English>
@ -675,6 +677,7 @@
<Polish>Duży IED (miejski, płyta naciskowa)</Polish>
<Spanish>IED Grande (Urbano, Placa de presión)</Spanish>
<French>Grand EEI (Urbain, plaque de pression)</French>
<Italian>IED grande (urbano, a pressione)</Italian>
</Key>
<Key ID="STR_ACE_Explosives_Module_IEDLandBig_Range_DisplayName">
<English>Large IED (Dug-in, Pressure Plate)</English>
@ -689,6 +692,7 @@
<Polish>Duży IED (zakopany, płyta naciskowa)</Polish>
<Spanish>IED Grande (Enterrado, Placa de presión)</Spanish>
<French>Grand EEI (Enterré, plaque de pression)</French>
<Italian>IED grande (interrato, a pressione)</Italian>
</Key>
<Key ID="STR_ACE_Explosives_Module_IEDUrbanSmall_Range_DisplayName">
<English>Small IED (Urban, Pressure Plate)</English>
@ -703,6 +707,7 @@
<Polish>Mały IED (miejski, płyta naciskowa)</Polish>
<Spanish>IED Pequeño (Urbano, Placa de presión)</Spanish>
<French>Petit EEI (Urbain, plaque de pression)</French>
<Italian>IED piccolo (urbano, a pressione)</Italian>
</Key>
<Key ID="STR_ACE_Explosives_Module_IEDLandSmall_Range_DisplayName">
<English>Small IED (Dug-in, Pressure Plate)</English>
@ -717,6 +722,7 @@
<Polish>Mały IED (zakopany, płyta naciskowa)</Polish>
<Spanish>IED Pequeño (Enterrado, Placa de presión)</Spanish>
<French>Petit EEI (Enterré, plaque de pression)</French>
<Italian>IED piccolo (interrato, a pressione)</Italian>
</Key>
<Key ID="STR_ACE_Explosives_connectInventoryExplosiveToDeadman">
<English>Connect to %1</English>
@ -731,4 +737,4 @@
<Portuguese>Conectar à %1</Portuguese>
</Key>
</Package>
</Project>
</Project>

View File

@ -1,3 +1,9 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));

View File

@ -4,7 +4,7 @@
control = "Checkbox"; \
displayName = CSTRING(Eden_equipFRIES); \
tooltip = CSTRING(Eden_equipFRIES_Tooltip); \
expression = [_this] call FUNC(equipFRIES); \
expression = QUOTE([_this] call FUNC(equipFRIES)); \
typeName = "BOOL"; \
condition = "objectVehicle"; \
defaultValue = false; \
@ -35,23 +35,20 @@ class CfgVehicles {
};
};
class Helicopter_Base_F;
class ACE_friesBase: Helicopter_Base_F {
destrType = "";
class Turrets {};
class Air;
class Helicopter: Air {
class ACE_SelfActions {
class ACE_prepareFRIES {
displayName = CSTRING(Interaction_prepareFRIES);
condition = [vehicle _player] call FUNC(canPrepareFRIES);
statement = [vehicle _player] call FUNC(prepareFRIES);
condition = QUOTE([vehicle _player] call FUNC(canPrepareFRIES));
statement = QUOTE([vehicle _player] call FUNC(prepareFRIES));
showDisabled = 0;
priority = 1;
};
class ACE_deployRopes {
displayName = CSTRING(Interaction_deployRopes);
condition = [_player, vehicle _player] call FUNC(canDeployRopes);
statement = [QGVAR(deployRopes), [vehicle _player]] call EFUNC(common,serverEvent);
condition = QUOTE([ARR_2(_player, vehicle _player)] call FUNC(canDeployRopes));
statement = QUOTE([ARR_2(QUOTE(QGVAR(deployRopes)), [vehicle _player])] call EFUNC(common,serverEvent));
showDisabled = 0;
priority = 1;
};
@ -71,10 +68,16 @@ class CfgVehicles {
};
};
};
class Helicopter_Base_F;
class ACE_friesBase: Helicopter_Base_F {
destrType = "";
class Turrets {};
};
class ACE_friesAnchorBar: ACE_friesBase {
author = "jokoho48";
scope = 1;
model = PATHTOF(data\friesAnchorBar.p3d);
model = QUOTE(PATHTOF(data\friesAnchorBar.p3d));
animated = 1;
class AnimationSources {
class extendHookRight {
@ -92,7 +95,7 @@ class CfgVehicles {
class ACE_friesGantry: ACE_friesBase {
author = "jokoho48";
scope = 1;
model = PATHTOF(data\friesGantry.p3d);
model = QUOTE(PATHTOF(data\friesGantry.p3d));
animated = 1;
class AnimationSources {
class adjustWidth {
@ -110,10 +113,20 @@ class CfgVehicles {
initPhase = 0;
animPeriod = 0;
};
class hideGantryLeft {
source = "user";
initPhase = 0;
animPeriod = 0;
};
class hideGantryRight {
source = "user";
initPhase = 0;
animPeriod = 0;
};
};
};
class ACE_friesGantryReverse: ACE_friesGantry {
class AnimationSources {
class AnimationSources: AnimationSources {
class adjustWidth {
source = "user";
initPhase = 0.213;
@ -143,54 +156,83 @@ class CfgVehicles {
class Helicopter_Base_H;
class Heli_Light_02_base_F: Helicopter_Base_H {
GVAR(enabled) = 1;
GVAR(ropeOrigins[]) = {{1.41, 1.38, 0}, {-1.41, 1.38, 0}};
GVAR(ropeOrigins)[] = {{1.41, 1.38, 0}, {-1.41, 1.38, 0}};
GVAR(onPrepare) = QFUNC(onPrepareCommon);
GVAR(onCut) = QFUNC(onCutCommon);
};
class Heli_Attack_02_base_F: Helicopter_Base_F {
GVAR(enabled) = 1;
GVAR(ropeOrigins[]) = {{1.25, 1.5, -0.6}, {-1.1, 1.5, -0.6}};
GVAR(ropeOrigins)[] = {{1.25, 1.5, -0.6}, {-1.1, 1.5, -0.6}};
GVAR(onPrepare) = QFUNC(onPrepareCommon);
GVAR(onCut) = QFUNC(onCutCommon);
};
class Heli_Transport_01_base_F: Helicopter_Base_H {
GVAR(enabled) = 2;
GVAR(ropeOrigins[]) = {"ropeOriginRight", "ropeOriginLeft"};
GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"};
GVAR(friesType) = "ACE_friesAnchorBar";
GVAR(friesAttachmentPoint[]) = {0.065, 2.2, -0.15};
GVAR(friesAttachmentPoint)[] = {0.065, 2.2, -0.15};
GVAR(onPrepare) = QFUNC(onPrepareCommon);
GVAR(onCut) = QFUNC(onCutCommon);
EQUIP_FRIES_ATTRIBUTE;
};
class Heli_Transport_02_base_F: Helicopter_Base_H {
GVAR(enabled) = 1;
GVAR(ropeOrigins[]) = {{0.94, -4.82, -1.16}, {-0.94, -4.82, -1.16}};
GVAR(ropeOrigins)[] = {{0.94, -4.82, -1.16}, {-0.94, -4.82, -1.16}};
GVAR(onPrepare) = QFUNC(onPrepareCommon);
GVAR(onCut) = QFUNC(onCutCommon);
class UserActions {
class Ramp_Open;
class Ramp_Close: Ramp_Open {
condition = QUOTE([ARR_5(this,'CargoRamp_Open',[[0],[1],[2]])] call FUNC(canCloseRamp));
};
};
};
class Heli_Transport_03_base_F: Helicopter_Base_H {
GVAR(enabled) = 1;
GVAR(ropeOrigins[]) = {{0.75, -5.29, -0.11}, {-0.87, -5.29, -0.11}};
GVAR(ropeOrigins)[] = {{0.75, -5.29, -0.11}, {-0.87, -5.29, -0.11}};
GVAR(onPrepare) = QFUNC(onPrepareCommon);
GVAR(onCut) = QFUNC(onCutCommon);
class UserActions {
class Ramp_Open;
class Ramp_Close: Ramp_Open {
condition = QUOTE([ARR_5(this,'Door_rear_source',[[0],[3],[4]])] call FUNC(canCloseRamp));
};
};
};
class Heli_light_03_base_F: Helicopter_Base_F {
GVAR(enabled) = 2;
GVAR(ropeOrigins[]) = {"ropeOriginRight", "ropeOriginLeft"};
GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"};
GVAR(friesType) = "ACE_friesGantryReverse";
GVAR(friesAttachmentPoint[]) = {1.04, 2.5, -0.34};
GVAR(friesAttachmentPoint)[] = {1.04, 2.5, -0.34};
EQUIP_FRIES_ATTRIBUTE;
};
class Heli_light_03_unarmed_base_F: Heli_light_03_base_F {
GVAR(enabled) = 2;
GVAR(ropeOrigins[]) = {"ropeOriginRight", "ropeOriginLeft"};
GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"};
GVAR(friesType) = "ACE_friesGantry";
GVAR(friesAttachmentPoint[]) = {-1.07, 3.26, -0.5};
GVAR(friesAttachmentPoint)[] = {-1.07, 3.26, -0.5};
EQUIP_FRIES_ATTRIBUTE;
};
class Heli_Transport_04_base_F;
class Heli_Transport_04_base_F: Helicopter_Base_H {
class UserActions;
};
class O_Heli_Transport_04_bench_F: Heli_Transport_04_base_F {
GVAR(enabled) = 1;
GVAR(ropeOrigins[]) = {{1.03, 1.6, -0.23}, {1.03, -1.36, -0.23}, {-1.23, 1.6, -0.23}, {-1.23, -1.36, -0.23}};
GVAR(ropeOrigins)[] = {{1.03, 1.6, -0.23}, {1.03, -1.36, -0.23}, {-1.23, 1.6, -0.23}, {-1.23, -1.36, -0.23}};
};
class O_Heli_Transport_04_covered_F: Heli_Transport_04_base_F {
GVAR(enabled) = 1;
GVAR(ropeOrigins[]) = {{0.83, -4.7, -0.03}, {-1.02, -4.7, -0.03}};
GVAR(ropeOrigins)[] = {{0.83, -4.7, -0.03}, {-1.02, -4.7, -0.03}};
GVAR(onPrepare) = QFUNC(onPrepareCommon);
GVAR(onCut) = QFUNC(onCutCommon);
class UserActions: UserActions {
class CloseDoor_6;
class Ramp_Close: CloseDoor_6 {
condition = QUOTE([ARR_6(this,'Door_6_source',[[0],[1],[2],[3]])] call FUNC(canCloseRamp));
};
};
};
};

View File

@ -0,0 +1,11 @@
class CfgWaypoints {
class ACE {
displayName = "ACE";
class Fastrope {
displayName = CSTRING(Waypoint_Fastrope);
displayNameDebug = "Fastrope";
file = QUOTE(PATHTOF(functions\fnc_deployAIWaypoint.sqf));
icon = QUOTE(PATHTOF(UI\Icon_Waypoint.paa));
};
};
};

Binary file not shown.

View File

@ -0,0 +1,18 @@
PREP(canCloseRamp);
PREP(canCutRopes);
PREP(canDeployRopes);
PREP(canFastRope);
PREP(canPrepareFRIES);
PREP(checkVehicleThread);
PREP(cutRopes);
PREP(deployAI);
PREP(deployRopes);
PREP(equipFRIES);
PREP(fastRope);
PREP(fastRopeLocalPFH);
PREP(fastRopeServerPFH);
PREP(moduleEquipFRIES);
PREP(onCutCommon);
PREP(onPrepareCommon);
PREP(onRopeBreak);
PREP(prepareFRIES);

View File

@ -7,8 +7,3 @@
[QGVAR(startFastRope), {
[FUNC(fastRopeServerPFH), 0, _this] call CBA_fnc_addPerFrameHandler;
}] call EFUNC(common,addEventHandler);
[QGVAR(ropeDetach), {
params ["_object", "_rope"];
_object ropeDetach _rope;
}] call EFUNC(common,addEventHandler);

View File

@ -2,21 +2,6 @@
ADDON = false;
PREP(canCutRopes);
PREP(canDeployRopes);
PREP(canFastRope);
PREP(canPrepareFRIES);
PREP(checkVehicleThread);
PREP(cutRopes);
PREP(deployRopes);
PREP(equipFRIES);
PREP(fastRope);
PREP(fastRopeLocalPFH);
PREP(fastRopeServerPFH);
PREP(moduleEquipFRIES);
PREP(onCutCommon);
PREP(onPrepareCommon);
PREP(onRopeBreak);
PREP(prepareFRIES);
#include "XEH_PREP.hpp"
ADDON = true;

View File

@ -0,0 +1,3 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

View File

@ -15,3 +15,4 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgMoves.hpp"
#include "CfgVehicles.hpp"
#include "CfgWaypoints.hpp"

View File

@ -90,6 +90,24 @@ class CfgModels {
angle0 = "rad 0";
angle1 = "rad 360";
};
class hideGantryLeft {
type = "hide";
source = "";
selection = "gantryLeft";
animPeriod = 0;
minValue = 0;
maxValue = 1;
hideValue = 0.99999;
};
class hideGantryRight {
type = "hide";
source = "";
selection = "gantryRight";
animPeriod = 0;
minValue = 0;
maxValue = 1;
hideValue = 0.99999;
};
};
};
};

View File

@ -0,0 +1,29 @@
/*
* Author: BaerMitUmlaut
* Checks if the player can close the ramp of the given helo.
*
* Arguments:
* 0: The helicopter <OBJECT>
* 1: The ramp animation name <STRING>
* 2: Turret paths that can close the ramp <ARRAY>
*
* Return Value:
* Able to close ramp <BOOL>
*
* Example:
* [_player, _vehicle] call ace_fastroping_fnc_canCloseRamp
*
* Public: No
*/
#include "script_component.hpp"
params ["_vehicle", "_door", "_turretPaths"];
(_vehicle doorPhase _door > 0.5) &&
{alive _vehicle} &&
{(_vehicle getVariable ["bis_disabled_Ramp", 0]) != 1} &&
{!(_vehicle getVariable [QGVAR(doorsLocked), false])} &&
{
(ACE_player == driver _vehicle) ||
{((assignedVehicleRole ACE_player) param [1, []]) in _turretPaths}
}

View File

@ -19,7 +19,6 @@ params ["_vehicle"];
private _config = configFile >> "CfgVehicles" >> typeOf _vehicle;
(isNumber (_config >> QGVAR(enabled)) &&
{(getNumber (_config >> QGVAR(enabled)) == 1) || {!(isNull (_vehicle getVariable [QGVAR(FRIES), objNull]))}} &&
((getNumber (_config >> QGVAR(enabled)) == 1) || {!(isNull (_vehicle getVariable [QGVAR(FRIES), objNull]))}) &&
{(_vehicle getVariable [QGVAR(deploymentStage), 0]) == 0} &&
{isText (_config >> QGVAR(onPrepare))})
{getText (_config >> QGVAR(onPrepare)) != ""}

View File

@ -32,8 +32,11 @@ _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
};
};
[QGVAR(ropeDetach), [_hook, _ropeTop]] call EFUNC(common,serverEvent);
[{{deleteVehicle _x} count _this}, [_ropeTop, _ropeBottom, _dummy, _hook], 60] call EFUNC(common,waitAndExecute);
//Destroy rope
//Only delete the hook first so the rope falls down.
//Note: ropeDetach was used here before, but the command seems a bit broken.
deleteVehicle _hook;
[{{deleteVehicle _x} count _this}, [_ropeTop, _ropeBottom, _dummy], 60] call EFUNC(common,waitAndExecute);
} count _deployedRopes;
_vehicle setVariable [QGVAR(deployedRopes), [], true];

View File

@ -0,0 +1,96 @@
/*
* Author: BaerMitUmlaut
* Auomatically deploy a helicopter filled with AI units.
*
* Arguments:
* 0: The helicopter <OBJECT>
* 1: Deploy special roles (gunners, copilot) (default: false) <BOOL>
* 2: Create deployment group (default: true) <BOOL>
*
* Return Value:
* None
*
* Example:
* [_vehicle] call ace_fastroping_fnc_deployAI
*
* Public: Yes
*/
#include "script_component.hpp"
params [["_vehicle", objNull, [objNull]], ["_deploySpecial", false, [true]], ["_createDeploymentGroup", true, [true]]];
private ["_config", "_configEnabled", "_deployTime", "_unitsToDeploy", "_deployGroup"];
if (isNull _vehicle || {!(_vehicle isKindOf "Helicopter")}) exitWith {
if (hasInterface) then {
// Note: BIS_fnc_guiMessage causes a CTD with call, so spawn is used instead.
["deployAI was called with an invalid or non-existant vehicle.", QFUNC(deployAI)] spawn BIS_fnc_guiMessage;
};
ACE_LOGERROR('FUNC(deployAI): deployAI was called with an invalid or non-existant vehicle.');
};
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
_configEnabled = getNumber (_config >> QGVAR(enabled));
if (_configEnabled == 0) exitWith {
if (hasInterface) then {
[format ["You cannot fast rope from a ""%1"" helicopter.", getText (_config >> "DisplayName")], QFUNC(deployAI)] spawn BIS_fnc_guiMessage;
};
ACE_LOGERROR_1('FUNC(deployAI): You cannot fast rope from a "%1" helicopter.',getText (_config >> "DisplayName"));
};
if (_configEnabled == 2 && {isNull (_vehicle getVariable [QGVAR(FRIES), objNull])}) exitWith {
if (hasInterface) then {
[format ["""%1"" requires a FRIES for fastroping, but has not been equipped with one.", getText (_config >> "DisplayName")], QFUNC(deployAI)] spawn BIS_fnc_guiMessage;
};
ACE_LOGERROR_1('FUNC(deployAI): "%1" requires a FRIES for fastroping but has not been equipped with one.',getText (_config >> "DisplayName"));
};
_unitsToDeploy = crew _vehicle;
if (_deploySpecial) then {
_unitsToDeploy deleteAt (_unitsToDeploy find driver _vehicle);
} else {
_unitsToDeploy = _unitsToDeploy select {(assignedVehicleRole _x) select 0 == "cargo"};
};
if (_unitsToDeploy isEqualTo []) exitWith {
ACE_LOGWARNING_1('FUNC(deployAI): Found no units to deploy in "%1".',getText (_config >> "DisplayName"));
};
if (_createDeploymentGroup) then {
_deployGroup = createGroup side (_unitsToDeploy select 0);
_unitsToDeploy joinSilent _deployGroup;
};
_deployTime = 0;
if (getText (_config >> QGVAR(onPrepare)) != "") then {
_deployTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onPrepare))));
};
[{[_this] call FUNC(deployRopes)}, _vehicle, _deployTime] call EFUNC(common,waitAndExecute);
driver _vehicle disableAI "MOVE";
DFUNC(deployAIRecursive) = {
params ["_vehicle", "_unitsToDeploy"];
private _unit = _unitsToDeploy deleteAt 0;
unassignVehicle _unit;
[_unit, _vehicle] call FUNC(fastRope);
if !(_unitsToDeploy isEqualTo []) then {
[{
[{
params ["_vehicle"];
private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
({!(_x select 5)} count (_deployedRopes)) > 0
}, FUNC(deployAIRecursive), _this] call EFUNC(common,waitUntilAndExecute);
}, [_vehicle, _unitsToDeploy], 1] call EFUNC(common,waitAndExecute);
} else {
[{
private _deployedRopes = _this getVariable [QGVAR(deployedRopes), []];
({_x select 5} count (_deployedRopes)) == 0
}, {
[_this] call FUNC(cutRopes);
driver _this enableAI "MOVE";
}, _vehicle] call EFUNC(common,waitUntilAndExecute);
};
};
[FUNC(deployAIRecursive), [_vehicle, _unitsToDeploy], _deployTime + 4] call EFUNC(common,waitAndExecute);

View File

@ -0,0 +1,42 @@
/*
* Author: BaerMitUmlaut
* Waypoint function for the fast rope waypoint.
*
* Arguments:
* 0: Group <GROUP>
* 1: Waypoint position <ARRAY>
*
* Return Value:
* true
*
* Example:
* [_group, [6560, 12390, 0]] call ace_fastroping_fnc_deployAIWayoint
*
* Public: No
*/
#include "script_component.hpp"
params [["_group", grpNull, [grpNull]], ["_position", [0, 0, 0], [[]], 3]];
private ["_vehicle", "_commander", "_speedMode"];
_vehicle = vehicle leader _group;
_commander = effectiveCommander _vehicle;
_speedMode = speedMode _group;
// - Approach -----------------------------------------------------------------
if (_vehicle distance2D _position > 50) then {
_group setSpeedMode "LIMITED";
_vehicle flyInHeight 20;
_commander doMove _position;
waitUntil {_vehicle distance2D _position < 50};
waitUntil {vectorMagnitude (velocity _vehicle) < 3};
//doStop _commander;
};
// - Deployment ---------------------------------------------------------------
[_vehicle] call FUNC(deployAI);
waitUntil {!((_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo [])};
waitUntil {(_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo []};
_group setSpeedMode _speedMode;
true

View File

@ -24,7 +24,7 @@ _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []];
_usableRope = _deployedRopes select 0;
_usableRopeIndex = 0;
{
if !(_x select 6) exitWith {
if !(_x select 5) exitWith {
_usableRope = _x;
_usableRopeIndex = _forEachIndex;
};

View File

@ -25,7 +25,7 @@ private ["_vectorUp", "_vectorDir", "_origin"];
if (vehicle _unit != _unit) exitWith {};
//Start fast roping
if (animationState _unit != "ACE_FastRoping") exitWith {
if (getMass _dummy != 80) exitWith {
//Fix for twitchyness
_dummy setMass 80;
_dummy setCenterOfMass [0, 0, -2];
@ -38,7 +38,9 @@ if (animationState _unit != "ACE_FastRoping") exitWith {
};
//Check if rope broke and unit is falling
if (isNull attachedTo _unit) exitWith {
//Make sure this isn't executed before the unit is actually fastroping
//Note: Stretching ropes does not change ropeLength
if ((isNull attachedTo _unit) && {ropeLength _ropeTop > 0.5}) exitWith {
[_pfhHandle] call CBA_fnc_removePerFrameHandler;
};

View File

@ -24,16 +24,24 @@ if !(isNull _fries) then {
[{
_this animateDoor ["door_R", 0];
_this animateDoor ["door_L", 0];
_vehicle animate ["dvere1_posunZ", 0];
_vehicle animate ["dvere2_posunZ", 0];
_this animateDoor ["CargoRamp_Open", 0];
_this animateDoor ["Door_rear_source", 0];
_this animateDoor ["Door_6_source", 0];
_this animate ["dvere1_posunZ", 0];
_this animate ["dvere2_posunZ", 0];
_this setVariable [QGVAR(doorsLocked), false, true];
}, _vehicle, 2] call EFUNC(common,waitAndExecute);
4
} else {
_vehicle animateDoor ["door_R", 0];
_vehicle animateDoor ["door_L", 0];
_vehicle animateDoor ["CargoRamp_Open", 0];
_vehicle animateDoor ["Door_rear_source", 0];
_vehicle animateDoor ["Door_6_source", 0];
_vehicle animate ["dvere1_posunZ", 0];
_vehicle animate ["dvere2_posunZ", 0];
_vehicle setVariable [QGVAR(doorsLocked), false, true];
2
};

View File

@ -22,9 +22,14 @@ _waitTime = 2;
_vehicle animateDoor ["door_R", 1];
_vehicle animateDoor ["door_L", 1];
_vehicle animateDoor ["CargoRamp_Open", 1];
_vehicle animateDoor ["Door_rear_source", 1];
_vehicle animateDoor ["Door_6_source", 1];
_vehicle animate ["dvere1_posunZ", 1];
_vehicle animate ["dvere2_posunZ", 1];
_vehicle setVariable [QGVAR(doorsLocked), true, true];
_fries = _vehicle getVariable [QGVAR(FRIES), objNull];
if !(isNull _fries) then {
[{

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="Fastroping">
<Key ID="STR_ACE_Fastroping_Module_FRIES_DisplayName">
@ -7,6 +7,7 @@
<Polish>Wyposaż FRIES</Polish>
<French>Equiper le FRIES</French>
<Spanish>Equipar FRIES</Spanish>
<Italian>Equipaggia la FRIES</Italian>
</Key>
<Key ID="STR_ACE_Fastroping_Module_FRIES_Description">
<English>Equips compatible helicopters with a Fast Rope Insertion Extraction System.</English>
@ -14,6 +15,7 @@
<Polish>Wyposaża kompatybilne helikoptery w zestaw Fast Rope Insertion Extraction System.</Polish>
<French>Equipe les hélicoptères compatibles avec un Module Fast Rope Insertion Extraction System.</French>
<Spanish>Equipar helicoptero compatible con un Sistema de Inserción Extracción Fast Rope.</Spanish>
<Italian>Equipagga l'elicottero compatibile con il Fast Rope Insertion Exstraction System</Italian>
</Key>
<Key ID="STR_ACE_Fastroping_Interaction_prepareFRIES">
<English>Prepare fast roping system</English>
@ -21,6 +23,7 @@
<Polish>Przygotuj system zjazdu na linach</Polish>
<French>Préparer le système de corde lisse</French>
<Spanish>Preparar el sistema fast roping</Spanish>
<Italian>Prepara le corde</Italian>
</Key>
<Key ID="STR_ACE_Fastroping_Interaction_deployRopes">
<English>Deploy ropes</English>
@ -28,6 +31,7 @@
<Polish>Wypuść liny</Polish>
<French>Déployer les cordes</French>
<Spanish>Desplegar cuerdas</Spanish>
<Italian>Srotola le corde</Italian>
</Key>
<Key ID="STR_ACE_Fastroping_Interaction_fastRope">
<English>Fast rope</English>
@ -35,6 +39,7 @@
<Polish>Zjedź na linie</Polish>
<French>Descendre à la corde</French>
<Spanish>Descender por la cuerda</Spanish>
<Italian>Scendi sulla corda</Italian>
</Key>
<Key ID="STR_ACE_Fastroping_Interaction_cutRopes">
<English>Cut ropes</English>
@ -42,6 +47,7 @@
<Polish>Odetnij liny</Polish>
<French>Détacher les cordes</French>
<Spanish>Cortar cuerdas</Spanish>
<Italian>Taglia le corde</Italian>
</Key>
<Key ID="STR_ACE_Fastroping_Eden_equipFRIES">
<English>Equip helicopter with FRIES</English>
@ -49,6 +55,7 @@
<Polish>Wyposaż helikopter w FRIES</Polish>
<French>Equiper l'hélicoptère avec le FRIED</French>
<Spanish>Equipar helicoptero con FRIES</Spanish>
<Italian>Equipaggia l'elicottero con FRIES</Italian>
</Key>
<Key ID="STR_ACE_Fastroping_Eden_equipFRIES_Tooltip">
<English>Equips the selected helicopter with a Fast Rope Insertion Extraction System</English>
@ -56,6 +63,12 @@
<Polish>Wyposaża wybrany helikopter w zestaw Fast Rope Insertion Extraction System</Polish>
<French>Equipe l'hélicoptère sélectionné avec un Fast Rope Insertion Extraction System</French>
<Spanish>Equipa el helicoptero seleccionado con un Sistema de Inserción Extracción Fast Rope</Spanish>
<Italian>Equipaggia l'elicottero selezionato con il Fast Rope Insertion Extraction System</Italian>
</Key>
<Key ID="STR_ACE_Fastroping_Waypoint_Fastrope">
<English>LET UNITS FAST ROPE</English>
<German>EINHEITEN ABSEILEN LASSEN</German>
<Italian>SCENDI DALLE CORDE</Italian>
</Key>
</Package>
</Project>
</Project>

View File

@ -16,10 +16,11 @@
TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret);
private _FCSMagazines = _vehicle getVariable [format ["%1_%2", QGVAR(Magazines), _turret], []];
private _FCSElevation = _vehicle getVariable format ["%1_%2", QGVAR(Elevation), _turret];
if !(_magazine in _FCSMagazines) exitWith {};
private _FCSElevation = _vehicle getVariable format ["%1_%2", QGVAR(Elevation), _turret];
// GET ELEVATION OFFSET OF CURRENT MAGAZINE
private _offset = 0;

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="FCS">
<Key ID="STR_ACE_FCS_LaseTarget">

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="FlashSuppressors">
<Key ID="STR_ACE_FlashSuppressors_muzzle_mzls_H">

View File

@ -4,8 +4,8 @@ class ACE_Settings {
typeName = "SCALAR";
isClientSettable = 1;
category = ECSTRING(interact_menu,Category_InteractionMenu);
displayName = CSTRING(showOnInteractionMenu_displayName);
description = CSTRING(showOnInteractionMenu_description);
values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(justKeybinds), CSTRING(keysAndInteractionMenu)};
displayName = CSTRING(ShowOnInteractionMenu_displayName);
description = CSTRING(ShowOnInteractionMenu_description);
values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(JustKeybinds), CSTRING(KeysAndInteractionMenu)};
};
};

View File

@ -12,131 +12,104 @@ class CfgVehicles {
icon = PATHTOF(UI\gestures_ca.paa);
class GVAR(Advance) {
displayName = CSTRING(BIgestureAdvance);
displayName = CSTRING(Advance);
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureAdvance';);
showDisabled = 1;
priority = 1.9;
};
class GVAR(Go) {
displayName = CSTRING(BIgestureGo);
displayName = CSTRING(Go);
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow ([ARR_2('gestureGo','gestureGoB')] select floor random 2););
showDisabled = 1;
priority = 1.8;
};
class GVAR(Follow) {
displayName = CSTRING(BIgestureFollow);
displayName = CSTRING(Follow);
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureFollow';);
showDisabled = 1;
priority = 1.7;
};
class GVAR(Up) {
displayName = CSTRING(BIgestureUp);
displayName = CSTRING(Up);
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureUp';);
showDisabled = 1;
priority = 1.5;
};
class GVAR(CeaseFire) {
displayName = CSTRING(BIgestureCeaseFire);
displayName = CSTRING(CeaseFire);
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureCeaseFire';);
showDisabled = 1;
priority = 1.3;
};
class GVAR(Freeze) {
displayName = CSTRING(BIgestureFreeze);
class GVAR(Stop) {
displayName = CSTRING(Stop);
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureFreeze';);
statement = QUOTE(_target playActionNow 'gestureFreeze';); // BI animation - is actualls "stop" in all stances but prone
showDisabled = 1;
priority = 1.2;
};
class GVAR(Forward) {
displayName = CSTRING(forward);
displayName = CSTRING(Forward);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
statement = QUOTE(QUOTE(QGVAR(forward)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.9;
};
class GVAR(Regroup) {
displayName = CSTRING(regroup);
displayName = CSTRING(Regroup);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
statement = QUOTE(QUOTE(QGVAR(regroup)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.8;
};
class GVAR(Stop) {
displayName = CSTRING(stop);
class GVAR(Freeze) {
displayName = CSTRING(Freeze);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
statement = QUOTE(QUOTE(QGVAR(stop)) call FUNC(playSignal));
statement = QUOTE(QUOTE(QGVAR(freeze)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.7;
};
class GVAR(Cover) {
displayName = CSTRING(cover);
displayName = CSTRING(Cover);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
statement = QUOTE(QUOTE(QGVAR(cover)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.6;
};
class GVAR(Point) {
displayName = CSTRING(point);
displayName = CSTRING(Point);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
statement = QUOTE(QUOTE(QGVAR(point)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.5;
};
class GVAR(Engage) {
displayName = CSTRING(engage);
displayName = CSTRING(Engage);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
statement = QUOTE(QUOTE(QGVAR(engage)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.4;
};
class GVAR(Hold) {
displayName = CSTRING(hold);
displayName = CSTRING(Hold);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
statement = QUOTE(QUOTE(QGVAR(hold)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.3;
};
class GVAR(Warning) {
displayName = CSTRING(warning);
displayName = CSTRING(Warning);
condition = QUOTE(canStand _target && GVAR(ReloadMutex));
statement = QUOTE(QUOTE(QGVAR(warning)) call FUNC(playSignal));
showDisabled = 1;
priority = 1.2;
};
/*
class class GVAR(Yes) {
displayName = ECSTRING(common,Yes);
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow ([ARR_2('gestureYes','gestureNod')] select floor random 2););
showDisabled = 1;
priority = 1.1;
};
class class GVAR(No) {
displayName = ECSTRING(common,No);
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow 'gestureNo';);
showDisabled = 1;
priority = 1.0;
};
class class GVAR(Hi) {
displayName = CSTRING(Hi);
condition = QUOTE(canStand _target);
statement = QUOTE(_target playActionNow ([ARR_3('gestureHi','gestureHiB','gestureHiC')] select floor random 3););
showDisabled = 1;
priority = 0.9;
};
*/
};
};
};
};

11
addons/gestures/README.md Normal file
View File

@ -0,0 +1,11 @@
ace_gestures
========
Gestures system in interaction menu and keybinds.
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [jokoho48](https://github.com/jokoho48)

View File

@ -5,4 +5,44 @@ if (!hasInterface) exitWith {};
// reload mutex, you can't play signal while reloading
GVAR(ReloadMutex) = true;
#include "key.sqf"
// Add keybinds
{
_x params ["_currentName", "_key", ["_vanillaKey", false] ];
// Don't add "ace_gestures_" prefix to BI gestures
private _signalName = _currentName;
if (!_vanillaKey) then {
_signalName = format [QGVAR(%1), _currentName];
};
private _code = compile format [QUOTE('%1' call FUNC(playSignal)), _signalName];
TRACE_4("Adding KeyBind",_currentName,_signalName,_code,_key);
[
"ACE3 Gestures",
_currentName,
localize format [LSTRING(%1), _currentName],
_code,
{false},
[_key, [false, (_key != -1), false]],
false
] call CBA_fnc_addKeybind;
false
} count [
["Freeze", 80], // Numpad 2
["Cover", 81], // Numpad 3
["Forward", 75], // Numpad 4
["Regroup", 76], // Numpad 5
["Engage", 77], // Numpad 6
["Point", 71], // Numpad 7
["Hold", 72], // Numpad 8
["Warning", 73], // Numpad 9
["Go", -1, true],
["Advance", -1, true],
["Follow", -1, true],
["Up", -1, true],
["Stop", -1, true],
["CeaseFire", -1, true]
];

View File

@ -1,7 +1,7 @@
class CfgMovesBasic {
class ManActions {
GVAR(forward) = QGVAR(forward);
GVAR(stop) = QGVAR(stop);
GVAR(freeze) = QGVAR(freeze);
GVAR(cover) = QGVAR(cover);
GVAR(regroup) = QGVAR(regroup);
GVAR(engage) = QGVAR(engage);
@ -10,7 +10,7 @@ class CfgMovesBasic {
GVAR(warning) = QGVAR(warningS);
GVAR(forwardStandLowered) = QGVAR(forwardStandLowered);
GVAR(stopStandLowered) = QGVAR(stopStandLowered);
GVAR(freezeStandLowered) = QGVAR(freezeStandLowered);
GVAR(coverStandLowered) = QGVAR(coverStandLowered);
GVAR(regroupStandLowered) = QGVAR(regroupStandLowered);
GVAR(engageStandLowered) = QGVAR(engageStandLowered);
@ -22,7 +22,7 @@ class CfgMovesBasic {
class Actions {
class NoActions: ManActions {
GVAR(forward)[] = {QGVAR(forward), "Gesture"};
GVAR(stop)[] = {QGVAR(stop), "Gesture"};
GVAR(freeze)[] = {QGVAR(freeze), "Gesture"};
GVAR(cover)[] = {QGVAR(cover), "Gesture"};
GVAR(regroup)[] = {QGVAR(regroup), "Gesture"};
GVAR(engage)[] = {QGVAR(engage), "Gesture"};
@ -31,7 +31,7 @@ class CfgMovesBasic {
GVAR(warning)[] = {QGVAR(warning), "Gesture"};
GVAR(forwardStandLowered)[] = {QGVAR(forwardStandLowered), "Gesture"};
GVAR(stopStandLowered)[] = {QGVAR(stopStandLowered), "Gesture"};
GVAR(freezeStandLowered)[] = {QGVAR(freezeStandLowered), "Gesture"};
GVAR(coverStandLowered)[] = {QGVAR(coverStandLowered), "Gesture"};
GVAR(regroupStandLowered)[] = {QGVAR(regroupStandLowered), "Gesture"};
GVAR(engageStandLowered)[] = {QGVAR(engageStandLowered), "Gesture"};
@ -134,13 +134,13 @@ class CfgGesturesMale {
file = QUOTE(PATHTOF(anim\ace_forward_stand_lowered.rtm));
};
class GVAR(stop): GVAR(forward) {
file = QUOTE(PATHTOF(anim\ace_stop.rtm));
class GVAR(freeze): GVAR(forward) {
file = QUOTE(PATHTOF(anim\ace_freeze.rtm));
speed = 0.6;
};
class GVAR(stopStandLowered): GVAR(stop) {
file = QUOTE(PATHTOF(anim\ace_stop_stand_lowered.rtm));
class GVAR(freezeStandLowered): GVAR(freeze) {
file = QUOTE(PATHTOF(anim\ace_freeze_stand_lowered.rtm));
};
class GVAR(cover): GVAR(forward) {

View File

@ -7,7 +7,7 @@ class CfgPatches {
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interact_menu"};
author[] = {"joko // Jonas", "Emperias", "Zigomarvin"};
authorUrl = "https://github.com/commy2/";
authorUrl = "https://github.com/jokoho48";
VERSION_CONFIG;
};
};

View File

@ -1,42 +0,0 @@
#include "\a3\editor_f\Data\Scripts\dikCodes.h"
{
_x params ["_currentName","_key"];
private _signalName = format [QGVAR(%1), _currentName];
if (_currentName select [0,2] == "BI") then {
//Don't add "ace_gestures_" prefix to BI gestures
_signalName = _currentName;
};
private _code = (compile format [QUOTE('%1' call FUNC(playSignal);), _signalName]);
TRACE_4("Adding KeyBind",_currentName,_signalName,_code,_key);
[
"ACE3 Gestures",
_currentName,
localize format[LSTRING(%1), _currentName],
_code,
{false},
[_key, [false, (_key != -1), false]],
false
] call CBA_fnc_addKeybind;
false
} count [
["stop", DIK_NUMPAD2],
["cover", DIK_NUMPAD3],
["forward", DIK_NUMPAD4],
["regroup", DIK_NUMPAD5],
["engage", DIK_NUMPAD6],
["point", DIK_NUMPAD7],
["hold", DIK_NUMPAD8],
["warning", DIK_NUMPAD9],
["BIgestureGo", -1],
["BIgestureAdvance", -1],
["BIgestureFollow", -1],
["BIgestureUp", -1],
["BIgestureFreeze", -1],
["BIgestureCeaseFire", -1]
];

View File

@ -25,7 +25,7 @@
<Portuguese>Gestos</Portuguese>
<Italian>Gesti</Italian>
</Key>
<Key ID="STR_ACE_Gestures_BIgestureAdvance">
<Key ID="STR_ACE_Gestures_Advance">
<English>Advance</English>
<German>Vordringen</German>
<Spanish>Avanzar</Spanish>
@ -37,7 +37,7 @@
<Portuguese>Avançar</Portuguese>
<Italian>Avanzare</Italian>
</Key>
<Key ID="STR_ACE_Gestures_BIgestureGo">
<Key ID="STR_ACE_Gestures_Go">
<English>Go</English>
<German>Los</German>
<Spanish>Adelante</Spanish>
@ -49,7 +49,7 @@
<Portuguese>Mover-se</Portuguese>
<Italian>Muoversi</Italian>
</Key>
<Key ID="STR_ACE_Gestures_BIgestureFollow">
<Key ID="STR_ACE_Gestures_Follow">
<English>Follow</English>
<German>Folgen</German>
<Spanish>Seguirme</Spanish>
@ -61,7 +61,7 @@
<Portuguese>Seguir</Portuguese>
<Italian>Seguire</Italian>
</Key>
<Key ID="STR_ACE_Gestures_BIgestureUp">
<Key ID="STR_ACE_Gestures_Up">
<English>Up</English>
<German>Aufstehen</German>
<Spanish>Arriba</Spanish>
@ -73,7 +73,7 @@
<Portuguese>Acima</Portuguese>
<Italian>Alzarsi</Italian>
</Key>
<Key ID="STR_ACE_Gestures_BIgestureCeaseFire">
<Key ID="STR_ACE_Gestures_CeaseFire">
<English>Cease Fire</English>
<German>Feuer einstellen</German>
<Spanish>Alto el fuego</Spanish>
@ -85,19 +85,18 @@
<Portuguese>Cessar Fogo</Portuguese>
<Italian>Cessare il Fuoco</Italian>
</Key>
<Key ID="STR_ACE_Gestures_BIGesturesPoint">
<English>Point</English>
<German>Zeigen</German>
<Spanish>Señalar</Spanish>
<Polish>Wskazać</Polish>
<Czech>Ukázat</Czech>
<French>Pointer</French>
<Russian>Показать направление</Russian>
<Hungarian>Mutat</Hungarian>
<Portuguese>Apontar</Portuguese>
<Italian>Puntare a</Italian>
<Key ID="STR_ACE_Gestures_Stop">
<English>Stop</English>
<French>Stop</French>
<German>Halt</German>
<Polish>Stop</Polish>
<Russian>Стоп</Russian>
<Portuguese>Parar</Portuguese>
<Czech>Stop</Czech>
<Italian>Stop</Italian>
<Spanish>Detenerse</Spanish>
</Key>
<Key ID="STR_ACE_Gestures_BIgestureFreeze">
<Key ID="STR_ACE_Gestures_Freeze">
<English>Freeze</English>
<German>Keine Bewegung</German>
<Spanish>Alto</Spanish>
@ -109,20 +108,7 @@
<Portuguese>Alto</Portuguese>
<Italian>Fermi</Italian>
</Key>
<!-- STOP -->
<Key ID="STR_ACE_Gestures_stop">
<English>Stop</English>
<French>Stop</French>
<German>Halt</German>
<Polish>Stop</Polish>
<Russian>Стоп</Russian>
<Portuguese>Parar</Portuguese>
<Czech>Stop</Czech>
<Italian>Stop</Italian>
<Spanish>Detenerse</Spanish>
</Key>
<!-- COVER -->
<Key ID="STR_ACE_Gestures_cover">
<Key ID="STR_ACE_Gestures_Cover">
<English>Cover</English>
<German>Deckung</German>
<Spanish>Cubrirse</Spanish>
@ -134,8 +120,7 @@
<Portuguese>Proteger-se</Portuguese>
<Italian>Copertura</Italian>
</Key>
<!-- REGROUP -->
<Key ID="STR_ACE_Gestures_regroup">
<Key ID="STR_ACE_Gestures_Regroup">
<English>Rally up</English>
<French>Regroupement</French>
<German>Sammeln</German>
@ -146,8 +131,7 @@
<Italian>Raggruppare</Italian>
<Spanish>Reunirse</Spanish>
</Key>
<!-- FORWARD -->
<Key ID="STR_ACE_Gestures_forward">
<Key ID="STR_ACE_Gestures_Forward">
<English>Move forward</English>
<French>En avant</French>
<German>Vorwärts Bewegen</German>
@ -158,8 +142,7 @@
<Italian>Muovere avanti</Italian>
<Spanish>Avanzar</Spanish>
</Key>
<!-- ENGAGE -->
<Key ID="STR_ACE_Gestures_engage">
<Key ID="STR_ACE_Gestures_Engage">
<English>Engage</English>
<German>Angriff</German>
<French>Engager</French>
@ -170,8 +153,7 @@
<Italian>Ingaggiare</Italian>
<Spanish>Atacar</Spanish>
</Key>
<!-- POINT -->
<Key ID="STR_ACE_Gestures_point">
<Key ID="STR_ACE_Gestures_Point">
<English>Point</English>
<French>Pointer</French>
<German>Zeigen</German>
@ -182,8 +164,7 @@
<Italian>Puntare</Italian>
<Spanish>Señalar</Spanish>
</Key>
<!-- HOLD -->
<Key ID="STR_ACE_Gestures_hold">
<Key ID="STR_ACE_Gestures_Hold">
<English>Hold</English>
<French>Tenir</French>
<German>Anhalten</German>
@ -194,8 +175,7 @@
<Italian>Mantenere</Italian>
<Spanish>Esperar</Spanish>
</Key>
<!-- WARNING -->
<Key ID="STR_ACE_Gestures_warning">
<Key ID="STR_ACE_Gestures_Warning">
<English>Warning</English>
<French>Attention</French>
<German>Achtung</German>
@ -206,31 +186,7 @@
<Italian>Attenzione</Italian>
<Spanish>Atención</Spanish>
</Key>
<Key ID="STR_ACE_Gestures_Hi">
<English>Hi</English>
<German>Hallo</German>
<Spanish>Hola</Spanish>
<Polish>Witaj</Polish>
<Czech>Ahoj</Czech>
<French>Salut</French>
<Russian>Привет</Russian>
<Hungarian>Helló</Hungarian>
<Portuguese>Olá</Portuguese>
<Italian>Ciao</Italian>
</Key>
<Key ID="STR_ACE_Gestures_Attack">
<English>Attack</English>
<German>Angreifen</German>
<Spanish>Atacar</Spanish>
<Polish>Do ataku</Polish>
<Czech>Zaútočit</Czech>
<French>Attaquer</French>
<Russian>Атаковать</Russian>
<Hungarian>Támadás</Hungarian>
<Portuguese>Atacar</Portuguese>
<Italian>Attaccare</Italian>
</Key>
<Key ID="STR_ACE_Gestures_showOnInteractionMenu_displayName">
<Key ID="STR_ACE_Gestures_ShowOnInteractionMenu_displayName">
<English>Show Gestures On Interaction Menu</English>
<German>Zeige Gesten im Interaktionsmenü</German>
<Czech>Zobrazit posunky v interakčním menu</Czech>
@ -239,7 +195,7 @@
<Spanish>Mostrar gestos en el menú de interacción</Spanish>
<French>Afficher les gestes au menu d'interaction.</French>
</Key>
<Key ID="STR_ACE_Gestures_showOnInteractionMenu_description">
<Key ID="STR_ACE_Gestures_ShowOnInteractionMenu_description">
<English>Show gestures on the self interaction menu, or just use keybinds, or disable completely</English>
<German>Zeige Gesten im Selbst-Interkationsmenü, lege sie auf Schnelltasten, oder deaktiviere sie vollständig.</German>
<Czech>Zobrazit posunky pro vlastní interakční menu, nebo prostě použít klávesové zkratky, nebo to zakázat úplně</Czech>
@ -248,7 +204,7 @@
<Spanish>Muestror los gestos en el menú de interacción propia, utilizar solo combinación de teclas o desactivarlos completamente</Spanish>
<French>Afficher les gestes dans le menu d'interaction personnel, ou seulement utiliser les touches, ou desactiver complètement.</French>
</Key>
<Key ID="STR_ACE_Gestures_justKeybinds">
<Key ID="STR_ACE_Gestures_JustKeybinds">
<English>Just Keybinds</English>
<German>Nur Schnelltasten</German>
<Czech>Pouze klávesové zkratky</Czech>
@ -257,7 +213,7 @@
<Spanish>Solo mediante teclas</Spanish>
<French>Seulement les touches</French>
</Key>
<Key ID="STR_ACE_Gestures_keysAndInteractionMenu">
<Key ID="STR_ACE_Gestures_KeysAndInteractionMenu">
<English>Keybinds + Interaction Menu</English>
<German>Schnelltasten+ Interaktionsmenü</German>
<Czech>Klávesové zkratky + interakční menu</Czech>

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="Goggles">
<Key ID="STR_ACE_Goggles_ShowInThirdPerson">

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="Grenades">
<Key ID="STR_ACE_Grenades_SwitchGrenadeMode">

View File

@ -115,6 +115,7 @@
<Spanish>Desactiva el efecto de zumbido cuando el jugador recibe daño auditivo.</Spanish>
<Polish>Usuń szum w uszach przy chwilowej utracie słuchu.</Polish>
<French>Enlève les acouphènes quand le joueur prend des dommages auditifs.</French>
<Italian>Quando il giocatore riceve danni all'udito, non fa sentire i fischi nelle orecchie</Italian>
</Key>
<Key ID="STR_ACE_Hearing_Module_DisplayName">
<English>Hearing</English>
@ -208,4 +209,4 @@
<French>Ajouter l'item "ACE_EarPlugs" à toutes les unités qui ont des armes lourdes. Peut être desactivé si des équipements personnels sont utilisés.</French>
</Key>
</Package>
</Project>
</Project>

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="HuntIR">
<Key ID="STR_DN_ACE_HUNTIRBOX">

View File

@ -4,6 +4,9 @@ ADDON = false;
#include "XEH_PREP.hpp"
GVAR(ActNamespace) = [] call CBA_fnc_createNamespace;
GVAR(ActSelfNamespace) = [] call CBA_fnc_createNamespace;
// Event handlers for all interact menu controls
DFUNC(handleMouseMovement) = {
if (GVAR(cursorKeepCentered)) then {
@ -42,6 +45,13 @@ GVAR(expanded) = false;
GVAR(startHoverTime) = ACE_diagTime;
GVAR(expandedTime) = ACE_diagTime;
// reset on mission load
addMissionEventHandler ["Loaded", {
GVAR(startHoverTime) = 0;
GVAR(expandedTime) = 0;
}];
GVAR(iconCtrls) = [];
GVAR(iconCount) = 0;

View File

@ -30,10 +30,11 @@ if (_typeNum == 0) then {
[_objectType] call FUNC(compileMenuSelfAction);
};
private _varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType];
private _actionTrees = missionNamespace getVariable [_varName, []];
if((count _actionTrees) == 0) then {
missionNamespace setVariable [_varName, _actionTrees];
private _namespace = [GVAR(ActNamespace), GVAR(ActSelfNamespace)] select _typeNum;
private _actionTrees = _namespace getVariable _objectType;
if (isNil "_actionTrees") then {
_actionTrees = [];
_namespace setVariable [_objectType, _actionTrees];
};
if (_parentPath isEqualTo ["ACE_MainActions"]) then {

View File

@ -18,8 +18,12 @@
params ["_objectType", "_typeNum"];
private _varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType];
private _actionTrees = missionNamespace getVariable [_varName, []];
private _namespace = [GVAR(ActNamespace), GVAR(ActSelfNamespace)] select _typeNum;
private _actionTrees = _namespace getVariable _objectType;
if (isNil "_actionTrees") then {
_actionTrees = [];
};
private _parentNode = [_actionTrees, ["ACE_MainActions"]] call FUNC(findActionNode);
if (isNil {_parentNode}) then {

View File

@ -18,10 +18,10 @@ private _objectType = _target;
if (_target isEqualType objNull) then {
_objectType = typeOf _target;
};
private _actionsVarName = format [QGVAR(Act_%1), _objectType];
private _namespace = GVAR(ActNamespace);
// Exit if the action menu is already compiled for this class
if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {};
if !(isNil {_namespace getVariable _objectType}) exitWith {};
private _recurseFnc = {
params ["_actionsCfg", "_parentDistance"];
@ -104,7 +104,7 @@ private _actionsCfg = configFile >> "CfgVehicles" >> _objectType >> "ACE_Actions
TRACE_1("Building ACE_Actions",_objectType);
private _actions = [_actionsCfg, 0] call _recurseFnc;
missionNamespace setVariable [_actionsVarName, _actions];
_namespace setVariable [_objectType, _actions];
/*
[

View File

@ -18,10 +18,10 @@ private _objectType = _target;
if (_target isEqualType objNull) then {
_objectType = typeOf _target;
};
private _actionsVarName = format [QGVAR(SelfAct_%1), _objectType];
private _namespace = GVAR(ActSelfNamespace);
// Exit if the action menu is already compiled for this class
if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {};
if !(isNil {_namespace getVariable _objectType}) exitWith {};
private _recurseFnc = {
@ -125,4 +125,4 @@ private _actions = [
]
];
missionNamespace setVariable [_actionsVarName, _actions];
_namespace setVariable [_objectType, _actions];

View File

@ -19,18 +19,20 @@
params ["_objectType", "_typeNum", "_fullPath"];
private ["_res","_varName","_actionTrees", "_parentNode", "_found"];
_res = _fullPath call FUNC(splitPath);
private _res = _fullPath call FUNC(splitPath);
_res params ["_parentPath", "_actionName"];
_varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType];
_actionTrees = missionNamespace getVariable [_varName, []];
private _namespace = [GVAR(ActNamespace), GVAR(ActSelfNamespace)] select _typeNum;
private _actionTrees = _namespace getVariable _objectType;
if (isNil "_actionTrees") then {
_actionTrees = [];
};
_parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode);
private _parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode);
if (isNil {_parentNode}) exitWith {};
// Iterate through children of the father
_found = false;
private _found = false;
{
if (((_x select 0) select 0) == _actionName) exitWith {
TRACE_2("Deleting Action", _forEachIndex, _x);

View File

@ -54,8 +54,9 @@ private _fnc_renderNearbyActions = {
} count GVAR(objectActionList);
// Iterate through base level class actions and render them if appropiate
private _actionsVarName = format [QGVAR(Act_%1), typeOf _target];
private _classActions = missionNamespace getVariable [_actionsVarName, []];
private _namespace = GVAR(ActNamespace);
private _classActions = _namespace getVariable typeOf _target;
{
private _action = _x;
// Try to render the menu
@ -95,8 +96,8 @@ private _fnc_renderSelfActions = {
GVAR(objectActionList) = _target getVariable [QGVAR(selfActions), []];
// Iterate through base level class actions and render them if appropiate
private _actionsVarName = format [QGVAR(SelfAct_%1), typeOf _target];
private _classActions = missionNamespace getVariable [_actionsVarName, []];
private _namespace = GVAR(ActSelfNamespace);
private _classActions = _namespace getVariable typeOf _target;
private _pos = if !(GVAR(useCursorMenu)) then {
//Convert to ASL, add offset and then convert back to AGL (handles waves when over water)

View File

@ -1,6 +1,8 @@
class ACE_Settings {
class GVAR(EnableTeamManagement) {
displayName = CSTRING(EnableTeamManagement_DisplayName);
description = CSTRING(EnableTeamManagement_Description);
value = 1;
typeName = "BOOL";
};

View File

@ -20,8 +20,11 @@
params ["", "", "_parameters"];
_parameters params ["_unit"];
private _varName = format [QEGVAR(interact_menu,Act_%1), typeOf _unit];
private _actionTrees = missionNamespace getVariable [_varName, []];
private _namespace = EGVAR(interact_menu,ActNamespace);
private _actionTrees = _namespace getVariable typeOf _unit;
if (isNil "_actionTrees") then {
_actionTrees = [];
};
private _actions = [];

View File

@ -19,4 +19,7 @@ if (isNull (uiNamespace getVariable ["ACE_Helper_Display", objNull])) exitWith {
(QGVAR(InteractionHelper) call BIS_fnc_rscLayer) cutText ["", "PLAIN"];
["mouseHint", []] call EFUNC(common,showHud); //This is equivalent to the old showHud true
// Disable action menu, showHud also disables all scripted UI (such as drawIcon3D)
inGameUISetEventHandler ["PrevAction", "false"];
inGameUISetEventHandler ["NextAction", "false"];
inGameUISetEventHandler ["Action", "false"];

View File

@ -50,4 +50,7 @@ if (_scroll == "") exitWith {
(_display displayCtrl 1002) ctrlSetText _scroll;
["mouseHint", [false, true, true, true, true, true, true, false]] call EFUNC(common,showHud); //This is equivalent to the old showHud false
// Enable action menu
inGameUISetEventHandler ["PrevAction", "true"];
inGameUISetEventHandler ["NextAction", "true"];
inGameUISetEventHandler ["Action", "true"];

View File

@ -711,6 +711,7 @@
<Polish>Włącz</Polish>
<Spanish>Encender</Spanish>
<French>Allumer</French>
<Italian>Accendi</Italian>
</Key>
<Key ID="STR_ACE_Interaction_TurnOff">
<English>Turn off</English>
@ -718,6 +719,7 @@
<Polish>Wyłącz</Polish>
<Spanish>Apagar</Spanish>
<French>Eteindre</French>
<Italian>Spegni</Italian>
</Key>
<Key ID="STR_ACE_Interaction_PassMagazine">
<English>Pass magazine</English>
@ -775,4 +777,4 @@
<French>Montrer l'interaction "donner un chargeur".</French>
</Key>
</Package>
</Project>
</Project>

View File

@ -2,6 +2,35 @@
if (!hasInterface) exitWith {};
// cache config
// items in the inventory display can only be distinguished by their lb names and pictures
// this can cause collisions (mainly weapons with attachments),
// but if the item has the same name and picture it at least shouldn't change the filter anyway
// luckily we don't need private items, so dummy and parent classes are out of the picture
GVAR(ItemKeyNamespace) = [] call CBA_fnc_createNamespace;
private _fnc_addToCache = {
private _displayName = getText (_this >> "displayName");
private _picture = getText (_this >> "picture");
// list box seems to delete the leading backslash
if (_picture select [0,1] == "\") then {
_picture = _picture select [1];
};
GVAR(ItemKeyNamespace) setVariable [format ["%1:%2", _displayName, _picture], _this];
};
private _allItems = [];
_allItems append ("getNumber (_x >> 'scope') > 0" configClasses (configFile >> "CfgWeapons"));
_allItems append ("getNumber (_x >> 'scope') > 0" configClasses (configFile >> "CfgGlasses"));
_allItems append ("getNumber (_x >> 'scope') == 2" configClasses (configFile >> "CfgMagazines"));
_allItems append ("getNumber (_x >> 'scope') > 0 && {getNumber (_x >> 'isBackpack') == 1}" configClasses (configFile >> "CfgVehicles"));
{_x call _fnc_addToCache; false} count _allItems;
GVAR(customFilters) = [];
GVAR(selectedFilterIndex) = -1;

View File

@ -4,47 +4,4 @@ ADDON = false;
#include "XEH_PREP.hpp"
// cache config
// items in the inventory display can only be distinguished by their lb names and pictures
// this can cause collisions (mainly weapons with attachments),
// but if the item has the same name and picture it at least shouldn't change the filter anyway
// luckily we don't need private items, so dummy and parent classes are out of the picture
if !(uiNamespace getVariable [QGVAR(configCached), false]) then {
private _fnc_addToCache = {
private _displayName = getText (_this >> "displayName");
private _picture = getText (_this >> "picture");
// list box seems to delete the leading backslash
if (_picture select [0,1] == "\") then {
_picture = _picture select [1];
};
uiNamespace setVariable [format [QGVAR(ItemKey:%1:%2), _displayName, _picture], _this];
};
// weapons and items
{
if (getNumber (_x >> "scope") > 0) then {_x call _fnc_addToCache};
false
} count (
("true" configClasses (configFile >> "CfgWeapons")) +
("true" configClasses (configFile >> "CfgGlasses"))
);
// magazines
{
if (getNumber (_x >> "scope") == 2) then {_x call _fnc_addToCache};
false
} count ("true" configClasses (configFile >> "CfgMagazines"));
// backpacks
{
if (getNumber (_x >> "scope") > 0 && {getNumber (_x >> "isBackpack") == 1}) then {_x call _fnc_addToCache};
false
} count ("true" configClasses (configFile >> "CfgVehicles"));
uiNamespace setVariable [QGVAR(configCached), true];
};
ADDON = true;

View File

@ -23,12 +23,9 @@ if (_filterFunction isEqualType {}) then {
private _i = 0;
while {_i < lbSize _itemList} do {
private _config = uiNamespace getVariable [
format [QGVAR(ItemKey:%1:%2), _itemList lbText _i, _itemList lbPicture _i],
configNull
];
private _config = GVAR(ItemKeyNamespace) getVariable format ["%1:%2", _itemList lbText _i, _itemList lbPicture _i];
if (!isNull _config && {!(_config call _filterFunction)}) then {
if (!isNil "_config" && {!(_config call _filterFunction)}) then {
_itemList lbDelete _i;
// in case the filter function returns nil. Otherwise could lock up the game.

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="Javelin">
<Key ID="STR_ACE_Javelin_LockTarget">

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="Kestrel4500">
<Key ID="STR_ACE_Kestrel4500_Name">

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="Laser">
<Key ID="STR_ACE_Laser_laserCode">

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="Laser_SelfDesignate">
<Key ID="STR_ACE_Laser_SelfDesignate_DesignatorOn">

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="Laserpointer">
<Key ID="STR_ACE_Laserpointer_red">

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="Logistics_UAVbattery">
<Key ID="STR_ACE_Logistics_UAVbattery_Full">

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="Logistics_Wirecutter">
<Key ID="STR_ACE_Logistics_Wirecutter_wirecutterName">

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="MagazineRepack">
<Key ID="STR_ACE_MagazineRepack_RepackMagazines">

View File

@ -0,0 +1,17 @@
class CfgSettings {
class CBA {
class Versioning {
class ACE {
class dependencies {
//ACE will hard exit if this is missing
CBA[] = {"cba_main", REQUIRED_CBA_VERSION, "(true)"};
//Warnings for missing RHS compat pbos
compat_rhs_afrf3[] = {"ace_compat_rhs_afrf3", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'rhs_main')"};
compat_rhs_usf3[] = {"ace_compat_rhs_usf3", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'rhsusf_main')"};
};
};
};
};
};

View File

@ -586,5 +586,6 @@ class CfgMods {
};
};
#include "CfgSettings.hpp"
#include "CfgModuleCategories.hpp"
#include "CfgVehicleClasses.hpp"

View File

@ -5,7 +5,7 @@
#define MAJOR 3
#define MINOR 5
#define PATCHLVL 0
#define PATCHLVL 1
#define BUILD 0
#define VERSION MAJOR.MINOR.PATCHLVL.BUILD
@ -13,3 +13,4 @@
// MINIMAL required version for the Mod. Components can specify others..
#define REQUIRED_VERSION 1.56
#define REQUIRED_CBA_VERSION {2,3,1}

View File

@ -33,7 +33,7 @@ if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then {
private _markerType = [_x] call EFUNC(common,getMarkerType);
private _colour = format ["Color%1", side _x];
private _marker = createMarkerLocal [format ["ACE_BFT_%1", _forEachIndex], [(getPos leader _x) select 0, (getPos leader _x) select 1]];
private _marker = createMarkerLocal [format ["ACE_BFT_%1", _forEachIndex], [(getPos _x) select 0, (getPos _x) select 1]];
_marker setMarkerTypeLocal _markerType;
_marker setMarkerColorLocal _colour;
_marker setMarkerTextLocal (name _x);

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