mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
11bc2695f5
* Fixed typo * Added "Blindfold Captive" interaction * Changed comment readability as requested * 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. * Removed extra new line * Make "validBlindfolds" a CBA Setting * 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. * Removed non-verified translations * Use GVAR(blindfold) config entry * Remove unused "_state" parameter * Check if captive isn't already blindfolded before blindfolding Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com> * Added "remove blindfold" interaction Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com> * Correct Error Message Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Optimized duplicate code * Apply suggestion to fix script_component includes Co-authored-by: PabstMirror <pabstmirror@gmail.com> --------- Co-authored-by: PabstMirror <pabstmirror@gmail.com> Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
28 lines
620 B
Plaintext
28 lines
620 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: PabstMirror
|
|
* Tests if can escort target (attach)
|
|
*
|
|
* Arguments:
|
|
* 0: Caller (player) <OBJECT>
|
|
* 1: Target <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Can escort <BOOL>
|
|
*
|
|
* Example:
|
|
* [player, bob] call ACE_captives_fnc_canEscortCaptive
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_unit", "_target"];
|
|
// Alive, handcuffed, not being escorted, and not unconscious
|
|
|
|
(_target getVariable [QGVAR(isHandcuffed), false]) &&
|
|
{isNull (attachedTo _target)} &&
|
|
{alive _target} &&
|
|
{!(_target getVariable ["ACE_isUnconscious", false])} &&
|
|
{(vehicle _unit) == _unit} &&
|
|
{(vehicle _target) == _target}
|