mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into settingsNameDescp
This commit is contained in:
commit
daceaa9dd8
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@ -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.
|
||||
|
@ -444,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", {
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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};//
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
@ -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};
|
||||
};
|
||||
|
@ -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));
|
||||
|
@ -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 Helicopter;
|
||||
class Helicopter_Base_F: Helicopter {
|
||||
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,14 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
};
|
||||
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 +93,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 +111,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 +154,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));
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
11
addons/fastroping/CfgWaypoints.hpp
Normal file
11
addons/fastroping/CfgWaypoints.hpp
Normal 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));
|
||||
};
|
||||
};
|
||||
};
|
BIN
addons/fastroping/UI/Icon_Waypoint.paa
Normal file
BIN
addons/fastroping/UI/Icon_Waypoint.paa
Normal file
Binary file not shown.
18
addons/fastroping/XEH_PREP.hpp
Normal file
18
addons/fastroping/XEH_PREP.hpp
Normal 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);
|
@ -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;
|
||||
|
3
addons/fastroping/XEH_preStart.sqf
Normal file
3
addons/fastroping/XEH_preStart.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "XEH_PREP.hpp"
|
@ -15,3 +15,4 @@ class CfgPatches {
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgMoves.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWaypoints.hpp"
|
||||
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
29
addons/fastroping/functions/fnc_canCloseRamp.sqf
Normal file
29
addons/fastroping/functions/fnc_canCloseRamp.sqf
Normal 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}
|
||||
}
|
@ -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)) != ""}
|
||||
|
96
addons/fastroping/functions/fnc_deployAI.sqf
Normal file
96
addons/fastroping/functions/fnc_deployAI.sqf
Normal 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);
|
42
addons/fastroping/functions/fnc_deployAIWaypoint.sqf
Normal file
42
addons/fastroping/functions/fnc_deployAIWaypoint.sqf
Normal 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
|
@ -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;
|
||||
};
|
||||
|
@ -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
|
||||
};
|
||||
|
@ -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 {
|
||||
[{
|
||||
|
@ -57,5 +57,9 @@
|
||||
<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>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Fastroping_Waypoint_Fastrope">
|
||||
<English>LET UNITS FAST ROPE</English>
|
||||
<German>EINHEITEN ABSEILEN LASSEN</German>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
@ -45,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;
|
||||
|
||||
|
@ -588,3 +588,16 @@ class CfgMods {
|
||||
|
||||
#include "CfgModuleCategories.hpp"
|
||||
#include "CfgVehicleClasses.hpp"
|
||||
|
||||
class CfgSettings {
|
||||
class CBA {
|
||||
class Versioning {
|
||||
class ACE {
|
||||
class dependencies {
|
||||
CBA[] = {"cba_main", REQUIRED_CBA_VERSION, "(true)"};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -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}
|
||||
|
@ -1366,7 +1366,7 @@ class ACE_Medical_Advanced {
|
||||
timeInSystem = 900;
|
||||
maxDose = 4;
|
||||
inCompatableMedication[] = {};
|
||||
viscosityChange = 10;
|
||||
viscosityChange = -10;
|
||||
};
|
||||
class Epinephrine {
|
||||
painReduce = 0;
|
||||
|
@ -663,7 +663,7 @@ class CfgVehicles {
|
||||
icon = "";
|
||||
displayName = CSTRING(Bodybag_Display);
|
||||
EGVAR(dragging,canDrag) = 1;
|
||||
EGVAR(dragging,dragPosition[]) = {0,1.2,0};
|
||||
EGVAR(dragging,dragPosition)[] = {0,1.2,0};
|
||||
EGVAR(dragging,dragDirection) = 0;
|
||||
EGVAR(cargo,size) = 1;
|
||||
EGVAR(cargo,canLoad) = 1;
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_openWounds", "_config", "_effectiveness","_mostEffectiveInjury", "_mostEffectiveSpot", "_woundEffectivenss", "_mostEffectiveInjury", "_impact", "_exit", "_classID", "_effectivenessFound", "_className", "_hitPoints", "_hitSelections", "_point", "_woundTreatmentConfig"];
|
||||
private ["_openWounds", "_config", "_effectiveness","_mostEffectiveInjury", "_mostEffectiveSpot", "_woundEffectiveness", "_mostEffectiveInjury", "_impact", "_exit", "_classID", "_effectivenessFound", "_className", "_hitPoints", "_hitSelections", "_point", "_woundTreatmentConfig"];
|
||||
params ["_target", "_bandage", "_selectionName", ["_specificClass", -1]];
|
||||
|
||||
// Ensure it is a valid bodypart
|
||||
@ -44,7 +44,7 @@ _exit = false;
|
||||
TRACE_2("OPENWOUND: ", _target, _x);
|
||||
// Only parse injuries that are for the selected bodypart.
|
||||
if (_partX == _part) then {
|
||||
_woundEffectivenss = _effectiveness;
|
||||
_woundEffectiveness = _effectiveness;
|
||||
|
||||
// Select the classname from the wound classname storage
|
||||
_className = GVAR(woundClassNames) select _classID;
|
||||
@ -54,7 +54,7 @@ _exit = false;
|
||||
// Collect the effectiveness from the used bandage for this wound type
|
||||
_woundTreatmentConfig = (_config >> _className);
|
||||
if (isNumber (_woundTreatmentConfig >> "effectiveness")) then {
|
||||
_woundEffectivenss = getNumber (_woundTreatmentConfig >> "effectiveness");
|
||||
_woundEffectiveness = getNumber (_woundTreatmentConfig >> "effectiveness");
|
||||
};
|
||||
} else {
|
||||
ACE_LOGWARNING_2("No config for wound type [%1] config base [%2]", _className, _config);
|
||||
@ -62,15 +62,15 @@ _exit = false;
|
||||
|
||||
TRACE_2("Wound classes: ", _specificClass, _classID);
|
||||
if (_specificClass == _classID) exitWith {
|
||||
_effectivenessFound = _woundEffectivenss;
|
||||
_effectivenessFound = _woundEffectiveness;
|
||||
_mostEffectiveSpot = _forEachIndex;
|
||||
_mostEffectiveInjury = _x;
|
||||
_exit = true;
|
||||
};
|
||||
|
||||
// Check if this is the currently most effective found.
|
||||
if (_woundEffectivenss * ((_x select 4) * (_x select 3)) > _effectivenessFound * ((_mostEffectiveInjury select 4) * (_mostEffectiveInjury select 3))) then {
|
||||
_effectivenessFound = _woundEffectivenss;
|
||||
if (_woundEffectiveness * ((_x select 4) * (_x select 3)) > _effectivenessFound * ((_mostEffectiveInjury select 4) * (_mostEffectiveInjury select 3))) then {
|
||||
_effectivenessFound = _woundEffectiveness;
|
||||
_mostEffectiveSpot = _forEachIndex;
|
||||
_mostEffectiveInjury = _x;
|
||||
};
|
||||
|
@ -15,6 +15,8 @@
|
||||
_static setMagazineTurretAmmo [_magazine, _ammoCount, [0]];
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
["initMortar", {_this call FUNC(mortarInit);}] call EFUNC(common,addEventHandler);
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["playerVehicleChanged", {_this call FUNC(handlePlayerVehicleChanged);}] call EFUNC(common,addEventHandler);
|
||||
|
@ -16,31 +16,30 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_player,_newVehicle);
|
||||
|
||||
private["_tubeWeaponName" ,"_fireModes", "_lastFireMode"];
|
||||
params ["_player", "_newVehicle"];
|
||||
|
||||
if (isNull _newVehicle) exitWith {};
|
||||
if (!(_newVehicle isKindOf "Mortar_01_base_F")) exitWith {};
|
||||
|
||||
// Run magazine handling initialization if enabled
|
||||
if (!EGVAR(common,settingsInitFinished)) then {
|
||||
EGVAR(common,runAtSettingsInitialized) pushBack [{
|
||||
if (GVAR(useAmmoHandling) && {!(_this getVariable [QGVAR(initialized),false]) && !(_this getVariable [QGVAR(exclude),false])}) then {
|
||||
_this call FUNC(mortarInit);
|
||||
if (!(_newVehicle getVariable [QGVAR(initialized),false]) && !(_newVehicle getVariable [QGVAR(exclude),false])) then {
|
||||
// Make sure that mortar init is executed after settings init
|
||||
[{
|
||||
params ["_mortar"];
|
||||
if (GVAR(useAmmoHandling) && {!(_mortar getVariable [QGVAR(initialized),false]) && !(_mortar getVariable [QGVAR(exclude),false])}) then {
|
||||
//wait for proper turret locality change
|
||||
[{
|
||||
["initMortar", [_this], [_this]] call EFUNC(common,globalEvent);
|
||||
}, _mortar, 0.05] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
}, _newVehicle];
|
||||
} else {
|
||||
if (GVAR(useAmmoHandling) && {!(_newVehicle getVariable [QGVAR(initialized),false]) && !(_newVehicle getVariable [QGVAR(exclude),false])}) then {
|
||||
_newVehicle call FUNC(mortarInit);
|
||||
};
|
||||
}, _newVehicle] call EFUNC(common,runAfterSettingsInit);
|
||||
};
|
||||
|
||||
_tubeWeaponName = (weapons _newVehicle) select 0;
|
||||
_fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes");
|
||||
private _tubeWeaponName = (weapons _newVehicle) select 0;
|
||||
private _fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes");
|
||||
|
||||
//Restore last firemode:
|
||||
_lastFireMode = _newVehicle getVariable [QGVAR(lastFireMode), -1];
|
||||
private _lastFireMode = _newVehicle getVariable [QGVAR(lastFireMode), -1];
|
||||
if (_lastFireMode != -1) then {
|
||||
_player action ["SwitchWeapon", _newVehicle, _player, _lastFireMode];
|
||||
};
|
||||
|
@ -18,27 +18,28 @@
|
||||
params ["_mortar"];
|
||||
|
||||
if (_mortar getVariable [QGVAR(initialized),false] || _mortar getVariable [QGVAR(exclude),false]) exitWith {TRACE_1("Exit",_mortar)};
|
||||
if (!(_mortar turretLocal [0])) exitWith {TRACE_1("Exit - turret not local",_mortar)};
|
||||
|
||||
// Remove all magazines
|
||||
// Remove all magazines from turret
|
||||
if (count magazines _mortar > 0) then {
|
||||
{
|
||||
[QGVAR(removeMagazine), [_mortar, _x]] call EFUNC(common,globalEvent);
|
||||
_mortar removeMagazineTurret [_x,[0]];
|
||||
} forEach magazines _mortar;
|
||||
};
|
||||
|
||||
// Replace current weapon with ammo handling weapon
|
||||
// Replace current turret weapon with ammo handling weapon
|
||||
private _currentWeapon = _mortar weaponsTurret [0] select 0;
|
||||
private _newWeapon = "";
|
||||
|
||||
if (_currentWeapon == "mortar_82mm") then {
|
||||
if (tolower _currentWeapon == "mortar_82mm") then {
|
||||
_newWeapon = "ace_mortar_82mm";
|
||||
} else {
|
||||
_newWeapon = getText (configFile >> "CfgWeapons" >> _currentWeapon >> QGVAR(replaceWith));
|
||||
};
|
||||
|
||||
if (_newWeapon != "") then {
|
||||
_mortar removeWeaponGlobal _currentWeapon;
|
||||
_mortar addWeaponGlobal _newWeapon;
|
||||
_mortar removeWeaponTurret [_currentWeapon,[0]];
|
||||
_mortar addWeaponTurret [_newWeapon,[0]];
|
||||
};
|
||||
|
||||
_mortar setVariable [QGVAR(initialized),true,true];
|
||||
|
@ -27,4 +27,5 @@ if (isNull _unit ||
|
||||
!(_nozzle getVariable [QGVAR(isRefueling), false]) &&
|
||||
{[_nozzle getVariable QGVAR(source)] call FUNC(getFuel) != 0} &&
|
||||
{!isNull (_nozzle getVariable [QGVAR(sink), objNull])} &&
|
||||
{(fuel (_nozzle getVariable QGVAR(sink))) < 1}
|
||||
{(fuel (_nozzle getVariable QGVAR(sink))) < 1} &&
|
||||
{!(isEngineOn (_nozzle getVariable QGVAR(sink)))}
|
||||
|
@ -52,6 +52,9 @@ private _maxFuel = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >>
|
||||
private _finished = false;
|
||||
private _fueling = _nozzle getVariable [QGVAR(isRefueling), false];
|
||||
if (_fueling) then {
|
||||
if (isEngineOn _sink) exitWith {
|
||||
_nozzle setVariable [QGVAR(isRefueling), false, true];
|
||||
};
|
||||
private _fuelInSource = [_source] call FUNC(getFuel);
|
||||
if (_fuelInSource == 0) exitWith {
|
||||
[LSTRING(Hint_SourceEmpty), 2, _unit] call EFUNC(common,displayTextStructured);
|
||||
|
@ -347,7 +347,7 @@ class CfgVehicles {
|
||||
|
||||
class Helicopter_Base_H;
|
||||
class Heli_Transport_04_base_F: Helicopter_Base_H {
|
||||
GVAR(hitpointGroups[]) = { {"HitEngine", {"HitEngine1", "HitEngine2"}}, {"Glass_1_hitpoint", {"Glass_2_hitpoint", "Glass_3_hitpoint", "Glass_4_hitpoint", "Glass_5_hitpoint", "Glass_6_hitpoint", "Glass_7_hitpoint", "Glass_8_hitpoint", "Glass_9_hitpoint", "Glass_10_hitpoint", "Glass_11_hitpoint", "Glass_12_hitpoint", "Glass_13_hitpoint", "Glass_14_hitpoint", "Glass_15_hitpoint", "Glass_16_hitpoint", "Glass_17_hitpoint", "Glass_18_hitpoint", "Glass_19_hitpoint", "Glass_20_hitpoint"}} };
|
||||
GVAR(hitpointGroups)[] = { {"HitEngine", {"HitEngine1", "HitEngine2"}}, {"Glass_1_hitpoint", {"Glass_2_hitpoint", "Glass_3_hitpoint", "Glass_4_hitpoint", "Glass_5_hitpoint", "Glass_6_hitpoint", "Glass_7_hitpoint", "Glass_8_hitpoint", "Glass_9_hitpoint", "Glass_10_hitpoint", "Glass_11_hitpoint", "Glass_12_hitpoint", "Glass_13_hitpoint", "Glass_14_hitpoint", "Glass_15_hitpoint", "Glass_16_hitpoint", "Glass_17_hitpoint", "Glass_18_hitpoint", "Glass_19_hitpoint", "Glass_20_hitpoint"}} };
|
||||
};
|
||||
class O_Heli_Transport_04_repair_F: Heli_Transport_04_base_F {
|
||||
GVAR(canRepair) = 1;
|
||||
@ -362,12 +362,12 @@ class CfgVehicles {
|
||||
|
||||
class Heli_Transport_02_base_F;
|
||||
class I_Heli_Transport_02_F: Heli_Transport_02_base_F {
|
||||
GVAR(hitpointPositions[]) = {{"HitVRotor", {-1,-9.4,1.8}}, {"HitHRotor", {0,1.8,1.3}}};
|
||||
GVAR(hitpointPositions)[] = {{"HitVRotor", {-1,-9.4,1.8}}, {"HitHRotor", {0,1.8,1.3}}};
|
||||
};
|
||||
|
||||
class Helicopter_Base_F;
|
||||
class Heli_light_03_base_F: Helicopter_Base_F {
|
||||
GVAR(hitpointPositions[]) = {{"HitVRotor", {-0.5,-5.55,1.2}}, {"HitHRotor", {0,1.8,1.5}}};
|
||||
GVAR(hitpointPositions)[] = {{"HitVRotor", {-0.5,-5.55,1.2}}, {"HitHRotor", {0,1.8,1.5}}};
|
||||
};
|
||||
|
||||
class B_APC_Tracked_01_base_F;
|
||||
@ -377,12 +377,12 @@ class CfgVehicles {
|
||||
};
|
||||
|
||||
class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F {
|
||||
GVAR(hitpointPositions[]) = {{"HitTurret", {0,-2,0}}};
|
||||
GVAR(hitpointPositions)[] = {{"HitTurret", {0,-2,0}}};
|
||||
};
|
||||
|
||||
class Car_F;
|
||||
class Offroad_01_base_F: Car_F {
|
||||
GVAR(hitpointGroups[]) = { {"HitGlass1", {"HitGlass2"}} };
|
||||
GVAR(hitpointGroups)[] = { {"HitGlass1", {"HitGlass2"}} };
|
||||
};
|
||||
class Offroad_01_repair_base_F: Offroad_01_base_F {
|
||||
GVAR(canRepair) = 1;
|
||||
@ -390,7 +390,7 @@ class CfgVehicles {
|
||||
};
|
||||
|
||||
class MRAP_01_base_F: Car_F {
|
||||
GVAR(hitpointGroups[]) = { {"HitGlass1", {"HitGlass2", "HitGlass3", "HitGlass4", "HitGlass5", "HitGlass6"}} };
|
||||
GVAR(hitpointGroups)[] = { {"HitGlass1", {"HitGlass2", "HitGlass3", "HitGlass4", "HitGlass5", "HitGlass6"}} };
|
||||
};
|
||||
|
||||
class B_Truck_01_mover_F;
|
||||
@ -421,9 +421,9 @@ class CfgVehicles {
|
||||
|
||||
class Quadbike_01_base_F;
|
||||
class B_Quadbike_01_F: Quadbike_01_base_F {
|
||||
GVAR(hitpointPositions[]) = { {"HitEngine", {0, 0.5, -0.7}}, {"HitFuel", {0, 0, -0.5}} };
|
||||
GVAR(hitpointPositions)[] = { {"HitEngine", {0, 0.5, -0.7}}, {"HitFuel", {0, 0, -0.5}} };
|
||||
};
|
||||
class Hatchback_01_base_F: Car_F {
|
||||
GVAR(hitpointPositions[]) = {{"HitBody", {0, 0.7, -0.5}}, {"HitFuel", {0, -1.75, -0.75}}};
|
||||
GVAR(hitpointPositions)[] = {{"HitBody", {0, 0.7, -0.5}}, {"HitFuel", {0, -1.75, -0.75}}};
|
||||
};
|
||||
};
|
||||
|
@ -48,9 +48,9 @@ class CfgVehicles {
|
||||
|
||||
GVAR(canSit) = 1;
|
||||
GVAR(sitDirection) = 180;
|
||||
GVAR(sitPosition[]) = {0, -0.1, -0.45};
|
||||
GVAR(sitPosition)[] = {0, -0.1, -0.45};
|
||||
EGVAR(dragging,canCarry) = 1;
|
||||
EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5};
|
||||
EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5};
|
||||
EGVAR(dragging,carryDirection) = 180;
|
||||
};
|
||||
// Camping Chair
|
||||
@ -61,9 +61,9 @@ class CfgVehicles {
|
||||
|
||||
GVAR(canSit) = 1;
|
||||
GVAR(sitDirection) = 180;
|
||||
GVAR(sitPosition[]) = {0, -0.1, -0.45};
|
||||
GVAR(sitPosition)[] = {0, -0.1, -0.45};
|
||||
EGVAR(dragging,canCarry) = 1;
|
||||
EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5};
|
||||
EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5};
|
||||
EGVAR(dragging,carryDirection) = 180;
|
||||
};
|
||||
|
||||
@ -76,9 +76,9 @@ class CfgVehicles {
|
||||
|
||||
GVAR(canSit) = 1;
|
||||
GVAR(sitDirection) = 90;
|
||||
GVAR(sitPosition[]) = {0, 0, -0.5};
|
||||
GVAR(sitPosition)[] = {0, 0, -0.5};
|
||||
EGVAR(dragging,canCarry) = 1;
|
||||
EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5};
|
||||
EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5};
|
||||
EGVAR(dragging,carryDirection) = 270;
|
||||
};
|
||||
// Chair (Wooden)
|
||||
@ -89,9 +89,9 @@ class CfgVehicles {
|
||||
|
||||
GVAR(canSit) = 1;
|
||||
GVAR(sitDirection) = 180;
|
||||
GVAR(sitPosition[]) = {0, -0.05, 0};
|
||||
GVAR(sitPosition)[] = {0, -0.05, 0};
|
||||
EGVAR(dragging,canCarry) = 1;
|
||||
EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5};
|
||||
EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5};
|
||||
EGVAR(dragging,carryDirection) = 180;
|
||||
};
|
||||
// Office Chair
|
||||
@ -102,9 +102,9 @@ class CfgVehicles {
|
||||
|
||||
GVAR(canSit) = 1;
|
||||
GVAR(sitDirection) = 180;
|
||||
GVAR(sitPosition[]) = {0, 0, -0.6};
|
||||
GVAR(sitPosition)[] = {0, 0, -0.6};
|
||||
EGVAR(dragging,canCarry) = 1;
|
||||
EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5};
|
||||
EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5};
|
||||
EGVAR(dragging,carryDirection) = 180;
|
||||
};
|
||||
// Rattan Chair
|
||||
@ -115,9 +115,9 @@ class CfgVehicles {
|
||||
|
||||
GVAR(canSit) = 1;
|
||||
GVAR(sitDirection) = 180;
|
||||
GVAR(sitPosition[]) = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point)
|
||||
GVAR(sitPosition)[] = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point)
|
||||
EGVAR(dragging,canCarry) = 1;
|
||||
EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5};
|
||||
EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5};
|
||||
EGVAR(dragging,carryDirection) = 180;
|
||||
};
|
||||
};
|
||||
|
@ -112,7 +112,7 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
EGVAR(dragging,canDrag) = 1;
|
||||
EGVAR(dragging,dragPosition[]) = {0,1,0};
|
||||
EGVAR(dragging,dragPosition)[] = {0,1,0};
|
||||
EGVAR(dragging,dragDirection) = 0;
|
||||
class ACE_Actions: ACE_Actions{
|
||||
class ACE_MainActions: ACE_MainActions {
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
_fnc_isLeaning = {
|
||||
GVAR(tagsToTest) = GVAR(tagsToTest) select {
|
||||
params ["_tag", "_tagPosASL", "_vectorDirAndUp"];
|
||||
|
||||
_vectorDirAndUp params ["_v1", "_v2"];
|
||||
@ -34,7 +34,6 @@ _fnc_isLeaning = {
|
||||
};
|
||||
true
|
||||
};
|
||||
GVAR(tagsToTest) = [GVAR(tagsToTest), _fnc_isLeaning] call EFUNC(common,filter);
|
||||
|
||||
// If there's no more tag
|
||||
if (GVAR(tagsToTest) isEqualTo []) exitWith {
|
||||
|
@ -42,7 +42,7 @@ class CfgVehicles {
|
||||
};
|
||||
|
||||
EGVAR(dragging,canDrag) = 1;
|
||||
EGVAR(dragging,dragPosition[]) = {0,1,0};
|
||||
EGVAR(dragging,dragPosition)[] = {0,1,0};
|
||||
EGVAR(dragging,dragDirection) = 0;
|
||||
scope = 2;
|
||||
displayName = CSTRING(DisplayName);
|
||||
|
@ -36,7 +36,7 @@ class CfgPatches {
|
||||
class ACE_Curator {
|
||||
GVAR(captives) = "ace_captives";
|
||||
GVAR(medical) = "ace_medical";
|
||||
GVAR(cargoAndRepair[]) = {"ace_cargo", "ace_repair"};
|
||||
GVAR(cargoAndRepair)[] = {"ace_cargo", "ace_repair"};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
11
optionals/compat_rhs_afrf3/CfgEventHandlers.hpp
Normal file
11
optionals/compat_rhs_afrf3/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,11 @@
|
||||
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));
|
||||
};
|
||||
};
|
@ -1,4 +1,4 @@
|
||||
class cfgVehicles {
|
||||
class CfgVehicles {
|
||||
class LandVehicle;
|
||||
class Tank: LandVehicle {
|
||||
class NewTurret;
|
||||
@ -201,18 +201,70 @@ class cfgVehicles {
|
||||
EGVAR(refuel,fuelCapacity) = 3600;
|
||||
};
|
||||
|
||||
class Heli_Light_02_base_F;
|
||||
class Helicopter_Base_F;
|
||||
class Helicopter_Base_H: Helicopter_Base_F {
|
||||
class EventHandlers;
|
||||
};
|
||||
class Heli_Light_02_base_F: Helicopter_Base_H {};
|
||||
class RHS_Mi8_base : Heli_Light_02_base_F {
|
||||
EGVAR(refuel,fuelCapacity) = 3700;
|
||||
EGVAR(fastroping,enabled) = 0;
|
||||
class EventHandlers: EventHandlers {
|
||||
class RHS_EventHandlers;
|
||||
};
|
||||
};
|
||||
|
||||
class RHS_Mi8amt_base: RHS_Mi8_base {
|
||||
EGVAR(fastroping,enabled) = 1;
|
||||
EGVAR(fastroping,ropeOrigins)[] = {{-1.13, 4.67, -0.89}};
|
||||
EGVAR(fastroping,onCut) = QFUNC(onCut);
|
||||
EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
|
||||
|
||||
class UserActions {
|
||||
class openDoor;
|
||||
class closeDoor_L: openDoor {
|
||||
condition = QUOTE((this doorPhase 'LeftDoor' > 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])});
|
||||
};
|
||||
};
|
||||
|
||||
class EventHandlers: EventHandlers {
|
||||
class RHS_EventHandlers: RHS_EventHandlers {
|
||||
getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_mi8_doors});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class RHS_Mi8_VVS_Base: RHS_Mi8_base {};
|
||||
class RHS_Mi8mt_vvs: RHS_Mi8_VVS_Base {};
|
||||
class RHS_Mi8mt_Cargo_vvs: RHS_Mi8mt_vvs {
|
||||
EGVAR(fastroping,enabled) = 1;
|
||||
EGVAR(fastroping,ropeOrigins)[] = {{-1.13, 4.67, -0.89}};
|
||||
EGVAR(fastroping,onCut) = QFUNC(onCut);
|
||||
EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
|
||||
|
||||
class UserActions {
|
||||
class openDoor;
|
||||
class closeDoor_L: openDoor {
|
||||
condition = QUOTE((this doorPhase 'LeftDoor' > 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])});
|
||||
};
|
||||
};
|
||||
|
||||
class EventHandlers: EventHandlers {
|
||||
class RHS_EventHandlers: RHS_EventHandlers {
|
||||
getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_mi8_doors});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Heli_Attack_02_base_F;
|
||||
class RHS_Ka52_base : Heli_Attack_02_base_F {
|
||||
EGVAR(refuel,fuelCapacity) = 1870;
|
||||
EGVAR(fastroping,enabled) = 0;
|
||||
};
|
||||
|
||||
class RHS_Mi24_base : Heli_Attack_02_base_F {
|
||||
EGVAR(refuel,fuelCapacity) = 1851;
|
||||
EGVAR(fastroping,enabled) = 0;
|
||||
};
|
||||
|
||||
class rhs_t80b : rhs_tank_base {
|
||||
|
2
optionals/compat_rhs_afrf3/XEH_PREP.hpp
Normal file
2
optionals/compat_rhs_afrf3/XEH_PREP.hpp
Normal file
@ -0,0 +1,2 @@
|
||||
PREP(onCut);
|
||||
PREP(onPrepare);
|
7
optionals/compat_rhs_afrf3/XEH_preInit.sqf
Normal file
7
optionals/compat_rhs_afrf3/XEH_preInit.sqf
Normal file
@ -0,0 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
#include "XEH_PREP.hpp"
|
||||
|
||||
ADDON = true;
|
3
optionals/compat_rhs_afrf3/XEH_preStart.sqf
Normal file
3
optionals/compat_rhs_afrf3/XEH_preStart.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "XEH_PREP.hpp"
|
@ -6,12 +6,13 @@ class CfgPatches {
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"rhs_c_weapons", "rhs_c_troops", "rhs_c_bmd", "rhs_c_bmp", "rhs_c_bmp3", "rhs_c_a2port_armor", "rhs_c_btr", "rhs_c_sprut", "rhs_c_t72", "rhs_c_tanks", "rhs_c_a2port_air", "rhs_c_a2port_car", "rhs_c_cars", "rhs_c_2s3", "rhs_c_rva"};
|
||||
author[]={"Ruthberg", "GitHawk"};
|
||||
author[]={"Ruthberg", "GitHawk", "BaerMitUmlaut"};
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgAmmo.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgMagazines.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
23
optionals/compat_rhs_afrf3/functions/fnc_onCut.sqf
Normal file
23
optionals/compat_rhs_afrf3/functions/fnc_onCut.sqf
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Function for closing doors and retracting the hooks for RHS USF helos.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Helicopter <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Amount of time to wait before cutting ropes <NUMBER>
|
||||
*
|
||||
* Example:
|
||||
* [_vehicle] call ace_compat_rhs_afrf3_fnc_onCut
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
params ["_vehicle"];
|
||||
|
||||
_vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true];
|
||||
_vehicle animateDoor ["LeftDoor", 0];
|
||||
|
||||
2
|
23
optionals/compat_rhs_afrf3/functions/fnc_onPrepare.sqf
Normal file
23
optionals/compat_rhs_afrf3/functions/fnc_onPrepare.sqf
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Function for opening doors and extending the hook for most vanilla helos.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Helicopter <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Amount of time to wait before deploying ropes <NUMBER>
|
||||
*
|
||||
* Example:
|
||||
* [_vehicle] call ace_compat_rhs_afrf3_fnc_onPrepare
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
params ["_vehicle"];
|
||||
|
||||
_vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true];
|
||||
_vehicle animateDoor ["LeftDoor", 1];
|
||||
|
||||
2
|
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp"
|
@ -1,4 +1,4 @@
|
||||
#define COMPONENT rhs_c_weapons_comp
|
||||
#define COMPONENT compat_rhs_afrf3
|
||||
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
|
11
optionals/compat_rhs_usf3/CfgEventHandlers.hpp
Normal file
11
optionals/compat_rhs_usf3/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,11 @@
|
||||
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));
|
||||
};
|
||||
};
|
@ -1,4 +1,17 @@
|
||||
class cfgVehicles {
|
||||
#define EQUIP_FRIES_ATTRIBUTE class Attributes { \
|
||||
class EGVAR(fastroping,equipFRIES) { \
|
||||
property = QEGVAR(fastroping,equipFRIES); \
|
||||
control = "Checkbox"; \
|
||||
displayName = ECSTRING(fastroping,Eden_equipFRIES); \
|
||||
tooltip = ECSTRING(fastroping,Eden_equipFRIES_Tooltip); \
|
||||
expression = QUOTE([_this] call EFUNC(fastroping,equipFRIES)); \
|
||||
typeName = "BOOL"; \
|
||||
condition = "objectVehicle"; \
|
||||
defaultValue = false; \
|
||||
}; \
|
||||
}
|
||||
|
||||
class CfgVehicles {
|
||||
class LandVehicle;
|
||||
class Tank: LandVehicle {
|
||||
class NewTurret;
|
||||
@ -44,21 +57,117 @@ class cfgVehicles {
|
||||
ace_repair_hitpointGroups[] = {{"era_1_hitpoint", {"era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint", "era_37_hitpoint", "era_38_hitpoint", "era_39_hitpoint", "era_40_hitpoint", "era_41_hitpoint", "era_42_hitpoint", "era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", "era_46_hitpoint"}}};
|
||||
};
|
||||
|
||||
class Heli_light_03_base_F;
|
||||
class Helicopter;
|
||||
class Helicopter_Base_F: Helicopter {
|
||||
class Eventhandlers;
|
||||
};
|
||||
class Heli_Light_03_base_F: Helicopter_Base_F {};
|
||||
class RHS_UH1_Base: Heli_light_03_base_F {
|
||||
EGVAR(refuel,fuelCapacity) = 1447;
|
||||
};
|
||||
|
||||
class Heli_Transport_01_base_F;
|
||||
class RHS_UH1Y_base: RHS_UH1_Base {};
|
||||
class RHS_UH1Y_US_base: RHS_UH1Y_base {};
|
||||
class RHS_UH1Y: RHS_UH1Y_US_base {
|
||||
EGVAR(fastroping,enabled) = 2;
|
||||
EGVAR(fastroping,friesType) = "ACE_friesAnchorBar";
|
||||
EGVAR(fastroping,friesAttachmentPoint)[] = {0, 2.38, -0.135};
|
||||
EGVAR(fastroping,onCut) = QFUNC(onCut);
|
||||
EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
|
||||
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"};
|
||||
|
||||
class UserActions;
|
||||
class EventHandlers: EventHandlers {
|
||||
class RHSUSF_EventHandlers;
|
||||
};
|
||||
|
||||
EQUIP_FRIES_ATTRIBUTE;
|
||||
};
|
||||
class RHS_UH1Y_FFAR: RHS_UH1Y {
|
||||
class UserActions: UserActions {
|
||||
class OpenCargoDoor;
|
||||
class CloseCargoDoor: OpenCargoDoor {
|
||||
condition = QUOTE([ARR_2(this,'doorRB')] call FUNC(canCloseDoor));
|
||||
};
|
||||
class CloseCargoLDoor: OpenCargoDoor {
|
||||
condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor));
|
||||
};
|
||||
};
|
||||
|
||||
class EventHandlers: EventHandlers {
|
||||
class RHSUSF_EventHandlers: RHSUSF_EventHandlers {
|
||||
getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_uh60_doors});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Helicopter_Base_H: Helicopter_Base_F {
|
||||
class Eventhandlers;
|
||||
};
|
||||
class Heli_Transport_01_base_F: Helicopter_Base_H {};
|
||||
class RHS_UH60_Base: Heli_Transport_01_base_F {
|
||||
EGVAR(refuel,fuelCapacity) = 1360;
|
||||
};
|
||||
|
||||
class RHS_UH60M_base: RHS_UH60_Base {};
|
||||
class RHS_UH60M_US_base: RHS_UH60M_base {};
|
||||
class RHS_UH60M: RHS_UH60M_US_base {
|
||||
EGVAR(fastroping,enabled) = 2;
|
||||
EGVAR(fastroping,friesType) = "ACE_friesAnchorBar";
|
||||
EGVAR(fastroping,friesAttachmentPoint)[] = {0, 1.25, -0.65};
|
||||
EGVAR(fastroping,onCut) = QFUNC(onCut);
|
||||
EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
|
||||
EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"};
|
||||
|
||||
class UserActions {
|
||||
class OpenCargoDoor;
|
||||
class CloseCargoDoor: OpenCargoDoor {
|
||||
condition = QUOTE([ARR_2(this,'doorRB')] call FUNC(canCloseDoor));
|
||||
};
|
||||
class CloseCargoLDoor: OpenCargoDoor {
|
||||
condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor));
|
||||
};
|
||||
};
|
||||
class EventHandlers: EventHandlers {
|
||||
class RHSUSF_EventHandlers {
|
||||
getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_uh60_doors});
|
||||
};
|
||||
};
|
||||
|
||||
EQUIP_FRIES_ATTRIBUTE;
|
||||
};
|
||||
|
||||
class RHS_UH60M_MEV: RHS_UH60M {
|
||||
EGVAR(fastroping,enabled) = 0;
|
||||
class Attributes {
|
||||
delete EGVAR(fastroping,equipFRIES);
|
||||
};
|
||||
};
|
||||
|
||||
class RHS_UH60M_MEV2: RHS_UH60M_MEV {
|
||||
EGVAR(fastroping,enabled) = 2;
|
||||
EQUIP_FRIES_ATTRIBUTE;
|
||||
};
|
||||
|
||||
class Heli_Transport_02_base_F;
|
||||
class RHS_CH_47F_base: Heli_Transport_02_base_F {
|
||||
EGVAR(refuel,fuelCapacity) = 3914;
|
||||
};
|
||||
|
||||
class RHS_CH_47F: RHS_CH_47F_base {
|
||||
EGVAR(fastroping,enabled) = 1;
|
||||
EGVAR(fastroping,ropeOrigins)[] = {{0.5, -7.15, -0.95}, {-0.5, -7.15, -0.95}};
|
||||
EGVAR(fastroping,onCut) = QFUNC(onCut);
|
||||
EGVAR(fastroping,onPrepare) = QFUNC(onPrepare);
|
||||
|
||||
class UserActions {
|
||||
class OpenCargoDoor;
|
||||
class CloseCargoDoor: OpenCargoDoor {
|
||||
condition = QUOTE([ARR_2(this,'ramp_anim')] call FUNC(canCloseDoor));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Heli_Attack_01_base_F;
|
||||
class RHS_AH1Z_base: Heli_Attack_01_base_F {
|
||||
EGVAR(refuel,fuelCapacity) = 1600;
|
||||
|
3
optionals/compat_rhs_usf3/XEH_PREP.hpp
Normal file
3
optionals/compat_rhs_usf3/XEH_PREP.hpp
Normal file
@ -0,0 +1,3 @@
|
||||
PREP(canCloseDoor);
|
||||
PREP(onCut);
|
||||
PREP(onPrepare);
|
7
optionals/compat_rhs_usf3/XEH_preInit.sqf
Normal file
7
optionals/compat_rhs_usf3/XEH_preInit.sqf
Normal file
@ -0,0 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
#include "XEH_PREP.hpp"
|
||||
|
||||
ADDON = true;
|
3
optionals/compat_rhs_usf3/XEH_preStart.sqf
Normal file
3
optionals/compat_rhs_usf3/XEH_preStart.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "XEH_PREP.hpp"
|
@ -6,12 +6,13 @@ class CfgPatches {
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"rhsusf_c_weapons", "rhsusf_c_troops", "rhsusf_c_m1a1", "rhsusf_c_m1a2", "RHS_US_A2_AirImport", "rhsusf_c_m109", "rhsusf_c_hmmwv", "rhsusf_c_rg33", "rhsusf_c_fmtv", "rhsusf_c_m113", "RHS_US_A2Port_Armor"};
|
||||
author[]={"Ruthberg", "GitHawk"};
|
||||
author[]={"Ruthberg", "GitHawk", "BaerMitUmlaut"};
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgAmmo.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgMagazines.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
30
optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf
Normal file
30
optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Checks if the door can be closed.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Helicopter <OBJECT>
|
||||
* 1: Door <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Door can be closed <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [_vehicle, "DoorLB"] call ace_compat_rhs_usf3_fnc_canCloseDoor
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
params ["_vehicle", "_door"];
|
||||
|
||||
(_vehicle doorPhase _door > 0) &&
|
||||
{alive _vehicle} &&
|
||||
{!(_vehicle getVariable [QEGVAR(fastroping,doorsLocked),false])} &&
|
||||
{
|
||||
if (_vehicle isKindOf "RHS_CH_47F") then {
|
||||
ACE_player in [driver _vehicle, _vehicle turretUnit [3], _vehicle turretUnit [4]]
|
||||
} else {
|
||||
ACE_player in _vehicle
|
||||
}
|
||||
}
|
36
optionals/compat_rhs_usf3/functions/fnc_onCut.sqf
Normal file
36
optionals/compat_rhs_usf3/functions/fnc_onCut.sqf
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Function for closing doors and retracting the hooks for RHS USF helos.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Helicopter <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Amount of time to wait before cutting ropes <NUMBER>
|
||||
*
|
||||
* Example:
|
||||
* [_vehicle] call ace_compat_rhs_usf3_fnc_onCut
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
params ["_vehicle"];
|
||||
|
||||
_vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true];
|
||||
|
||||
private _fries = _vehicle getVariable [QEGVAR(fastroping,FRIES), objNull];
|
||||
if !(isNull _fries) then {
|
||||
_fries animate ["extendHookRight", 0];
|
||||
_fries animate ["extendHookLeft", 0];
|
||||
[{
|
||||
_this animateDoor ["doorRB", 0];
|
||||
_this animateDoor ["doorLB", 0];
|
||||
}, _vehicle, 2] call EFUNC(common,waitAndExecute);
|
||||
|
||||
4
|
||||
} else {
|
||||
_vehicle animateDoor ["ramp_anim", 0];
|
||||
|
||||
2
|
||||
};
|
38
optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf
Normal file
38
optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Author: BaerMitUmlaut
|
||||
* Function for opening doors and extending the hook for most vanilla helos.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Helicopter <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Amount of time to wait before deploying ropes <NUMBER>
|
||||
*
|
||||
* Example:
|
||||
* [_vehicle] call ace_compat_rhs_usf3_fnc_onPrepare
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
params ["_vehicle"];
|
||||
private ["_fries", "_waitTime"];
|
||||
|
||||
_vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true];
|
||||
|
||||
_waitTime = 2;
|
||||
|
||||
_vehicle animateDoor ["doorRB", 1];
|
||||
_vehicle animateDoor ["doorLB", 1];
|
||||
_vehicle animateDoor ["ramp_anim", 1];
|
||||
|
||||
_fries = _vehicle getVariable [QEGVAR(fastroping,FRIES), objNull];
|
||||
if !(isNull _fries) then {
|
||||
[{
|
||||
_this animate ["extendHookRight", 1];
|
||||
_this animate ["extendHookLeft", 1];
|
||||
}, _fries, 2] call EFUNC(common,waitAndExecute);
|
||||
_waitTime = 4;
|
||||
};
|
||||
|
||||
_waitTime
|
1
optionals/compat_rhs_usf3/functions/script_component.hpp
Normal file
1
optionals/compat_rhs_usf3/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp"
|
@ -1,4 +1,4 @@
|
||||
#define COMPONENT rhsusf_c_weapons_comp
|
||||
#define COMPONENT compat_rhs_usf3
|
||||
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user