Medical - Fix hitpoints on VR units (#7098)

This commit is contained in:
PabstMirror 2019-07-12 10:03:22 -05:00 committed by GitHub
parent 5b05c59fd5
commit 0c47d45d31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 4 deletions

View File

@ -17,3 +17,7 @@ class CfgPatches {
#include "ACE_Settings.hpp" #include "ACE_Settings.hpp"
#include "CfgEventHandlers.hpp" #include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp" #include "CfgVehicles.hpp"
class ACE_Tests {
medicalHitpoints = QPATHTOF(dev\test_hitpointConfigs.sqf);
};

View File

@ -0,0 +1,33 @@
// PabstMirror
// ["medicalHitpoints"] call ace_common_fnc_runTests;
// execVM "\z\ace\addons\medical\dev\test_hitpointConfigs.sqf"
#include "\z\ace\addons\medical\script_component.hpp"
// UAV-AI should get filtered by scope check
private _mans = configProperties [configFile >> "CfgVehicles", "(isClass _x) && {(getNumber (_x >> 'scope')) == 2} && {configName _x isKindOf 'CaManBase'}", true];
INFO_1("Checking mans for medical hitpoints [%1 mans]",count _mans);
private _testPass = true;
{
private _typeOf = configName _x;
private _hitpoints = (configProperties [_x >> "HitPoints", "isClass _x", true]) apply {configName _x};
// _typeOf createUnit [position player, group player, "z = this"];
// deleteVehicle z;
private _lastHitpoint = (_hitpoints param [(count _hitpoints) - 1, "#array"]);
if (_lastHitpoint != "ACE_HDBracket") then {
WARNING_2("%1 has bad last hitpoint: %2",_typeOf,_hitpoints);
_testPass = false;
};
if (((_hitpoints findIf {_x == "HitLeftArm"}) == -1) || {(_hitpoints findIf {_x == "HitLeftArm"}) == -1}
|| {(_hitpoints findIf {_x == "HitLeftLeg"}) == -1} || {(_hitpoints findIf {_x == "HitRightLeg"}) == -1}
|| {(_hitpoints findIf {_x == "HitHead"}) == -1} || {(_hitpoints findIf {_x == "HitBody"}) == -1}) then {
WARNING_2("%1 missing ace hitpoints: %2",_typeOf,_hitpoints);
_testPass = false;
};
} forEach _mans;
_testPass

View File

@ -63,6 +63,11 @@ class CfgVehicles {
ADD_ACE_HITPOINTS(1,1); ADD_ACE_HITPOINTS(1,1);
}; };
}; };
class B_Protagonist_VR_F: B_Soldier_base_F {
class HitPoints {
ADD_ACE_HITPOINTS(1,1);
};
};
class O_Soldier_VR_F: O_Soldier_base_F { class O_Soldier_VR_F: O_Soldier_base_F {
class HitPoints { class HitPoints {
ADD_ACE_HITPOINTS(1,1); ADD_ACE_HITPOINTS(1,1);
@ -73,10 +78,7 @@ class CfgVehicles {
ADD_ACE_HITPOINTS(1,1); ADD_ACE_HITPOINTS(1,1);
}; };
}; };
class I_Protagonist_VR_F: I_Soldier_base_F {
// Civilians
class C_man_1;
class C_Soldier_VR_F: C_man_1 {
class HitPoints { class HitPoints {
ADD_ACE_HITPOINTS(1,1); ADD_ACE_HITPOINTS(1,1);
}; };
@ -86,6 +88,19 @@ class CfgVehicles {
ADD_ACE_HITPOINTS(1,1); ADD_ACE_HITPOINTS(1,1);
}; };
}; };
class C_man_1;
class C_Protagonist_VR_F: C_man_1 {
class HitPoints {
ADD_ACE_HITPOINTS(1,1);
};
};
// Civilians
class C_Soldier_VR_F: C_man_1 {
class HitPoints {
ADD_ACE_HITPOINTS(1,1);
};
};
// APEX // APEX
class O_V_Soldier_Viper_F: O_Soldier_base_F { class O_V_Soldier_Viper_F: O_Soldier_base_F {