-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Medical - Fix hitpoints on VR units (#7098)
- Loading branch information
1 parent
5b05c59
commit 0c47d45
Showing
3 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters