mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Update to ACE Standarts
Fix Adding anytime B_Parachute Fix Reserve Parachute Added if Normal Parachute Open
This commit is contained in:
parent
7a012a5acb
commit
48f44813ea
@ -1,5 +1,5 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
@ -16,20 +16,22 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_CutParachute {
|
||||
displayName = "STR_ACE_Parachute_CutParachute";
|
||||
displayName = "$STR_ACE_Parachute_CutParachute";
|
||||
exceptions[] = {"isNotInside"};
|
||||
condition = QUOTE([_player] call FUNC(checkCutParachute));
|
||||
statement = QUOTE([_player] call FUNC(cutParachute));
|
||||
showDisabled = 0;
|
||||
priority = 2.9;
|
||||
icon = QUOTE(PATHTOF(UI\cut_ca.paa));
|
||||
hotkey = "C";
|
||||
hotkey = "C"; // Did this allready Work?
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class B_Parachute;
|
||||
class ACE_NonSteerableParachute: B_Parachute {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
|
@ -23,7 +23,7 @@ if (!hasInterface) exitWith {};
|
||||
if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if (!('ACE_Altimeter' in assignedItems ace_player)) exitWith {false};
|
||||
if (!(missionNamespace getVariable [QGVAR(AltimeterActive), false])) then {
|
||||
[ace_player] call FUNC(showAltimeter);
|
||||
[ACE_player] call FUNC(showAltimeter);
|
||||
} else {
|
||||
call FUNC(hideAltimeter);
|
||||
};
|
||||
@ -41,4 +41,6 @@ GVAR(PFH) = false;
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
// don't show speed and height when in expert mode
|
||||
["infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call EFUNC(common,addEventHandler);
|
||||
["infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call EFUNC(common,addEventHandler);
|
||||
//[ACE_Player,([ACE_player] call EFUNC(common,getAllGear))] call FUNC(storeParachute);
|
||||
["playerInventoryChanged", FUNC(storeParachute) ] call EFUNC(common,addEventHandler);
|
@ -22,6 +22,7 @@ PREP(handleInfoDisplayChanged);
|
||||
PREP(hideAltimeter);
|
||||
PREP(onEachFrame);
|
||||
PREP(showAltimeter);
|
||||
PREP(checkCutParachute);
|
||||
PREP(cutParachute);
|
||||
PREP(checkCutParachute);
|
||||
PREP(storeParachute);
|
||||
ADDON = true;
|
||||
|
@ -14,4 +14,4 @@
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
SETVAR(_unit,chuteIsCut,false);
|
||||
_unit setVariable [QGVAR(chuteIsCut), false];
|
@ -1,18 +1,19 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
Name: check Cut Parachute
|
||||
* Author: joko // Jonas
|
||||
* Reset the parachute system.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean
|
||||
*
|
||||
* Example:
|
||||
* [player] call FUNC(checkCutParachute);
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
Author: joko // Jonas
|
||||
|
||||
Description:
|
||||
Check if Parachute can be Cuted
|
||||
|
||||
Parameters:
|
||||
0: Object
|
||||
|
||||
Returns:
|
||||
Boolean
|
||||
*/
|
||||
_unit = _this select 0;
|
||||
|
||||
if (animationState _unit == "para_pilot" && !(GETVAR(_unit,chuteIsCut,false))) then {true} else {false};
|
||||
(animationState _unit == 'para_pilot' && !(_unit getvariable [QGVAR(chuteIsCut),false]))
|
@ -1,22 +1,22 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
Name: Cut Parachute
|
||||
|
||||
Author: joko // Jonas
|
||||
|
||||
Description:
|
||||
Cut Parachute and delete Old
|
||||
|
||||
Parameters:
|
||||
0: Object
|
||||
|
||||
Returns:
|
||||
Nothing
|
||||
*/
|
||||
* Author: joko // Jonas
|
||||
* Cut Parachute and delete Old
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Object
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [player] call FUNC(cutParachute);
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
private["_unit","_vehicle"];
|
||||
_unit = _this select 0;
|
||||
PARAMS_1(_unit);
|
||||
_vehicle = vehicle _unit;
|
||||
_unit action ["GetOut", vehicle _unit];
|
||||
deleteVehicle _vehicle;
|
||||
_unit addBackpack "B_Parachute";
|
||||
SETVAR(_unit,chuteIsCut,true);
|
||||
_unit setVariable [QGVAR(chuteIsCut), true];
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_unit"];
|
||||
_unit = _this select 0;
|
||||
PARAMS_1(_unit);
|
||||
GVAR(PFH) = false;
|
||||
[_unit, "AmovPercMevaSrasWrflDf_AmovPknlMstpSrasWrflDnon", 2] call EFUNC(common,doAnimation);
|
||||
SETVAR(_unit,chuteIsCut,false);
|
||||
|
28
addons/parachute/functions/fnc_storeParachute.sqf
Normal file
28
addons/parachute/functions/fnc_storeParachute.sqf
Normal file
@ -0,0 +1,28 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: joko // Jonas
|
||||
* Add the Reserve Parachute to Units or Save Backpack if is a Parachute in Unit
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* 0: Unit
|
||||
* 1: getAllGear-Array
|
||||
*
|
||||
* Example:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
_unit = _this select 0;
|
||||
_backpack = ((_this select 1) select 6);
|
||||
|
||||
if ((vehicle _unit) isKindOf "ParachuteBase" || (backpack _unit == "")) then {
|
||||
_unit addbackpack (_unit getVariable[QGVAR(backpackClass),""]);
|
||||
} else {
|
||||
if (getText(configfile >> "CfgVehicles" >> _backpack >> "ParachuteClass") in ["NonSteerable_Parachute_F","B_Parachute_02_F","O_Parachute_02_F","I_Parachute_02_F","Steerable_Parachute_F"]) then {
|
||||
_unit setvariable[QGVAR(backpackClass),_backpack];
|
||||
};
|
||||
};
|
@ -52,6 +52,6 @@
|
||||
<Key ID="STR_ACE_Parachute_CutParachute">
|
||||
<English>Cut Parachute</English>
|
||||
<German>Fallschirm abschneiden</German>
|
||||
</Key>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
@ -73,7 +73,7 @@ PREP(onTapShoulder);
|
||||
<td>"playerInventoryChanged"</td>
|
||||
<td>Inventory changed</td>
|
||||
<td>common</td>
|
||||
<td>getAllGear-Array</td>
|
||||
<td>[_player, getAllGear-Array]</td>
|
||||
<td>local</td>
|
||||
</tr>
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user