mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added captive hotkey (#5529)
* added captive hotkey * Removed toggling + distance check * adjusts player -> ace_player interact check stringtable adjust * Update XEH_postInit.sqf * Update XEH_postInit.sqf * Removed dots * Removed comment * Use targetEvent
This commit is contained in:
parent
4a6b06dfeb
commit
3d340bb0ef
@ -1,4 +1,5 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
#include "\a3\editor_f\Data\Scripts\dikCodes.h"
|
||||||
|
|
||||||
["ace_settingsInitialized", {
|
["ace_settingsInitialized", {
|
||||||
// Hold on a little bit longer to ensure anims will work
|
// Hold on a little bit longer to ensure anims will work
|
||||||
@ -35,6 +36,21 @@ if (isServer) then {
|
|||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
|
["ACE3 Common", QGVAR(captives), [(localize LSTRING(SetCaptive)), (localize LSTRING(KeyComb_description))],
|
||||||
|
{
|
||||||
|
private _target = cursorObject;
|
||||||
|
if !([ACE_player, _target, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
|
if !(_target isKindOf "CAManBase" || {(_target distance ACE_player) > getNumber (configFile >> "CfgVehicles" >> "CAManBase" >> "ACE_Actions" >> "ACE_ApplyHandcuffs" >> "distance")}) exitWith {false};
|
||||||
|
|
||||||
|
if ([ACE_player, _target] call FUNC(canApplyHandcuffs)) exitWith {
|
||||||
|
[QGVAR(setHandcuffed), [_target, true], _target] call CBA_fnc_targetEvent;
|
||||||
|
true
|
||||||
|
};
|
||||||
|
false
|
||||||
|
},
|
||||||
|
{false},
|
||||||
|
[DIK_F1, [true, false, false]], true] call CBA_fnc_addKeybind; // Shift + F1
|
||||||
|
|
||||||
["isNotEscorting", {!(GETVAR(_this select 0,GVAR(isEscorting),false))}] call EFUNC(common,addCanInteractWithCondition);
|
["isNotEscorting", {!(GETVAR(_this select 0,GVAR(isEscorting),false))}] call EFUNC(common,addCanInteractWithCondition);
|
||||||
["isNotHandcuffed", {!(GETVAR(_this select 0,GVAR(isHandcuffed),false))}] call EFUNC(common,addCanInteractWithCondition);
|
["isNotHandcuffed", {!(GETVAR(_this select 0,GVAR(isHandcuffed),false))}] call EFUNC(common,addCanInteractWithCondition);
|
||||||
["isNotSurrendering", {!(GETVAR(_this select 0,GVAR(isSurrendering),false))}] call EFUNC(common,addCanInteractWithCondition);
|
["isNotSurrendering", {!(GETVAR(_this select 0,GVAR(isSurrendering),false))}] call EFUNC(common,addCanInteractWithCondition);
|
||||||
|
@ -427,6 +427,10 @@
|
|||||||
<Chinese>投降或無武器狀態</Chinese>
|
<Chinese>投降或無武器狀態</Chinese>
|
||||||
<Chinesesimp>投降或无武器状态</Chinesesimp>
|
<Chinesesimp>投降或无武器状态</Chinesesimp>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Captives_KeyComb_Description">
|
||||||
|
<English>Sets the unit under the cursor captive.</English>
|
||||||
|
<German>Nimmt die Einheit vor dem Cursor fest.</German>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrenderAi_name">
|
<Key ID="STR_ACE_Captives_ModuleSettings_requireSurrenderAi_name">
|
||||||
<English>Require AI surrendering</English>
|
<English>Require AI surrendering</English>
|
||||||
<German>Benötigt AI Kapitulation</German>
|
<German>Benötigt AI Kapitulation</German>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user