<commit_before>#include "macros.hpp"
if (call AS_fnc_controlsAI) exitWith {hint "You cannot go Undercover while you are controlling AI"};

// the player may be temporarly controlling another unit. We check the original unit
// the player cannot become undercover on an AI controlled unit, so this is ok
private _player = player getVariable ["owner", player];

if (captive _player) exitWith {hint "You are already undercover"};

private _heli_spotters = [["base","airfield"], "AAF"] call AS_fnc_location_TS;
private _all_spotters = [["base","airfield","outpost","roadblock","hill", "hillAA"], "AAF"] call AS_fnc_location_TS;

private _arrayCivVeh = arrayCivVeh + [civHeli];

private _compromised = _player getVariable "compromised";
private _reason = "";

private _isMilitaryDressedConditions = [
	{primaryWeapon _player != ""},
	{secondaryWeapon _player != ""},
	{handgunWeapon _player != ""},
	{!(vest _player in AS_FIAvests_undercover)},
	{!(headgear _player in AS_FIAhelmets_undercover)},
	{hmd _player != ""},
	{!(uniform _player in AS_FIAuniforms_undercover)}
];
private _isMilitaryHints = [
	"a weapon",
	"a weapon",
	"a handgun",
	"a military vest",
	"a military helmet",
	"a military head set",
	"a military uniform"
];

private _isMilitaryDressed = {
	{
		if (call _x) exitWith {
			true
		};
	} forEach _isMilitaryDressedConditions;
	false
};
<commit_msg>Fixed condition to go undercover.<commit_after>#include "macros.hpp"
if (call AS_fnc_controlsAI) exitWith {hint "You cannot go Undercover while you are controlling AI"};

// the player may be temporarly controlling another unit. We check the original unit
// the player cannot become undercover on an AI controlled unit, so this is ok
private _player = player getVariable ["owner", player];

if (captive _player) exitWith {hint "You are already undercover"};

private _heli_spotters = [["base","airfield"], "AAF"] call AS_fnc_location_TS;
private _all_spotters = [["base","airfield","outpost","roadblock","hill", "hillAA"], "AAF"] call AS_fnc_location_TS;

private _arrayCivVeh = arrayCivVeh + [civHeli];

private _compromised = _player getVariable "compromised";
private _reason = "";

private _isMilitaryDressedConditions = [
	{primaryWeapon _player != ""},
	{secondaryWeapon _player != ""},
	{handgunWeapon _player != ""},
	{vest _player != "" and !(vest _player in AS_FIAvests_undercover)},
	{headgear _player != "" and !(headgear _player in AS_FIAhelmets_undercover)},
	{hmd _player != ""},
	{!(uniform _player in AS_FIAuniforms_undercover)}
];
private _isMilitaryHints = [
	"a weapon",
	"a weapon",
	"a handgun",
	"a military vest",
	"a military helmet",
	"a military head set",
	"a military uniform"
];

private _isMilitaryDressed = {
	{
		if (call _x) exitWith {
			true
		};
	} forEach _isMilitaryDressedConditions;
	false
};

{'fraction_non_alphanumeric': 0.12607142857142858, 'fraction_numerical': 0.0, 'mean_word_length': 5.637440758293839, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1273042', 'n_tokens_mistral': 944, 'n_tokens_neox': 914, 'n_words': 284}