Compare commits
5 Commits
85e9af6a73
...
3.1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b06fe717b | ||
|
|
d9dfee0c7b | ||
| 1f1552bd53 | |||
| c912e730ac | |||
|
0301758e28
|
@@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
### Added
|
||||
- Add forgotten code file file for medical overlay
|
||||
|
||||
### Changed
|
||||
- Merge update-flag-exclusions branch to fix issues with vehicles not applying flag
|
||||
|
||||
## [3.1.1] - 2024-01-04
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -85,6 +85,16 @@ private _appliedParentClasses = [
|
||||
"Helicopter"
|
||||
];
|
||||
|
||||
private _modelsWithoutFlagProxies = [
|
||||
"TF373_SOAR_MH47G_Base", // MH-47G Chinook
|
||||
"RHS_MELB_base", // MELB AH-6M/MH-6M/H-6M Little Bird
|
||||
"USAF_C17", // C17 Globemaster III
|
||||
"USAF_C130J", // C130J Super Hercules
|
||||
"USAF_AC130U", // AC130 Spooky II
|
||||
"ej_UH60M_base", // UH-60M Black Hawk + DAP variants
|
||||
"rhsusf_fmtv_base" // M1083A1P2 variants + SOV SOCOM variants
|
||||
];
|
||||
|
||||
{
|
||||
private _parentClass = _x;
|
||||
[_parentClass, "InitPost", {
|
||||
@@ -94,7 +104,22 @@ private _appliedParentClasses = [
|
||||
"Set Vehicle Flag", // displayed title
|
||||
"\A3\ui_f\data\map\markers\flags\nato_ca.paa", // flag icon
|
||||
{true}, // statement
|
||||
{true}, // condition
|
||||
{
|
||||
params ["_target", "_player", "_params"];
|
||||
private _modelsWithoutFlagProxies = _params select 1;
|
||||
|
||||
// check if hierarchy includes any of the models without flag proxies
|
||||
private _excluded = false;
|
||||
{
|
||||
if (_excluded) exitWith {false};
|
||||
_excluded = _target isKindOf _x;
|
||||
} forEach _modelsWithoutFlagProxies;
|
||||
if (_excluded) exitWith {false};
|
||||
|
||||
|
||||
// check if vehicle is alive
|
||||
alive _target;
|
||||
}, // condition
|
||||
{
|
||||
params ["_target", "_player", "_params"];
|
||||
private _flagActionID = _params#0;
|
||||
@@ -155,7 +180,7 @@ private _appliedParentClasses = [
|
||||
|
||||
_actions;
|
||||
}, // child code
|
||||
[_flagActionID], // params
|
||||
[_flagActionID, _modelsWithoutFlagProxies], // params
|
||||
nil, // position
|
||||
4, // distance
|
||||
[false, false, false, false, false], // other params
|
||||
@@ -180,7 +205,10 @@ private _appliedParentClasses = [
|
||||
params ["_target", "_player", "_params"];
|
||||
_target forceFlagTexture "";
|
||||
}, // statement
|
||||
{true}, // condition
|
||||
{
|
||||
params ["_target", "_player", "_params"];
|
||||
alive _target && getForcedFlagTexture _target != "";
|
||||
}, // condition
|
||||
nil // child code
|
||||
] call ace_interact_menu_fnc_createAction;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ params [
|
||||
["_player", objNull, [objNull]]
|
||||
];
|
||||
|
||||
if (!isPlayer _player) exitWith { diag_log("exitWith inventotry")};
|
||||
if (!isPlayer _player) exitWith { diag_log("exitWith logPlayerInventory")};
|
||||
|
||||
_items = [];
|
||||
_items append uniformItems _player;
|
||||
@@ -13,6 +13,9 @@ _items pushback hmd _player;
|
||||
_items pushback binocular _player;
|
||||
_items append primaryWeaponItems _player;
|
||||
|
||||
_noncompliant = [];
|
||||
_unlisted = [];
|
||||
|
||||
{
|
||||
_item = _x;
|
||||
_modes = getArray(configfile >> "CfgWeapons" >> _item >> "visionMode");
|
||||
@@ -26,15 +29,28 @@ _items append primaryWeaponItems _player;
|
||||
_restrictedItemList = ["A3_GPNVG18b_REC_TI","A3_GPNVG18_REC_TI","A3_GPNVG18b_TI","A3_GPNVG18_TI","A3_GPNVG18b_REC_BLK_TI","A3_GPNVG18_REC_BLK_TI","A3_GPNVG18b_BLK_TI","A3_GPNVG18_BLK_TI","NVGogglesB_gry_F","NVGogglesB_grn_F","NVGogglesB_blk_F","optic_Nightstalker","rhsusf_acc_anpas13gv1","Tier1_ANPVS10_Tan","rhsusf_acc_anpvs27","optic_tws_mg","optic_tws"];
|
||||
|
||||
if ( _x in _restrictedItemList ) then {
|
||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 has a restricted inventory item: %2", name _player, getText( configfile >> "CfgWeapons" >> _item >> "displayName" )];
|
||||
} else if ((count _modes) isNotEqualTo 0) then {
|
||||
_noncompliant pushBackUnique _item;
|
||||
};
|
||||
|
||||
if ((count _modes) isNotEqualTo 0) then {
|
||||
_modes = _modes apply { toLower _x };
|
||||
if ( "ti" in _modes ) then {
|
||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 has an unlisted thermal item: %2", name _player, getText( configfile >> "CfgWeapons" >> _item >> "displayName" )];
|
||||
_unlisted pushBackUnique _item;
|
||||
};
|
||||
} else {
|
||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 inventory in compliance", name _player];
|
||||
}
|
||||
};
|
||||
|
||||
} forEach _items;
|
||||
|
||||
{
|
||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 has a restricted inventory item: %2", name _player, getText( configfile >> "CfgWeapons" >> _x >> "displayName" )];
|
||||
} forEach _noncompliant;
|
||||
|
||||
{
|
||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 has an unlisted thermal item: %2", name _player, getText( configfile >> "CfgWeapons" >> _x >> "displayName" )];
|
||||
} forEach _unlisted;
|
||||
|
||||
if (((count _noncompliant) isEqualTo 0) && ((count _unlisted) isEqualTo 0)) then {
|
||||
diag_log text format["[MILSIM] (logPlayerInventory): %1 inventory in compliance", name _player];
|
||||
};
|
||||
|
||||
nil
|
||||
Reference in New Issue
Block a user