From a402fc3a2d4a8ed806fafac3eaf830930c892df6 Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:11:26 +0100 Subject: [PATCH 01/17] Update fnc_canApplyHandcuffs.sqf --- addons/captives/functions/fnc_canApplyHandcuffs.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/functions/fnc_canApplyHandcuffs.sqf b/addons/captives/functions/fnc_canApplyHandcuffs.sqf index 72ac745517f..cd816f39990 100644 --- a/addons/captives/functions/fnc_canApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_canApplyHandcuffs.sqf @@ -20,7 +20,7 @@ params ["_unit", "_target"]; //Check sides, Player has cableTie, target is alive and not already handcuffed (GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) && -{"ACE_CableTie" in (_unit call EFUNC(common,uniqueItems))} && +{((_unit call EFUNC(common,uniqueItems)) select {_x isKindOf "ACE_CableTie"}) isNotEqualTo []} && {alive _target} && {!(_target getVariable [QGVAR(isHandcuffed), false])} && { From f38e343518ab92b19d77d59d0f3033c95a883b4d Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:20:04 +0100 Subject: [PATCH 02/17] Update fnc_canApplyHandcuffs.sqf --- addons/captives/functions/fnc_canApplyHandcuffs.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/functions/fnc_canApplyHandcuffs.sqf b/addons/captives/functions/fnc_canApplyHandcuffs.sqf index cd816f39990..0d1d7a9bd94 100644 --- a/addons/captives/functions/fnc_canApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_canApplyHandcuffs.sqf @@ -20,7 +20,7 @@ params ["_unit", "_target"]; //Check sides, Player has cableTie, target is alive and not already handcuffed (GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) && -{((_unit call EFUNC(common,uniqueItems)) select {_x isKindOf "ACE_CableTie"}) isNotEqualTo []} && +{((_unit call EFUNC(common,uniqueItems)) select {_x isKindOf ["ACE_CableTie", configFile >> "CfgWeapons"]}) isNotEqualTo []} && {alive _target} && {!(_target getVariable [QGVAR(isHandcuffed), false])} && { From 545ea280b5ed37c59e9f940207caf3a4aa153062 Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:28:50 +0100 Subject: [PATCH 03/17] Update fnc_doApplyHandcuffs.sqf --- addons/captives/functions/fnc_doApplyHandcuffs.sqf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/captives/functions/fnc_doApplyHandcuffs.sqf b/addons/captives/functions/fnc_doApplyHandcuffs.sqf index ad1ef3f2d69..174dea91e69 100644 --- a/addons/captives/functions/fnc_doApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_doApplyHandcuffs.sqf @@ -23,4 +23,6 @@ playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (get [QGVAR(setHandcuffed), [_target, true, _unit], [_target]] call CBA_fnc_targetEvent; -_unit removeItem "ACE_CableTie"; +private _cuffs = ((_unit call EFUNC(common,uniqueItems)) select {_x isKindOf ["ACE_CableTie", configFile >> "CfgWeapons"]}); + +_unit removeItem (_cuffs#0); From e019bf840af1933a25eb0d99a7ab316a2b050923 Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:56:14 +0100 Subject: [PATCH 04/17] Update XEH_preStart.sqf --- addons/captives/XEH_preStart.sqf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/captives/XEH_preStart.sqf b/addons/captives/XEH_preStart.sqf index 022888575ed..f30a1dfe71f 100644 --- a/addons/captives/XEH_preStart.sqf +++ b/addons/captives/XEH_preStart.sqf @@ -1,3 +1,6 @@ #include "script_component.hpp" #include "XEH_PREP.hpp" + +private _cableTies = (QUOTE(getNumber (_x >> QQGVAR(is_Cable_Tie)) > 0) configClasses (configFile >> "CfgWeapons") apply {configName _x}); +uiNamespace setVariable [QGVAR(cableTies), compileFinal str _cableTies]; From 949ee0ea189a860800d1fd4382c1f7a0b5337ff5 Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:57:12 +0100 Subject: [PATCH 05/17] Update fnc_doApplyHandcuffs.sqf --- addons/captives/functions/fnc_doApplyHandcuffs.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/functions/fnc_doApplyHandcuffs.sqf b/addons/captives/functions/fnc_doApplyHandcuffs.sqf index 174dea91e69..d9c9bdeb1e5 100644 --- a/addons/captives/functions/fnc_doApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_doApplyHandcuffs.sqf @@ -23,6 +23,6 @@ playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (get [QGVAR(setHandcuffed), [_target, true, _unit], [_target]] call CBA_fnc_targetEvent; -private _cuffs = ((_unit call EFUNC(common,uniqueItems)) select {_x isKindOf ["ACE_CableTie", configFile >> "CfgWeapons"]}); +private _cuffs = ((_unit call EFUNC(common,uniqueItems)) arrayIntersect GVAR(cableTies); _unit removeItem (_cuffs#0); From 977a03cd8ccc99418127ac7603210b7fa4a066cf Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 16:58:14 +0100 Subject: [PATCH 06/17] Update fnc_canApplyHandcuffs.sqf --- addons/captives/functions/fnc_canApplyHandcuffs.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/functions/fnc_canApplyHandcuffs.sqf b/addons/captives/functions/fnc_canApplyHandcuffs.sqf index 0d1d7a9bd94..97712c4df52 100644 --- a/addons/captives/functions/fnc_canApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_canApplyHandcuffs.sqf @@ -20,7 +20,7 @@ params ["_unit", "_target"]; //Check sides, Player has cableTie, target is alive and not already handcuffed (GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) && -{((_unit call EFUNC(common,uniqueItems)) select {_x isKindOf ["ACE_CableTie", configFile >> "CfgWeapons"]}) isNotEqualTo []} && +{((_unit call EFUNC(common,uniqueItems)) arrayIntersect GVAR(cableTies)) isNotEqualTo []} && {alive _target} && {!(_target getVariable [QGVAR(isHandcuffed), false])} && { From 66a2e3281cbf608e558b19d2777c49a41d414930 Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 17:00:22 +0100 Subject: [PATCH 07/17] Update XEH_preInit.sqf --- addons/captives/XEH_preInit.sqf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/captives/XEH_preInit.sqf b/addons/captives/XEH_preInit.sqf index 61bd9788a30..132e634ec98 100644 --- a/addons/captives/XEH_preInit.sqf +++ b/addons/captives/XEH_preInit.sqf @@ -8,6 +8,8 @@ PREP_RECOMPILE_END; GVAR(captivityEnabled) = false; +GVAR(cableTies) = call (uiNamespace getVariable QGVAR(cableTies)); + #include "initSettings.sqf" ADDON = true; From 1d67c3f1b62c2d45cbb87e95543c84506655ffa7 Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 17:01:29 +0100 Subject: [PATCH 08/17] Update fnc_doApplyHandcuffs.sqf stray bracket --- addons/captives/functions/fnc_doApplyHandcuffs.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/functions/fnc_doApplyHandcuffs.sqf b/addons/captives/functions/fnc_doApplyHandcuffs.sqf index d9c9bdeb1e5..37f37d71066 100644 --- a/addons/captives/functions/fnc_doApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_doApplyHandcuffs.sqf @@ -23,6 +23,6 @@ playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (get [QGVAR(setHandcuffed), [_target, true, _unit], [_target]] call CBA_fnc_targetEvent; -private _cuffs = ((_unit call EFUNC(common,uniqueItems)) arrayIntersect GVAR(cableTies); +private _cuffs = (_unit call EFUNC(common,uniqueItems)) arrayIntersect GVAR(cableTies); _unit removeItem (_cuffs#0); From e9f1f5c37376530457009c2a5735a0d2a4dc10b2 Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 17:45:43 +0100 Subject: [PATCH 09/17] Update addons/captives/XEH_preStart.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> --- addons/captives/XEH_preStart.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/XEH_preStart.sqf b/addons/captives/XEH_preStart.sqf index f30a1dfe71f..50863187833 100644 --- a/addons/captives/XEH_preStart.sqf +++ b/addons/captives/XEH_preStart.sqf @@ -2,5 +2,5 @@ #include "XEH_PREP.hpp" -private _cableTies = (QUOTE(getNumber (_x >> QQGVAR(is_Cable_Tie)) > 0) configClasses (configFile >> "CfgWeapons") apply {configName _x}); +private _cableTies = (QUOTE(getNumber (_x >> QQGVAR(cableTie)) > 0) configClasses (configFile >> "CfgWeapons") apply {configName _x}); uiNamespace setVariable [QGVAR(cableTies), compileFinal str _cableTies]; From e4915c7d718bdb4a85ac0a25ed947279bde5326b Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 18:08:10 +0100 Subject: [PATCH 10/17] Update CfgWeapons.hpp --- addons/captives/CfgWeapons.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/captives/CfgWeapons.hpp b/addons/captives/CfgWeapons.hpp index 34f7b59e100..b6e132a84bf 100644 --- a/addons/captives/CfgWeapons.hpp +++ b/addons/captives/CfgWeapons.hpp @@ -4,6 +4,7 @@ class CfgWeapons { class ACE_CableTie: ACE_ItemCore { author = ECSTRING(common,ACETeam); + ace_captives_cableTie = 1; displayName = CSTRING(CableTie); descriptionShort = CSTRING(CableTieDescription); model = QPATHTOF(models\ace_cabletie.p3d); From 5aa2fdee806f4f02a3214e7eeee708e6d99c994d Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 18:30:47 +0100 Subject: [PATCH 11/17] Update CfgWeapons.hpp --- addons/captives/CfgWeapons.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/CfgWeapons.hpp b/addons/captives/CfgWeapons.hpp index b6e132a84bf..84b07d97aac 100644 --- a/addons/captives/CfgWeapons.hpp +++ b/addons/captives/CfgWeapons.hpp @@ -4,7 +4,7 @@ class CfgWeapons { class ACE_CableTie: ACE_ItemCore { author = ECSTRING(common,ACETeam); - ace_captives_cableTie = 1; + GVAR(cableTie) = 1; displayName = CSTRING(CableTie); descriptionShort = CSTRING(CableTieDescription); model = QPATHTOF(models\ace_cabletie.p3d); From ca95f0a5a9df720835aeb34c0fe671a0a0c37483 Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 18:31:46 +0100 Subject: [PATCH 12/17] Update fnc_canApplyHandcuffs.sqf --- addons/captives/functions/fnc_canApplyHandcuffs.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/functions/fnc_canApplyHandcuffs.sqf b/addons/captives/functions/fnc_canApplyHandcuffs.sqf index 97712c4df52..444fb4c3e54 100644 --- a/addons/captives/functions/fnc_canApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_canApplyHandcuffs.sqf @@ -20,7 +20,7 @@ params ["_unit", "_target"]; //Check sides, Player has cableTie, target is alive and not already handcuffed (GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) && -{((_unit call EFUNC(common,uniqueItems)) arrayIntersect GVAR(cableTies)) isNotEqualTo []} && +{((_unit call EFUNC(common,uniqueItems)) findAny GVAR(cableTies)) != -1} && {alive _target} && {!(_target getVariable [QGVAR(isHandcuffed), false])} && { From cf8af73b58090485b414e42b4dbe365d5bc75d5c Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 21:24:34 +0100 Subject: [PATCH 13/17] Change to restraints Update XEH_preInit.sqf --- addons/captives/XEH_preInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/XEH_preInit.sqf b/addons/captives/XEH_preInit.sqf index 132e634ec98..8ec915e4f2d 100644 --- a/addons/captives/XEH_preInit.sqf +++ b/addons/captives/XEH_preInit.sqf @@ -8,7 +8,7 @@ PREP_RECOMPILE_END; GVAR(captivityEnabled) = false; -GVAR(cableTies) = call (uiNamespace getVariable QGVAR(cableTies)); +GVAR(restraints) = call (uiNamespace getVariable QGVAR(restraints)); #include "initSettings.sqf" From 66e614b5bb82d64c453a1696c6948e4bba32bbb6 Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 21:24:53 +0100 Subject: [PATCH 14/17] Update XEH_preStart.sqf --- addons/captives/XEH_preStart.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/captives/XEH_preStart.sqf b/addons/captives/XEH_preStart.sqf index 50863187833..75cbb90ef98 100644 --- a/addons/captives/XEH_preStart.sqf +++ b/addons/captives/XEH_preStart.sqf @@ -2,5 +2,5 @@ #include "XEH_PREP.hpp" -private _cableTies = (QUOTE(getNumber (_x >> QQGVAR(cableTie)) > 0) configClasses (configFile >> "CfgWeapons") apply {configName _x}); -uiNamespace setVariable [QGVAR(cableTies), compileFinal str _cableTies]; +private _restraints = (QUOTE(getNumber (_x >> QQGVAR(restraint)) > 0) configClasses (configFile >> "CfgWeapons") apply {configName _x}); +uiNamespace setVariable [QGVAR(restraints), compileFinal str _restraints]; From de0cde6decb0eb01cb265b326bc44277e46b5d0a Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 21:25:08 +0100 Subject: [PATCH 15/17] Update fnc_canApplyHandcuffs.sqf --- addons/captives/functions/fnc_canApplyHandcuffs.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/functions/fnc_canApplyHandcuffs.sqf b/addons/captives/functions/fnc_canApplyHandcuffs.sqf index 444fb4c3e54..5c97606f2e0 100644 --- a/addons/captives/functions/fnc_canApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_canApplyHandcuffs.sqf @@ -20,7 +20,7 @@ params ["_unit", "_target"]; //Check sides, Player has cableTie, target is alive and not already handcuffed (GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) && -{((_unit call EFUNC(common,uniqueItems)) findAny GVAR(cableTies)) != -1} && +{((_unit call EFUNC(common,uniqueItems)) findAny GVAR(restraints)) != -1} && {alive _target} && {!(_target getVariable [QGVAR(isHandcuffed), false])} && { From 2ebc43ad6264f2de685e782a4fb7a9376fc833a9 Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 21:25:19 +0100 Subject: [PATCH 16/17] Update fnc_doApplyHandcuffs.sqf --- addons/captives/functions/fnc_doApplyHandcuffs.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/functions/fnc_doApplyHandcuffs.sqf b/addons/captives/functions/fnc_doApplyHandcuffs.sqf index 37f37d71066..76ae4c1b32b 100644 --- a/addons/captives/functions/fnc_doApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_doApplyHandcuffs.sqf @@ -23,6 +23,6 @@ playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (get [QGVAR(setHandcuffed), [_target, true, _unit], [_target]] call CBA_fnc_targetEvent; -private _cuffs = (_unit call EFUNC(common,uniqueItems)) arrayIntersect GVAR(cableTies); +private _cuffs = (_unit call EFUNC(common,uniqueItems)) arrayIntersect GVAR(restraints); _unit removeItem (_cuffs#0); From 98253d6ed3ba618466e3b7f43c08505fc7460e7c Mon Sep 17 00:00:00 2001 From: Will/KJW <100206101+SpicyBagpipes@users.noreply.github.com> Date: Tue, 29 Aug 2023 21:25:38 +0100 Subject: [PATCH 17/17] Update CfgWeapons.hpp --- addons/captives/CfgWeapons.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/captives/CfgWeapons.hpp b/addons/captives/CfgWeapons.hpp index 84b07d97aac..23c7d0c2ce5 100644 --- a/addons/captives/CfgWeapons.hpp +++ b/addons/captives/CfgWeapons.hpp @@ -4,7 +4,7 @@ class CfgWeapons { class ACE_CableTie: ACE_ItemCore { author = ECSTRING(common,ACETeam); - GVAR(cableTie) = 1; + GVAR(restraint) = 1; displayName = CSTRING(CableTie); descriptionShort = CSTRING(CableTieDescription); model = QPATHTOF(models\ace_cabletie.p3d);