mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Enhance some scripts
add New Config Parameter has Reserve Parachute
This commit is contained in:
parent
41c6ea8b4e
commit
ccd3fb8b4a
@ -1,5 +1,4 @@
|
||||
class CfgVehicles {
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
@ -13,6 +12,10 @@ class CfgVehicles {
|
||||
backpack = "ACE_NonSteerableParachute";
|
||||
count = 4;
|
||||
};
|
||||
class _xx_ACE_ReserveParachute {
|
||||
backpack = "ACE_ReserveParachute";
|
||||
count = 4;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -33,13 +36,16 @@ class CfgVehicles {
|
||||
};
|
||||
class Helicopter;
|
||||
class ParachuteBase: Helicopter {
|
||||
ace_reserveParachute = "ACE_NonSteerableParachute";
|
||||
ace_hasReserveParachute = 1;
|
||||
ace_reserveParachute = "ACE_ReserveParachute";
|
||||
};
|
||||
class B_Parachute: ParachuteBase {
|
||||
ace_reserveParachute = "ACE_NonSteerableParachute";
|
||||
ace_hasReserveParachute = 1;
|
||||
ace_reserveParachute = "ACE_ReserveParachute";
|
||||
};
|
||||
class ACE_NonSteerableParachute: B_Parachute {
|
||||
ace_reserveParachute = "ACE_NonSteerableParachute";
|
||||
ace_hasReserveParachute = 0;
|
||||
ace_reserveParachute = "";
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
scope = 2;
|
||||
displayName = "$STR_ACE_Parachute_NonSteerableParachute";
|
||||
@ -50,7 +56,17 @@ class CfgVehicles {
|
||||
maximumLoad = 0;
|
||||
mass = 100;
|
||||
};
|
||||
|
||||
class ACE_ReserveParachute: ACE_NonSteerableParachute {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
displayName = "$STR_ACE_Parachute_ReserveParachute";
|
||||
//picture = "\z\ace\addons\parachute\ui\reserveParachute_icon.paa"; //@todo
|
||||
//model = "\z\ace\addons\parachute\data\test.p3d"; // @todo
|
||||
ace_hasReserveParachute = 0;
|
||||
ace_reserveParachute = "";
|
||||
ParachuteClass = "NonSteerable_Parachute_F";
|
||||
mass = 70;
|
||||
scope = 2;
|
||||
};
|
||||
class B_Soldier_05_f; class B_Pilot_F: B_Soldier_05_f {backpack = "ACE_NonSteerableParachute";};
|
||||
class I_Soldier_04_F; class I_pilot_F: I_Soldier_04_F {backpack = "ACE_NonSteerableParachute";};
|
||||
class O_helipilot_F; class O_Pilot_F: O_helipilot_F {backpack = "ACE_NonSteerableParachute";};
|
||||
|
@ -16,4 +16,4 @@
|
||||
#include "script_component.hpp"
|
||||
private["_unit"];
|
||||
_unit = _this select 0;
|
||||
(animationState _unit == 'para_pilot' && !(_unit getvariable [QGVAR(chuteIsCut),false]))
|
||||
(animationState _unit == 'para_pilot' && !(_unit getvariable [QGVAR(chuteIsCut),false]) && (_unit getvariable [QGVAR(hasReserve),false]))
|
@ -17,6 +17,6 @@
|
||||
private["_unit","_vehicle"];
|
||||
_unit = _this select 0;
|
||||
_vehicle = vehicle _unit;
|
||||
_unit action ["GetOut", vehicle _unit];
|
||||
_unit action ["GetOut", _vehicle];
|
||||
deleteVehicle _vehicle;
|
||||
_unit setVariable [QGVAR(chuteIsCut), true];
|
@ -18,10 +18,11 @@
|
||||
private ["_unit","_backpack"];
|
||||
_unit = _this select 0;
|
||||
_backpack = (_this select 1) select 6 ;
|
||||
if ((vehicle _unit) isKindOf "ParachuteBase") then {
|
||||
if ((vehicle _unit) isKindOf "ParachuteBase" && !([false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))) && !(_unit getVariable [QGVAR(chuteIsCut),false])) then {
|
||||
_unit addBackpack (_unit getVariable[QGVAR(backpackClass),"ACE_NonSteerableParachute"]);
|
||||
} else {
|
||||
if (getText(configFile >> "CfgVehicles" >> _backpack >> "ace_reserveParachute") != "") then {
|
||||
if ([false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))) then {
|
||||
_unit setVariable[QGVAR(backpackClass),getText(configFile >> "CfgVehicles" >> _backpack >> "ace_reserveParachute")];
|
||||
};
|
||||
_unit setVariable [QGVAR(hasReserve),[false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))];
|
||||
};
|
@ -53,5 +53,9 @@
|
||||
<English>Cut Parachute</English>
|
||||
<German>Fallschirm abschneiden</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Parachute_ReserveParachute">
|
||||
<English>Reserve Parachute</English>
|
||||
<German>Reserve Fallschirm</German>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user