From 7acdc61a7d03e391e6fa3b13bc947e74db46bea8 Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Mon, 4 Sep 2023 12:05:50 +0200 Subject: [PATCH 01/15] Fixed typo --- addons/captives/functions/fnc_canEscortCaptive.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/functions/fnc_canEscortCaptive.sqf b/addons/captives/functions/fnc_canEscortCaptive.sqf index cb5fdd49729..23ead76d3e1 100644 --- a/addons/captives/functions/fnc_canEscortCaptive.sqf +++ b/addons/captives/functions/fnc_canEscortCaptive.sqf @@ -17,7 +17,7 @@ */ params ["_unit", "_target"]; -//Alive, handcuffed, not being escored, and not unconscious +//Alive, handcuffed, not being escorted, and not unconscious (_target getVariable [QGVAR(isHandcuffed), false]) && {isNull (attachedTo _target)} && From dee79319e08f778c166bd9ac5cb6d936ec61ff25 Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Mon, 4 Sep 2023 12:06:43 +0200 Subject: [PATCH 02/15] Added "Blindfold Captive" interaction --- addons/captives/CfgVehicles.hpp | 8 ++++ addons/captives/XEH_PREP.hpp | 2 + .../functions/fnc_canBlindfoldCaptive.sqf | 28 ++++++++++++++ .../functions/fnc_doBlindfoldCaptive.sqf | 37 +++++++++++++++++++ addons/captives/stringtable.xml | 17 +++++++++ 5 files changed, 92 insertions(+) create mode 100644 addons/captives/functions/fnc_canBlindfoldCaptive.sqf create mode 100644 addons/captives/functions/fnc_doBlindfoldCaptive.sqf diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp index 8fe05963387..b0e96c17da9 100644 --- a/addons/captives/CfgVehicles.hpp +++ b/addons/captives/CfgVehicles.hpp @@ -57,6 +57,14 @@ class CfgVehicles { statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive)); exceptions[] = {"isNotSwimming"}; }; + class ACE_BlindfoldCaptive { + displayName = CSTRING(BlindfoldCaptive); + distance = 4; + condition = QUOTE([ARR_2(_player, _target)] call FUNC(canBlindfoldCaptive)); + statement = QUOTE([ARR_3(_player, _target, true)] call FUNC(doBlindfoldCaptive)); + exceptions[] = {"isNotSwimming"}; + showDisabled = 0; + }; }; }; diff --git a/addons/captives/XEH_PREP.hpp b/addons/captives/XEH_PREP.hpp index 6157a1e33e9..44aae1f88e0 100644 --- a/addons/captives/XEH_PREP.hpp +++ b/addons/captives/XEH_PREP.hpp @@ -1,5 +1,6 @@ PREP(addLoadCaptiveActions); PREP(canApplyHandcuffs); +PREP(canBlindfoldCaptive); PREP(canEscortCaptive); PREP(canLoadCaptive); PREP(canRemoveHandcuffs); @@ -7,6 +8,7 @@ PREP(canStopEscorting); PREP(canSurrender); PREP(canUnloadCaptive); PREP(doApplyHandcuffs); +PREP(doBlindfoldCaptive); PREP(doEscortCaptive); PREP(doLoadCaptive); PREP(doRemoveHandcuffs); diff --git a/addons/captives/functions/fnc_canBlindfoldCaptive.sqf b/addons/captives/functions/fnc_canBlindfoldCaptive.sqf new file mode 100644 index 00000000000..a0b3ba127cb --- /dev/null +++ b/addons/captives/functions/fnc_canBlindfoldCaptive.sqf @@ -0,0 +1,28 @@ +#include "script_component.hpp" +/* + * Author: mrschick + * Tests if caller has a Contact DLC blindfold in their inventory to put on the captive + * + * Arguments: + * 0: caller (player) + * 1: target + * + * Return Value: + * The return value + * + * Example: + * [player, bob] call ACE_captives_fnc_canBlindfoldCaptive + * + * Public: No + */ + +params ["_unit", "_target"]; +//Alive, handcuffed, not being escorted, and caller has a Contact DLC blindfold in their inventory + +(_target getVariable [QGVAR(isHandcuffed), false]) && +{isNull (attachedTo _target)} && +{alive _target} && +{(vehicle _unit) == _unit} && +{(vehicle _target) == _target} && +{(["G_Blindfold_01_black_F", "G_Blindfold_01_white_F"] findAny (items _unit)) != -1} + diff --git a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf new file mode 100644 index 00000000000..5003fa8ed28 --- /dev/null +++ b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf @@ -0,0 +1,37 @@ +#include "script_component.hpp" +/* + * Author: mrschick + * Puts a blindfold on a captive unit if the player has a blindfold in their inventory + * + * Arguments: + * 0: _unit-Player + * 1: target + * + * Return Value: + * The return value + * + * Example: + * [player, bob, true] call ACE_captives_fnc_doBlindfoldCaptive; + * + * Public: No + */ + +params ["_unit", "_target", "_state"]; + +// check if _unit has a Contact DLC blindfold in its inventory, abort otherwise. +private _validBlindfolds = ["G_Blindfold_01_black_F", "G_Blindfold_01_white_F"]; +private _carriedBlindfoldIdx = _validBlindfolds findAny (items _unit); +if (_carriedBlindfoldIdx == -1) exitWith {}; + +// Remove _target goggles if it is wearing any and move them to _unit inventory +private _previousGoggles = goggles _target; +if (_previousGoggles != "") then { + removeGoggles _target; + _unit addItem _previousGoggles; +}; + +// Add blindfold to _target from _unit inventory +_unit removeItem (_validBlindfolds select _carriedBlindfoldIdx); +_target addGoggles (_validBlindfolds select _carriedBlindfoldIdx); + + diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 8c4f85db067..16769f2b2bf 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -136,6 +136,23 @@ 将俘虏带出载具 Tutukluyu indir + + Blindfold Captive + Augen verbinden + + + + + + + + Benda gli occhi + + + + + + Cable Tie Kabelbinder From b77b6a996d21b2b1c954f149ac6ab1ab006c286f Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Mon, 4 Sep 2023 19:09:08 +0200 Subject: [PATCH 03/15] Changed comment readability as requested --- addons/captives/functions/fnc_canBlindfoldCaptive.sqf | 10 +++++----- addons/captives/functions/fnc_canEscortCaptive.sqf | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/captives/functions/fnc_canBlindfoldCaptive.sqf b/addons/captives/functions/fnc_canBlindfoldCaptive.sqf index a0b3ba127cb..29b5b5ec95c 100644 --- a/addons/captives/functions/fnc_canBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_canBlindfoldCaptive.sqf @@ -1,14 +1,14 @@ #include "script_component.hpp" /* * Author: mrschick - * Tests if caller has a Contact DLC blindfold in their inventory to put on the captive + * Checks if caller can blindfold the captive * * Arguments: - * 0: caller (player) - * 1: target + * 0: Caller (player) + * 1: Target * * Return Value: - * The return value + * Can blindfold * * Example: * [player, bob] call ACE_captives_fnc_canBlindfoldCaptive @@ -17,7 +17,7 @@ */ params ["_unit", "_target"]; -//Alive, handcuffed, not being escorted, and caller has a Contact DLC blindfold in their inventory +// Alive, handcuffed, not being escorted, and caller has a Contact DLC blindfold in their inventory (_target getVariable [QGVAR(isHandcuffed), false]) && {isNull (attachedTo _target)} && diff --git a/addons/captives/functions/fnc_canEscortCaptive.sqf b/addons/captives/functions/fnc_canEscortCaptive.sqf index 23ead76d3e1..7ae4fb53c0a 100644 --- a/addons/captives/functions/fnc_canEscortCaptive.sqf +++ b/addons/captives/functions/fnc_canEscortCaptive.sqf @@ -4,11 +4,11 @@ * Tests if can escort target (attach) * * Arguments: - * 0: caller (player) - * 1: target + * 0: Caller (player) + * 1: Target * * Return Value: - * The return value + * Can escort * * Example: * [player, bob] call ACE_captives_fnc_canEscortCaptive @@ -17,7 +17,7 @@ */ params ["_unit", "_target"]; -//Alive, handcuffed, not being escorted, and not unconscious +// Alive, handcuffed, not being escorted, and not unconscious (_target getVariable [QGVAR(isHandcuffed), false]) && {isNull (attachedTo _target)} && From f15656ca602ac2357474f68c4e9f2985d584bb9d Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Tue, 5 Sep 2023 22:19:58 +0200 Subject: [PATCH 04/15] Better handling of captive goggle replacement if the capturer's inventory cannot contain the captive's goggles, move them to the captive's inventory, if that also can't fit them, drop them on the ground. --- .../functions/fnc_doBlindfoldCaptive.sqf | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf index 5003fa8ed28..319a6083c71 100644 --- a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf @@ -23,15 +23,23 @@ private _validBlindfolds = ["G_Blindfold_01_black_F", "G_Blindfold_01_white_F"]; private _carriedBlindfoldIdx = _validBlindfolds findAny (items _unit); if (_carriedBlindfoldIdx == -1) exitWith {}; -// Remove _target goggles if it is wearing any and move them to _unit inventory +_unit removeItem (_validBlindfolds select _carriedBlindfoldIdx); + +// Remove _target goggles if it is wearing any and move them to _unit or _target inventory (if they can hold them) private _previousGoggles = goggles _target; if (_previousGoggles != "") then { - removeGoggles _target; - _unit addItem _previousGoggles; + if ([_unit, _previousGoggles] call CBA_fnc_canAddItem) exitWith { + removeGoggles _target; + _unit addItem _previousGoggles; + }; + if ([_target, _previousGoggles] call CBA_fnc_canAddItem) exitWith { + removeGoggles _target; + _target addItem _previousGoggles; + }; + // if the target goggles can fit in neither _unit nor _target inventory, drop them on the ground + [_target, _previousGoggles] call CBA_fnc_dropItem; }; -// Add blindfold to _target from _unit inventory -_unit removeItem (_validBlindfolds select _carriedBlindfoldIdx); _target addGoggles (_validBlindfolds select _carriedBlindfoldIdx); From 512bed5824b2f7f4dcd4e6391b8684622e772e29 Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Wed, 6 Sep 2023 12:14:21 +0200 Subject: [PATCH 05/15] Removed extra new line --- addons/captives/functions/fnc_doBlindfoldCaptive.sqf | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf index 319a6083c71..bf70bdeb41c 100644 --- a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf @@ -42,4 +42,3 @@ if (_previousGoggles != "") then { _target addGoggles (_validBlindfolds select _carriedBlindfoldIdx); - From db26bc87bfa51d215ab05889a2f11a8782972365 Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Wed, 6 Sep 2023 12:57:29 +0200 Subject: [PATCH 06/15] Make "validBlindfolds" a CBA Setting --- .../functions/fnc_canBlindfoldCaptive.sqf | 2 +- .../functions/fnc_doBlindfoldCaptive.sqf | 2 +- addons/captives/initSettings.sqf | 9 ++++++ addons/captives/stringtable.xml | 30 +++++++++++++++++++ 4 files changed, 41 insertions(+), 2 deletions(-) diff --git a/addons/captives/functions/fnc_canBlindfoldCaptive.sqf b/addons/captives/functions/fnc_canBlindfoldCaptive.sqf index 29b5b5ec95c..eaa7d0214e6 100644 --- a/addons/captives/functions/fnc_canBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_canBlindfoldCaptive.sqf @@ -24,5 +24,5 @@ params ["_unit", "_target"]; {alive _target} && {(vehicle _unit) == _unit} && {(vehicle _target) == _target} && -{(["G_Blindfold_01_black_F", "G_Blindfold_01_white_F"] findAny (items _unit)) != -1} +{(GVAR(validBlindfolds) findAny (items _unit)) != -1} diff --git a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf index bf70bdeb41c..8fef71cf094 100644 --- a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf @@ -19,7 +19,7 @@ params ["_unit", "_target", "_state"]; // check if _unit has a Contact DLC blindfold in its inventory, abort otherwise. -private _validBlindfolds = ["G_Blindfold_01_black_F", "G_Blindfold_01_white_F"]; +private _validBlindfolds = GVAR(validBlindfolds); private _carriedBlindfoldIdx = _validBlindfolds findAny (items _unit); if (_carriedBlindfoldIdx == -1) exitWith {}; diff --git a/addons/captives/initSettings.sqf b/addons/captives/initSettings.sqf index 3a1fbfa6ed8..14280b5c2b5 100644 --- a/addons/captives/initSettings.sqf +++ b/addons/captives/initSettings.sqf @@ -31,3 +31,12 @@ private _category = format ["ACE %1", localize LSTRING(DisplayName)]; false, 1 ] call CBA_fnc_addSetting; + +[ + QGVAR(validBlindfolds), "EDITBOX", + [LSTRING(ModuleSettings_validBlindfolds_name), LSTRING(ModuleSettings_validBlindfolds_description)], + _category, + '["G_Blindfold_01_black_F","G_Blindfold_01_white_F"]', + 1, + {GVAR(validBlindfolds) = call compile GVAR(validBlindfolds);} +] call CBA_fnc_addSetting; diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 16769f2b2bf..8aed65e6d94 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -473,6 +473,36 @@ Vyžadovat, aby se AI prvně vzdala před umožněním zajetí Requiere la rendición de la IA antes de poder arrestarlas + + Goggles that count as blindfolds + Brillen-Items die Augenbinden sind + Occhiali che sono bende per gli occhi + + + + + + + + + + + + + List of goggle items that ACE should consider as valid blindfolds to blind captives with + Liste von items die ACE als funktionierende Augenbinden werten sollte + Lista di occhiali che ACE considera bende per gli occhi + + + + + + + + + + + Sets the unit under the cursor captive. Nimmt die Einheit unter dem Cursor fest. From c5a841174230a01b7c79b53b9a2268e53e43d578 Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Wed, 6 Sep 2023 14:05:53 +0200 Subject: [PATCH 07/15] Add remaining localizations I speak German and Italian fluently and can also infer the proper sentence structure and conjugations in French/Spanish/Portuguese, the other eastern languages are completely foreign to me though and I have to trust Google/DeepL. --- addons/captives/stringtable.xml | 64 ++++++++++++++++----------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 8aed65e6d94..3223cb79065 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -139,19 +139,19 @@ Blindfold Captive Augen verbinden - - - - - - - + Vendas los ojos al cautivo + Bandes les yeux + zawiązujesz oczy jeńcowi + zavážete zajatci oči + bekötöd a fogoly szemét + Вы завязываете пленнику глаза + Vendas os olhos Benda gli occhi - - - - - + 捕虜に目隠しをする + 포로에게 눈을 가리고 + 蒙住囚犯的眼睛 + 蒙住囚犯的眼睛 + Esirin Gözlerini Bağlayın Cable Tie @@ -477,31 +477,31 @@ Goggles that count as blindfolds Brillen-Items die Augenbinden sind Occhiali che sono bende per gli occhi - - - - - - - - - - + 目隠しにもなるゴーグル + 可用作眼罩的護目鏡 + 可用作眼罩的护目镜 + 눈가리개로 사용할 수 있는 고글 + Gogle, które liczą się jako opaski na oczy + Очки, которые можно считать повязками на глаза + Óculos que valem como vendas + Lunettes pouvant être utilisées comme bandeau + Brýle, které lze použít jako pásky přes oči + Gafas que se pueden utilizar como vendas List of goggle items that ACE should consider as valid blindfolds to blind captives with Liste von items die ACE als funktionierende Augenbinden werten sollte Lista di occhiali che ACE considera bende per gli occhi - - - - - - - - - - + 捕虜の目隠しとして有効なゴーグルのリスト + 應被視為對失明俘虜有效的眼罩的護目鏡物品列表 + 应视为有效眼罩的护目镜物品清单,可用于蒙住俘虏的眼睛 + 포로의 눈을 가릴 때 유효한 눈가리개로 간주해야 하는 고글 품목 목록은 다음과 같습니다. + Lista elementów gogli, które powinny być uważane za ważne opaski do oślepienia jeńców + Перечень очков, которые следует рассматривать как действительные повязки для ослепления пленных + Lista de artigos de óculos que devem ser considerados como vendas válidas para cegar os prisioneiros com + Liste des lunettes qui devraient être considérées comme des bandeaux valables pour aveugler les captifs. + Seznam brýlí, které by měly být považovány za platné pásky přes oči, jimiž lze oslepit zajatce + Lista de gafas que deben considerarse como vendas válidas con las que cegar a los cautivos Sets the unit under the cursor captive. From fdc70fc59ba265e43919284cc85f4f1c2ac7a53f Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:15:03 +0200 Subject: [PATCH 08/15] Removed non-verified translations --- addons/captives/stringtable.xml | 34 ++------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 3223cb79065..51b1d03ee39 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -139,19 +139,9 @@ Blindfold Captive Augen verbinden - Vendas los ojos al cautivo - Bandes les yeux - zawiązujesz oczy jeńcowi - zavážete zajatci oči - bekötöd a fogoly szemét - Вы завязываете пленнику глаза - Vendas os olhos + Bandeau sur les yeux du captif + Vendar prisioneiro Benda gli occhi - 捕虜に目隠しをする - 포로에게 눈을 가리고 - 蒙住囚犯的眼睛 - 蒙住囚犯的眼睛 - Esirin Gözlerini Bağlayın Cable Tie @@ -477,31 +467,11 @@ Goggles that count as blindfolds Brillen-Items die Augenbinden sind Occhiali che sono bende per gli occhi - 目隠しにもなるゴーグル - 可用作眼罩的護目鏡 - 可用作眼罩的护目镜 - 눈가리개로 사용할 수 있는 고글 - Gogle, które liczą się jako opaski na oczy - Очки, которые можно считать повязками на глаза - Óculos que valem como vendas - Lunettes pouvant être utilisées comme bandeau - Brýle, které lze použít jako pásky přes oči - Gafas que se pueden utilizar como vendas List of goggle items that ACE should consider as valid blindfolds to blind captives with Liste von items die ACE als funktionierende Augenbinden werten sollte Lista di occhiali che ACE considera bende per gli occhi - 捕虜の目隠しとして有効なゴーグルのリスト - 應被視為對失明俘虜有效的眼罩的護目鏡物品列表 - 应视为有效眼罩的护目镜物品清单,可用于蒙住俘虏的眼睛 - 포로의 눈을 가릴 때 유효한 눈가리개로 간주해야 하는 고글 품목 목록은 다음과 같습니다. - Lista elementów gogli, które powinny być uważane za ważne opaski do oślepienia jeńców - Перечень очков, которые следует рассматривать как действительные повязки для ослепления пленных - Lista de artigos de óculos que devem ser considerados como vendas válidas para cegar os prisioneiros com - Liste des lunettes qui devraient être considérées comme des bandeaux valables pour aveugler les captifs. - Seznam brýlí, které by měly být považovány za platné pásky přes oči, jimiž lze oslepit zajatce - Lista de gafas que deben considerarse como vendas válidas con las que cegar a los cautivos Sets the unit under the cursor captive. From ba63b0c0286713ff8ce2fee95fb51f46cfcaa4ec Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Wed, 6 Sep 2023 12:12:37 -0500 Subject: [PATCH 09/15] Use GVAR(blindfold) config entry --- addons/captives/CfgGlasses.hpp | 6 ++++++ addons/captives/XEH_preInit.sqf | 1 + addons/captives/XEH_preStart.sqf | 3 +++ addons/captives/config.cpp | 1 + addons/captives/functions/fnc_canBlindfoldCaptive.sqf | 11 +++++------ addons/captives/functions/fnc_doBlindfoldCaptive.sqf | 11 +++++------ addons/captives/initSettings.sqf | 9 --------- addons/captives/stringtable.xml | 10 ---------- 8 files changed, 21 insertions(+), 31 deletions(-) create mode 100644 addons/captives/CfgGlasses.hpp diff --git a/addons/captives/CfgGlasses.hpp b/addons/captives/CfgGlasses.hpp new file mode 100644 index 00000000000..5bebfb830ca --- /dev/null +++ b/addons/captives/CfgGlasses.hpp @@ -0,0 +1,6 @@ +class CfgGlasses { + class None; + class G_Blindfold_01_base_F: None { + GVAR(blindfold) = 1; + }; +}; diff --git a/addons/captives/XEH_preInit.sqf b/addons/captives/XEH_preInit.sqf index 8ec915e4f2d..d66df57f007 100644 --- a/addons/captives/XEH_preInit.sqf +++ b/addons/captives/XEH_preInit.sqf @@ -9,6 +9,7 @@ PREP_RECOMPILE_END; GVAR(captivityEnabled) = false; GVAR(restraints) = call (uiNamespace getVariable QGVAR(restraints)); +GVAR(blindfolds) = keys (uiNamespace getVariable QGVAR(blindfolds)); #include "initSettings.sqf" diff --git a/addons/captives/XEH_preStart.sqf b/addons/captives/XEH_preStart.sqf index 75cbb90ef98..7cc9038599e 100644 --- a/addons/captives/XEH_preStart.sqf +++ b/addons/captives/XEH_preStart.sqf @@ -4,3 +4,6 @@ private _restraints = (QUOTE(getNumber (_x >> QQGVAR(restraint)) > 0) configClasses (configFile >> "CfgWeapons") apply {configName _x}); uiNamespace setVariable [QGVAR(restraints), compileFinal str _restraints]; + +private _blindfolds = (QUOTE(getNumber (_x >> QQGVAR(blindfold)) > 0) configClasses (configFile >> "CfgGlasses") apply {configName _x}); +uiNamespace setVariable [QGVAR(blindfolds), compileFinal (_blindfolds createHashMapFromArray [])]; diff --git a/addons/captives/config.cpp b/addons/captives/config.cpp index 0b8dae014a3..c28a88559d1 100644 --- a/addons/captives/config.cpp +++ b/addons/captives/config.cpp @@ -16,6 +16,7 @@ class CfgPatches { #include "ACE_Settings.hpp" #include "CfgEventHandlers.hpp" +#include "CfgGlasses.hpp" #include "CfgMoves.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" diff --git a/addons/captives/functions/fnc_canBlindfoldCaptive.sqf b/addons/captives/functions/fnc_canBlindfoldCaptive.sqf index eaa7d0214e6..7fed80cf595 100644 --- a/addons/captives/functions/fnc_canBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_canBlindfoldCaptive.sqf @@ -11,18 +11,17 @@ * Can blindfold * * Example: - * [player, bob] call ACE_captives_fnc_canBlindfoldCaptive + * [player, cursorObject] call ACE_captives_fnc_canBlindfoldCaptive * * Public: No */ params ["_unit", "_target"]; -// Alive, handcuffed, not being escorted, and caller has a Contact DLC blindfold in their inventory +// Alive, handcuffed, not being escorted, and caller has a blindfold in their inventory (_target getVariable [QGVAR(isHandcuffed), false]) && {isNull (attachedTo _target)} && {alive _target} && -{(vehicle _unit) == _unit} && -{(vehicle _target) == _target} && -{(GVAR(validBlindfolds) findAny (items _unit)) != -1} - +{isNull objectParent _unit} && +{isNull objectParent _target} && +{(GVAR(blindfolds) findAny (_unit call EFUNC(common,uniqueItems))) != -1} diff --git a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf index 8fef71cf094..ac69ce0b67f 100644 --- a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf @@ -18,12 +18,11 @@ params ["_unit", "_target", "_state"]; -// check if _unit has a Contact DLC blindfold in its inventory, abort otherwise. -private _validBlindfolds = GVAR(validBlindfolds); -private _carriedBlindfoldIdx = _validBlindfolds findAny (items _unit); -if (_carriedBlindfoldIdx == -1) exitWith {}; +// check if _unit has a blindfold in its inventory, abort otherwise. +private _carriedBlindfoldIdx = GVAR(blindfolds) findAny (_unit call EFUNC(common,uniqueItems)); +if (_carriedBlindfoldIdx == -1) exitWith { ERROR("no blindfold"); }; -_unit removeItem (_validBlindfolds select _carriedBlindfoldIdx); +_unit removeItem (GVAR(blindfolds) select _carriedBlindfoldIdx); // Remove _target goggles if it is wearing any and move them to _unit or _target inventory (if they can hold them) private _previousGoggles = goggles _target; @@ -40,5 +39,5 @@ if (_previousGoggles != "") then { [_target, _previousGoggles] call CBA_fnc_dropItem; }; -_target addGoggles (_validBlindfolds select _carriedBlindfoldIdx); +_target addGoggles (GVAR(blindfolds) select _carriedBlindfoldIdx); diff --git a/addons/captives/initSettings.sqf b/addons/captives/initSettings.sqf index 14280b5c2b5..3a1fbfa6ed8 100644 --- a/addons/captives/initSettings.sqf +++ b/addons/captives/initSettings.sqf @@ -31,12 +31,3 @@ private _category = format ["ACE %1", localize LSTRING(DisplayName)]; false, 1 ] call CBA_fnc_addSetting; - -[ - QGVAR(validBlindfolds), "EDITBOX", - [LSTRING(ModuleSettings_validBlindfolds_name), LSTRING(ModuleSettings_validBlindfolds_description)], - _category, - '["G_Blindfold_01_black_F","G_Blindfold_01_white_F"]', - 1, - {GVAR(validBlindfolds) = call compile GVAR(validBlindfolds);} -] call CBA_fnc_addSetting; diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 51b1d03ee39..d4ba21938c2 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -463,16 +463,6 @@ Vyžadovat, aby se AI prvně vzdala před umožněním zajetí Requiere la rendición de la IA antes de poder arrestarlas - - Goggles that count as blindfolds - Brillen-Items die Augenbinden sind - Occhiali che sono bende per gli occhi - - - List of goggle items that ACE should consider as valid blindfolds to blind captives with - Liste von items die ACE als funktionierende Augenbinden werten sollte - Lista di occhiali che ACE considera bende per gli occhi - Sets the unit under the cursor captive. Nimmt die Einheit unter dem Cursor fest. From 77f54231b89ab9bfd9f7ecd093306f149b3ab2ff Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Sat, 9 Sep 2023 16:04:54 +0200 Subject: [PATCH 10/15] Remove unused "_state" parameter --- addons/captives/CfgVehicles.hpp | 2 +- addons/captives/functions/fnc_doBlindfoldCaptive.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp index b0e96c17da9..95727ec85e1 100644 --- a/addons/captives/CfgVehicles.hpp +++ b/addons/captives/CfgVehicles.hpp @@ -61,7 +61,7 @@ class CfgVehicles { displayName = CSTRING(BlindfoldCaptive); distance = 4; condition = QUOTE([ARR_2(_player, _target)] call FUNC(canBlindfoldCaptive)); - statement = QUOTE([ARR_3(_player, _target, true)] call FUNC(doBlindfoldCaptive)); + statement = QUOTE([ARR_2(_player, _target)] call FUNC(doBlindfoldCaptive)); exceptions[] = {"isNotSwimming"}; showDisabled = 0; }; diff --git a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf index ac69ce0b67f..c63c79c02c5 100644 --- a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf @@ -16,7 +16,7 @@ * Public: No */ -params ["_unit", "_target", "_state"]; +params ["_unit", "_target"]; // check if _unit has a blindfold in its inventory, abort otherwise. private _carriedBlindfoldIdx = GVAR(blindfolds) findAny (_unit call EFUNC(common,uniqueItems)); From dc6beeb88d85c3570b235626cbfdae7a7e474f84 Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Sat, 9 Sep 2023 16:39:04 +0200 Subject: [PATCH 11/15] Check if captive isn't already blindfolded before blindfolding Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com> --- addons/captives/functions/fnc_canBlindfoldCaptive.sqf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/captives/functions/fnc_canBlindfoldCaptive.sqf b/addons/captives/functions/fnc_canBlindfoldCaptive.sqf index 7fed80cf595..e2ba5ccc819 100644 --- a/addons/captives/functions/fnc_canBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_canBlindfoldCaptive.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" /* * Author: mrschick - * Checks if caller can blindfold the captive + * Checks if caller can blindfold the captive. * * Arguments: * 0: Caller (player) @@ -11,17 +11,18 @@ * Can blindfold * * Example: - * [player, cursorObject] call ACE_captives_fnc_canBlindfoldCaptive + * [player, cursorTarget] call ace_captives_fnc_canBlindfoldCaptive * * Public: No */ params ["_unit", "_target"]; -// Alive, handcuffed, not being escorted, and caller has a blindfold in their inventory +// Alive, handcuffed, not being escorted, caller has a blindfold in their inventory and target isn't already wearing a blindfold (_target getVariable [QGVAR(isHandcuffed), false]) && {isNull (attachedTo _target)} && {alive _target} && {isNull objectParent _unit} && {isNull objectParent _target} && -{(GVAR(blindfolds) findAny (_unit call EFUNC(common,uniqueItems))) != -1} +{(GVAR(blindfolds) findAny (_unit call EFUNC(common,uniqueItems))) != -1} && +{!((goggles _target) in GVAR(blindfolds))} From 052594225c23ca3cf1fe7a41693c0966d93b8111 Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Sat, 9 Sep 2023 17:49:48 +0200 Subject: [PATCH 12/15] Added "remove blindfold" interaction Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com> --- addons/captives/CfgVehicles.hpp | 12 ++- addons/captives/XEH_PREP.hpp | 1 + .../fnc_canRemoveBlindfoldCaptive.sqf | 27 +++++++ .../functions/fnc_doBlindfoldCaptive.sqf | 76 +++++++++++++------ addons/captives/stringtable.xml | 6 ++ 5 files changed, 97 insertions(+), 25 deletions(-) create mode 100644 addons/captives/functions/fnc_canRemoveBlindfoldCaptive.sqf diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp index 95727ec85e1..831ee0dff83 100644 --- a/addons/captives/CfgVehicles.hpp +++ b/addons/captives/CfgVehicles.hpp @@ -57,11 +57,19 @@ class CfgVehicles { statement = QUOTE([ARR_2(_player, _target)] call FUNC(doUnloadCaptive)); exceptions[] = {"isNotSwimming"}; }; - class ACE_BlindfoldCaptive { + class GVAR(BlindfoldCaptive) { displayName = CSTRING(BlindfoldCaptive); distance = 4; condition = QUOTE([ARR_2(_player, _target)] call FUNC(canBlindfoldCaptive)); - statement = QUOTE([ARR_2(_player, _target)] call FUNC(doBlindfoldCaptive)); + statement = QUOTE([ARR_3(_player, _target, true)] call FUNC(doBlindfoldCaptive)); + exceptions[] = {"isNotSwimming"}; + showDisabled = 0; + }; + class GVAR(RemoveBlindfoldCaptive) { + displayName = CSTRING(RemoveBlindfoldCaptive); + distance = 4; + condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRemoveBlindfoldCaptive)); + statement = QUOTE([ARR_3(_player, _target, false)] call FUNC(doBlindfoldCaptive)); exceptions[] = {"isNotSwimming"}; showDisabled = 0; }; diff --git a/addons/captives/XEH_PREP.hpp b/addons/captives/XEH_PREP.hpp index 44aae1f88e0..9769fe78554 100644 --- a/addons/captives/XEH_PREP.hpp +++ b/addons/captives/XEH_PREP.hpp @@ -3,6 +3,7 @@ PREP(canApplyHandcuffs); PREP(canBlindfoldCaptive); PREP(canEscortCaptive); PREP(canLoadCaptive); +PREP(canRemoveBlindfoldCaptive); PREP(canRemoveHandcuffs); PREP(canStopEscorting); PREP(canSurrender); diff --git a/addons/captives/functions/fnc_canRemoveBlindfoldCaptive.sqf b/addons/captives/functions/fnc_canRemoveBlindfoldCaptive.sqf new file mode 100644 index 00000000000..b342994233b --- /dev/null +++ b/addons/captives/functions/fnc_canRemoveBlindfoldCaptive.sqf @@ -0,0 +1,27 @@ +#include "script_component.hpp" +/* + * Author: johnb43 + * Checks if caller can remove blindfold from the captive. + * + * Arguments: + * 0: Caller (player) + * 1: Target + * + * Return Value: + * Can remove blindfold + * + * Example: + * [player, cursorTarget] call ace_captives_fnc_canRemoveBlindfoldCaptive + * + * Public: No + */ + +params ["_unit", "_target"]; +// Alive, handcuffed, not being escorted, and target is wearing a blindfold + +(_target getVariable [QGVAR(isHandcuffed), false]) && +{isNull (attachedTo _target)} && +{alive _target} && +{isNull objectParent _unit} && +{isNull objectParent _target} && +{(goggles _target) in GVAR(blindfolds)} diff --git a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf index c63c79c02c5..757f4b2f150 100644 --- a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf @@ -1,43 +1,73 @@ #include "script_component.hpp" /* - * Author: mrschick - * Puts a blindfold on a captive unit if the player has a blindfold in their inventory + * Author: mrschick, johnb43 + * Puts a blindfold on a captive unit if the player has a blindfold in their inventory. * * Arguments: - * 0: _unit-Player - * 1: target + * 0: Unit + * 1: Target + * 2: Put on (true) or take off (false) * * Return Value: - * The return value + * None * * Example: - * [player, bob, true] call ACE_captives_fnc_doBlindfoldCaptive; + * [player, cursorTarget, true] call ace_captives_fnc_doBlindfoldCaptive * * Public: No */ -params ["_unit", "_target"]; +params ["_unit", "_target", "_state"]; -// check if _unit has a blindfold in its inventory, abort otherwise. -private _carriedBlindfoldIdx = GVAR(blindfolds) findAny (_unit call EFUNC(common,uniqueItems)); -if (_carriedBlindfoldIdx == -1) exitWith { ERROR("no blindfold"); }; +if (_state) then { // Blindfold target + // Check if _unit has a blindfold in its inventory, abort otherwise. + private _carriedBlindfoldIdx = GVAR(blindfolds) findAny (_unit call EFUNC(common,uniqueItems)); + if (_carriedBlindfoldIdx == -1) exitWith { ERROR("no blindfold"); }; -_unit removeItem (GVAR(blindfolds) select _carriedBlindfoldIdx); + private _blindfold = GVAR(blindfolds) select _carriedBlindfoldIdx; + _unit removeItem _blindfold; -// Remove _target goggles if it is wearing any and move them to _unit or _target inventory (if they can hold them) -private _previousGoggles = goggles _target; -if (_previousGoggles != "") then { - if ([_unit, _previousGoggles] call CBA_fnc_canAddItem) exitWith { + // Remove target's goggles if it is wearing any and move them to unit's or target's inventory (if they can hold them) + private _previousGoggles = goggles _target; + if (_previousGoggles != "") then { + if ([_unit, _previousGoggles] call CBA_fnc_canAddItem) exitWith { + removeGoggles _target; + _unit addItem _previousGoggles; + }; + if ([_target, _previousGoggles] call CBA_fnc_canAddItem) exitWith { + removeGoggles _target; + _target addItem _previousGoggles; + }; + // If the target's goggles can fit in neither unit's nor target's inventory, drop them on the ground + private _weaponHolder = nearestObject [_target, "WeaponHolder"]; + if (isNull _weaponHolder || {_target distance _weaponHolder > 2}) then { + _weaponHolder = createVehicle ["GroundWeaponHolder", [0, 0, 0], [], 0, "NONE"]; + _weaponHolder setPosASL getPosASL _target; + }; + _weaponHolder addItemCargoGlobal [_previousGoggles, 1]; + }; + + _target addGoggles _blindfold; +} else { // Remove blindfold from target + private _blindfold = goggles _target; + + // Abort if already not wearing a blindfold + if !(_blindfold in GVAR(blindfolds)) exitWith { ERROR("has blindfold on"); }; + + if ([_unit, _blindfold] call CBA_fnc_canAddItem) exitWith { removeGoggles _target; - _unit addItem _previousGoggles; + _unit addItem _blindfold; }; - if ([_target, _previousGoggles] call CBA_fnc_canAddItem) exitWith { + if ([_target, _blindfold] call CBA_fnc_canAddItem) exitWith { removeGoggles _target; - _target addItem _previousGoggles; + _target addItem _blindfold; }; - // if the target goggles can fit in neither _unit nor _target inventory, drop them on the ground - [_target, _previousGoggles] call CBA_fnc_dropItem; + // If the target's goggles can fit in neither unit's nor target's inventory, drop them on the ground + private _weaponHolder = nearestObject [_target, "WeaponHolder"]; + if (isNull _weaponHolder || {_target distance _weaponHolder > 2}) then { + _weaponHolder = createVehicle ["GroundWeaponHolder", [0, 0, 0], [], 0, "NONE"]; + _weaponHolder setPosASL getPosASL _target; + }; + _weaponHolder addItemCargoGlobal [_blindfold, 1]; + removeGoggles _target; }; - -_target addGoggles (GVAR(blindfolds) select _carriedBlindfoldIdx); - diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index d4ba21938c2..99b0c38ec16 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -143,6 +143,12 @@ Vendar prisioneiro Benda gli occhi + + Remove blindfold + Augenbinde entfernen + Enlever bandeau sur les yeux + Rimuovi la benda per gli occhi + Cable Tie Kabelbinder From 920672711bd3328f90d3b852ae3eab739fd11249 Mon Sep 17 00:00:00 2001 From: Fabio Schick <58027418+mrschick@users.noreply.github.com> Date: Sat, 9 Sep 2023 19:12:08 +0200 Subject: [PATCH 13/15] Correct Error Message Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --- addons/captives/functions/fnc_doBlindfoldCaptive.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf index 757f4b2f150..e4f4959f5cc 100644 --- a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf @@ -52,7 +52,7 @@ if (_state) then { // Blindfold target private _blindfold = goggles _target; // Abort if already not wearing a blindfold - if !(_blindfold in GVAR(blindfolds)) exitWith { ERROR("has blindfold on"); }; + if !(_blindfold in GVAR(blindfolds)) exitWith { ERROR("no blindfold"); }; if ([_unit, _blindfold] call CBA_fnc_canAddItem) exitWith { removeGoggles _target; From 75094cd5ae5ef2b4361704b799d0698f35fd379f Mon Sep 17 00:00:00 2001 From: mrschick <58027418+mrschick@users.noreply.github.com> Date: Fri, 15 Sep 2023 20:02:49 +0200 Subject: [PATCH 14/15] Optimized duplicate code --- .../functions/fnc_doBlindfoldCaptive.sqf | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf index e4f4959f5cc..bd23336d83f 100644 --- a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf @@ -19,6 +19,9 @@ params ["_unit", "_target", "_state"]; +private _dropGoggles = false; +private _previousGoggles = ""; + if (_state) then { // Blindfold target // Check if _unit has a blindfold in its inventory, abort otherwise. private _carriedBlindfoldIdx = GVAR(blindfolds) findAny (_unit call EFUNC(common,uniqueItems)); @@ -28,7 +31,7 @@ if (_state) then { // Blindfold target _unit removeItem _blindfold; // Remove target's goggles if it is wearing any and move them to unit's or target's inventory (if they can hold them) - private _previousGoggles = goggles _target; + _previousGoggles = goggles _target; if (_previousGoggles != "") then { if ([_unit, _previousGoggles] call CBA_fnc_canAddItem) exitWith { removeGoggles _target; @@ -39,35 +42,36 @@ if (_state) then { // Blindfold target _target addItem _previousGoggles; }; // If the target's goggles can fit in neither unit's nor target's inventory, drop them on the ground - private _weaponHolder = nearestObject [_target, "WeaponHolder"]; - if (isNull _weaponHolder || {_target distance _weaponHolder > 2}) then { - _weaponHolder = createVehicle ["GroundWeaponHolder", [0, 0, 0], [], 0, "NONE"]; - _weaponHolder setPosASL getPosASL _target; - }; - _weaponHolder addItemCargoGlobal [_previousGoggles, 1]; + _dropGoggles = true; }; _target addGoggles _blindfold; } else { // Remove blindfold from target - private _blindfold = goggles _target; + _previousGoggles = goggles _target; // Abort if already not wearing a blindfold - if !(_blindfold in GVAR(blindfolds)) exitWith { ERROR("no blindfold"); }; + if !(_previousGoggles in GVAR(blindfolds)) exitWith { ERROR("no blindfold"); }; - if ([_unit, _blindfold] call CBA_fnc_canAddItem) exitWith { + if ([_unit, _previousGoggles] call CBA_fnc_canAddItem) exitWith { removeGoggles _target; - _unit addItem _blindfold; + _unit addItem _previousGoggles; }; - if ([_target, _blindfold] call CBA_fnc_canAddItem) exitWith { + if ([_target, _previousGoggles] call CBA_fnc_canAddItem) exitWith { removeGoggles _target; - _target addItem _blindfold; + _target addItem _previousGoggles; }; - // If the target's goggles can fit in neither unit's nor target's inventory, drop them on the ground + // If the target's blindfold can fit in neither unit's nor target's inventory, drop it on the ground + _dropGoggles = true; + + removeGoggles _target; +}; + +// Handle for things that need to be dropped to the ground +if (_dropGoggles) then { private _weaponHolder = nearestObject [_target, "WeaponHolder"]; if (isNull _weaponHolder || {_target distance _weaponHolder > 2}) then { _weaponHolder = createVehicle ["GroundWeaponHolder", [0, 0, 0], [], 0, "NONE"]; _weaponHolder setPosASL getPosASL _target; }; - _weaponHolder addItemCargoGlobal [_blindfold, 1]; - removeGoggles _target; + _weaponHolder addItemCargoGlobal [_previousGoggles, 1]; }; From dce0403ba6e78dec8166afbb72635cc45cb51fef Mon Sep 17 00:00:00 2001 From: Fabio Schick <58027418+mrschick@users.noreply.github.com> Date: Sun, 24 Sep 2023 09:51:54 +0200 Subject: [PATCH 15/15] Apply suggestion to fix script_component includes Co-authored-by: PabstMirror --- addons/captives/functions/fnc_canBlindfoldCaptive.sqf | 2 +- addons/captives/functions/fnc_canRemoveBlindfoldCaptive.sqf | 2 +- addons/captives/functions/fnc_doBlindfoldCaptive.sqf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/captives/functions/fnc_canBlindfoldCaptive.sqf b/addons/captives/functions/fnc_canBlindfoldCaptive.sqf index e2ba5ccc819..892ed5b5df2 100644 --- a/addons/captives/functions/fnc_canBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_canBlindfoldCaptive.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: mrschick * Checks if caller can blindfold the captive. diff --git a/addons/captives/functions/fnc_canRemoveBlindfoldCaptive.sqf b/addons/captives/functions/fnc_canRemoveBlindfoldCaptive.sqf index b342994233b..b509197feaf 100644 --- a/addons/captives/functions/fnc_canRemoveBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_canRemoveBlindfoldCaptive.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: johnb43 * Checks if caller can remove blindfold from the captive. diff --git a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf index bd23336d83f..aff7444909a 100644 --- a/addons/captives/functions/fnc_doBlindfoldCaptive.sqf +++ b/addons/captives/functions/fnc_doBlindfoldCaptive.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: mrschick, johnb43 * Puts a blindfold on a captive unit if the player has a blindfold in their inventory.