Changed hellfire interaction check & added N variant (#5294)

* Changed weapon check for interaction to generic ace_hellfire_enabled value

* Added November hellfire variant

* Cleanup

* +1
This commit is contained in:
Tim Beswick 2017-06-23 17:32:48 +01:00 committed by PabstMirror
parent 9bf59bc74d
commit 2823ee58a4
5 changed files with 60 additions and 18 deletions

View File

@ -19,7 +19,7 @@ class CfgAmmo {
laserLock = 0;
manualControl = 0;
maxSpeed = 450;
thrustTime = 2.5; // motor burn 2-3 sec
thrust = 250;
timeToLive = 40;
@ -54,4 +54,17 @@ class CfgAmmo {
attackProfiles[] = {"hellfire", "hellfire_hi", "hellfire_lo"};
};
};
class ACE_Hellfire_AGM114N: ACE_Hellfire_AGM114K {
displayName = "AGM-114N";
displayNameShort = "AGM-114N";
description = "AGM-114N";
descriptionShort = "AGM-114N";
hit = 1100;
indirectHit = 200;
indirectHitRange = 10;
explosionEffects = "BombExplosion";
class ace_missileguidance: ace_missileguidance {
enabled = 1; // Missile Guidance must be explicitly enabled
};
};
};

View File

@ -1,6 +1,7 @@
class CfgMagazines {
class 12Rnd_PG_missiles;
// Kilo - tandem shaped charge HEAT (anti-tank)
class 6Rnd_ACE_Hellfire_AGM114K: 12Rnd_PG_missiles { // Old style vehicle magazine
count = 6;
ammo = "ACE_Hellfire_AGM114K";
@ -44,4 +45,43 @@ class CfgMagazines {
model = "\A3\Weapons_F\DynamicLoadout\PylonPod_4x_Missile_LG_scalpel_F.p3d";
mirrorMissilesIndexes[] = {2, 1, 4, 3};
};
// November - Metal augmented charge (Thermobaric) (Enclosures, ships, urban targets, air defense units)
class 6Rnd_ACE_Hellfire_AGM114N: 6Rnd_ACE_Hellfire_AGM114K { // Old style vehicle magazine
count = 6;
ammo = "ACE_Hellfire_AGM114N";
displayName = "AGM-114N [ACE]";
displayNameShort = "AGM-114N";
descriptionShort = "AGM-114N";
};
// 1.70 pylon magazines:
class PylonMissile_1Rnd_ACE_Hellfire_AGM114N: PylonMissile_1Rnd_ACE_Hellfire_AGM114K { // Bare missle
displayName = "1x AGM-114N [ACE]";
displayNameShort = "AGM-114N";
descriptionShort = "AGM-114N";
ammo = "ACE_Hellfire_AGM114N";
pylonWeapon = QGVAR(launcher_N);
};
class PylonRack_1Rnd_ACE_Hellfire_AGM114N: PylonRack_1Rnd_ACE_Hellfire_AGM114K { // 1x Launcher Support Rack
displayName = "1x AGM-114N [ACE]";
displayNameShort = "AGM-114N";
descriptionShort = "AGM-114N";
ammo = "ACE_Hellfire_AGM114N";
pylonWeapon = QGVAR(launcher_N);
};
class PylonRack_3Rnd_ACE_Hellfire_AGM114N: PylonRack_3Rnd_ACE_Hellfire_AGM114K { // 3x Launcher Support Rack
displayName = "3x AGM-114N [ACE]";
displayNameShort = "AGM-114N";
descriptionShort = "AGM-114N";
ammo = "ACE_Hellfire_AGM114N";
pylonWeapon = QGVAR(launcher_N);
};
class PylonRack_4Rnd_ACE_Hellfire_AGM114N: PylonRack_4Rnd_ACE_Hellfire_AGM114K { // 4x Launcher Support Rack
displayName = "4x AGM-114N [ACE]";
displayNameShort = "AGM-114N";
descriptionShort = "AGM-114N";
ammo = "ACE_Hellfire_AGM114N";
pylonWeapon = QGVAR(launcher_N);
};
};

View File

@ -1,7 +1,7 @@
class CfgWeapons {
class missiles_SCALPEL;
class GVAR(launcher): missiles_SCALPEL {
displayName = CSTRING(Hellfire);
displayName = "AGM-114K Hellfire II";
GVAR(enabled) = 1; // show attack profile / lock on hud
EGVAR(laser,canSelect) = 1; // can ace_laser lock (allows switching laser code)
canLock = 0;
@ -10,4 +10,8 @@ class CfgWeapons {
lockingTargetSound[] = {"",0,1};
lockedTargetSound[] = {"",0,1};
};
class GVAR(launcher_N): GVAR(launcher) {
displayName = "AGM-114N Hellfire II";
magazines[] = {"6Rnd_ACE_Hellfire_AGM114N", "PylonMissile_1Rnd_ACE_Hellfire_AGM114N", "PylonRack_1Rnd_ACE_Hellfire_AGM114N", "PylonRack_3Rnd_ACE_Hellfire_AGM114N", "PylonRack_4Rnd_ACE_Hellfire_AGM114N"};
};
};

View File

@ -61,7 +61,7 @@ private _fnc_condition = {
params ["_target", "_player", "_attackProfile"];
private _turretPath = if (ACE_player == (driver _target)) then {[-1]} else {ACE_player call CBA_fnc_turretPath};
private _hasWeapon = ({QGVAR(launcher) == _x} count (_target weaponsTurret _turretPath)) > 0;
private _hasWeapon = ({(isNumber (configFile >> "CfgWeapons" >> _x >> QGVAR(enabled))) && {getNumber (configFile >> "CfgWeapons" >> _x >> QGVAR(enabled)) > 0}} count (_target weaponsTurret _turretPath)) > 0;
(_hasWeapon) &&
{(_target getVariable [QEGVAR(missileguidance,attackProfile), "hellfire"]) != _attackProfile};

View File

@ -1,21 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Hellfire">
<Key ID="STR_ACE_Hellfire_Hellfire">
<English>Hellfire</English>
<Spanish>Hellfire</Spanish>
<French>Hellfire</French>
<Polish>Hellfire</Polish>
<German>Hellfire</German>
<Czech>Hellfire</Czech>
<Italian>Hellfire</Italian>
<Portuguese>Hellfire</Portuguese>
<Hungarian>Hellfire</Hungarian>
<Russian>Hellfire</Russian>
<Japanese>ヘルファイア</Japanese>
<SChinese>地狱火</SChinese>
<TChinese>地獄火</TChinese>
</Key>
<Key ID="STR_ACE_Hellfire_hellfireModeAction">
<English>Set Hellfire mode</English>
<Italian>Imposta modalità Hellfire</Italian>