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
664 B
Plaintext
28 lines
664 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: johnb43
|
|
* Checks if caller can remove blindfold from the captive.
|
|
*
|
|
* Arguments:
|
|
* 0: Caller (player) <OBJECT>
|
|
* 1: Target <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Can remove blindfold <BOOL>
|
|
*
|
|
* 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)}
|