mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Medical - Fix hitpoints on VR units (#7098)
This commit is contained in:
parent
5b05c59fd5
commit
0c47d45d31
@ -17,3 +17,7 @@ class CfgPatches {
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
class ACE_Tests {
|
||||
medicalHitpoints = QPATHTOF(dev\test_hitpointConfigs.sqf);
|
||||
};
|
||||
|
33
addons/medical/dev/test_hitpointConfigs.sqf
Normal file
33
addons/medical/dev/test_hitpointConfigs.sqf
Normal 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
|
@ -63,6 +63,11 @@ class CfgVehicles {
|
||||
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 HitPoints {
|
||||
ADD_ACE_HITPOINTS(1,1);
|
||||
@ -73,10 +78,7 @@ class CfgVehicles {
|
||||
ADD_ACE_HITPOINTS(1,1);
|
||||
};
|
||||
};
|
||||
|
||||
// Civilians
|
||||
class C_man_1;
|
||||
class C_Soldier_VR_F: C_man_1 {
|
||||
class I_Protagonist_VR_F: I_Soldier_base_F {
|
||||
class HitPoints {
|
||||
ADD_ACE_HITPOINTS(1,1);
|
||||
};
|
||||
@ -86,6 +88,19 @@ class CfgVehicles {
|
||||
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
|
||||
class O_V_Soldier_Viper_F: O_Soldier_base_F {
|
||||
|
Loading…
Reference in New Issue
Block a user